Forum_general

General

At this page you can post questions or start discussions on general topics related to Delft3D Flexible Mesh.

Please select a proper category below (if possible), to post your message or reply to an existing post. Please add tags to your posts to simplify searching.

 

** PLEASE TAG YOUR POST! **

 

 

 

 


Message Boards

run_parallel.sh

SP
Santosa Putra, modified 6 Years ago.

run_parallel.sh

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear all,

Nice greeting. I just want to share about run_parallel.sh script use.

I got error when I try to make *.mdu partition using run_parralel.sh. (error in line 28)

In line 28 there is a command like:

for (( my_rank=0; my_rank<NUMRANKS; my_rank++ ))

Can you help me to explain this, please?
Thank you.
Arthur van Dam, modified 6 Years ago.

RE: run_parallel.sh (Answer)

Youngling Posts: 17 Join Date: 3/3/11 Recent Posts
Line 28 starts the for-loop across the number of subdomains you have requested, and it will create multiple MDU files, based on a single base MDU file. One MDU file for each subdomain.

Which version of bash are you using?
Here's some of my output:

[dam_ar@devux64:~]$ which bash
/bin/bash
[dam_ar@devux64:~]$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.


And when running on a sample model:

[dam_ar@devux64:~/unstruc_svn6/test_data/dd_example]$ ../../scripts/parallel/run_parallel.sh dd_example.mdu 4 dd_example_part.pol 6
[dam_ar@devux64:~/unstruc_svn6/test_data/dd_example]$ ls -lart
total 168
drwxr-xr-x 3 dam_ar dsc  4096 Nov 29 11:46 output
-rw-r--r-- 1 dam_ar dsc  5271 Nov 29 11:46 dd_example_part.pol
-rw-r--r-- 1 dam_ar dsc 26308 Nov 29 11:46 dd_example_net.nc
-rw-r--r-- 1 dam_ar dsc 12756 Nov 29 11:46 dd_example_0003_net.nc
-rw-r--r-- 1 dam_ar dsc 13192 Nov 29 11:46 dd_example_0002_net.nc
-rw-r--r-- 1 dam_ar dsc 13820 Nov 29 11:46 dd_example_0001_net.nc
-rw-r--r-- 1 dam_ar dsc 13256 Nov 29 11:46 dd_example_0000_net.nc
-rw-r--r-- 1 dam_ar dsc  7468 Nov 29 11:46 dd_example.mdu
-rw-r--r-- 1 dam_ar dsc 10308 Nov 29 11:46 dd_example.dia
drwxr-xr-x 5 dam_ar dsc  4096 Nov 29 11:46 ..
drwxr-xr-x 4 dam_ar dsc  4096 Nov 29 11:46 .
drwxr-xr-x 6 dam_ar dsc  4096 Dec  4 21:00 .svn
[b][color=#0000FF]-rw-r--r-- 1 dam_ar dsc  7450 Jan 15 10:58 dd_example_0003.mdu
-rw-r--r-- 1 dam_ar dsc  7450 Jan 15 10:58 dd_example_0002.mdu
-rw-r--r-- 1 dam_ar dsc  7450 Jan 15 10:58 dd_example_0001.mdu
-rw-r--r-- 1 dam_ar dsc  7450 Jan 15 10:58 dd_example_0000.mdu[/color]
[/b]
SP
Santosa Putra, modified 6 Years ago.

RE: run_parallel.sh

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear Arthur, thank you for your reply.

ihe@Master:/mirror/dflowfm$ which bash
/bin/bash
ihe@Master:/mirror/dflowfm$ bash --version
GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


Seems that it is different version compared to your BASH. Is that make a problem?
Arthur van Dam, modified 6 Years ago.

RE: run_parallel.sh

Youngling Posts: 17 Join Date: 3/3/11 Recent Posts
I just checked with bash 4.2.10. Works without problems. I have attached the correct run_parallel.sh to this message, could you please try that one. Maybe you had some changes in your script?
SP
Santosa Putra, modified 6 Years ago.

RE: run_parallel.sh

Youngling Posts: 0 Join Date: 9/16/13 Recent Posts
Dear Arthur,

I try with run_parallel.sh that you give.

Maybe because I do
sh run_parallel.sh ./salt/saltfield-np5-60.mdu 3 ./salt/saltfield-np5_part.pol 6

in the previous step.

Later on I just run it with
run_parallel.sh ./salt/saltfield-np5-60.mdu 3 ./salt/saltfield-np5_part.pol 6


And it gives me error:

sed: -e expression #1, char 162: unknown option to `s'
sed: -e expression #1, char 162: unknown option to `s'
sed: -e expression #1, char 162: unknown option to `s'


As an alternative, I will try to modify the *.mdu file manually.
Thank you for your time
Arthur van Dam, modified 6 Years ago.

RE: run_parallel.sh

Youngling Posts: 17 Join Date: 3/3/11 Recent Posts
Okay, I understand. You should not have used `sh run_parallel.sh ... `, just `run_parallel.sh ...`, as described in the manual, Sec. 7.2.2.
Regarding the sed error, let's have a look at that on Monday, if you're coming over to us.