Fluids

Fluids

UDF compilation problem in ANSYS Fluent 2020 R2

    • yash54321
      Subscriber
      Hi,nPlease find attached images for error messages. Here, I tried to compile the customizable UDF from ANSYS fluent manual. nI used in-built compiler and MS Visual studio19 compiler (trying all available answers).nThe errors are either 'C:\Users\yashr\Desktop\ansystuts\ansystuts_files\dp0\FFF\Fluent\libudf\win64\2ddp_node>C:\PROGRA~1\ANSYS Inc\v202\fluent/../commonfiles/CPython/3_7/winx64/Release/python/scons C:\PROGRA~1\ANSYS' is not recognized as an internal or external command, operable program or batch file. OR (chdir libudf)(chdir win64\2ddp_node)'nmake' is not recognized as an internal or external command, operable program or batch file.nAlso, I didn't find option to start fluent 2020R2 in serial mode. Resulting in The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). error.n
    • yash54321
      Subscriber
      The fluent does not let me start using 0 processors. Also, I used 'in-built compiler' but doesn't work (as mentioned in the question). Thanks for your suggestions. n
    • Rob
      Ansys Employee
      nmake means there isn't an external compiler (typically Microsoft). I'm not sure why the built in compiler is failing though, does it run when you launch Fluent outside of Workbench. The lack of parallelisation of the code may mean the result isn't correct but doesn't normally stop the compiler from working. n
    • attiq
      Subscriber
      Facing Same Issuen
    • elwinxavier
      Subscriber
      I'm facing the same issue here. Any known solution?n
    • Rob
      Ansys Employee
      Have you tried launching outside of Workbench? n
    • attiq
      Subscriber
      I tried changing the version of MS Visual Studio and Tried running or opening fluent through RUN PROMPT. But every time I open I had to do it through VS Run Prompt. The problem is partially solved. Even through VS run prompt, sometimes fluent fails to load UDF. But sometimes it works fine.nExperts advice is still needed.nThank You.n
    • elwinxavier
      Subscriber
      Ya, even outside workbench I failed too. I used Built-in Compiler btw.nThis is the error when i press buildn'C:\PROGRA~1\ANSYS' is not recognized as an internal or external command,noperable program or batch file.n
    • attiq
      Subscriber
      Open This link. Try this waynn
    • elwinxavier
      Subscriber

      This link. Try this wayhttps://forum.ansys.com/discussion/comment/102171#Comment_102171

      Thanks Attiq. I Watched this before. Tried and doesnt help.n
    • elwinxavier
      Subscriber

      nmake means there isn't an external compiler (typically Microsoft). I'm not sure why the built in compiler is failing though, does it run when you launch Fluent outside of Workbench. The lack of parallelisation of the code may mean the result isn't correct but doesn't normally stop the compiler from working.https://forum.ansys.com/discussion/comment/92417#Comment_92417

      @Rob, I used Build-In Compiler and also tried both inside Workbench and outside workbench. I'm getting error 'C:\PROGRA~1\ANSYS' is not recognized as an internal or external command, operable program or batch file. Where is this directory of 'C:\PROGRA~1\ANSYS' tho?.I'm not sure warning should be ignore? but if I continue to Load it, it will become 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.
    • JD_JN
      Subscriber
      Hello,nAs I had commented on an earlier similar post, I had the same issue and this is how I fixed it. Following these steps, you don't have to launch fluent from command prompt!nInstall Visual Studio 2017 Community Edition with C++ options (ANSYS 2019 doesn't support newer versions of VS such as MSVS 2019)nGo to Control Panel -> System and Security -> System -> Advanced System Settings -> Environment VariablesnGo to the bottom section named System variables and then double-click to open PathnThere, create 4 new entries (mentioned below as steps 5, 6, 7, by clicking on 'New':n%SystemRoot%\\system32n%SystemRoot%nC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64 (This is the location for make in MSVS 2017 Community Edition)n\ANSYS Inc\v194\fluenttbin\win64 (This is for ANSYS 2019, your version number will change according to the one you have installed)nMake sure that the entries in steps 5 - 8 are at the top most rows of the path variables, i.e., entry 5 should be in row 1, entry 6 should be in row 2, entry 7 should be in row 3, and entry 8 should be in row 4. You can change their row positions using Move Up option in the system variables dialog boxnClick OK and exit out of the Path variables dialog box, as well as exit out of the Environment variables dialog box and System properties dialog boxnRestart systemnStart FLUENT. In the FLUENT Launcher, click on 'Show More Options'nMake sure that the working directory location is the location of your folder containing your UDF and then click OK to launch FLUENTnNow you will be able to build and load your UDFs.nHope this will also help in your issue.nCheers!n
    • Keyur Kanade
      Ansys Employee
      Thank youRegards,nKeyurnHow to access Ansys Online Help DocumentnHow to show full resolution imagenGuidelines on the Student CommunitynHow to use Google to search within Ansys Student Communityn
    • elwinxavier
      Subscriber
      Array appreciate the kind help. Unfortunately these doesn't help.nMy problem aren't really nmake. I'm using 2020 R2, I have the feature to enable Built-In Compilersn nSo the problem Statement is, when in Compiled UDFsnBuilt will result following Errorn'C:\PROGRA~1\ANSYS' is not recognized as an internal or external command, operable program or batch file.nLOAD will result following ErrornError: 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.nnnDo ANSYS staff knows, with Build-In Compiler, is the problem still lies within Visual Studio? Because if it doesn't we can certainly skip the MS Visual Studio and look other way.nOr the problem is more to the Build-in Compilers itself. Is there anyway to check on Build-In Compilers? DO we have any patch and installer to re-install on ANSYS Patch?n
    • Rob
      Ansys Employee
      The built in compiler should install with the rest of the code and is CLANG based so nothing linked to Microsoft VS. What is the full path of the installation and working folder? n
    • Rob
      Ansys Employee
      Continues here https://forum.ansys.com/discussion/23003/installing-vs-for-udfs#latestn
Viewing 16 reply threads
  • The topic ‘UDF compilation problem in ANSYS Fluent 2020 R2’ is closed to new replies.