CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   The UDF library you are trying to load (libudf) is not compiled for 3d on the current (https://www.cfd-online.com/Forums/fluent-udf/152332-udf-library-you-trying-load-libudf-not-compiled-3d-current.html)

vigii April 29, 2015 02:50

The UDF library you are trying to load (libudf) is not compiled for 3d on the current
 
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.

pakk April 29, 2015 05:12

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.

vigii April 29, 2015 05:18

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


pakk April 29, 2015 05:23

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.

vigii April 29, 2015 06:03

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.

pakk April 29, 2015 06:06

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? ;)

vigii April 29, 2015 08:18

I can share my screen or provide remote access to fix this issue. Kindly please help me in fixing this issue.

pakk April 29, 2015 08:24

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?

vigii April 29, 2015 12:53

1 Attachment(s)
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.

pakk April 30, 2015 02:50

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?

vigii April 30, 2015 05:58

If you could help me, Please help or give way to those who could resolve my issue.

pakk April 30, 2015 06:42

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 May 1, 2015 08:07

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?

vigii May 2, 2015 09:09

I found the error is because of c++ C90 compiler incompatibility.

vigii May 2, 2015 09:13

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


shivakumar May 3, 2015 13:54

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

vigii May 4, 2015 08:24

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

shivakumar May 4, 2015 09:10

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

yash.aesi June 8, 2016 01:21

UDF comilation error on Linux system
 
1 Attachment(s)
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.

pakk June 8, 2016 02:57

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.

yash.aesi June 8, 2016 04:26

1 Attachment(s)
Thanks for quick reply ....I am sending you the code with line number for the better understanding.

Thanks ,
Sonu.

pakk June 8, 2016 05:59

It looks like my guess was correct. You used the wrong style of commenting in line 67.

yash.aesi June 8, 2016 06:19

ok, I will change those lines and will compile again.

Thanks Again.

kywong5 March 2, 2017 10:36

Hi Pakk, I'm not able to compile UDF into fluent. Could I know where is the problem?

Copied c:\users\0wner\desktop ry ken/C:\Users\0wner\Desktop ry ken\ken.c to libudf\src
(system "copy "C:\PROGRA~1\ANSYSI~1\v140\fluent"\fluent14.0.0\sr c\makefile_nt.udf "libudf\win64\3d\makefile" ")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3d")()
# Generating ud_io1.h

Done.

Opening library "c:\users\0wner\desktop\try ken\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the curent platform (win64).

The system cannot find the file specified.

c:\users\0wner\desktop ry ken\libudf\win64\3d\libudf.dll
Error Object: #f

pakk March 2, 2017 10:53

The problem is that you foldername has a space in it. Fluent has a problem with folders with a space in the name. Copy everything to a different folder and work from there.

kywong5 March 2, 2017 11:11

Quote:

Originally Posted by pakk (Post 639209)
The problem is that you foldername has a space in it. Fluent has a problem with folders with a space in the name. Copy everything to a different folder and work from there.

Thank you, Pakk. I just tried it without a space in the folder name. I get the error as below:

Copied C:\Users\0wner\Desktop\ken/C:\Users\0wner\Desktop\ken\ken.c to libudf\src
(system "copy "C:\PROGRA~1\ANSYSI~1\v140\fluent"\fluent14.0.0\sr c\makefile_nt.udf "libudf\win64\3d\makefile" ")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3d")()
# Generating ud_io1.h

Done.

Opening library "C:\Users\0wner\Desktop\ken\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the curent platform (win64).

The system cannot find the file specified.

C:\Users\0wner\Desktop\ken\libudf\win64\3d\libudf. dll
Error Object: #f

elaf_2003 November 28, 2017 04:54

udf compiled
 
Hi
I would like to compiled udf in Fluent 17.2 using Win10, 64.
I have got this error
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).\n\nThe system cannot find the file specified.
\n\nC:\Users\hp\Desktop\udf1\libudf\win64\3d\libud f.dll
Error Object: #f
I have downloaded visual studio 2013 , with commend prompt tool vs 2012

can any body help me with this issue please
Regards,
Ahmed

AlexanderZ November 28, 2017 05:02

Quote:

Originally Posted by elaf_2003 (Post 673137)
Hi
I would like to compiled udf in Fluent 17.2 using Win10, 64.
I have got this error
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).\n\nThe system cannot find the file specified.
\n\nC:\Users\hp\Desktop\udf1\libudf\win64\3d\libud f.dll
Error Object: #f
I have downloaded visual studio 2013 , with commend prompt tool vs 2012

can any body help me with this issue please
Regards,
Ahmed

try to press Functions --> compiled -> choose source file

best regards

pakk November 28, 2017 05:14

Quote:

Originally Posted by elaf_2003 (Post 673137)
Hi
I would like to compiled udf in Fluent 17.2 using Win10, 64.
I have got this error
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).\n\nThe system cannot find the file specified.
\n\nC:\Users\hp\Desktop\udf1\libudf\win64\3d\libud f.dll
Error Object: #f
I have downloaded visual studio 2013 , with commend prompt tool vs 2012

can any body help me with this issue please
Regards,
Ahmed

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. 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.

elaf_2003 November 28, 2017 05:16

Hi
Thanks a lot mate
Yes indeed I have done this, therefore I have got this error
I could not find the ali udf.dll file in the folder that generated after compiler

elaf_2003 November 28, 2017 15:04

udf compiled
 
Hi Pakk
Firstly, thanks for response.
When I Build Library I have got this message
(Copied C:\Users\hp\Desktop\udf1/C:\Users\hp\Desktop\udf1\fixtempvisc_304.c to libudf\src
Creating user_nt.udf file for 3d ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v172\fluent"\fluent17.2.0\sr c\udf\makefile_nt.udf "libudf\win64\3d\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\3d")# Generating ud_io1.h
fixtempvisc_304.c
C:\PROGRA~1\ANSYSI~1\v172\fluent\fluent17.2.0\tgri d\src\hash.h(16) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory)

However, I have used this code before when I was using Fluent 14.5, also when I used interpret in stead of compiled the code went wrong.
It is important for me to use compile method because I have 4 udf in my case and as you know that impossible to run them by using interpret method.
If you have got this problem before and sort it out please guide me.
Kind regard,
Ahmed.

pakk November 29, 2017 06:12

The compiler complains that it can not find the file "basetsd.h".
This file belongs to 'Microsoft Windows SDK'.

So the Fluent compiler does not know where to find files from SDK. You made an error in installing this, or using this.

I am no expert in SDK, so I can not help you with that, but I can guarantee you that the current problem that you see has nothing to do with the code inside your udf.

(By the way: if you put the four UDFs in one file, you might be able to interpret them all four at the same time. But in general, compiling is better, so it is useful to solve this problem.)

elaf_2003 November 29, 2017 09:17

Hi Parkk
Thanks for this helpful information
I will re installing the vs 2013
I will let you know if it will be sorted
Regards

elaf_2003 December 3, 2017 00:52

udf compiled
 
Hi
I would like to inform you that my problem has been solved, I went through your suggestion. Just re instill VS 2012, it was missing program which is windows kit develop.
Thanks guys for helpful advice.
Best wishes to all.

enayath December 20, 2017 17:18

https://www.youtube.com/watch?v=xt2hnE9_LdM

enayath December 20, 2017 17:19

https://www.youtube.com/watch?v=xt2hnE9_LdM

cobra666 October 3, 2019 02:49

Quote:

Originally Posted by pakk (Post 544243)
The error message tells you what you did, and what went wrong.



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.

Please tell me, a mistake of a similar nature, but I can not figure it out myself




Copied C:\Users\Admin\Desktop\4554\cobra_files\dp0\FLU\Fl uent/C:\Users\Admin\Desktop\4554\oil-den.c to libudf\src
Copied C:\Users\Admin\Desktop\4554\cobra_files\dp0\FLU\Fl uent/C:\Users\Admin\Desktop\4554\vane.c to libudf\src
Creating user_nt.udf file for 3ddp ...
(system "copy "C:\Games\ANSYSI~1\v171\fluent"\fluent17.1.0\src\u df\makefile_nt.udf "libudf\win64\3ddp\makefile" ")
‘ª®¯¨à®¢ *® ä ©«®¢: 1.
(chdir "libudf")(chdir "win64\3ddp")"nmake" *¥ ï¥âáï ¢*ãâà¥**¥© ¨«¨ ¢*¥è*¥©
ª®¬ *¤®©, ¨á¯®«*塞®© ¯à®£à ¬¬®© ¨«¨ ¯ ª¥â*ë¬ ä ©«®¬.

Done.

Opening library "C:\Users\Admin\Desktop\4554\cobra_files\dp0\FLU\F luent\C:\Users\Admin\Desktop\4554\cobra_files\dp0\ FLU\Fluent\libudf"...RPC RCX_SC_SET_ERR_MSG failed: RPC: Can't encode arguments


Error: The UDF library you are trying to load (C:\Users\Admin\Desktop\4554\cobra_files\dp0\FLU\F luent\libudf) is not compiled for 3ddp on the current platform (win64).

Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë.

C:\Users\Admin\Desktop\4554\cobra_files\dp0\FLU\Fl uent\C:\Users\Admin\Desktop\4554\cobra_files\dp0\F LU\Fluent\libudf\win64\3ddp\libudf.dll

Error: EOF in string read
Error Object: ()

pakk October 3, 2019 06:16

I'm sorry, I can't really help here. You are using a language with non-ascii characters, so the error messages show up like strange signs, which I can't read.

Based on the length, I would guess that they say that Fluent cannot find the compiler, so your compiler setup is wrong, but that is not much more than a guess.

(Please don't see this as an insult to your language. If anybody did something wrong, it is the programmer who made non-ascii codes show up in these strange signs.)


All times are GMT -4. The time now is 15:49.