|
[Sponsors] |
August 24, 2018, 12:20 |
read wall-time, cpu-time etc from udf
|
#1 |
New Member
DS
Join Date: May 2016
Posts: 28
Rep Power: 10 |
Goodmorning,
I would use the output parameters as "time/iter" and variables obtained with /parallel/timer/usage command as "Average wall-clock time per iteration", "Total-clock time" etc in my UDF. Do someone know how to import that parameters in UDF? Thank you very much Best Regards DS |
|
September 28, 2018, 07:31 |
|
#2 |
New Member
Gernot Pongratz
Join Date: Aug 2018
Posts: 1
Rep Power: 0 |
Hi Denis!
What I did is defining a UNIX-timestamp as an User Defined Report Definition. Put following code in a ".c" file and compile it in your fluent (make sure, you have VisualStudio installed). You can then make a User Defined Report Definition with the function "getSystemTime" and write a UNIX time stamp for every saved data-set in an output file. When you copy the output file in a Excel-Sheet and format the column with the timestamp like "DD.MM.YYYY hh:mm:ss" you get time and can calculate the time-difference between your iterations. If you don't get your time, you might be in another timezone. In that case, change the code like follows: timestamp = (now + <hoursOfTimezoneDifference> * 3600) / 86400.0 + 25569.0; Hope that did help. #include <udf.h> #include<time.h> DEFINE_REPORT_DEFINITION_FN(getSystemTime) { time_t now; double timestamp; time(&now); timestamp = now / 86400.0 + 25569.0; return timestamp; } |
|
Tags |
cpu-time, udf, wall-time |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 22:00 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) | AndreP | STAR-CCM+ | 10 | August 2, 2018 08:48 |
plot over time | fferroni | OpenFOAM Post-Processing | 7 | June 8, 2012 08:56 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |