CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   How to terminate fluent batch jobs? (http://www.cfd-online.com/Forums/fluent/34372-how-terminate-fluent-batch-jobs.html)

Martin S. Rasmussen August 10, 2004 08:50

How to terminate fluent batch jobs?
 
We run fluent non-interactive on a Sun Gridengine by submitting our jobs batchwise and occasionally, we need to terminate a job. However, a simple termination kills the process without writting any of the results into a data file. Is there a simple way to terminate fluent and have a regular exit including the writting of a case and data file at the time of termination?

/Martin

Bob August 10, 2004 12:20

Re: How to terminate fluent batch jobs?
 
You can touch the file by touch /tmp/check-fluent and then rcp "casename" "username@workstationid". What I have to do after this is "ls" and it lists the case and data file at which iteration it was saved. I then I have to rcp that case and data using the same directory in which it gets saved into my home directory to be viewed in Fluent. After that you can kill the job. I hope this is understandable.

Jason August 10, 2004 15:23

Re: How to terminate fluent batch jobs?
 
You can make it a little easier.

In your input file for the batch run insert a line including the parenthesis:

(set! checkpoint/exit-filename "/directory/exit-fluent-####")

Where directory is the directory you're storing your case and data files, and #### is some representative name. They say you can use "./" to indicate the directory where the case and data currently are, but that doesn't always work so well for me. And exit-fluent-#### can really be anything you want, but this is the format that works well for me. Then, when you want to stop the iterations and end the process, just type (this works for HP unix workstations at least):

touch /directory/exit-fluent-####

It will save the case and data file after the current iteration, adding the iteration number to the file name, and the files will all be in the directory you specified in your input file.

Hope this helps

Jason

Martin S. Rasmussen August 11, 2004 09:39

Re: How to terminate fluent batch jobs?
 
I assume that set checkpoint/exit-filename "/directory/exit-fluent-#### should be placed in the shell script file that launches fluent and not in the journal file. Correct?

/Martin

Jason August 11, 2004 10:21

Re: How to terminate fluent batch jobs?
 
In the journal file.

Example:

;-----------------------------------

;Start of script

;-----------------------------------

; Set checkpoint - exit filename

(set! checkpoint/exit-filename "/disk0/exit-fluent-2d-airfoil")

; Read Case and data

rc /disk0/2d-airfoil.cas rd /disk0/2d-airfoil.dat

; Calculate 500 iterations

it 500

; Write Data

wd /disk0/2d-airfoil-final.dat

; Exit file

exit y

;-----------------------------------

;End of script

;-----------------------------------

Then, whenever you want it to save the case and data and exit fluent, type:

touch /disk0/exit-fluent-2d-airfoil

In the directory "/disk0/" there will now be three new files (for example if you stopped at iteration 52):

2d-airfoil0052.cas, 2d-airfoil0052.dat, and another file that I believe ends in .inp

The .inp file is supposed to be used to restart the processes, but I've never looked into it to see what it actually says.

Hope this helps. Jason

Martin S. Rasmussen August 11, 2004 12:01

Re: How to terminate fluent batch jobs?
 
Thanks, I got everything I needed and it runs smooth in all the configurations that I use. Also when I tried to set the check-filename. Thanks again - Martin


All times are GMT -4. The time now is 21:28.