CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

The UDF library you are trying to load (libudf) is not compiled for 3d on the current

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2015, 03:50
Default The UDF library you are trying to load (libudf) is not compiled for 3d on the current
  #1
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
Hi All,

I'm trying to do a dynamic meshing using custom UDF. I have installed microsoft visual c++ 2010 express & Microsoft SDK v7.0 and .NET 3.5.

I tried opening the Fluent V14.5 from SDK CMD Shell and compile my UDF. But Whenever, I try compile my UDF I get an error as follows

"The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64)."

It would be really helpful if someone assist me in resolving this issue.

Please let me know if you require additional details to resolve this error.

Regards,
Vignesh V.
vigii is offline   Reply With Quote

Old   April 29, 2015, 06:12
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
The error message tells you what you did, and what went wrong.

Quote:
"The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64)."[emphasis mine]
First keyword: load. This is the error message you get when you try to load the udf. In your post you say it is the error message when you try to compile, but that is simply not true.

Second keyword: not compiled. Your code is not compiled. The obvious solution for this: compile your code.
If you have problems compiling your code, show the message you get when you try to compile your code. Not the error message you get when you try to load your code.
ronithstanly likes this.
pakk is offline   Reply With Quote

Old   April 29, 2015, 06:18
Default
  #3
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
Please find the error displayed as below

HTML Code:
Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor.c to libudf\src
Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor_vane_smoothing.c to libudf\src
udf_names.c file in 3ddp is upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v145\fluent"\fluent14.5.0\src\makefile_nt.udf "libudf\win64\3ddp\makefile" ")
        1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
gerotor.c
..\..\src\gerotor.c(540) : error C2143: syntax error : missing ';' before 'type'
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
gerotor_vane_smoothing.c
Generating Code...

Done.

Opening library "C:\Users\vignesh.v\Desktop\gerotor_test\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).

The system cannot find the file specified.

C:\Users\vignesh.v\Desktop\gerotor_test\libudf\win64\3ddp\libudf.dll
Error Object: #f
vigii is offline   Reply With Quote

Old   April 29, 2015, 06:23
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Look at the first error you see:
Quote:
..\..\src\gerotor.c(540) : error C2143: syntax error : missing ';' before 'type'
I'll go through it step by step.

"..\..\src\gerotor.c": This means that the error is in this file. This is probably the file you are working on.

"(540)": this is the line number in which the error is.

"error C2143: syntax error": this is the type of error. An error in the syntax.

"missing ';' before 'type'": you forgot to type a ';', and probably it should go somewhere before 'type'. If 'type' is the first word on that line, you probably forgot a ';' on the line before.
pakk is offline   Reply With Quote

Old   April 29, 2015, 07:03
Default
  #5
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
Hi Pakk,

But the same file is compiling in Linux version of Ansys.

Can you help me in compiling in Windows version of Ansys.

Regards,
Vignesh V.
vigii is offline   Reply With Quote

Old   April 29, 2015, 07:06
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I am doing that. I tell you where the mistake is, and what you should change. What more do you want? Do you expect me to hack into your computer and change the code for you?
pakk is offline   Reply With Quote

Old   April 29, 2015, 09:18
Default
  #7
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
I can share my screen or provide remote access to fix this issue. Kindly please help me in fixing this issue.
vigii is offline   Reply With Quote

Old   April 29, 2015, 09:24
Default
  #8
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I have already told you what to do.
If you already did that: what was the outcome?
If you did not do that: why did you not do that?
pakk is offline   Reply With Quote

Old   April 29, 2015, 13:53
Default
  #9
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
I have tried the same file in linux which is working good. My question is why its not compiling in Windows. The errors which are listed are meaningless and If you can really help me I would appreciate it. Please find the attached file for your reference.
Attached Files
File Type: c gerotor.c (20.5 KB, 120 views)
vigii is offline   Reply With Quote

Old   April 30, 2015, 03:50
Default
  #10
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
For you the errors may be meaningless, but that is why I explained you what the error is.

Did you do anything with that information? Nobody expects you to suddenly become a programming expert, but when I show you in which file the error is, and in which line number, I am sure you could have looked up which line that is. Did you even do that?
pakk is offline   Reply With Quote

Old   April 30, 2015, 06:58
Default
  #11
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
If you could help me, Please help or give way to those who could resolve my issue.
vigii is offline   Reply With Quote

Old   April 30, 2015, 07:42
Default
  #12
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you don't want to be helped, then don't come here. If you want to be helped, take the advice you get.

It are three simple steps:
1. Look at the code where the error is.
2. Understand the error.
3. Fix the error.

I can help you in all three steps. But you have to do something. I instructed you several times to do the first step, but for some reason you just don't do that.

Look at line 540 of the file 'gerotor.c'. I can't give instructions in a simpler way than this. You can't fix code without looking at the code, so you will have to look at the code. Do that!
pakk is offline   Reply With Quote

Old   May 1, 2015, 09:07
Default
  #13
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
I notice that you don't follow my advice. I also see that you keep saying that you would appreciate it if I could help you, this gives the impression that for you it does not feel as if I am helping you.

On the other hand, I feel as if I am doing everything I can do to help you. I explained you what you first error message meant, I explained step by step what your second error message meant, I translated the error message into plain English, and I told you three times that the key to your solution would be to look up line 540. I really don't know what more you can reasonably expect from anybody to help you.

Can you tell me what I did to give you the feeling that I am not helping?
PranjalNewton and Baden like this.
pakk is offline   Reply With Quote

Old   May 2, 2015, 10:09
Default
  #14
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
I found the error is because of c++ C90 compiler incompatibility.
vigii is offline   Reply With Quote

Old   May 2, 2015, 10:13
Default
  #15
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
I have fixed the error by changing the compiler. Now the file is compiling and when I load these compiled UDF I get this error as below

HTML Code:
Error: 
c:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0\win64\3ddp\fl1450s.exe received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f
vigii is offline   Reply With Quote

Old   May 3, 2015, 14:54
Default
  #16
Senior Member
 
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13
shivakumar is on a distinguished road
Track your udf.

Use Message("line 1 is correct"\n); after each and every line. This is easiest method to get rid of from the access violation error. Hope this helps

shiv
shivakumar is offline   Reply With Quote

Old   May 4, 2015, 09:24
Default
  #17
Member
 
Vignesh KPV
Join Date: Oct 2011
Location: Bangalore
Posts: 83
Rep Power: 15
vigii is on a distinguished road
Send a message via Skype™ to vigii
Hi Shivakumar,

My UDF is compiling and hope there is no error in compilation. But when I load UDF its is throwing out the error as above. Can you please tell me why do I get this error.

Regards,
Vignesh
vigii is offline   Reply With Quote

Old   May 4, 2015, 10:10
Default
  #18
Senior Member
 
Join Date: Mar 2013
Location: B'lr
Posts: 130
Rep Power: 13
shivakumar is on a distinguished road
I had the same problem earlier.

I can give an example

Code:
----
----
---
real origin[2], theta_inner, theta_outer, dtheta_inner, dtheta_outer;
Message(" above line 1 is correct\n");

    dtheta_inner=RPM*M_PI/30*dtime;
Message(" above line 2 is correct\n");

    dtheta_outer=Num_Gears_Inner/(Num_Gears_Inner+1.0)*dtheta_inner;
Message(" above line 3 is correct\n");

    theta_inner=RPM*M_PI/30*time+RP_Get_Real("dynamesh/in-cyn/crank-start-angle")*M_PI/180;
Message(" above line 4 is correct\n");

    theta_outer=Num_Ge
---
----
In this manner you should debug your code using message statement. You code has 802 lines so I recommend you to use the Message properly where you feel there is some difficulty.


shiv
shivakumar is offline   Reply With Quote

Old   June 8, 2016, 02:21
Default UDF comilation error on Linux system
  #19
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 13
yash.aesi is on a distinguished road
Hello ,

when I am compiling one UDF on window its working fine but the same case when I am trying on the Linux system that time its not getting compiled and giving the below shown error.

Thanks in advance.

Regards,
Sonu.
Attached Images
File Type: jpg error snap.JPG (168.5 KB, 87 views)
yash.aesi is offline   Reply With Quote

Old   June 8, 2016, 03:57
Default
  #20
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
It is very difficult to find the mistake in your code without seeing your code.

My best guess is that you wrote a comment on line 66 or line 67 like this:
Code:
\\this is a comment
This is not the right way to write comments in c (although the windows-compiler accepts it), and the linux-compiler complains about it.
The correct way to write comments:
Code:
\* this is a comment *\
If you want me to give a better guess, you really have to show your code, at least the part around line 67.
pakk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Current density visualisation (PEM fuel cell add-on module) pchoopanya FLUENT 10 August 21, 2023 15:33
decomposePar is missing a library whk1992 OpenFOAM Pre-Processing 8 March 7, 2015 08:53
cannot load UDF library jayilosa Fluent UDF and Scheme Programming 3 November 16, 2011 13:44
Error in opening UDF library anon_d Fluent UDF and Scheme Programming 4 May 21, 2011 03:10
error open udf library adjie_mesin06 Main CFD Forum 1 October 27, 2010 02:49


All times are GMT -4. The time now is 03:22.