Skip to content

Commit

Permalink
replaced in_data_files with DATA in all files and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
komatits committed Oct 22, 2012
1 parent dc31d17 commit 46c15bb
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ all: default \
required: bin lib obj

backup:
cp -rp src in_data_files Makefile go_generate_databases* go_mesher* go_solver* mymachines bak
cp -rp src DATA Makefile go_generate_databases* go_mesher* go_solver* mymachines bak

bak: backup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
To run this example on two processor cores for instance, type this (replace "2" with another value in the three lines below if you want to use more processor cores):


./bin/xdecompose_mesh_SCOTCH 2 in_data_files/MESH in_out_files/DATABASES_MPI
./bin/xdecompose_mesh_SCOTCH 2 DATA/MESH in_out_files/DATABASES_MPI

mpirun -np 2 ./bin/xgenerate_databases

Expand Down
2 changes: 1 addition & 1 deletion src/generate_databases/model_tomography.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module tomography_par
include "constants.h"

! for external tomography:
! file must be in ../in_data_files/ directory
! file must be in ../DATA/ directory
! (regular spaced, xyz-block file in ascii)

character (len=80) :: TOMO_FILENAME = 'tomography_model.xyz'
Expand Down
4 changes: 2 additions & 2 deletions src/shared/constants.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
!!-----------------------------------------------------------

! paths for inputs and outputs files
character(len=256), parameter :: IN_DATA_FILES_PATH = '../in_data_files/'
character(len=256), parameter :: MF_IN_DATA_FILES_PATH = '../in_data_files/meshfem3D_files/'
character(len=256), parameter :: IN_DATA_FILES_PATH = '../DATA/'
character(len=256), parameter :: MF_IN_DATA_FILES_PATH = '../DATA/meshfem3D_files/'
character(len=256), parameter :: OUTPUT_FILES_PATH = '../in_out_files/OUTPUT_FILES/'


Expand Down
2 changes: 1 addition & 1 deletion src/shared/read_value_parameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ end function err_occurred
!
! include "constants.h"
!
! open(unit=IIN,file='in_data_files/Par_file',status='old',action='read')
! open(unit=IIN,file='DATA/Par_file',status='old',action='read')
!
! end subroutine open_parameter_file
!
Expand Down
4 changes: 2 additions & 2 deletions utils/Cluster/go_generate_databases
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# name of the file that contains the list of machines
set machine_file = "mymachines"

set my_local_path = `grep LOCAL_PATH in_data_files/Par_file | cut -d '=' -f 2 `
set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `

# compute total number of processors needed
set NPROC = `grep NPROC in_data_files/Par_file | cut -d '=' -f 2 `
set NPROC = `grep NPROC DATA/Par_file | cut -d '=' -f 2 `

# total number of processors is the product of the values read
@ numprocessors = $NPROC
Expand Down
4 changes: 2 additions & 2 deletions utils/Cluster/go_solver
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# name of the file that contains the list of machines
set machine_file = "mymachines"

set my_local_path = `grep LOCAL_PATH in_data_files/Par_file | cut -d '=' -f 2 `
set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `

# compute total number of processors needed
set NPROC = `grep NPROC in_data_files/Par_file | cut -d '=' -f 2 `
set NPROC = `grep NPROC DATA/Par_file | cut -d '=' -f 2 `

# total number of processors is the product of the values read
@ numprocessors = $NPROC
Expand Down
4 changes: 2 additions & 2 deletions utils/Cluster/lsf/go_generate_databases_lsf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ fi
# 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC

cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/

# obtain lsf job information
cat $LSB_DJOB_HOSTFILE > in_out_files/OUTPUT_FILES/compute_nodes
Expand Down
10 changes: 5 additions & 5 deletions utils/Cluster/lsf/go_mesher_solver_lsf_basin.forward
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ remap_lsf_machines.pl in_out_files/OUTPUT_FILES/lsf_machines > in_out_files/OUTP
shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < in_out_files/OUTPUT_FILES/machines >/dev/null

# main parameter file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < in_data_files/Par_file > Par_file.tmp
mv Par_file.tmp in_data_files/Par_file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > Par_file.tmp
mv Par_file.tmp DATA/Par_file

# mesher parameter file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < in_data_files/meshfem3D_files/Mesh_Par_file > Par_file.tmp
mv Par_file.tmp in_data_files/meshfem3D_files/Mesh_Par_file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < DATA/meshfem3D_files/Mesh_Par_file > Par_file.tmp
mv Par_file.tmp DATA/meshfem3D_files/Mesh_Par_file

# run the specfem program
current_pwd=$PWD
Expand All @@ -36,5 +36,5 @@ mpirun.lsf --gm-no-shmem --gm-copy-env ./xspecfem3D
cd current_pwd/
mkdir -p in_out_files/SEM
cd in_out_files/SEM/
collect_seismo_lsf_multi.pl ../OUTPUT_FILES/lsf_machines $current_pwd/in_data_files/Par_file
collect_seismo_lsf_multi.pl ../OUTPUT_FILES/lsf_machines $current_pwd/DATA/Par_file
cleanbase.pl ../OUTPUT_FILES/machines
10 changes: 5 additions & 5 deletions utils/Cluster/lsf/go_mesher_solver_lsf_basin.kernel
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ remap_lsf_machines.pl in_out_files/OUTPUT_FILES/lsf_machines > in_out_files/OUTP
shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < in_out_files/OUTPUT_FILES/machines >/dev/null

# main parameter file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < in_data_files/Par_file > Par_file.tmp
mv Par_file.tmp in_data_files/Par_file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > Par_file.tmp
mv Par_file.tmp DATA/Par_file

# mesher parameter file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < in_data_files/meshfem3D_files/Mesh_Par_file > Par_file.tmp
mv Par_file.tmp in_data_files/meshfem3D_files/Mesh_Par_file
sed -e "s:^LOCAL_PATH .*:LOCAL_PATH = $BASEMPIDIR.$LSB_JOBID:" < DATA/meshfem3D_files/Mesh_Par_file > Par_file.tmp
mv Par_file.tmp DATA/meshfem3D_files/Mesh_Par_file

current_pwd=$PWD

Expand All @@ -35,7 +35,7 @@ mpirun.lsf --gm-no-shmem --gm-copy-env ./xspecfem3D
#### this is the part needs to be revised for each kernel simulation #####
mkdir -p $current_pwd/in_out_files/SEM
cd $current_pwd/in_out_files/SEM
collect_seismo_lsf_multi.pl $current_pwd/in_out_files/OUTPUT_FILES/lsf_machines $current_pwd/in_data_files/Par_file
collect_seismo_lsf_multi.pl $current_pwd/in_out_files/OUTPUT_FILES/lsf_machines $current_pwd/DATA/Par_file
#xcut_velocity 29.0 32.5 3 GSC*.semd
xcreate_adjsrc_traveltime 29.0 32.5 3 GSC*.semd
rename .semd.adj .adj *.semd.ad
Expand Down
8 changes: 4 additions & 4 deletions utils/Cluster/lsf/go_solver_lsf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ fi
# 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC

rm -r -f in_out_files/OUTPUT_FILES
mkdir in_out_files/OUTPUT_FILES
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp in_data_files/STATIONS in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp DATA/STATIONS in_out_files/OUTPUT_FILES/

# obtain lsf job information
cat $BSUB_DJOB_NODEFILE > in_out_files/OUTPUT_FILES/compute_nodes
Expand Down
6 changes: 3 additions & 3 deletions utils/Cluster/lsf/run_lsf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ d=`date`
echo "Finished compilation $d"

# get total number of nodes needed for solver
NPROC=`grep NPROC in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# compute total number of nodes needed for mesher
NPROC_XI=`grep NPROC_XI in_data_files/meshfem3D_files/Mesh_Par_file | cut -d = -f 2 `
NPROC_ETA=`grep NPROC_ETA in_data_files/meshfem3D_files/Mesh_Par_file | cut -d = -f 2 `
NPROC_XI=`grep NPROC_XI DATA/meshfem3D_files/Mesh_Par_file | cut -d = -f 2 `
NPROC_ETA=`grep NPROC_ETA DATA/meshfem3D_files/Mesh_Par_file | cut -d = -f 2 `
# total number of nodes is the product of the values read
numnodes=$(( $NPROC_XI * $NPROC_ETA ))

Expand Down
2 changes: 1 addition & 1 deletion utils/Cluster/pbs/go_decomposer_pbs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC
Expand Down
4 changes: 2 additions & 2 deletions utils/Cluster/pbs/go_generate_databases_pbs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC
Expand All @@ -29,7 +29,7 @@ mkdir -p in_out_files/OUTPUT_FILES

# backup files used for this simulation
cp go_generate_databases_pbs.bash in_out_files/OUTPUT_FILES/
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/

# save a complete copy of source files
#rm -rf in_out_files/OUTPUT_FILES/src
Expand Down
6 changes: 3 additions & 3 deletions utils/Cluster/pbs/go_mesher_pbs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
cd $PBS_O_WORKDIR

# number of cores for the job
NPROC=`grep NPROC in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
numnodes=$NPROC

mkdir -p in_out_files/OUTPUT_FILES
mkdir -p in_out_files/DATABASES_MPI

# backup files used for this simulation
cp go_mesher_pbs.bash in_out_files/OUTPUT_FILES/
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/meshfem3D_files/Mesh_Par_file in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/meshfem3D_files/Mesh_Par_file in_out_files/OUTPUT_FILES/

# save a complete copy of source files
#rm -rf in_out_files/OUTPUT_FILES/src
Expand Down
8 changes: 4 additions & 4 deletions utils/Cluster/pbs/go_solver_pbs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC
Expand All @@ -29,9 +29,9 @@ mkdir -p in_out_files/OUTPUT_FILES

# backup files used for this simulation
cp go_solver_pbs.bash in_out_files/OUTPUT_FILES/
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/STATIONS in_out_files/OUTPUT_FILES/
cp in_data_files/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/STATIONS in_out_files/OUTPUT_FILES/
cp DATA/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp src/shared/constants.h in_out_files/OUTPUT_FILES/

# save a complete copy of source files
Expand Down
12 changes: 6 additions & 6 deletions utils/Cluster/pbs/valgrind_go_solver_pbs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# bash script
#PBS -S /bin/bash

# job name
# job name
#PBS -N valgrind_go_solver

# joins output and error information
Expand All @@ -25,7 +25,7 @@
# 150 CPUs ( 18*8+6 ), walltime 15 hour
#PBS -l nodes=18:ppn=8+1:ppn=6,walltime=15:00:00

# valgrind mpi library
# valgrind mpi library
PRELOAD_LIB=/my_valgrind_path/valgrind/lib/valgrind/libmpiwrap-x86-linux.so

###########################################################
Expand All @@ -35,17 +35,17 @@ 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC

mkdir -p in_out_files/OUTPUT_FILES

# backup files used for this simulation
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/STATIONS in_out_files/OUTPUT_FILES/
cp in_data_files/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/STATIONS in_out_files/OUTPUT_FILES/
cp DATA/CMTSOLUTION in_out_files/OUTPUT_FILES/

# obtain job information
cat $PBS_NODEFILE > in_out_files/OUTPUT_FILES/compute_nodes
Expand Down
6 changes: 3 additions & 3 deletions utils/Cluster/run3d.csh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (! -d $OUTDIR) then
mkdir $OUTDIR
endif
cd $OUTDIR
cp ../../in_data_files/CMTSOLUTION .
cp ../../in_data_files/STATIONS .
cp ../../in_data_files/Par_file .
cp ../../DATA/CMTSOLUTION .
cp ../../DATA/STATIONS .
cp ../../DATA/Par_file .

8 changes: 4 additions & 4 deletions utils/Cluster/sge/go_generate_databases_sge.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
# 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC

mkdir -p in_out_files/OUTPUT_FILES

# backup for files used for this simulation
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/STATIONS in_out_files/OUTPUT_FILES/
cp in_data_files/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/STATIONS in_out_files/OUTPUT_FILES/
cp DATA/CMTSOLUTION in_out_files/OUTPUT_FILES/

rm -rf in_out_files/OUTPUT_FILES/src
cp -rp ./src in_out_files/OUTPUT_FILES/
Expand Down
8 changes: 4 additions & 4 deletions utils/Cluster/sge/go_solver_sge.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
# 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 in_data_files/Par_file | cut -d = -f 2 `
NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `

# total number of nodes is the product of the values read
numnodes=$NPROC

mkdir -p in_out_files/OUTPUT_FILES

# backup for files used for this simulation
cp in_data_files/Par_file in_out_files/OUTPUT_FILES/
cp in_data_files/STATIONS in_out_files/OUTPUT_FILES/
cp in_data_files/CMTSOLUTION in_out_files/OUTPUT_FILES/
cp DATA/Par_file in_out_files/OUTPUT_FILES/
cp DATA/STATIONS in_out_files/OUTPUT_FILES/
cp DATA/CMTSOLUTION in_out_files/OUTPUT_FILES/

rm -rf in_out_files/OUTPUT_FILES/src
cp -rp ./src in_out_files/OUTPUT_FILES/
Expand Down
12 changes: 6 additions & 6 deletions utils/Visualization/GMT/movie2gif.gmt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ sub Usage {
# convert from movie data to gmt xyz files
if ($tran_to_gmt) {

if (not -f "../in_data_files/Par_file") {die(" Check if ../in_data_files/Par_file exist or not\n");}
(@junk) = split(" ", `grep '^DT' ../in_data_files/Par_file`);
if (not -f "../DATA/Par_file") {die(" Check if ../DATA/Par_file exist or not\n");}
(@junk) = split(" ", `grep '^DT' ../DATA/Par_file`);
$dt = $junk[2];

(@junk) = split(" ", `grep '^NTSTEP_BETWEEN_FRAMES' ../in_data_files/Par_file`);
(@junk) = split(" ", `grep '^NTSTEP_BETWEEN_FRAMES' ../DATA/Par_file`);
$nframe = $junk[2];

# start and end time
Expand All @@ -107,11 +107,11 @@ sub Usage {

} else {

if (not -f "../in_data_files/Par_file") {die(" Check if ../in_data_files/Par_file exist or not\n");}
(@junk) = split(" ", `grep '^DT' ../in_data_files/Par_file`);
if (not -f "../DATA/Par_file") {die(" Check if ../DATA/Par_file exist or not\n");}
(@junk) = split(" ", `grep '^DT' ../DATA/Par_file`);
$dt = $junk[2];

(@junk) = split(" ", `grep '^NTSTEP_BETWEEN_FRAMES' ../in_data_files/Par_file`);
(@junk) = split(" ", `grep '^NTSTEP_BETWEEN_FRAMES' ../DATA/Par_file`);
$nframe = $junk[2];

}
Expand Down
2 changes: 1 addition & 1 deletion utils/Visualization/GMT/plot_shakemap.gmt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# copy this script into your bin/ folder and run for example:
#
# ./plot_shakemap.gmt.pl ../in_data_files/ 2 ../in_data_files/CMTSOLUTION
# ./plot_shakemap.gmt.pl ../DATA/ 2 ../DATA/CMTSOLUTION
#
# will create shakemap file ../in_out_files/OUTPUT_FILES/gmt_shaking_map.ps for peak ground velocity

Expand Down
Loading

0 comments on commit 46c15bb

Please sign in to comment.