|
[Sponsors] |
Error: Udf library not compiled on the current platform |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 21, 2020, 11:01 |
Error: Udf library not compiled on the current platform
|
#1 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Hi everybody,
I now that this is a many-times faced problem, but despite i read a lot of suggestions in this forum, i still have this error. I'm not a master in C language and in compiling. I use ansys 18.1 and VS2015. I have to use a UDF compiled function in my simulation problem in order to apply a particular boundary condition. I solved the "nmake" problem by running fluent into the command prompt of VS2015. I go to user-defined-functions>compiled, i load my .c file of my UDF function and i press button "build" near the library name and this message appears: "Copied C:\Ansys\Projects\TESI\Dati_salvati\UDF_PROCEDURE/C:\Ansys\Projects\TESI\Dati_salvati\UDF_PROCEDURE\ wallheatflux.c to libudf\src udf_names.c and user_nt.udf files in 2ddp are upto date. (system "copy "C:\PROGRA~1\ANSYSI~1\v181\fluent"\fluent18.1.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp\makefile" ") 1 file copiati. (chdir "libudf")(chdir "win64\2ddp")# Generating ud_io1.h Done." Then i press the button "load" and the error is the following: "Error: The UDF library you are trying to load (libudf) is not compiled for 2ddp on the current platform (win64).\n\n Impossibile trovare il file specificato. \n\nC:\Ansys\Projects\TESI\Dati_salvati\UDF_PROCED URE\libudf\win64\2ddp\libudf.dll Error Object: #f " I put the case and the .c file in the same folder as some tutorials suggest, but the error is the same. How can i solve this? Thank you in advance! |
|
April 21, 2020, 11:27 |
Working Directory
|
#2 |
Senior Member
|
Use the command
pwd in Fluent user interface to check if the current working directory is correct. Since you started from VS Prompt, it is possible that Fluent started from a different directory, hence, is unable to load the library. If it shows the directory that is not same as the location where the library is located, change the directory using command sync-chdir <directory name where library is located> And then try to load the library.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 12:34 |
|
#3 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Thanks for the reply.
The same error is occurring even if i did what you suggest me. I note that i have no "libudf.dll" file in the folder "libudf" that i generated. it's for this reason that it cannot find it. How can i get this .dll file? Is this a specific library which i don't have? |
|
April 21, 2020, 12:38 |
.dll
|
#4 |
Senior Member
|
When Fluent compiles a library, it generates .dll file. If that is not there, then Fluent did not compile it. The reason for non-compilation should be the log that Fluent creates when you click on Build. Remove the library folder and re-Build. Then check the output within Fluent's interface. Do not load.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 12:55 |
|
#5 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Well i removed the library folder and i re-build. It generates a folder "libudf" with inside two folders. The first one is the UDF function i add initially, while the other one is called "2ddp" and inside i have: log, makefile, ud_io1.h, user_nt.udf
No library is created. Is there something important that i forgot? Thank you for your patience |
|
April 21, 2020, 12:57 |
Log
|
#6 |
Senior Member
|
Could you copy the log file or Fluent's output in its window here?
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 13:05 |
|
#7 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Ok, i didn't know that "log" is kind of an information about the error. Inside the log there is:
""cl" it is not recognized as an internal or external command, an executable program or batch file. NMAKE : U1077: 'cl' : return code '0x1' Stop." Which means that i did not solve the nmake problem? |
|
April 21, 2020, 13:07 |
cl
|
#8 |
Senior Member
|
cl is actually linker. The problem is not what you did but how Windows operates. You need to start VS Prompt via Run As Administrator and then launch Fluent to compile the UDF. Then, it will work.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 13:15 |
|
#9 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Even if i run as administrator the problem is the same.
I checked the log and is exactly the same as before. |
|
April 21, 2020, 13:17 |
Log
|
#10 |
Senior Member
|
Could you paste or attach the log file here? It appears that VS is not installed with Administrator privileges.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 13:36 |
|
#11 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
I can only upload it as a txt file because its normal extension is "invalid file" for the forum.
(the log is in italian) Thank you a lot |
|
April 21, 2020, 14:14 |
Installation
|
#12 |
Senior Member
|
Yes, it is pointing towards installation issue in VS. Look at the following
https://www.ibm.com/support/pages/er...turn-code-0x80 While installing VS, you need to ensure that setup is started as Run As Administrator.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 21, 2020, 15:10 |
|
#13 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Is there a way to change the path without reinstalling the Visual Studio programme?
If not, i just have to run the .exe installation file as administrator? Thank you a lot |
|
April 21, 2020, 16:02 |
|
#14 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Running the .exe as an admin won't help if you're missing paths. Off the top of my head I don't know which ones, but it is an installation problem. Either you change the paths in environmental variables or you re-install it so that the installer sets the right paths.
|
|
April 21, 2020, 16:23 |
Path
|
#15 |
Senior Member
|
This could or could not be about the path. Most likely, its about incapability to be able to link. If it is really about path, then usually the path for cl.exe is
C:\Program Files (x86)\Microsoft Visual Studio xx.0\VC\bin But this is most likely already set. If not, set it and try again. VS also provides multiple command prompts. Prefer to use Developer Command Prompt.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 22, 2020, 07:43 |
|
#16 |
Member
Francesco
Join Date: Apr 2020
Posts: 56
Rep Power: 6 |
Hi,
i solved the problem of the cl.exe. it wasn't on the VS2015 folders, so i noticed that the C++ language for VS2015 was not installed. I installed it and now the error is about syntax, which i'll try to solve by myself. Thank you vinerm for the help, it has been very helpful |
|
|
|
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 |
Adding compiled turbulence model to the library - OpenFOAM 5.0 | netto005 | OpenFOAM Programming & Development | 0 | April 18, 2018 11:53 |
UDF library load error | smgeorge531 | Fluent UDF and Scheme Programming | 6 | August 26, 2013 05:06 |
What is the difference between current time step and current time | djing | FLUENT | 4 | May 1, 2012 17:18 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |