Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Parallelizing a DEFINE_PROFILE UDF

    • MohammadUT
      Subscriber

      Hello, I have two questions  and I would be very thankful if you take time and answer them.


      1-Does host is executed when reading a DEFINE_PROFILE UDF? because these same lines on this type of udf doesn't show the same result as an ONDEMAND UDF:


      	#if RP_HOST

      Message("n I am in the host processn");

      #endif /* RP_HOST */

      #if RP_NODE

      Message("I am in the node process with ID %dn",myid);

      /* myid is a global variable which is set to the multiport ID for

      each node */

      #endif /* RP_NODE */ 

      result of DEFINE_PROFILE:


      I am in the node process with ID 0

      I am in the node process with ID 1

      I am in the node process with ID 2

      I am in the node process with ID 3

      I am in the node process with ID 4

      result of DEFINE_ON_DEMAND:


       I am in the host process

      I am in the node process with ID 0

      I am in the node process with ID 1

      I am in the node process with ID 2

      I am in the node process with ID 3

      I am in the node process with ID 4



      2-Do we need Host to set an RP-Variable in udf or it is node's job? If we need host for that considering question 1, what should I do to get this UDF that works fine in parallel with zero nodes, does the same with more nodes?


      DEFINE_PROFILE(udftransient,t,i)

      {

      .

      begin_f_loop(f,t)

      {

      F_PROFILE(f,t,i) = massfr;

      }

      end_f_loop(f,t)

      .

      RP_Set_Real("qintudf",(massfr/998.2)); // this line does nothing in parallel with 2 or more nodes



      thank you in adavance.

    • DrAmine
      Ansys Employee
      You did the test and it shows that is not executed. I will try to sync host with node processes. Perhaps this is not required with you to your variable.

      For further debugging start Gluent with zero cpu: that is the old serial solver.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.