[cig-commits] [commit] devel,master: fixes a bug for runs without C-PML conditions; creates bash scripts for both CPML/purely_elastic/ examples; modifies loops using the CPML_mask_ibool array; comments out boundary conditions for acoustic pml elements (e2b8a5d)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jun 18 16:51:21 PDT 2014


Repository : https://github.com/geodynamics/specfem3d

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d/compare/6026e367984905ab133865f62fa6293b343759b9...47f703851338234f96397e7da9fbff63d8178b8a

>---------------------------------------------------------------

commit e2b8a5d82641b243ffcfb5b4ad246787ddbce576
Author: Joseph Charles <jcharles at lma.cnrs-mrs.fr>
Date:   Sun Mar 24 18:58:31 2013 +0000

    fixes a bug for runs without C-PML conditions; creates bash scripts for both CPML/purely_elastic/ examples; modifies loops using the CPML_mask_ibool array; comments out boundary conditions for acoustic pml elements


>---------------------------------------------------------------

e2b8a5d82641b243ffcfb5b4ad246787ddbce576
 .../HOMO8_FREE_SURFACE/HOWTO_run_this_example.txt  | 11 ------
 .../purely_elastic/HOMO8_FREE_SURFACE}/process.sh  | 45 +++++++++++++---------
 .../HOMO8_NOFREESURFACE/HOWTO_run_this_example.txt | 11 ------
 .../purely_elastic/HOMO8_NOFREESURFACE}/process.sh | 45 +++++++++++++---------
 homogeneous_halfspace_HEX8/process.sh              | 40 +++++++++++--------
 meshfem3D_examples/simple_model/process.sh         |  2 -
 6 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/CPML/purely_elastic/HOMO8_FREE_SURFACE/HOWTO_run_this_example.txt b/CPML/purely_elastic/HOMO8_FREE_SURFACE/HOWTO_run_this_example.txt
deleted file mode 100644
index cae8beb..0000000
--- a/CPML/purely_elastic/HOMO8_FREE_SURFACE/HOWTO_run_this_example.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-To run this example on 8 processor cores for instance, type this (replace "8" with another value in the three lines below if you want to use more processor cores):
-
-cd bin/
-
-./xdecompose_mesh 8 ../DATA/MESH ../OUTPUT_FILES/DATABASES_MPI
-
-mpirun -np 8 ./xgenerate_databases
-
-mpirun -np 8 ./xspecfem3D
-
diff --git a/Mount_StHelens/process.sh b/CPML/purely_elastic/HOMO8_FREE_SURFACE/process.sh
old mode 100755
new mode 100644
similarity index 62%
copy from Mount_StHelens/process.sh
copy to CPML/purely_elastic/HOMO8_FREE_SURFACE/process.sh
index 99bf242..dfae675
--- a/Mount_StHelens/process.sh
+++ b/CPML/purely_elastic/HOMO8_FREE_SURFACE/process.sh
@@ -5,12 +5,13 @@
 #
 # prior to running this script, you must create the mesh files
 # in directory MESH/ 
+# (see section 3.1 "Meshing with CUBIT" in user guide)
 #
 
-###################################################
+##################################################
 
 # number of processes
-NPROC=4
+NPROC=8
 
 ##################################################
 
@@ -33,44 +34,52 @@ rm -f OUTPUT_FILES/*
 rm -rf OUTPUT_FILES/DATABASES_MPI/*
 
 # compiles executables in root directory
-cd ../../
+cd ../../../..
+
+rm -fr DATA/*
+cd $currentdir
+cp -fr DATA/* ../../../../DATA/.
+
+cd ../../../..
+
 make clean
-make > $currentdir/tmp.log
+./configure
+make all > $currentdir/tmp.log
 cd $currentdir
 
 # links executables
 cd bin/
-rm -f ./x*
-cp ../../../bin/xdecompose_mesh ./
-cp ../../../bin/xgenerate_databases ./
-cp ../../../bin/xspecfem3D ./
+rm -f *
+ln -s ../../../../../bin/xdecompose_mesh .
+ln -s ../../../../../bin/xgenerate_databases .
+ln -s ../../../../../bin/xspecfem3D .
 cd ../
 
-# decomposes mesh
-echo
-echo "  decomposing mesh..."
-echo
-./bin/xdecompose_mesh $NPROC MESH/ OUTPUT_FILES/DATABASES_MPI/
+if [ ! -e bin/xspecfem3D ]; then echo "compilation failed, please check..."; exit 1; fi
 
 # stores setup
 cp DATA/Par_file OUTPUT_FILES/
 cp DATA/CMTSOLUTION OUTPUT_FILES/
 cp DATA/STATIONS OUTPUT_FILES/
 
+# decomposes mesh
+echo
+echo "  decomposing mesh..."
+echo
+cd bin/
+./xdecompose_mesh $NPROC ../DATA/MESH/ ../OUTPUT_FILES/DATABASES_MPI/
+
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -n $NPROC ./xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
+mpirun -n $NPROC ./xspecfem3D
 cd ../
 
 echo
diff --git a/CPML/purely_elastic/HOMO8_NOFREESURFACE/HOWTO_run_this_example.txt b/CPML/purely_elastic/HOMO8_NOFREESURFACE/HOWTO_run_this_example.txt
deleted file mode 100644
index cae8beb..0000000
--- a/CPML/purely_elastic/HOMO8_NOFREESURFACE/HOWTO_run_this_example.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-To run this example on 8 processor cores for instance, type this (replace "8" with another value in the three lines below if you want to use more processor cores):
-
-cd bin/
-
-./xdecompose_mesh 8 ../DATA/MESH ../OUTPUT_FILES/DATABASES_MPI
-
-mpirun -np 8 ./xgenerate_databases
-
-mpirun -np 8 ./xspecfem3D
-
diff --git a/Mount_StHelens/process.sh b/CPML/purely_elastic/HOMO8_NOFREESURFACE/process.sh
old mode 100755
new mode 100644
similarity index 62%
copy from Mount_StHelens/process.sh
copy to CPML/purely_elastic/HOMO8_NOFREESURFACE/process.sh
index 99bf242..3ce7ca4
--- a/Mount_StHelens/process.sh
+++ b/CPML/purely_elastic/HOMO8_NOFREESURFACE/process.sh
@@ -5,12 +5,13 @@
 #
 # prior to running this script, you must create the mesh files
 # in directory MESH/ 
+# (see section 3.1 "Meshing with CUBIT" in user guide)
 #
 
-###################################################
+##################################################
 
 # number of processes
-NPROC=4
+NPROC=8
 
 ##################################################
 
@@ -33,44 +34,52 @@ rm -f OUTPUT_FILES/*
 rm -rf OUTPUT_FILES/DATABASES_MPI/*
 
 # compiles executables in root directory
-cd ../../
+cd ../../../..
+
+rm -fr DATA/*
+cd $currentdir
+cp -fr DATA/* ../../../../DATA/.
+
+cd ../../../..
+
 make clean
-make > $currentdir/tmp.log
+./configure
+make all > $currentdir/tmp.log
 cd $currentdir
 
 # links executables
 cd bin/
-rm -f ./x*
-cp ../../../bin/xdecompose_mesh ./
-cp ../../../bin/xgenerate_databases ./
-cp ../../../bin/xspecfem3D ./
+rm -f bin/*
+ln -s ../../../../../bin/xdecompose_mesh .
+ln -s ../../../../../bin/xgenerate_databases .
+ln -s ../../../../../bin/xspecfem3D .
 cd ../
 
-# decomposes mesh
-echo
-echo "  decomposing mesh..."
-echo
-./bin/xdecompose_mesh $NPROC MESH/ OUTPUT_FILES/DATABASES_MPI/
+if [ ! -e bin/xspecfem3D ]; then echo "compilation failed, please check..."; exit 1; fi
 
 # stores setup
 cp DATA/Par_file OUTPUT_FILES/
 cp DATA/CMTSOLUTION OUTPUT_FILES/
 cp DATA/STATIONS OUTPUT_FILES/
 
+# decomposes mesh
+echo
+echo "  decomposing mesh..."
+echo
+cd bin/
+./xdecompose_mesh $NPROC ../DATA/MESH/ ../OUTPUT_FILES/DATABASES_MPI/
+
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -n $NPROC ./xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
+mpirun -n $NPROC ./xspecfem3D
 cd ../
 
 echo
diff --git a/homogeneous_halfspace_HEX8/process.sh b/homogeneous_halfspace_HEX8/process.sh
index a7d50e5..f7623bc 100755
--- a/homogeneous_halfspace_HEX8/process.sh
+++ b/homogeneous_halfspace_HEX8/process.sh
@@ -5,6 +5,7 @@
 #
 # prior to running this script, you must create the mesh files
 # in directory MESH/
+# (see section 3.1 "Meshing with CUBIT" in user guide)
 #
 
 ###################################################
@@ -27,49 +28,54 @@ echo "   setting up example..."
 echo
 
 mkdir -p bin
-mkdir -p OUTPUT_FILES
 mkdir -p OUTPUT_FILES/DATABASES_MPI
 
-rm -rf OUTPUT_FILES/*
+rm -f OUTPUT_FILES/*
 rm -rf OUTPUT_FILES/DATABASES_MPI/*
 
 # compiles executables in root directory
 cd ../../
-make > tmp.log
+
+rm -fr DATA/*
+cd $currentdir
+cp -fr DATA/* ../../DATA/.
+
+cd ../../
+
+make clean
+./configure
+make all > $currentdir/tmp.log
 cd $currentdir
 
 # links executables
 cd bin/
-rm -f ./x*
-cp ../../../bin/xdecompose_mesh ./
-cp ../../../bin/xgenerate_databases ./
-cp ../../../bin/xspecfem3D ./
-cd ../
-
-# decomposes mesh
-echo
-echo "  decomposing mesh..."
-echo
-./bin/xdecompose_mesh $NPROC DATA/MESH-default/ OUTPUT_FILES/DATABASES_MPI/
+rm -f *
+cp ../../../bin/xdecompose_mesh .
+cp ../../../bin/xgenerate_databases .
+cp ../../../bin/xspecfem3D .
 
 # stores setup
 cp DATA/Par_file OUTPUT_FILES/
 cp DATA/CMTSOLUTION OUTPUT_FILES/
 cp DATA/STATIONS OUTPUT_FILES/
 
+# decomposes mesh
+echo
+echo "  decomposing mesh..."
+echo
+cd bin/
+./xdecompose_mesh $NPROC ../DATA/MESH-default/ ../OUTPUT_FILES/DATABASES_MPI/
+
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-cd bin/
 mpirun -np $NPROC ./xgenerate_databases
-cd ../
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
 mpirun -np $NPROC ./xspecfem3D
 cd ../
 
diff --git a/meshfem3D_examples/simple_model/process.sh b/meshfem3D_examples/simple_model/process.sh
index d08aac1..01b7d60 100755
--- a/meshfem3D_examples/simple_model/process.sh
+++ b/meshfem3D_examples/simple_model/process.sh
@@ -61,13 +61,11 @@ echo "running database generation..."
 echo
 cd bin/
 mpirun -np $NPROC ./xgenerate_databases
-cd ../
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
 mpirun -np $NPROC ./xspecfem3D
 cd ../
 



More information about the CIG-COMMITS mailing list