|
[Sponsors] |
Batch Processing and auto-save log file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2013, 17:16 |
Batch Processing and auto-save log file
|
#1 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hi!
I am trying to run an steady case with FLUENT using the batch processing. Until the end of calculation nothing written to the log file, so I cannot check the residuals. Is there any command which I should add in .jou and/or .sh file, so I can write the log during the calculation? Here is my .jou file: --------------------- file/ read-case-data xx.cas.gzfile autosave data-frequency 5000 file autosave root-name xx solve/iterate 16000 file/write-data Final.dat.gz exit yes --------------------- Moreover I want to know: what does the following command do in the .jou file? file autosave root-name xx The data-frequency command save the .dat file in a format .dat. Is it possible to save the data-frequency file in format dat.gz instead of dat? Thanks. |
|
April 19, 2013, 18:07 |
|
#2 |
Senior Member
Stuart Buckingham
Join Date: May 2010
Location: United Kingdom
Posts: 267
Rep Power: 25 |
Hi Astio, the auto save function will save a file every 5000 iterations with the name "xx" followed by the iteration number.
To log your run, you need to pipe the output to another file from the command line. This is done using the ">" symbol. Eg. fluent -g 3ddp -i ajournalfile.jou > log file.text Stu |
|
April 20, 2013, 04:06 |
|
#3 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hello and thanks for your reply.
"file autosave data-frequency 5000" will save the sata file every 5000 iterations with the name "xx", but I ask about the next line: "file autosave root-name xx"? which file will autosaved by this command? what is root-name? About the jou file, I cannot follow you! would you please give me more details about the approach? this should be added somewhere is the .sh file or .jou file? or in the esubmit command where should have ">"? I use this command to submit: esubmit -n 3 -t 1200 ./fluent-pdc.sh 8 3ddp ./test.jou Thanks in advance for your help. |
|
April 21, 2013, 00:18 |
|
#4 |
Senior Member
|
The names of auto-saved files composed of two parts, 'root-name' and 'time step'/'flow time'. For example, for steady case, when you set 'root-name' as './save/my-case-name.gz', then after 5000 iterations, the auto-saved data with be named './save/my-case-name-05000.dat.gz'. Note that for that to work, you have to ensure that a directory named 'save' in the same directory as your journal file. If you don't want you data file to be compressed, then you can set the 'root-name' to './save/my-case-name' instead.
|
|
April 21, 2013, 05:30 |
|
#5 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hello and thanks for your reply.
Any solution for the log auto-save log file? Is it possible to save the log file every several iteration? I am looking for an approach to save the log file over the batch Processing and/or direct from the fluent, but I cannot find any thing. Is there any solution? |
|
April 21, 2013, 09:38 |
|
#6 |
Senior Member
|
You can ask the one who created the file named 'fluent-pdc.sh' for a solution, or you can try this command if he is not nearby at the moment:
esubmit -n 3 -t 1200 fluent 3ddp -t8 -i ./test.jou > run.log 2>&1 |
|
April 22, 2013, 03:04 |
|
#7 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hello!
I try your command and I got this line in the run.log file esubmit: warning: `fluent' don't seem to be in PATH. How should I change the .sh file? I ask the provider people and they don't know how it functioned! |
|
April 22, 2013, 04:04 |
|
#8 |
Senior Member
|
You need to view the content of 'fluent-pdc.sh'. It sets the environment variables for FLUENT and process the arguments. You should be able to find a line which looks like
fluent -g -t $1 $2 -i $3 You need to modify this line to redirect the output, which results in fluent -g -t $1 $2 -i $3 > run.log 2>&1 After that you can submit your job with the command you told before, i.e., esubmit -n 3 -t 1200 ./fluent-pdc.sh 8 3ddp ./test.jou and you will find the output in 'run.log' |
|
April 22, 2013, 06:43 |
|
#9 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hi!
I think you become a bit misunderstood about my issue! I have the run.log file at the end of simulation. For instance I run the case over 1000 iteration, then when the simulation is done, then the log file is written in the run.log. But the problem is, this file doen't fill until the end of simulation, so I cannot check anything until the end. I want to have the log simultaneously or after several iterations. |
|
April 22, 2013, 09:26 |
|
#10 |
Senior Member
|
The default behavior is to send the output to STDOUT, which is usually connected to your terminal. But when the program is run via a job manager, the job manager will take care of the STDOUT. Usually it will redirect STDOUT to a temporally created file and put that file to your working directory after the job is done. That's how you see the output at the end of your simulation. The solution is simple. If you redirect the STDOUT to some file (i.e., > run.log) then you will see the content during the simulation. It will be updated almost simultaneously except for some latency caused by file buffering.
|
|
April 22, 2013, 10:06 |
|
#11 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Hello.
I know what you mean. here is a part of my .sh file: Code:
if [ $SP_PROCS -gt 1 ]; then # use SP_HOSTFILE to create the correct format and rename it i=0 while [ $i -lt $PPN ]; do cat $SP_HOSTFILE > $SP_JID.hosts i=$((i+1)) done echo "CNF file is: ">>$LOGFILE cat $SP_JID.hosts >>$LOGFILE FLUENTARGS="-t`expr $PPN \* $SP_PROCS` -cnf=$SP_JID.hosts -pethernet -mpi=openmpi" elif [ $PPN -gt 1 ]; then # use shared memory MPI only FLUENTARGS="-t$PPN" fi echo "Executing fluent in directory `pwd`">>$LOGFILE echo "fluent $SOL -g $FLUENTARGS -i $JOU" >>$LOGFILE fluent $SOL -g $FLUENTARGS -i "$JOU" > run.log 2>&1 echo "Finished running Fluent" >>$LOGFILE As you can see I have this command: Code:
fluent $SOL -g $FLUENTARGS -i "$JOU" > run.log 2>&1 By the way, many thanks for your help. |
|
April 23, 2013, 03:59 |
|
#13 |
Senior Member
Astio Lamar
Join Date: May 2012
Location: Pipe
Posts: 186
Rep Power: 13 |
Thanks.
I try but it doesn't work. |
|
|
|