Author Topic: Batch Mode simulation  (Read 1204 times)

uspanda

  • Posts: 14
    • View Profile
Batch Mode simulation
« on: April 02, 2017, 12:52:26 pm »
Hello 

I have prepared a number of model input files, and want to carry out several simulations in a row using an ASCII batch file containing the prompts for each simulation. The batch file is running fine, but it runs using single core.

Can anyone help me to run the batch file / multiple setups under batch file using Parallelization ? What is the option to mention in the batch commands to run using Parallelization?

Thanks in advance

U S Panda

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #1 on: April 03, 2017, 05:06:01 pm »
Hi,

you can use the MZLaunch - Engine.

See here:
http://faq.dhigroup.com/default.asp?module=MIKE+FLOOD&ID=366
or
http://faq.dhigroup.com/default.asp?module=MIKE+21&ID=57#answer

There are several parameters available.

Bests Christian


Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #2 on: April 03, 2017, 05:46:50 pm »
Hi,

concerning the batch with GPU you may use the following command:
start /w MzLaunch.exe SIM.m21fm -gpu NUMBER_OF_GPUS GPU1 GPU2 GPUn

Hope that helps.

Bests Christian
Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

uspanda

  • Posts: 14
    • View Profile
Re: Batch Mode simulation
« Reply #3 on: April 07, 2017, 11:32:46 am »
Thank you Dr. Christian for the information.

Well, my issues is with invoking distributed memory approach (MPI) Parallelization during batch simulation.

Is there any option/ command I should specify in the *.bat file for the above requirement.

Regards,
Panda

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #4 on: April 21, 2017, 02:41:59 pm »
Hi,

you can use this sequence:

set Number_of_Cores=8
mpiexec -n %Number_of_Cores% -localonly FemEngineHDMPI.exe lake.m21fm

Bests Christian
Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

uspanda

  • Posts: 14
    • View Profile
Re: Batch Mode simulation
« Reply #5 on: April 27, 2017, 01:20:28 pm »
Sir,

I have used the following lines but still it is not running in MPI mode, it is fine with normal mode only. Please do correct me for the following execution.


path=C:\Users\Admin\Desktop\pwq_coast; %DHI_MIKE_2014%;

set Number_of_Cores=16

start /wait MzLaunch.exe mpiexec -n 16 -localonly FemEngineHDMPI.exe case_1_opening.m21fm -x
start /wait MzLaunch.exe mpiexec -n 16 -localonly FemEngineHDMPI.exe case_2_opening.m21fm -x
start /wait MzLaunch.exe mpiexec -n 16 -localonly FemEngineHDMPI.exe case_3_opening.m21fm -x
start /wait MzLaunch.exe mpiexec -n 16 -localonly FemEngineHDMPI.exe case_4_opening.m21fm -x

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #6 on: April 28, 2017, 09:34:26 am »
Hi,

looks nice.
Does it work ?

Bests
Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

uspanda

  • Posts: 14
    • View Profile
Re: Batch Mode simulation
« Reply #7 on: April 28, 2017, 09:39:14 am »
Hi

No, this is not working for MPI mode, its only works with normal mode.

Please do correct the code for MPI run in batch mode.

Regards

Mathieu

  • Posts: 94
    • View Profile
Re: Batch Mode simulation
« Reply #8 on: May 09, 2017, 09:59:46 am »
Hi Panda,

You can see in the MIKE Zero manual, that the list of options from the MZLaunch utility can be called using this command line:
C:\"Program Files (x86)"\DHI\2017\bin\x64\MZLaunch.exe -h
So if you run this from a command prompt, you then get the MPI option which is:
-mpi X, where X is the number of subdomains to use.

So the final command line may look like this:
Start /wait C:\"Program Files (x86)"\DHI\2017\bin\x64\Mzlaunch.exe case_1_opening.m21fm -mpi 4 -x
if you want to use 4 subdomains with version 2017.

Best regards,
Mathieu

uspanda

  • Posts: 14
    • View Profile
Re: Batch Mode simulation
« Reply #9 on: June 14, 2017, 05:51:29 am »
Dear Dr Matheiu,

Thank you very much for your reply. I tried with your options but i am getting the error

"The command "mpiexec -n 4 -localonly "C\program files (x86)\dhi\2014\bin\x64\femenginehdMPI.exe" "case-1-Sewage.m21fm" could not be launched.

system error message:
The system cannot find the file specified.


Is it with MPIEXEC installation problem, if so, how to resolve it?
Thank you.

Panda

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #10 on: June 14, 2017, 10:16:45 am »
Hi,

have you tried to specify the absolute path to your m21fm - file ?

Bests Christian
Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

uspanda

  • Posts: 14
    • View Profile
Re: Batch Mode simulation
« Reply #11 on: June 14, 2017, 10:19:18 am »
Hi

Yes, I have given the following path

path=C:\Users\Admin\Documents\MIKE Zero Projects\Puducherry_Satya\Case Studies setup;%DHI_MIKE_2014%;

start /wait MzLaunch.exe -exit 20%increase_april.m21fm -mpi 4 -x
start /wait MzLaunch.exe -exit 20%increase_NOV.m21fm -mpi 4 -x
start /wait MzLaunch.exe -exit 50%increase_april.m21fm -mpi 4 -x
start /wait MzLaunch.exe -exit 50%increase_NOV.m21fm -mpi 4 -x

Christian Tomsu

  • Posts: 96
    • View Profile
    • SPEKTER GmbH
Re: Batch Mode simulation
« Reply #12 on: June 19, 2017, 12:40:58 pm »
Hi uspanda,

could it be, that the % in the filename should be replaced by something other ???
The % is normally reserved for variables.

Bests Christian
Project management / Modelling / Advisor
SPEKTER GmbH
Herzogenaurach

vinhtn

  • Posts: 1
    • View Profile
Re: Batch Mode simulation
« Reply #13 on: May 27, 2020, 11:14:19 am »
Hi,

I am trying to make the batch file to run Mike URBAN with Runoff, Network, and 2D overland options at the same times.

Actually, I didn't find any information about how to make the command except for how to call "MOUSESimLaunch.exe"
Could you please help me out?

Best,
Tran