Page 1 of 1

Batch job in wufi 2D

Posted: Sat Nov 06, 2010 12:21 am -1100
by manexi
Hi,

Is there a possibility to run files in a batch with wufi 2D? There are some references to such possibilities in the general topic of wufi software, but I don't find any precise procedure to do it in the help file or in the forum.

Thanks for your answer,

Posted: Wed Nov 10, 2010 2:20 am -1100
by Christian Bludau
Hello,
yes, there is the possibility to run Wufi2D in batch, but you will need little knowledge of command line parameters.

If you call the kernel in a command window with /h you will get the following information:
-----------------------------------------------------------------------------------
C:\Programme\IBP-Software\WUFI2D-3>w2d_flow.exe /h
usage: prog [switches] [workingdirectory] inputfile
-- workingdirectory is the directory where the output files are stored
all the additional input files (e.g. climate files) must be
located in the same directory as the inputfile
-- inputfile is the name of the parameter file, defining the construction
-- gridfile is the name of the parameter file, defining the grid partitioning
-- switches:
/i: print version info of all linked files and start
the calculation if inputfile is supplied
/v: print kernel version and start the
calculation if inputfile is supplied
/r n: restart the calculation at timestep n
with binarydata from disc
/h: print this help and quit
/g gridfile: use parallel mode applying separation defined in gridfile
/s: write slavespeed file
-------------------------------------------------------------------------------------
This is all you need for batch calulation...

Now step by step:
First create the case and go to calculation and start calculation for at least one time step, to make sure that the input.dat contains the actual information. Then save the case. You may do so with a couple of cases.
Now you can close Wufi2D.

Second create a batch-file with the following content:
"c:\programme\ibp-software\wufi2d-3\w2d_flow.exe" "path to project" "path to project\input.dat"
of all your projects to be calculated. Doing this, in the command window the printout of the calculation will be shown. If you want to create the iter.txt, which can be opened in Wufi for the convergence analysis, you have to add 2>"path to project\iter.txt":
"c:\programme\ibp-software\wufi2d-3\w2d_flow.exe" "path to project" "path to project\input.dat" 2>"path to project\iter.txt"
During the calculation you will only see a black window with a cursor blinking, but if you open the iter.txt with a text editor during calculation, and scroll down, you will see the state of the calculation at the end of the file.

Third step: call the batch-file

Hope that helps,
Christian

Re: Batch job in wufi 2D

Posted: Thu Jul 25, 2013 9:43 pm -1100
by Amandine Piot
Hi all !

I'm trying to run wufi 2d with a batch file; I did what Christian said, and with the following batch files it calculates, but doesn't create the result file

Code: Select all

"C:\Program Files (x86)\WUFI\WUFI2D-3\WUFI2D-3.3.exe" -c -s "D:\W2Dbatch\essai" "D:\W2Dbatch\essai\input.dat"
With i or v instead of c, it doesn't calculate, just open Wufi's GUI. Without the -s, it seems that it doesen't make anything.

If I use

Code: Select all

"C:\Program Files (x86)\WUFI\WUFI2D-3\WUFI2D-3.3.exe" -c -s "D:\W2Dbatch\essai" "D:\W2Dbatch\essai\input.dat" 2>"D:\W2Dbatch\essai\iter.txt"
It does exactly the same (printout of the calculation), and creates the iter.txt files but it is empty.

I also tried

Code: Select all

"C:\Program Files (x86)\WUFI\WUFI2D-3\WUFI2D-3.3.exe" -c -s "D:\W2Dbatch\essai" "D:\W2Dbatch\essai\input.dat" 2>"D:\W2Dbatch\essai\essai.wfd"
and it creates the .wfd file but it remains empty. Whatever is before the > sign doesn't matter.
I have read this topic http://www.wufi-forum.com/viewtopic.php?f=5&t=82 but I couldn't find a solution yet :idea: ...
Can anyone help ?

Re: Batch job in wufi 2D

Posted: Thu Jul 25, 2013 10:05 pm -1100
by veitner
you need to call "w2d_flow.exe" instead of "WUFI2D-3.3.exe"

"WUFI2D-3.3.exe" is the graphical user interface (basically to create an input file for the core)

"w2d_flow.exe" the core solver which reads the input file, performs the calculation and writes out the result data


Veit

Re: Batch job in wufi 2D

Posted: Thu Jul 25, 2013 10:48 pm -1100
by Amandine Piot
You're right, I've mixed up several things. The following file works perfectly

Code: Select all

"C:\Program Files (x86)\WUFI\WUFI2D-3\kernel\x86\w2d_flow-x86.exe" /i /s "D:\W2Dbatch\essai" "D:\W2Dbatch\essai\input.dat" 2>"D:\W2Dbatch\essai\iter.txt"
thanks a lot ! :D

Re: Batch job in wufi 2D

Posted: Fri Jul 26, 2013 12:57 am -1100
by Christian Bludau
Hi Amandine,

the /s is only needed if you want to calculate in parallel mode...

Christian

Re: Batch job in wufi 2D

Posted: Mon Oct 28, 2013 3:59 am -1100
by DamienS
Hi everybody, Hi Christian,

I'm trying to follow the steps you write, but i am not an expert in command line parameters. How do you call the batch file, please ? Is it from the command prompt ?

Regards,

Damien

Re: Batch job in wufi 2D

Posted: Mon Oct 28, 2013 4:08 am -1100
by veitner
I would call it from the command prompt. Then you can see error messages regarding the syntax of the script. As soon as it works you could also double click it (windows explorer).

Veit Eitner

Re: Batch job in wufi 2D

Posted: Mon Oct 28, 2013 11:30 pm -1100
by DamienS
Hi Veit,

Thank you for your answer, my batch file works.

Damien

Re: Batch job in wufi 2D

Posted: Sun Nov 12, 2017 12:26 am -1100
by VMN
Hi,

I need to run several simulations in this way (I use WUFI 6):
- load 30-year long weather data
- run the WUFI simulation
- select and save certain outputs as ASCII file (ASCII-export)
This procedure should be done for multiple times, so I want to code it once (preferably in Matlab), run the simulations and save the results.

I checked this topic on how to run batch jobs in WUFI. It seems that the critical component is "w2d_flow.exe" which I could not call it (and did not find it anywhere).

Would you please let me know how should I manage running several simulation and saving results as I mentioned in WUFI 6?

Thanks in advance,
Nik

Re: Batch job in wufi 2D

Posted: Sun Nov 12, 2017 10:17 pm -1100
by Sebastian Boegl
Hi Nik,

this thread is about using WUFI 2D with a batch job, therefore, you don't have the 2D kernel w2d_flow.exe.
Please refer to the help section Batch Jobs in WUFI 6's help system.

Best,
Sebastian