Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Compiling UDFs in Linux

    • Albert Abraham
      Subscriber

      I have written a UDF to run in parallel in C. It contains the global reduction macro PRF_GRSUM1(). This macro is not supported in Fluent while solving in parallel so I am trying to compile the code instead of interpreting it. I have tried to follow compilation instructions in the manuel however, the built-in compiler only works on Windows. I am not sure how to work around this issue to succesfully compile the code in Fluent on Linux. Below is the basic code I am using as a test for compiling.

       

      // A simple adjust to test if we can compile in Fluent on Linux

      #include "udf.h"

      DEFINE_ADJUST(comptest,d)
      {
          Thread* t;
          cell_t c;
          
          begin_c_loop(c,t)
          
        C_UDSI(c,t,2) = 1;
        
            end_c_loop(c,t)

       


      }

    • Rob
      Forum Moderator

      As LINUX is a proper operating system there's a compiler included in the OS as standard. Just deselect the "use included compiler" and build as normal. 

      • mohamed-walid.alrihawi
        Subscriber

        where do i find the "use included compiler"

    • Rob
      Forum Moderator

      On the Compiler panel. 

      • mohamed-walid.alrihawi
        Subscriber

        could you please provide a screenshot of the window ?

         

    • Rob
      Forum Moderator

Viewing 3 reply threads
  • The topic ‘Compiling UDFs in Linux’ is closed to new replies.