[cig-commits] r18124 - in seismo/3D/SPECFEM3D_GLOBE/trunk: EXAMPLES/noise_examples EXAMPLES/noise_examples/global_long EXAMPLES/noise_examples/global_short EXAMPLES/noise_examples/regional src/specfem3D

yangl at geodynamics.org yangl at geodynamics.org
Tue Mar 22 14:52:39 PDT 2011


Author: yangl
Date: 2011-03-22 14:52:38 -0700 (Tue, 22 Mar 2011)
New Revision: 18124

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE123.submit_atten
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_clean_create
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_collect
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE123.submit_atten
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_clean_create
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_collect
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/pre-processing
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE123.submit_atten
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_clean_create
   seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_collect
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.f90
Log:
NOISE minor changes

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE123.submit_atten
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE123.submit_atten	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE123.submit_atten	2011-03-22 21:52:38 UTC (rev 18124)
@@ -24,26 +24,13 @@
 d=`date`
 LOCAL_PATH_ALL=`grep LOCAL_PATH DATA/Par_file | cut -d = -f 2 | sed 's/ //g'`
 echo "Start cleaning local disk on nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+8 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"
 
 ## clean OUTPUT_FILES
-rm -rf OUTPUT_FILES
-mkdir  OUTPUT_FILES
+rm -rf   OUTPUT_FILES
+mkdir -p OUTPUT_FILES
 
 #### backup Fortran source files
 ##rm -rf      ZZZ_src
@@ -120,14 +107,7 @@
 ## collect outputs (e.g., kernels, meshes) from local nodes to global disk
 d=`date`
 echo "Start collecting outputs from nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent++ ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    let myrank="$ievent-1"
-    mpiexec -np 1 -host $machine_all ./NOISE_collect $machine_all $machine_all $LOCAL_PATH_ALL $LOCAL_PATH_ALL $myrank < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_collect  $LOCAL_PATH_ALL      OUTPUT_FILES/
 d=`date`
 echo "Finish collecting outputs from nodes, $d"
 
@@ -140,12 +120,6 @@
 cp DATA/STATIONS    ZZZ_3/
 
 
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_clean_create
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_clean_create	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_clean_create	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,7 +1,11 @@
-#!/bin/bash
-ulimit -s unlimited
+#!/bin/bash -eu
 
-LOCAL_PATH=$1
+DIR_LOCAL=$1
+iproc=$PBS_VNODENUM
 
-rm -rf $LOCAL_PATH
-mkdir -p $LOCAL_PATH
+##### other files can be collected in the same way
+if [ $(($iproc % 8)) = 0 ]; then
+   rm -rf   $DIR_LOCAL
+   mkdir -p $DIR_LOCAL
+fi
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_collect
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_collect	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_long/NOISE_collect	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,13 +1,11 @@
-#!/bin/bash
+#!/bin/bash -eu
 
-machine_new=$1
-machine_old=$2
-LOCAL_PATH_NEW=$3
-LOCAL_PATH_OLD=$4
-let myrank=$5
-myrank_new=`printf "%06d" $myrank`
+DIR_LOCAL=$1
+DIR_GLOBAL=$2
+iproc=`printf "%06d" $PBS_VNODENUM`
 
-##echo "cp $LOCAL_PATH_NEW/proc$myrank_new*kernel* OUTPUT_FILES/"
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1*kernel*.bin OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_*array_dims.txt OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_solver_data*.bin OUTPUT_FILES/
+##### other files can be collected in the same way
+mv $DIR_LOCAL/*$iproc*reg1*kernel*.bin      $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_*array_dims.txt  $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_solver_data*.bin $DIR_GLOBAL/
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE123.submit_atten
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE123.submit_atten	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE123.submit_atten	2011-03-22 21:52:38 UTC (rev 18124)
@@ -24,26 +24,13 @@
 d=`date`
 LOCAL_PATH_ALL=`grep LOCAL_PATH DATA/Par_file | cut -d = -f 2 | sed 's/ //g'`
 echo "Start cleaning local disk on nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+8 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"
 
 ## clean OUTPUT_FILES
-rm -rf OUTPUT_FILES
-mkdir  OUTPUT_FILES
+rm -rf   OUTPUT_FILES
+mkdir -p OUTPUT_FILES
 
 #### backup Fortran source files
 ##rm -rf      ZZZ_src
@@ -120,14 +107,7 @@
 ## collect outputs (e.g., kernels, meshes) from local nodes to global disk
 d=`date`
 echo "Start collecting outputs from nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent++ ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    let myrank="$ievent-1"
-    mpiexec -np 1 -host $machine_all ./NOISE_collect $machine_all $machine_all $LOCAL_PATH_ALL $LOCAL_PATH_ALL $myrank < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_collect  $LOCAL_PATH_ALL      OUTPUT_FILES/
 d=`date`
 echo "Finish collecting outputs from nodes, $d"
 
@@ -140,12 +120,6 @@
 cp DATA/STATIONS    ZZZ_3/
 
 
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_clean_create
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_clean_create	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_clean_create	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,7 +1,11 @@
-#!/bin/bash
-ulimit -s unlimited
+#!/bin/bash -eu
 
-LOCAL_PATH=$1
+DIR_LOCAL=$1
+iproc=$PBS_VNODENUM
 
-rm -rf $LOCAL_PATH
-mkdir -p $LOCAL_PATH
+##### other files can be collected in the same way
+if [ $(($iproc % 8)) = 0 ]; then
+   rm -rf   $DIR_LOCAL
+   mkdir -p $DIR_LOCAL
+fi
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_collect
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_collect	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/global_short/NOISE_collect	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,13 +1,11 @@
-#!/bin/bash
+#!/bin/bash -eu
 
-machine_new=$1
-machine_old=$2
-LOCAL_PATH_NEW=$3
-LOCAL_PATH_OLD=$4
-let myrank=$5
-myrank_new=`printf "%06d" $myrank`
+DIR_LOCAL=$1
+DIR_GLOBAL=$2
+iproc=`printf "%06d" $PBS_VNODENUM`
 
-##echo "cp $LOCAL_PATH_NEW/proc$myrank_new*kernel* OUTPUT_FILES/"
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1*kernel*.bin OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_*array_dims.txt OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_solver_data*.bin OUTPUT_FILES/
+##### other files can be collected in the same way
+mv $DIR_LOCAL/*$iproc*reg1*kernel*.bin      $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_*array_dims.txt  $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_solver_data*.bin $DIR_GLOBAL/
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/pre-processing
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/pre-processing	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/pre-processing	2011-03-22 21:52:38 UTC (rev 18124)
@@ -11,27 +11,21 @@
 
 mkdir -p SEM zzz_job_info NOISE_TOMOGRAPHY
 
-#cp $dir/A0.II.LHZ.adj                    ./SEM/
-#cp $dir/cp_adj_sources                   ./SEM/
-
 cp $dir/adj_traveltime_filter.f90        ./
 cp $dir/NOISE123.submit_atten            ./
 cp $dir/NOISE_clean_create               ./
 cp $dir/NOISE_collect                    ./
 cp $dir/NOISE_transfer                   ./
 
-cp $dir/S_squared                        ./NOISE_TOMOGRAPHY
+cp $dir/S_squared                        ./NOISE_TOMOGRAPHY/
 cp $dir/irec_master_noise                ./NOISE_TOMOGRAPHY/
 cp $dir/nu_master                        ./NOISE_TOMOGRAPHY/
 
 cp $dir/Par_file_NOISE_*                 ./DATA/
-cp $dir/CMTSOLUTION_NOISE                ./DATA/
-cp $dir/STATIONS_NOISE                   ./DATA/
+cp $dir/CMTSOLUTION_NOISE                ./DATA/CMTSOLUTION
+cp $dir/STATIONS_NOISE                   ./DATA/STATIONS
+cp $dir/STATIONS_NOISE_ADJOINT           ./DATA/STATIONS_ADJOINT
 
-#cd SEM
-#./cp_adj_sources
-#cd ..
-
 ifort -o NOISE_adj adj_traveltime_filter.f90
 
 cp DATA/Par_file_NOISE_1_attenuation DATA/Par_file

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE123.submit_atten
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE123.submit_atten	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE123.submit_atten	2011-03-22 21:52:38 UTC (rev 18124)
@@ -24,26 +24,13 @@
 d=`date`
 LOCAL_PATH_ALL=`grep LOCAL_PATH DATA/Par_file | cut -d = -f 2 | sed 's/ //g'`
 echo "Start cleaning local disk on nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+8 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"
 
 ## clean OUTPUT_FILES
-rm -rf OUTPUT_FILES
-mkdir  OUTPUT_FILES
+rm -rf   OUTPUT_FILES
+mkdir -p OUTPUT_FILES
 
 #### backup Fortran source files
 ##rm -rf      ZZZ_src
@@ -120,14 +107,7 @@
 ## collect outputs (e.g., kernels, meshes) from local nodes to global disk
 d=`date`
 echo "Start collecting outputs from nodes, $d"
-for (( ievent=1;ievent<=$numnodes;ievent++ ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    let myrank="$ievent-1"
-    mpiexec -np 1 -host $machine_all ./NOISE_collect $machine_all $machine_all $LOCAL_PATH_ALL $LOCAL_PATH_ALL $myrank < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_collect  $LOCAL_PATH_ALL      OUTPUT_FILES/
 d=`date`
 echo "Finish collecting outputs from nodes, $d"
 
@@ -140,12 +120,6 @@
 cp DATA/STATIONS    ZZZ_3/
 
 
-for (( ievent=1;ievent<=$numnodes;ievent=ievent+1 ))
-do
-    let line=$ievent
-    machine_all=$(awk 'NR=='$line'{print}' zzz_job_info/compute_nodes_all)
-    mpiexec -np 1 -host $machine_all ./NOISE_clean_create $LOCAL_PATH_ALL < /dev/null &
-done
-wait
+pbsdsh $PBS_O_WORKDIR/NOISE_clean_create   $LOCAL_PATH_ALL
 d=`date`
 echo "Finish cleaning local disk on nodes, $d"

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_clean_create
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_clean_create	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_clean_create	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,7 +1,11 @@
-#!/bin/bash
-ulimit -s unlimited
+#!/bin/bash -eu
 
-LOCAL_PATH=$1
+DIR_LOCAL=$1
+iproc=$PBS_VNODENUM
 
-rm -rf $LOCAL_PATH
-mkdir -p $LOCAL_PATH
+##### other files can be collected in the same way
+if [ $(($iproc % 8)) = 0 ]; then
+   rm -rf   $DIR_LOCAL
+   mkdir -p $DIR_LOCAL
+fi
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_collect
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_collect	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/EXAMPLES/noise_examples/regional/NOISE_collect	2011-03-22 21:52:38 UTC (rev 18124)
@@ -1,13 +1,11 @@
-#!/bin/bash
+#!/bin/bash -eu
 
-machine_new=$1
-machine_old=$2
-LOCAL_PATH_NEW=$3
-LOCAL_PATH_OLD=$4
-let myrank=$5
-myrank_new=`printf "%06d" $myrank`
+DIR_LOCAL=$1
+DIR_GLOBAL=$2
+iproc=`printf "%06d" $PBS_VNODENUM`
 
-##echo "cp $LOCAL_PATH_NEW/proc$myrank_new*kernel* OUTPUT_FILES/"
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1*kernel*.bin OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_*array_dims.txt OUTPUT_FILES/
-mv $LOCAL_PATH_NEW/proc$myrank_new*reg1_solver_data*.bin OUTPUT_FILES/
+##### other files can be collected in the same way
+mv $DIR_LOCAL/*$iproc*reg1*kernel*.bin      $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_*array_dims.txt  $DIR_GLOBAL/
+mv $DIR_LOCAL/*$iproc*reg1_solver_data*.bin $DIR_GLOBAL/
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.f90	2011-03-22 20:44:44 UTC (rev 18123)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.f90	2011-03-22 21:52:38 UTC (rev 18124)
@@ -4307,7 +4307,7 @@
   endif
 
   ! save/read the surface movie using the same c routine as we do for absorbing boundaries (file ID is 21)
-  if (NOISE_TOMOGRAPHY\=0) call close_file_abs(21) 
+  if (NOISE_TOMOGRAPHY/=0) call close_file_abs(21) 
 
 
   ! synchronize all processes



More information about the CIG-COMMITS mailing list