[cig-commits] [commit] devel: more explicit grep commands in bash run scripts (f9a1799)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Dec 10 22:31:03 PST 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/792a19b464179eb88e075ebdbb8148bf1eb7f17d...f9a179993dc8cd7ee808dabccecebe9ce88e9754
>---------------------------------------------------------------
commit f9a179993dc8cd7ee808dabccecebe9ce88e9754
Author: Carl Tape <carltape at gmail.com>
Date: Wed Dec 10 21:30:22 2014 -0900
more explicit grep commands in bash run scripts
>---------------------------------------------------------------
f9a179993dc8cd7ee808dabccecebe9ce88e9754
utils/Cluster/pbs/go_combine_vol_data_pbs.bash | 4 ++--
utils/Cluster/pbs/go_decomposer_pbs.bash | 11 +++++------
utils/Cluster/pbs/go_generate_databases_pbs.bash | 5 ++---
utils/Cluster/pbs/go_mesher_pbs.bash | 2 +-
utils/Cluster/pbs/go_solver_pbs.bash | 4 ++--
utils/Cluster/pbs/valgrind_go_solver_pbs.bash | 3 +--
6 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/utils/Cluster/pbs/go_combine_vol_data_pbs.bash b/utils/Cluster/pbs/go_combine_vol_data_pbs.bash
index fa0164c..35988e3 100755
--- a/utils/Cluster/pbs/go_combine_vol_data_pbs.bash
+++ b/utils/Cluster/pbs/go_combine_vol_data_pbs.bash
@@ -24,10 +24,10 @@ cd $PBS_O_WORKDIR
# script to run the mesher and the solver
# read Par_file to get information about the run
# compute total number of nodes needed
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
# path to database files for mesh (relative to bin/)
-LOCALPATH=`grep LOCAL_PATH DATA/Par_file | cut -d = -f 2`
+LOCALPATH=`grep LOCAL_PATH DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
nmax=$(($NPROC-1))
diff --git a/utils/Cluster/pbs/go_decomposer_pbs.bash b/utils/Cluster/pbs/go_decomposer_pbs.bash
index 78f93be..263a561 100755
--- a/utils/Cluster/pbs/go_decomposer_pbs.bash
+++ b/utils/Cluster/pbs/go_decomposer_pbs.bash
@@ -21,13 +21,12 @@
cd $PBS_O_WORKDIR
-# script to run the mesher and the solver
+# script to decompose mesh
# read Par_file to get information about the run
-# compute total number of nodes needed
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
-# path to database files for mesh (relative to bin/)
-LOCALPATH=`grep LOCAL_PATH DATA/Par_file | cut -d = -f 2`
+# path to database files for mesh
+LOCALPATH=`grep LOCAL_PATH DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
echo starting decomposer for $NPROC partitions
echo " "
@@ -37,7 +36,7 @@ mkdir -p OUTPUT_FILES/
# save a copy
cp go_decomposer_pbs.bash OUTPUT_FILES/
-# USER CHANGE MESH DIRECTORY
+# USER: CHANGE MESH DIRECTORY
MESHDIR=./EXAMPLES/homogeneous_halfspace/MESH
mkdir -p $LOCALPATH
diff --git a/utils/Cluster/pbs/go_generate_databases_pbs.bash b/utils/Cluster/pbs/go_generate_databases_pbs.bash
index 296640c..1f0ca2a 100755
--- a/utils/Cluster/pbs/go_generate_databases_pbs.bash
+++ b/utils/Cluster/pbs/go_generate_databases_pbs.bash
@@ -21,10 +21,9 @@
cd $PBS_O_WORKDIR
-# script to run the mesher and the solver
+# script to generate databases
# read Par_file to get information about the run
-# compute total number of nodes needed
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
mkdir -p OUTPUT_FILES
diff --git a/utils/Cluster/pbs/go_mesher_pbs.bash b/utils/Cluster/pbs/go_mesher_pbs.bash
index ce35e68..633cf64 100755
--- a/utils/Cluster/pbs/go_mesher_pbs.bash
+++ b/utils/Cluster/pbs/go_mesher_pbs.bash
@@ -22,7 +22,7 @@
cd $PBS_O_WORKDIR
# number of cores for the job
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
mkdir -p OUTPUT_FILES
mkdir -p OUTPUT_FILES/DATABASES_MPI
diff --git a/utils/Cluster/pbs/go_solver_pbs.bash b/utils/Cluster/pbs/go_solver_pbs.bash
index b64ea04..f642d97 100755
--- a/utils/Cluster/pbs/go_solver_pbs.bash
+++ b/utils/Cluster/pbs/go_solver_pbs.bash
@@ -21,10 +21,10 @@
cd $PBS_O_WORKDIR
-# script to run the mesher and the solver
+# script to run the solver
# read Par_file to get information about the run
# compute total number of nodes needed
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
mkdir -p OUTPUT_FILES
diff --git a/utils/Cluster/pbs/valgrind_go_solver_pbs.bash b/utils/Cluster/pbs/valgrind_go_solver_pbs.bash
index 416b68d..92f255b 100755
--- a/utils/Cluster/pbs/valgrind_go_solver_pbs.bash
+++ b/utils/Cluster/pbs/valgrind_go_solver_pbs.bash
@@ -35,10 +35,9 @@ PRELOAD_LIB=/my_valgrind_path/valgrind/lib/valgrind/libmpiwrap-x86-linux.so
cd $PBS_O_WORKDIR
-# script to run the mesher and the solver
# read Par_file to get information about the run
# compute total number of nodes needed
-NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2`
+NPROC=`grep NPROC DATA/Par_file | grep -v -E '^[[:space:]]*#' | cut -d = -f 2`
mkdir -p OUTPUT_FILES
More information about the CIG-COMMITS
mailing list