Last active
April 20, 2024 08:23
-
-
Save martijngastkemper/7dfce82d7e39869c725d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #$ -V | |
| #$ -j yes | |
| set NHOSTS manually here: | |
| export NHOSTS=2 | |
| NPART=$NHOSTS | |
| # | |
| # This script starts a single-domain Delft3D-FLOW computation on Linux in parallel mode | |
| # asuming nodes are allocated manually | |
| # | |
| # Usage example: | |
| # Create a file named machinefile as described below | |
| # Execute this script | |
| # | |
| # In case the error "unable to find mpd.conf" occurs: | |
| # Your home directory MUST contain file .mpd.conf with contents: | |
| # secretword=bla | |
| # and with file access permissions: | |
| # -r-------- | |
| # | |
| # | |
| # Specify the config file to be used here | |
| # | |
| argfile=config.xml | |
| # | |
| # Set the directory containing delftflow.exe here | |
| # | |
| export ARCH=lnx | |
| export D3D_HOME=delft3d/bin | |
| exedir=$D3D_HOME/$ARCH/flow2d3d/bin | |
| # | |
| # No adaptions needed below | |
| # | |
| # Set some (environment) parameters | |
| export LD_LIBRARY_PATH=$exedir:$LD_LIBRARY_PATH | |
| ### Specific setting for H3/H4 linuxclusters, needed for MPICH2 | |
| ### commands (mpdboot, mpirun, mpiexed, mpdallexit etc.). | |
| export PATH="/opt/mpich2/bin:${PATH}" | |
| ### The file "machinefile" is assumed to be created manually and should | |
| ### look like: | |
| ### machinename1:2 | |
| ### machinename2:2 | |
| ### machinename3:2 | |
| echo Contents of machinefile: | |
| cat $(pwd)/machinefile | |
| echo ---------------------------------------------------------------------- | |
| # Run | |
| ### command="d3d.run -nproc "$NHOSTS" -input "$inputfile" -back no | |
| ### eval $command | |
| ### General for MPICH2, startup your MPICH2 communication network (you | |
| ### can check if it is already there with mpdtrace). | |
| ### | |
| ### The use of hydra instead of mpd is adviced. hydra is the default for mpich2 version 1.4.1 | |
| ### From the README: | |
| ### hydra | |
| ### ----- | |
| ### Hydra is the default process management framework that uses existing | |
| ### daemons on nodes (e.g., ssh, pbs, slurm, sge) to start MPI processes. | |
| ### More information on Hydra can be found at | |
| ### http://wiki.mcs.anl.gov/mpich2/index.php/Using_the_Hydra_Process_Manager | |
| ### | |
| ### mpd | |
| ### --- | |
| ### MPD was the traditional process manager in MPICH2. The file | |
| ### mpich2-1.4.1/src/pm/mpd/README has more information about interactive commands | |
| ### for managing the ring of MPDs. The MPD process manager is now deprecated. | |
| mpd & | |
| ### Optionally: | |
| ### Add option --rsh=/usr/bin/rsh to mpdboot | |
| ### This is needed when the following error appears: | |
| ### mpdboot_xh5000 (handle_mpd_output 420): from mpd on xh5001, invalid port info: no_port | |
| mpdboot -n $NHOSTS -f $(pwd)/machinefile --ncpus=2 | |
| # link mpich debug rubbish to /dev/null | |
| node_number=$NPART | |
| while test $node_number -ge 1 | |
| do | |
| node_number=`expr $node_number - 1` | |
| ln -s /dev/null log$node_number.irlog | |
| done | |
| ### For debug purpose: | |
| echo " " | |
| echo "ldd libflow2d3d.so: start" | |
| ldd $exedir/libflow2d3d.so | |
| echo "ldd libflow2d3d.so: end" | |
| echo " " | |
| ### General, start delftflow in parallel by means of mpirun. | |
| ### The machines in the h4 cluster are dual core; start 2*NHOSTS parallel processes | |
| mpirun -np $NHOSTS $exedir/d_hydro.exe $argfile | |
| ### alternatives: | |
| ### mpiexec -n $DELTAQ_NumNodes delftflow_91.exe -r $inputfile.mdf | |
| ### mpiexec -n `expr $DELTAQ_NumNodes \* 2` $exedir/deltares_hydro.exe $argfile | |
| rm -f log*.irlog | |
| ### General for MPICH2, finish your MPICH2 communication network. | |
| mpdallexit | |
Author
Hi Martijn,
Thank you so much for the response. I’m quite new in running the coupled
simulations (WAVE+FLOW) via a cluster. I can’t remember the original error
I had.
Just to give you a little bit of background, I am using the scripts below:
-
run_dflow2d3d_parallel_dwaves.sh
-
and tnpa_cc_trial2.pbs (where I execute .sh) to try and run the coupled
simulation.
I am not sure how to set up the environment (which is included in the.pbs
script), and I would appreciate your assistance. In addition, there is no
literature or information on this topic.
Does the.pbs script make sense? Specifically, where I run the model? I
would appreciate it if you could share any information you have about this.
Looking forward to hearing from you.
Kind regards,
Bafana
…On Wed, 17 Apr 2024 at 21:40, Martijn Gastkemper ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Funny that this script gets some attention after 9 years. It’s a long time
ago. I kept my shell script skills up to date the last years but never
worked with delft3d since.
Can you share more details and the error? Maybe I can help.
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/martijngastkemper/7dfce82d7e39869c725d#gistcomment-5027357>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASXMSL4QTDDNQLMOOMAZ2W3Y53F2ZBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVAYTQNRXGYYTGN5HORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Author
I'm sorry but that beyond my knowledge.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Funny that this script gets some attention after 9 years. It’s a long time ago. I kept my shell script skills up to date the last years but never worked with delft3d since.
Can you share more details and the error? Maybe I can help.