[cig-commits] [commit] devel, master: examples' process.sh reflect new directory structure (ceb555e)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jun 18 16:54:44 PDT 2014


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

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

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

commit ceb555e1fc2f0553ddff0eac0717837d3fafb002
Author: Matthieu Lefebvre <ml15 at princeton.edu>
Date:   Wed Mar 26 10:37:05 2014 -0400

    examples' process.sh reflect new directory structure


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

ceb555e1fc2f0553ddff0eac0717837d3fafb002
 .../ACOUSTIC/postprocessing.f90                    | 18 +++++++-------
 .../ELASTIC/postprocessing.f90                     | 28 +++++++++++-----------
 .../process.sh                                     |  8 +++----
 .../process.sh                                     |  1 -
 .../process.sh                                     |  7 +++---
 .../process.sh                                     |  8 +++----
 .../process.sh                                     |  8 +++----
 .../process.sh                                     |  8 +++----
 Mount_StHelens/process.sh                          |  8 ++-----
 .../process.sh                                     |  8 +++----
 .../process.sh                                     |  8 +++----
 layered_halfspace/process.sh                       | 12 +++-------
 .../many_interfaces/go_process_pbs.bash            | 12 +++-------
 meshfem3D_examples/many_interfaces/process.sh      | 12 +++-------
 meshfem3D_examples/simple_model/process.sh         | 10 +++-----
 meshfem3D_examples/socal1D/process.sh              | 12 +++-------
 noise_tomography/pre-processing.sh                 | 23 +++++++++---------
 view_all_process_sh_to_modify.csh                  | 24 +++++++++++++++++++
 waterlayered_halfspace/process.sh                  |  8 ++-----
 19 files changed, 99 insertions(+), 124 deletions(-)

diff --git a/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/postprocessing.f90 b/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/postprocessing.f90
index 56f63b4..e47fcd4 100644
--- a/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/postprocessing.f90
+++ b/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/postprocessing.f90
@@ -39,7 +39,7 @@ program random_model
     print*,'  ',trim(prname)
 
     ! nspec & nglob
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'external_mesh.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'external_mesh.bin',status='old',action='read',form='unformatted',iostat=ier)
     if( ier /= 0 ) stop 'error opening database proc######_external_mesh.bin'
     read(IOUT) nspec
     read(IOUT) nglob
@@ -47,18 +47,18 @@ program random_model
 
     ! weights
     allocate(weights(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array weights'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'weights_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'weights_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) weights
     close(IOUT)
 
     ! kernels
     allocate(krhop(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array krhop'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'rhop_acoustic_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'rhop_acoustic_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) krhop
     close(IOUT)
 
     allocate(kalpha(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array kalpha'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'alpha_acoustic_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'alpha_acoustic_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) kalpha
     close(IOUT)
 
@@ -67,20 +67,20 @@ program random_model
     ! rho
     allocate(rho(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array rho'
     allocate(rho0(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array rho0'
-    open(unit=IOUT,file='../models/target_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/target_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
     read(IOUT) rho
     close(IOUT)
-    open(unit=IOUT,file='../models/initial_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/initial_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
     read(IOUT) rho0
     close(IOUT)
 
     ! vp
     allocate(vp(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vp'
     allocate(vp0(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vp0'
-    open(unit=IOUT,file='../models/target_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/target_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
     read(IOUT) vp
     close(IOUT)
-    open(unit=IOUT,file='../models/initial_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/initial_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
     read(IOUT) vp0
     close(IOUT)
 
@@ -99,7 +99,7 @@ program random_model
     !!! calculate inner product in data space --- <F dm, F dm>
     write(procname,"(i4)") myrank
     filename=trim(adjustl(procname))//"_dx_SU"
-    open(111,file="../OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
+    open(111,file="./OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
     if( ios /= 0 ) stop 'error opening adjoint trace'
     print*,'  ',trim(adjustl(filename))//".adj"
 
diff --git a/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/postprocessing.f90 b/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/postprocessing.f90
index 2f3f562..dc47fd8 100644
--- a/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/postprocessing.f90
+++ b/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/postprocessing.f90
@@ -39,7 +39,7 @@ program random_model
     print*,'  ',trim(prname)
 
     ! nspec & nglob
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'external_mesh.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'external_mesh.bin',status='old',action='read',form='unformatted',iostat=ier)
     if( ier /= 0 ) stop 'error opening database proc######_external_mesh.bin'
     read(IOUT) nspec
     read(IOUT) nglob
@@ -47,53 +47,53 @@ program random_model
 
     ! weights
     allocate(weights(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array weights'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'weights_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'weights_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) weights
     close(IOUT)
 
     ! kernels
     allocate(krhop(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array krhop'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'rhop_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'rhop_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) krhop
     close(IOUT)
 
     allocate(kalpha(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array kalpha'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'alpha_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'alpha_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) kalpha
     close(IOUT)
 
     allocate(kbeta(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array kbeta'
-    open(unit=IOUT,file='../OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'beta_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
+    open(unit=IOUT,file='./OUTPUT_FILES/DATABASES_MPI/'//trim(adjustl(prname))//'beta_kernel.bin',status='old',action='read',form='unformatted',iostat=ier)
     read(IOUT) kbeta
     close(IOUT)
 
     ! rho
     allocate(rho(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array rho'
     allocate(rho0(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array rho0'
-    open(unit=IOUT,file='../models/target_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/target_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
     read(IOUT) rho
     close(IOUT)
-    open(unit=IOUT,file='../models/initial_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/initial_model/'//trim(adjustl(prname))//'rho.bin',status='old',action='read',form='unformatted')
     read(IOUT) rho0
     close(IOUT)
 
     ! vp
     allocate(vp(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vp'
     allocate(vp0(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vp0'
-    open(unit=IOUT,file='../models/target_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/target_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
     read(IOUT) vp
     close(IOUT)
-    open(unit=IOUT,file='../models/initial_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/initial_model/'//trim(adjustl(prname))//'vp.bin',status='old',action='read',form='unformatted')
     read(IOUT) vp0
     close(IOUT)
 
     ! vs
     allocate(vs(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vs'
     allocate(vs0(NGLLX,NGLLY,NGLLZ,nspec),stat=ier); if( ier /= 0 ) stop 'error allocating array vs0'
-    open(unit=IOUT,file='../models/target_model/'//trim(adjustl(prname))//'vs.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/target_model/'//trim(adjustl(prname))//'vs.bin',status='old',action='read',form='unformatted')
     read(IOUT) vs
     close(IOUT)
-    open(unit=IOUT,file='../models/initial_model/'//trim(adjustl(prname))//'vs.bin',status='old',action='read',form='unformatted')
+    open(unit=IOUT,file='./models/initial_model/'//trim(adjustl(prname))//'vs.bin',status='old',action='read',form='unformatted')
     read(IOUT) vs0
     close(IOUT)
 
@@ -109,7 +109,7 @@ program random_model
     !!! calculate inner product in data space --- <F dm, F dm>
     write(procname,"(i4)") myrank
     filename=trim(adjustl(procname))//"_dx_SU"
-    open(111,file="../OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
+    open(111,file="./OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
     if( ios /= 0 ) stop 'error opening adjoint trace'
     print*,'  ',trim(adjustl(filename))//".adj"
 
@@ -128,7 +128,7 @@ program random_model
     irec_total = irec_total + 1
 
     filename=trim(adjustl(procname))//"_dy_SU"
-    open(111,file="../OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
+    open(111,file="./OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
     if( ios /= 0 ) stop 'error opening adjoint trace'
     print*,'  ',trim(adjustl(filename))//".adj"
 
@@ -146,7 +146,7 @@ program random_model
     close(111)
 
     filename=trim(adjustl(procname))//"_dz_SU"
-    open(111,file="../OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
+    open(111,file="./OUTPUT_FILES/SEM/"//trim(adjustl(filename))//".adj",access='direct',recl=240+4*NSTEP,iostat = ios)
     if( ios /= 0 ) stop 'error opening adjoint trace'
     print*,'  ',trim(adjustl(filename))//".adj"
 
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/process.sh
index d7ce811..de5f2d7 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/process.sh
@@ -64,21 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/process.sh
index d7ce811..3fd1cc2 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/process.sh
@@ -64,7 +64,6 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
 ./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/process.sh
index d7ce811..911d787 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/process.sh
@@ -64,20 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
+mpirun -np $NPROC ./bin/xspecfem3D
 cd ../
 
 echo
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/process.sh
index d7ce811..de5f2d7 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/process.sh
@@ -64,21 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/process.sh
index d7ce811..de5f2d7 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/process.sh
@@ -64,21 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/process.sh b/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/process.sh
index d7ce811..de5f2d7 100755
--- a/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/process.sh
+++ b/CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/process.sh
@@ -64,21 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/Mount_StHelens/process.sh b/Mount_StHelens/process.sh
index 99bf242..379a1bd 100755
--- a/Mount_StHelens/process.sh
+++ b/Mount_StHelens/process.sh
@@ -61,17 +61,13 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/process.sh b/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/process.sh
index ec47524..fefac36 100755
--- a/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/process.sh
+++ b/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/process.sh
@@ -54,21 +54,19 @@ NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation on $NPROC processors..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver on $NPROC processors..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/homogeneous_halfspace_HEX8_elastic_no_absorbing/process.sh b/homogeneous_halfspace_HEX8_elastic_no_absorbing/process.sh
index 5524529..f7da882 100755
--- a/homogeneous_halfspace_HEX8_elastic_no_absorbing/process.sh
+++ b/homogeneous_halfspace_HEX8_elastic_no_absorbing/process.sh
@@ -64,21 +64,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH-default ../OUTPUT_FILES/DATABASES_MPI/
+./bin/xdecompose_mesh $NPROC ./MESH-default ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/layered_halfspace/process.sh b/layered_halfspace/process.sh
index bd66f2c..9fa63f5 100755
--- a/layered_halfspace/process.sh
+++ b/layered_halfspace/process.sh
@@ -56,25 +56,19 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  decomposing mesh..."
 echo
-cd bin/
-./xdecompose_mesh $NPROC ../MESH/ ../OUTPUT_FILES/DATABASES_MPI/
-cd ..
+./bin/xdecompose_mesh $NPROC ./MESH/ ./OUTPUT_FILES/DATABASES_MPI/
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpiexec -np $NPROC ./xgenerate_databases
-cd ../
+mpiexec -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpiexec -np $NPROC ./xspecfem3D
-cd ../
+mpiexec -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/meshfem3D_examples/many_interfaces/go_process_pbs.bash b/meshfem3D_examples/many_interfaces/go_process_pbs.bash
index 0a0c23c..583c3ef 100755
--- a/meshfem3D_examples/many_interfaces/go_process_pbs.bash
+++ b/meshfem3D_examples/many_interfaces/go_process_pbs.bash
@@ -60,9 +60,7 @@ numnodes=$NPROC
 echo
 echo "  meshing..."
 echo
-cd bin/
-mpiexec -np $numnodes ./xmeshfem3D
-cd ../
+mpiexec -np $numnodes ./bin/xmeshfem3D
 mv OUTPUT_FILES/output_mesher.txt OUTPUT_FILES/output_meshfem3D.txt
 
 # stores setup
@@ -75,17 +73,13 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpiexec -np $numnodes ./xgenerate_databases
-cd ../
+mpiexec -np $numnodes ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpiexec -np $numnodes ./xspecfem3D
-cd ../
+mpiexec -np $numnodes ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/meshfem3D_examples/many_interfaces/process.sh b/meshfem3D_examples/many_interfaces/process.sh
index 9475fce..33d37d0 100755
--- a/meshfem3D_examples/many_interfaces/process.sh
+++ b/meshfem3D_examples/many_interfaces/process.sh
@@ -52,26 +52,20 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "running mesher..."
 echo
-cd bin/
-mpirun -np $NPROC ./xmeshfem3D
-cd ../
+mpirun -np $NPROC ./bin/xmeshfem3D
 mv OUTPUT_FILES/output_mesher.txt OUTPUT_FILES/output_meshfem3D.txt
 
 # runs database generation
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/meshfem3D_examples/simple_model/process.sh b/meshfem3D_examples/simple_model/process.sh
index 01b7d60..bbe25c0 100755
--- a/meshfem3D_examples/simple_model/process.sh
+++ b/meshfem3D_examples/simple_model/process.sh
@@ -50,24 +50,20 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "running mesher..."
 echo
-cd bin/
-mpirun -np $NPROC ./xmeshfem3D
-cd ../
+mpirun -np $NPROC ./bin/xmeshfem3D
 mv OUTPUT_FILES/output_mesher.txt OUTPUT_FILES/output_meshfem3D.txt
 
 # runs database generation
 echo
 echo "running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/meshfem3D_examples/socal1D/process.sh b/meshfem3D_examples/socal1D/process.sh
index 73a1ba5..19a7f3c 100755
--- a/meshfem3D_examples/socal1D/process.sh
+++ b/meshfem3D_examples/socal1D/process.sh
@@ -51,9 +51,7 @@ cp DATA/STATIONS OUTPUT_FILES/
 echo
 echo "running mesher..."
 echo
-cd bin/
-mpirun -np $NPROC ./xmeshfem3D
-cd ../
+mpirun -np $NPROC ./bin/xmeshfem3D
 mv OUTPUT_FILES/output_mesher.txt OUTPUT_FILES/output_meshfem3D.txt
 
 
@@ -61,9 +59,7 @@ mv OUTPUT_FILES/output_mesher.txt OUTPUT_FILES/output_meshfem3D.txt
 echo
 echo "running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # exit here if you want to do mesher only
 #exit
@@ -72,9 +68,7 @@ cd ../
 echo
 echo "running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"
diff --git a/noise_tomography/pre-processing.sh b/noise_tomography/pre-processing.sh
index 84627c5..0cb6cd7 100755
--- a/noise_tomography/pre-processing.sh
+++ b/noise_tomography/pre-processing.sh
@@ -65,6 +65,7 @@ ifort adj_traveltime_filter.f90 > tmp.log
 ln -s ../../../bin/xgenerate_databases
 ln -s ../../../bin/xspecfem3D
 ln -s ../../../bin/xcombine_vol_data
+cd ..
 
 #****************************************************************************************************************************************************
 #////////////////////////////// SIMULATION IS STARTING //////////////////////////////////////////////////////////////////////////////////////////////
@@ -88,12 +89,12 @@ cp $OUTPUT_FILES/NOISE_TOMOGRAPHY/irec_master_noise_contribution1  $OUTPUT_FILES
 
 # step 1 of noise simulation
 cp $DATA/Par_file_step1                         $DATA/Par_file
-mpirun -np 4 ./xgenerate_databases
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xgenerate_databases
+mpirun -np 4 ./bin/xspecfem3D
 
 # step 2 of noise simulation
 cp $DATA/Par_file_step2                         $DATA/Par_file
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xspecfem3D
 mv $OUTPUT_FILES/X2.DB.BXZ.semd             $OUTPUT_FILES/SEM/
 
 # calculating adjoint source
@@ -115,7 +116,7 @@ awk '{print $1,0.0}' $OUTPUT_FILES/SEM/X2.DB.BXZ.adj > $OUTPUT_FILES/SEM/X1.DB.B
 
 # step 3 of noise simulation
 cp $DATA/Par_file_step3                         $DATA/Par_file
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xspecfem3D
 
 # store kernels
 cp $OUTPUT_FILES/DATABASES_MPI/*kernel*                  $OUTPUT_FILES/NOISE_TOMOGRAPHY/1st/
@@ -123,11 +124,11 @@ cp $OUTPUT_FILES/DATABASES_MPI/*kernel*                  $OUTPUT_FILES/NOISE_TOM
 # visualization (refer to other examples, if you don't know the visualization process very well)
 # note that "xcombine_vol_data" is compiled by "make combine_vol_data"
 # this program generates a file "$OUTPUT_FILES/$kernel.mesh"
-./xcombine_vol_data 0 3 $kernel $OUTPUT_FILES/DATABASES_MPI/  $OUTPUT_FILES/ 1
+./bin/xcombine_vol_data 0 3 $kernel $OUTPUT_FILES/DATABASES_MPI/  $OUTPUT_FILES/ 1
 # you may need to install "mesh2vtu" package first, before you can use "mesh2vtu.pl"
 # convert "$OUTPUT_FILES/$kernel.mesh" to "$OUTPUT_FILES/NOISE_TOMOGRAPHY/1st_$kernel.vtu"
 # which can be loaded and visualized in Paraview
-mesh2vtu.pl -i $OUTPUT_FILES/$kernel.mesh -o $OUTPUT_FILES/NOISE_TOMOGRAPHY/1st_$kernel.vtu
+./bin/mesh2vtu.pl -i $OUTPUT_FILES/$kernel.mesh -o $OUTPUT_FILES/NOISE_TOMOGRAPHY/1st_$kernel.vtu
 
 # at the end of this part, we obtain the 1st contribution of the noise sensitivity kernel, stored as:
 # $OUTPUT_FILES/NOISE_TOMOGRAPHY/1st_$kernel.vtu
@@ -146,11 +147,11 @@ cp $OUTPUT_FILES/NOISE_TOMOGRAPHY/irec_master_noise_contribution2  $OUTPUT_FILES
 
 # step 1 of noise simulation
 cp $DATA/Par_file_step1                         $DATA/Par_file
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xspecfem3D
 
 # step 2 of noise simulation
 cp $DATA/Par_file_step2                         $DATA/Par_file
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xspecfem3D
 
 # calculating adjoint source
 # since it's 2nd contribution, we inject adjoint source 2 at receiver 1
@@ -168,18 +169,18 @@ awk '{print $1,0.0}' $OUTPUT_FILES/SEM/X1.DB.BXZ.adj > $OUTPUT_FILES/SEM/X2.DB.B
 
 # step 3 of noise simulation
 cp $DATA/Par_file_step3                         $DATA/Par_file
-mpirun -np 4 ./xspecfem3D
+mpirun -np 4 ./bin/xspecfem3D
 
 # store kernels
 cp $OUTPUT_FILES/DATABASES_MPI/*kernel*                  $OUTPUT_FILES/NOISE_TOMOGRAPHY/2nd/
 
 # visualization (refer to other examples, if you don't know the visualization process very well)
 # this program generates a file "$OUTPUT_FILES/$kernel.mesh"
-./xcombine_vol_data 0 3 $kernel $OUTPUT_FILES/DATABASES_MPI/  $OUTPUT_FILES/ 1
+./bin/xcombine_vol_data 0 3 $kernel $OUTPUT_FILES/DATABASES_MPI/  $OUTPUT_FILES/ 1
 # you may need to install "mesh2vtu" package first, before you can use "mesh2vtu.pl"
 # convert "$OUTPUT_FILES/$kernel.mesh" to "$OUTPUT_FILES/NOISE_TOMOGRAPHY/1st_$kernel.vtu"
 # which can be loaded and visualized in Paraview
-mesh2vtu.pl -i $OUTPUT_FILES/$kernel.mesh -o $OUTPUT_FILES/NOISE_TOMOGRAPHY/2nd_$kernel.vtu
+./bin/mesh2vtu.pl -i $OUTPUT_FILES/$kernel.mesh -o $OUTPUT_FILES/NOISE_TOMOGRAPHY/2nd_$kernel.vtu
 
 # at the end of this part, we obtain the 2nd contribution of the noise sensitivity kernel, stored as:
 # $OUTPUT_FILES/NOISE_TOMOGRAPHY/2nd_$kernel.vtu
diff --git a/view_all_process_sh_to_modify.csh b/view_all_process_sh_to_modify.csh
new file mode 100755
index 0000000..11d65ab
--- /dev/null
+++ b/view_all_process_sh_to_modify.csh
@@ -0,0 +1,24 @@
+#!/bin/csh
+
+# this list of files is obtained using " find . -iname \*proces\* -exec ls -1 {} \;
+
+vi \
+./layered_halfspace/process.sh \
+./homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides/process.sh \
+./BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/postprocessing.f90 \
+./BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/postprocessing.f90 \
+./waterlayered_halfspace/process.sh \
+./Mount_StHelens/process.sh \
+./noise_tomography/pre-processing.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_6sides/process.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_5sides/process.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_acoustic_elastic_absorbing_CPML_5sides/process.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_6sides/process.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_elastic_absorbing_CPML_6sides/process.sh \
+./CPML_examples/homogeneous_halfspace_HEX8_acoustic_absorbing_CPML_5sides/process.sh \
+./meshfem3D_examples/many_interfaces/go_process_pbs.bash \
+./meshfem3D_examples/many_interfaces/process.sh \
+./meshfem3D_examples/simple_model/process.sh \
+./meshfem3D_examples/socal1D/process.sh \
+./homogeneous_halfspace_HEX8_elastic_no_absorbing/process.sh \
+./tomographic_model/process.sh
diff --git a/waterlayered_halfspace/process.sh b/waterlayered_halfspace/process.sh
index 518c566..519f0b3 100755
--- a/waterlayered_halfspace/process.sh
+++ b/waterlayered_halfspace/process.sh
@@ -61,17 +61,13 @@ echo
 echo
 echo "  running database generation..."
 echo
-cd bin/
-mpirun -np $NPROC ./xgenerate_databases
-cd ../
+mpirun -np $NPROC ./bin/xgenerate_databases
 
 # runs simulation
 echo
 echo "  running solver..."
 echo
-cd bin/
-mpirun -np $NPROC ./xspecfem3D
-cd ../
+mpirun -np $NPROC ./bin/xspecfem3D
 
 echo
 echo "see results in directory: OUTPUT_FILES/"



More information about the CIG-COMMITS mailing list