|
[Sponsors] |
January 25, 2019, 11:34 |
[SOLVED] UDFs are run three times instead of just once
|
#1 |
New Member
Join Date: Jan 2019
Posts: 2
Rep Power: 0 |
Perhaps someone here will be able to help me with the following problem: even with a rather minimal UDF (see further), the included functions are always run three times instead of just once. For example, when I compile this source file:
Code:
#include "udf.h" DEFINE_EXECUTE_ON_LOADING(on_loading, libname) { Message("\n%s has been loaded.\n", libname); } DEFINE_EXECUTE_AT_END(fcn) { Message("\n(Computing additional stuff)\n"); } Code:
[...] make[3]: Leaving directory `/home/xxx/test/libudf/lnamd64/3ddp_node' make[2]: Leaving directory `/home/xxx/test/libudf/lnamd64/3ddp_node' make[1]: Leaving directory `/home/xxx/test/libudf/lnamd64/3ddp_node' Opening library "/home/xxx/test/libudf"... Library "/home/xxx/test/libudf/lnamd64/3ddp_host/libudf.so" opened libudf has been loaded. Opening library "/home/xxx/test/libudf"... Library "/home/xxx/test/libudf/lnamd64/3ddp_node/libudf.so" opened on_loading fcn UDF Autorun: on_loading libudf has been loaded. Done. Opening library "/home/xxx/test/libudf"... Library "/home/xxx/test/libudf/lnamd64/3ddp_node/libudf.so" opened libudf has been loaded. Code:
iter continuity x-velocity y-velocity z-velocity energy k epsilon time/iter ! 104 solution is converged 104 9.1032e-04 4.3001e-04 1.7156e-04 1.2367e-04 1.4684e-16 7.1970e-04 9.9163e-04 0:00:00 200 (Computing additional stuff) (Computing additional stuff) (Computing additional stuff) ! 105 solution is converged 105 9.1246e-04 4.1374e-04 1.6847e-04 1.2057e-04 1.4959e-16 6.9600e-04 9.7084e-04 0:01:03 199 Calculation complete. Just for completeness' sake: I am using Fluent 19.1 on a linux machine. Any help would be much appreciated. nvx EDIT (27 Jan): Today I also tried to replicate the issue in a freshly-installed virtual machine (CentOS 7 x64). The result was identical to what I have been experiencing with the other linux machine. In other words, with the same minimal source code mentioned above, UDFs from the compiled library were always run three times. Last edited by nvx; January 27, 2019 at 12:59. Reason: New information added |
|
January 27, 2019, 07:33 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Could it be that you are running parallel with three nodes?
|
|
January 27, 2019, 07:40 |
|
#3 |
New Member
Join Date: Jan 2019
Posts: 2
Rep Power: 0 |
pakk,
Thank you for your response, it led me to the solution! After a lot of additional digging and testing it seems that Fluent runs both types of UDFs mentioned in the example on all compute nodes, i.e., including the master node. This was what confused me all along, because the number of UDF executions did not even match the number of specified parallel nodes... nvx Last edited by nvx; January 27, 2019 at 12:58. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with foam-extend 4.0 ggi parallel run | Metikurke | OpenFOAM Running, Solving & CFD | 1 | December 6, 2018 16:51 |
Long loading times and unable to run with 4 cores in ANSYS AIM | Vestdam | ANSYS | 0 | October 4, 2018 04:10 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 23:29 |
parallel run is slower than serial run (pimpleFoam) !!! | mechy | OpenFOAM | 18 | August 17, 2016 18:19 |
Can not run OpenFOAM in parallel in clusters, help! | ripperjack | OpenFOAM Running, Solving & CFD | 5 | May 6, 2014 16:25 |