Fluids

Fluids

udf is stuck at transfering data from host to nodes

    • m.shafiee1374
      Subscriber

      Hi,

      I've encountered another problem with data transfer from the host to the nodes. Lets assume my code looks something like this:

      DEFINE_ADJUST(name,libname)
      {
         real a[4], b[4], c[4], V ;
         #if !RP_HOST
         /*Nodes are used to calculate V*/
         #endif /*!RP_HOST*/
         node_to_host_real_1(V) ;
         #if !RP_NODE
         /*V is used to calculate a & b on the host process*/
         /*I'm able to print a&b values on the TUI from here*/
         #endif /*!RP_NODE*/
         host_to_node_real(a,4) ;         /*solution is stuck here*/
         host_to_node_real(b,4) ;
         Message0("\n a[1] = %f\n", a[1]) ;      /*This line is not executed*/
         #if !RP_HOST
         /*Use a & b to calculate c on the nodes*/
         #endif /*!RP_HOST*/
      }
      All of the above works fine (a and b are filled with real numbers), until it reaches the first line with red comment and the solver gets stuck there without giving any errors whatsoever (I have to actually end the fluent process to force it to exit). Also, I'm not getting any errors during compilation. Whats wrong here? or how can I debug this since I'm not getting any errors?
    • m.shafiee1374
      Subscriber

      Update:

      So, as a work around, instead of using "host_to_node_real" function, I used "PRF_CSEND_REAL(node_zero, &a, 4, myid)" to send the data from the host and then used "PRF_CRECV_REAL(host, &a, 4, host)" to receive it on the node_0. But now during compilation, I'm getting the "undeclared identifier" error for the host parameter. And I'm stuck again! :/

      How to fix this?

    • m.shafiee1374
      Subscriber
      After looking through para.h file from the fluent installation directory, I realized the correct variable that shows the host id is "node_host" not "host" (a mistake in udf manual). so the correct form is :
      PRF_CRECV_REAL(node_host, &a, 4, node_host) ;
      Which is then compiled with no errors.
       
      However, using these "low level message passing macros" did not solve my problem mentioned in the beginning of this thread. Solver is still stuck at executing them:(

       

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