Batch job in wufi 2D

All about WUFI 2D
Post Reply
manexi
WUFI User
WUFI User
Posts: 45
Joined: Wed Oct 06, 2010 4:05 am -1100

Batch job in wufi 2D

Post 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,
Christian Bludau
WUFI SupportTeam IBP
WUFI SupportTeam IBP
Posts: 1130
Joined: Tue Jul 04, 2006 10:08 pm -1100
Location: IBP Holzkirchen, the home of WUFI
Contact:

Post 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
Amandine Piot
WUFI International Support Team
WUFI International Support Team
Posts: 40
Joined: Mon Feb 28, 2011 11:02 pm -1100

Re: Batch job in wufi 2D

Post 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 ?
veitner
WUFI SupportTeam IBP
WUFI SupportTeam IBP
Posts: 135
Joined: Tue Mar 08, 2005 11:14 pm -1100

Re: Batch job in wufi 2D

Post 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
Amandine Piot
WUFI International Support Team
WUFI International Support Team
Posts: 40
Joined: Mon Feb 28, 2011 11:02 pm -1100

Re: Batch job in wufi 2D

Post 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
Christian Bludau
WUFI SupportTeam IBP
WUFI SupportTeam IBP
Posts: 1130
Joined: Tue Jul 04, 2006 10:08 pm -1100
Location: IBP Holzkirchen, the home of WUFI
Contact:

Re: Batch job in wufi 2D

Post by Christian Bludau »

Hi Amandine,

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

Christian
DamienS
WUFI User
WUFI User
Posts: 2
Joined: Sun Oct 27, 2013 10:52 pm -1100

Re: Batch job in wufi 2D

Post 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
veitner
WUFI SupportTeam IBP
WUFI SupportTeam IBP
Posts: 135
Joined: Tue Mar 08, 2005 11:14 pm -1100

Re: Batch job in wufi 2D

Post 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
DamienS
WUFI User
WUFI User
Posts: 2
Joined: Sun Oct 27, 2013 10:52 pm -1100

Re: Batch job in wufi 2D

Post by DamienS »

Hi Veit,

Thank you for your answer, my batch file works.

Damien
VMN
WUFI User
WUFI User
Posts: 1
Joined: Sat Nov 11, 2017 11:53 pm -1100

Re: Batch job in wufi 2D

Post 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
Sebastian Boegl
WUFI SupportTeam IBP
WUFI SupportTeam IBP
Posts: 46
Joined: Sun Jan 06, 2013 11:45 pm -1100
Contact:

Re: Batch job in wufi 2D

Post 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
Post Reply