[cig-commits] r8521 - in seismo/2D/SPECFEM2D/trunk/UTILS: . sun_grid_engine_UPPA

walter at geodynamics.org walter at geodynamics.org
Fri Dec 7 15:53:12 PST 2007


Author: walter
Date: 2007-12-07 15:53:11 -0800 (Fri, 07 Dec 2007)
New Revision: 8521

Added:
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/clean_scratch_UPPA.sh
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_parallel.sh
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_serial.sh
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_parallel.sh
   seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_serial.sh
Log:
added sun grid engine scripts for UPPA cluster.

Added: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/clean_scratch_UPPA.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/clean_scratch_UPPA.sh	2007-05-22 04:40:07 UTC (rev 8520)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/clean_scratch_UPPA.sh	2007-12-07 23:53:11 UTC (rev 8521)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+
+rm -r /scratch/$1/$2$3
\ No newline at end of file


Property changes on: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/clean_scratch_UPPA.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_parallel.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_parallel.sh	2007-05-22 04:40:07 UTC (rev 8520)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_parallel.sh	2007-12-07 23:53:11 UTC (rev 8521)
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# shell to be used
+#$ -S /bin/sh
+
+# name of the job
+#$ -N SPECFEM2D
+
+# this is to make the current directory the working directory
+#$ -cwd
+
+
+# SGE script to use on the UPPA cluster, usually called by submit_sun_grid_engine_UPPA.sh
+# It dispatches the Databases to the corresponding nodes in their local storage devices (assuming /scratch/$user already exists).
+# The current limit on the number of processes is 99 for this script.
+# The host of the scp from iplmas014 should be changed according to the user's lab (can be ipigps014 for MIGP).
+# Many unnecessary copies should be disposed of as soon as FS sync issues have been addressed.
+# The call to clean_scratch_UPPA.sh should be replaced when an alternate way to do this becomes available, like "rsh" 
+# or "shmux" for instance (according to OpenMPI manual it can be used, but beware of other MPI libraries, and it is in fact ugly).
+
+
+
+
+
+PeHostfile2MachineFile()
+{
+    cat $1
+    
+    j=0
+    
+    host0=`head -n 1 $1 | cut -f1 -d" "|cut -f1 -d"."`
+
+    cat $1 | while read line; do
+      # echo $line
+      host=`echo $line|cut -f1 -d" "|cut -f1 -d"."`
+      nslots=`echo $line|cut -f2 -d" "`
+      i=1
+      
+       scp -r ../$3$4 $host.univ-pau.fr:/scratch/$2
+
+      while [ $i -le $nslots ]; do
+         echo $host
+         i=`expr $i + 1`
+
+	 if [ $j -lt 10 ] 
+	     then
+	     scp ./OUTPUT_FILES/Database0000$j $host.univ-pau.fr:/scratch/$2/$3$4/OUTPUT_FILES/
+	 else
+	     if [ $j -lt 100 ]
+		 then
+		 scp ./OUTPUT_FILES/Database000$j $host.univ-pau.fr:/scratch/$2$3$4/OUTPUT_FILES/
+	     fi  
+	 fi
+
+	 j=`expr $j + 1`	 
+	 
+
+      done
+    done
+}
+
+
+CURRENT_DIR=$PWD
+echo $CURRENT_DIR
+
+mkdir $JOB_NAME$JOB_ID
+mkdir $JOB_NAME$JOB_ID/OUTPUT_FILES
+mkdir $JOB_NAME$JOB_ID/DATA
+
+cd $JOB_NAME$JOB_ID
+
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/OUTPUT_FILES/Database* ./OUTPUT_FILES/
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/DATA/STATIONS ./DATA/
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/xspecfem2D ./
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/clean_scratch.sh ./
+
+PeHostfile2MachineFile $PE_HOSTFILE $USER $JOB_NAME $JOB_ID
+
+cd $CURRENT_DIR
+
+rm -r $JOB_NAME$JOB_ID/
+
+rm ./OUTPUT_FILES/Database*
+
+cd /scratch/$USER/$JOB_NAME$JOB_ID
+
+
+LD_LIBRARY_PATH=/opt/openmpi-1.2.1/gfortran64/lib  /opt/openmpi-1.2.1/gfortran64/bin/mpirun -np 8 ./xspecfem2D
+
+scp $host0.univ-pau.fr:/scratch/$USER/$JOB_NAME$JOB_ID/OUTPUT_FILES/* $CURRENT_DIR/OUTPUT_FILES/
+
+LD_LIBRARY_PATH=/opt/openmpi-1.2.1/gfortran64/lib  /opt/openmpi-1.2.1/gfortran64/bin/mpirun -np 8 ./clean_scratch_UPPA.sh $USER $JOB_NAME $JOB_ID
+

Added: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_serial.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_serial.sh	2007-05-22 04:40:07 UTC (rev 8520)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/qsub_UPPA_serial.sh	2007-12-07 23:53:11 UTC (rev 8521)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# shell to be used
+#$ -S /bin/sh
+
+# name of the job
+#$ -N SPECFEM2D
+
+# this is to make the current directory the working directory
+#$ -cwd
+
+
+# SGE script to use on the UPPA cluster, usually called by submit_sun_grid_engine_UPPA.sh
+# It dispatches the Database to the corresponding node in its local storage devices (assuming /scratch/$user already exists).
+# The host of the scp from iplmas014 should be changed according to the user's lab (can be ipigps014 for MIGP).
+# Many unnecessary copies should be disposed of as soon as FS sync issues have been addressed.
+
+
+
+
+CURRENT_DIR=$PWD
+echo $CURRENT_DIR
+
+mkdir $JOB_NAME$JOB_ID
+mkdir $JOB_NAME$JOB_ID/OUTPUT_FILES
+mkdir $JOB_NAME$JOB_ID/DATA
+
+cd $JOB_NAME$JOB_ID
+
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/OUTPUT_FILES/Database* ./OUTPUT_FILES/
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/DATA/STATIONS ./DATA/
+scp iplmas014.univ-pau.fr:$CURRENT_DIR/xspecfem2D ./
+
+cp -r ../$JOB_NAME$JOB_ID /scratch/$USER/
+
+cd $CURRENT_DIR
+
+rm -r $JOB_NAME$JOB_ID/
+
+rm ./OUTPUT_FILES/Database*
+
+cd /scratch/$USER/$JOB_NAME$JOB_ID
+
+./xspecfem2D
+
+cp /scratch/$USER/$JOB_NAME$JOB_ID/OUTPUT_FILES/* $CURRENT_DIR/OUTPUT_FILES/
+
+rm -r /scratch/$USER/$JOB_NAME$JOB_ID
\ No newline at end of file

Added: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_parallel.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_parallel.sh	2007-05-22 04:40:07 UTC (rev 8520)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_parallel.sh	2007-12-07 23:53:11 UTC (rev 8521)
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+
+# This is a script for submitting parallel jobs on the UPPA cluster.
+# DO NOT FORGET to check file qsub_openmpi_UPPA.sh to change the number of 
+# proccesses according to the value specified in Par_file.
+# The path to OpenMPI libs should or should not be specified, depending 
+# on the user environement.
+
+# The allocation rule for parallel jobs is round robin when using "openmpi" PE : 
+# specify "openmpi_fillup" to have the fill up allocation rule.
+
+# BEWARE : by default, old Databases along with new Databases in ./OUTPUT_FILES directory are removed;
+# comment "rm ./OUTPUT_FILES/Database*" in this file and in qsub_openmpi_UPPA.sh if you wish to change this behavior.
+
+# note : xmeshfem2D DOES NOT run on a node, its runs on a frontal and outside of SGE. It was done so as to provide a way to
+# submit jobs when the Databases were previously created.
+
+
+rm ./OUTPUT_FILES/Database*
+
+LD_LIBRARY_PATH=/opt/openmpi-1.2.1/gfortran64/lib ./xmeshfem2D
+
+qsub -pe openmpi 8 ./qsub_UPPA_parallel.sh
+


Property changes on: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_parallel.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_serial.sh
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_serial.sh	2007-05-22 04:40:07 UTC (rev 8520)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_serial.sh	2007-12-07 23:53:11 UTC (rev 8521)
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+
+# This is a script for submitting serial jobs on the UPPA cluster.
+
+# BEWARE : by default, old Databases along with new Databases in ./OUTPUT_FILES directory are removed;
+# comment "rm ./OUTPUT_FILES/Database*" in this file and in qsub_UPPA.sh if you wish to change this behavior.
+
+# note : xmeshfem2D DOES NOT run on a node, its runs on a frontal and outside of SGE. It was done so as to provide a way to
+# submit jobs when the Databases were previously created.
+
+
+rm ./OUTPUT_FILES/Database*
+
+./xmeshfem2D
+
+qsub ./qsub_UPPA_serial.sh
+


Property changes on: seismo/2D/SPECFEM2D/trunk/UTILS/sun_grid_engine_UPPA/submit_sun_grid_engine_UPPA_serial.sh
___________________________________________________________________
Name: svn:executable
   + *



More information about the cig-commits mailing list