CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Fluent from command line not in background please! (

Chris Bailey March 14, 2005 12:14

Fluent from command line not in background please!
I'm using a Win2000 computer and want to run Fluent from the command line to process a journal file. I want it to run in the foreground; that is, I don't want it to return control to another program that called it until it has finished.

Based on the User Guide section 1.5.4 I am sending this command to Windows from the other program:

fluent 2d -i p:\a\fluent\20050303-\fluent_analyze_brief.jou

However, this appears to run in the background, if I understand the result. In any case, Windows returns control to the other program before Fluent has finished. In my application this won't work, because the other program needs results Fluent has to write.

Here's a quote from the User Guide that sounds like it implies using the -gu switch moves the job from foreground to background. However, this switch doesn't seem to change this issue. Note I am not using the -gu switch and expect foreground operation, hence am disappointed.

"On Windows systems, fluent -gu will run FLUENT keeping it in a minimized window; if you maximize the window, the GUI will be available. This option can be used in conjunction with the -i journal option to run a job in 'background' mode"

Just to show that this sort of thing ought to be able to work, I am doing the same with Gambit, and it works fine. My other program sends this to Windows:

gambit -inp p:\a\fluent\20050303-\gambit_mesh.jou

And, just as I want, the other program doesn't consider the command executed until Gambit has finished and closed. Note, there is actually a bug in Gambit that affects this, but they know about that bug and have a patch already available on the web site.

Does anybody recognize something I am doing wrong, or know a way to fix this?

Luca March 14, 2005 12:27

Re: Fluent from command line not in background ple
you can let your primary process wait in a while cycle until Fluent in the last iteration creates a file... When your primary process finds that file, the while -cycle ends. This is a possible solution in case you canno launch fluent not in backgroud...Luca

Chris Bailey March 14, 2005 13:13

Re: Fluent from command line not in background ple
Luca, Hah! You're good. You're a bulldog who never gives up. We think alike. Your suggestion is what I was working on while I was waiting for the elegant way if it ever comes.

Luca March 15, 2005 04:05

Re: Fluent from command line not in background ple
Thank you Chris...Sooner or later I'll ask you for some suggestiong about Scheme, because at the moment I'm busy on programming Fluent with Scheme language. See you Chris. Have a nice day. Luca

andrew March 16, 2005 22:52

Re: Fluent from command line not in background ple
if you are running from a batch file you can set the enviromnet variable FLUENT_WAIT, which will force fluent to wait until it has finished and start fluent with the command start /wait fluent ...

ie, (in a batch file)



start /wait fluent 3ddp -i somejournal.jou

rem END

good luck,


bass8 July 28, 2012 07:26

i had a same question and the andrew's solution has solved the problem.
but i don't understand why the set environment variable will force fluent to wait until it has finished.


All times are GMT -4. The time now is 16:26.