Fluids

Fluids

UDF Error

    • soloviev
      Subscriber

      Hello,


      I am trying to load a previously run model on a new workstation. I copied the case and data file, libudf folder, and the udf file itself to my new working folder. I loaded the case and date files and get the following error: 


      The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). The system cannot find the file specified. (file name is libudf.dll)


       


      When I do this on other workstations I have no problem. The compiler loaded on these is visual studio. I also attempted to unload and reload the udf and re-build the folder, which did not work. It gave the same error. 


       


      In the directory, the libudf folder is created, but the file which Fluent cannot find is not created when the library is built.


       


      What could be causing this?


       


      Thank you,


      Alex


       


       

    • DrAmine
      Ansys Employee

      Actually it has to work on different windows workstations running different OS. But sometimes if the UDF libraray is linked to some  different DLL tis would fail. It would also fail if you are using different Fluent versions.


      Safer is to recompile.

    • soloviev
      Subscriber

      Thank you for the quick response.


       


      I did try to recompile by unload and reload the udf and re-build the folder, which did not work. It gave the same error. 


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      Either there is lock here. Please unload the library, eliminate any hooks save case in other directory . Close Fluent open Fluent recompile UDF and load it then read case and hook it.
    • soloviev
      Subscriber

      Good afternoon,


      I just attempted the solution you suggested and unfortunately received the same error again. 


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      Are you able to compile anything on this machine?
    • soloviev
      Subscriber

      With regards to Fluent, I have tried other UDFs and were not able to compile those either. 


       


      Thanks,


      Alex

    • soloviev
      Subscriber

      Additionally, I just attempted to set up the model from scratch rather than loading a case file, and ran into the same error as listed above.


       


      Thanks,


      Alex

    • soloviev
      Subscriber

      When compiling in a new case file, I get the following output when loading "(chdir "libudf")(chdir "win643ddp_host")'nmake' is not recognized as an internal or external command, operable program or batch file"

    • Rob
      Ansys Employee

      The computer you're on doesn't have a compiler, or it's not linked correctly. 

    • soloviev
      Subscriber

      Visual Studio 2017 was downloaded. I just downloaded 2019 to see if this version will work better. How do I link it with fluent?


       


      Thanks,


      Alex

    • Rob
      Ansys Employee

      2017 is the one we currently use. I can't remember the exact steps: there will be some explanations in the Installation section. 

    • DrAmine
      Ansys Employee
      Try launching Fluent from the command prompt of visual studio. All required environment variables are parsed virtually into the system variables.
    • soloviev
      Subscriber

      I attempted to open fluent from the command prompt of visual studio and it did not work. 


      c:Program FilesANSYS incv192fluentntbinwin64


      is the command I used. What is the correct one?


      I will also look into the directions for linking the fluent and VS.


      Thanks,


      Alex

    • DrAmine
      Ansys Employee

      in VS 2017 and then x-86_x64 Cross Tools Command Prompt type cl t check if compiler is working.


      Do you have access as ASC to customer portal solutions?

    • soloviev
      Subscriber

      I apologize for all of the questions. This is very new for us. 


      I was just in the normal command window in VS. How do I get to the x-6_x64 Cross Tools Command Prompt?


       


      We can log onto the customer portal, yes.


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee

      then please look after solution number 2049257.


       


      The command prompt I was referring to is located under Visual Studio 2017 under start programs. That is not the windows CMD.

    • soloviev
      Subscriber

      Hello again,


       


      I was able to find the command prompt you mentioned and after inputting cl t I received the following error:


       


      /out:t.exe
      t
      LINK : fatal error LNK1104: cannot open file 't.exe'

    • DrAmine
      Ansys Employee

      If "cl" result in that then you need to cleanup everything and re-install as Admin with the instructions from the Solution suggested.

    • soloviev
      Subscriber

      Thank you. I will follow the solution you provided.


       


      Thanks,


      Alex

    • soloviev
      Subscriber

      Hello again,


      I followed the directions in the given solution and unfortunately I received the same error. 


       


      Thanks,


      Alex

    • soloviev
      Subscriber

      I seemingly have gotten it working on my workstation.


       


      I am now trying to remotely run my model on a HPC cluster from fluent running on the workstation. 


      When I do this, the error occurs again. I am wondering if fluent is not able to compute the job remotely with UDFs?


      Thanks,


      Alex

    • DrAmine
      Ansys Employee

      Does it mean: working on the machine is fine (compiling) but by remote (via Remote desktop?) not? 


       

    • soloviev
      Subscriber

      Hello,


       


      Yes, I have it working on the local machine. I have fluent set up with remote Linux nodes and a remote working directory and when using that option it gives the error from before.


       


      Thanks,
      Alex

    • DrAmine
      Ansys Employee
      Summary:
      1/Linux nodes
      2/host is windows
      3/you can compile on the nodes directly?
    • soloviev
      Subscriber

      Hello,


      I am not sure what your last reply meant. What would direct fluent to compile on the nodes directly if that is not the default?


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      I wanted to summarize the problem. Are you able to compile on Linux nodes by just logging on them directly without using remote Linux nodes from Fluent launcher?
    • DrAmine
      Ansys Employee
      Summary is required so that system experts might help here.
    • soloviev
      Subscriber

      Hello,



      We are relatively new to compiling code. Not sure how to test this. I was under the impression that Linux had a compiler already installed correct?


       


      Thanks,
      Alex

    • DrAmine
      Ansys Employee
      You need to check if gcc is installed.
    • soloviev
      Subscriber

      Thank you.


       


      I have checked that gcc is installed and it is. I also tested the compiler using a .c file and it indeed compiled the code.


       


      Thanks, 


      Alex

    • soloviev
      Subscriber

      Hello,


       


      I spoke with the IT team of the HPC cluster manufacturer and he noted that even when compiling remotely, it still seems fluent is looking for windows files, when in fact Fluent would now be compiling on Linux. Do you think this might play a role in the issue?


       


      Thanks,
      Alex

    • soloviev
      Subscriber

      Hello,


       


      Has there been any progress on this issue?


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      If you are submitting from a Windows machine to a Linux machine you would need a compiler on Windows.  If you are just launching from Linux then no, you would not need a compiler on Windows. You would need to compile on Linux as you have successfully tested.
    • soloviev
      Subscriber

      Hello,


      We have a compiler on windows that works successfully when running local jobs. The compiler on Linux is also apparently working. When we send a Fluent model to the Linux computer cluster, the UDF can no longer be compiled.


       


      Thanks,
      Alex

    • DrAmine
      Ansys Employee

      Once you compile it on Windows and Linux you  do not have to recompile. You just have to load the udf In Fluent, do not choose compile.


       

    • soloviev
      Subscriber

      Thank you.


      So I have thus far set up the model with the UDF on the Windows computer. I then load the .cas and .dat files with the compiled UDF using the remote settings on the Linux cluster and do not recompile/change any settings.


      Then the UDF should work properly?


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      Yes. In the shares directory where the UDF has been compiled on Linux and Windows you just need to load the UDF from menu Manage.
    • soloviev
      Subscriber

      Hello,


      I have done this after loading in the case file from the model and it still gives me the same error as previously mentioned. 


       


      Thanks,


      Alex

    • soloviev
      Subscriber

      Maybe this will help. When I am loading the UDF the console reads the following: 


      It seems that the system is copying a UDF compiled for win64 and that's why its stating its not compiled for Linux. 


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      In the case file switch off any UDFs. Compile without reading case in the same directory for windows and Linux. Than load from menu Manage that UDF library. Read then the case and complete setup.
    • soloviev
      Subscriber

      Hello,


      Thank you for the suggestion. Unfortunately this still did not fix the issue. I noticed when loading the UDF that the system is still copying a win64 file to create the UDF library, even when the UDF I am loading on Linux was never compiled on windows. I am wondering if a setting needs to be changed, since we are using a windows interface to set this model up (we load fluent in windows and use the 'use remote Linux nodes' setting). I have attached a screenshot to show this. 


       



       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee
      You need to compile the UDF on Windows too.
    • soloviev
      Subscriber

      I have compiled it on both systems. I am working from a remote directory on the Linux machine, so fluent has no directory set up locally to even access the compiled udf on the windows machine. How should I configure these settings when I am opening fluent so that is can access both?


       


      Thanks,


      Alex

    • DrAmine
      Ansys Employee

      Actually you need two directories: the Windows (local) directory and the Linux (remote) directory. You should be able to compile them on Windows and if you are submitting the solve jobs from Windows and have the network paths setup correctly for Linux it should read them in.

    • soloviev
      Subscriber

      Thank you. We actually were contacted by Diana to further look into this issue and she is going to try to work through it. I attempted this solution with the two directories and still ran into the same error. 


       


      We appreciate all of the help you provided!


       


      -Alex

    • DrAmine
      Ansys Employee

      I am aware about that that Alex. Thanks for Updating. I guess we can lock this topic for now, right?

    • soloviev
      Subscriber

      Yes, for now we can.


       


      Thank you,


      Alex

Viewing 47 reply threads
  • You must be logged in to reply to this topic.