[cig-commits] [commit] devel: Modif scripts DSM (c0c43b1)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Oct 7 03:03:46 PDT 2014


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

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/acc6906b149198b82f5e2b2fe7923a89990a7932...3d4c7ccbd84fea019e2ac6a62e759e3c61a473fb

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

commit c0c43b183eddbcf25872c9d8e1f5c6cb3dc2e17d
Author: Clément Durochat <c.durochat at gmail.com>
Date:   Mon Oct 6 14:44:37 2014 +0200

    Modif scripts DSM


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

c0c43b183eddbcf25872c9d8e1f5c6cb3dc2e17d
 .../batch_run_benchmark_all_process.sh             |  7 ++-
 .../example_simple_small/parfile_for_benchmark     |  7 ++-
 .../read_absorbing_interfaces.f90                  |  4 +-
 .../DSM_FOR_SPECFEM3D/UTILS/config.h               | 63 +++++++++++-----------
 .../UTILS/create_inputs_files.f90                  |  4 --
 utils/DSM_FOR_SPECFEM3D/config.h                   | 58 ++++++++++++++++++++
 utils/DSM_FOR_SPECFEM3D/install.sh                 |  2 +-
 .../DSM_FOR_SPECFEM3D/shells/scrpits_specfem3D.sh  | 14 ++---
 8 files changed, 110 insertions(+), 49 deletions(-)

diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh
index 234d7e8..b58f1a7 100755
--- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh
+++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/batch_run_benchmark_all_process.sh
@@ -90,6 +90,9 @@ NPROC_MINUS_ONE="$NPROC-1"
 # log file for output 
 flog_file=$(pwd)/log.benchmark
 
+# Define the home of specfem3d
+HOME_SPECFEM3D=/ccc/scratch/cont003/gen7165/durochtc/Codes/SPECFEM3Ds/specfem3d
+
 # choose the movie
 PREFIX_MOVIE=velocity_Z_it
 
@@ -106,7 +109,7 @@ ${HOME_SPECFEM3D}/utils/DSM_FOR_SPECFEM3D/bin/xcreate_inputs_files<<EOF
 parfile_for_benchmark
 EOF
 
-echo '!!!!!!!!!!!!!!!!!! SHELLS STEP1 : fin de lecture parfile_for_benchmark !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!! SHELLS STEP1 : fin de lecture parfile_for_benchmark !!!!!!!!!!!!!!!!'
 
 # CHOOSE the computation type. CHOICE =1/2/3 means SH/PSV/FULL wavefield computation
 CHOICE=3
@@ -132,7 +135,7 @@ echo 'The value of CHOICE variable is' $CHOICE >  $flog_file
 # ----- load script and path --- 
 source params.in
 source $SCRIPTS/scrpits_specfem3D.sh
-echo '!!!!!!!!!!!!!!!!!! SHELLS STEP3 : fin de lecture scrpits_specfem3D.sh !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!! SHELLS STEP2 : fin de lecture scrpits_specfem3D.sh !!!!!!!!!!!!!!!!'
 if [ $CHOICE -eq 1 ]
  then
  source $SCRIPTS/scripts_dsm_SH.sh
diff --git a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/parfile_for_benchmark b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/parfile_for_benchmark
index a0083f3..b7277cf 100755
--- a/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/parfile_for_benchmark
+++ b/EXAMPLES/DSM_FOR_SPECFEM3D/example_simple_small/parfile_for_benchmark
@@ -1,8 +1,7 @@
 #  ABSOLUTE PATH FOR EXECUTABLES
-HOME_SPECFEM3D           =  /ccc/scratch/cont003/gen7165/durochtc/Codes/SPECFEM3Ds/specfem3d
-DSM_BINARY_PATH          =  $HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/bin
-SPECFEM3D_BINARY_PATH    =  $HOME_SPECFEM3D/bin
-SHELL_SCRIPT_PATH        =  $HOME_SPECFEM3D/utils/DSM_FOR_SPECFEM3D/shells
+DSM_BINARY_PATH          =  ${HOME_SPECFEM3D}/utils/DSM_FOR_SPECFEM3D/bin
+SPECFEM3D_BINARY_PATH    =  ${HOME_SPECFEM3D}/bin
+SHELL_SCRIPT_PATH        =  ${HOME_SPECFEM3D}/utils/DSM_FOR_SPECFEM3D/shells
 
 # DIRECTORY CONTAINED INPUTS FILES (RELATIVE PATH FORM ./)
 DSM_INPUT_DIR            = input_dsm
diff --git a/utils/DSM_FOR_SPECFEM3D/Part4_modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90 b/utils/DSM_FOR_SPECFEM3D/Part4_modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90
index 4f44bf7..a31add6 100755
--- a/utils/DSM_FOR_SPECFEM3D/Part4_modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90
+++ b/utils/DSM_FOR_SPECFEM3D/Part4_modify_DSM_results_for_SPECFEM/Interf_SPECFEM3D_DSM/read_absorbing_interfaces.f90
@@ -52,7 +52,7 @@ program read_absorbing_interfaces
   call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ierr)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nbproc,ierr)
 
-  write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP read_absorbing 0----------!!!!!!!!!!!'
+!!!  write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP read_absorbing 0----------!!!!!!!!!!!'
 !
 !------------------- PARAMETRES ----------------------------
   NTIMESTEP = 100
@@ -607,7 +607,7 @@ program read_absorbing_interfaces
   
   call MPI_FINALIZE(ierr)
 
-  write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP read_absorbing fin ----------!!!!!!!!!!!'
+!!!  write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP read_absorbing fin ----------!!!!!!!!!!!'
 
 end program read_absorbing_interfaces
 
diff --git a/setup/config.h.in b/utils/DSM_FOR_SPECFEM3D/UTILS/config.h
old mode 100644
new mode 100755
similarity index 64%
copy from setup/config.h.in
copy to utils/DSM_FOR_SPECFEM3D/UTILS/config.h
index 952b9d5..718e011
--- a/setup/config.h.in
+++ b/utils/DSM_FOR_SPECFEM3D/UTILS/config.h
@@ -1,92 +1,95 @@
-/* setup/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* configuration flags to be save in the adios output file. */
-#undef CONFIGURE_FLAGS
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to dummy `main' function (if any) required to link to the Fortran
    libraries. */
-#undef FC_DUMMY_MAIN
+/* #undef FC_DUMMY_MAIN */
 
 /* Define if F77 and FC dummy `main' functions are identical. */
-#undef FC_DUMMY_MAIN_EQ_F77
+/* #undef FC_DUMMY_MAIN_EQ_F77 */
 
 /* Define to a macro mangling the given C identifier (in lower and upper
    case), which must not contain underscores, for linking with Fortran. */
-#undef FC_FUNC
+#define FC_FUNC(name,NAME) name ## _
 
 /* As FC_FUNC, but for C identifiers containing underscores. */
-#undef FC_FUNC_
+#define FC_FUNC_(name,NAME) name ## _
+
+/* Define to alternate name for `main' routine that is called from a `main' in
+   the Fortran libraries. */
+/* #undef FC_MAIN */
 
 /* Define if emmintrin.h */
-#undef HAVE_EMMINTRIN
+#define HAVE_EMMINTRIN 1
 
 /* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+#define HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+#define HAVE_MEMORY_H 1
 
 /* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
+/* #undef HAVE_PTHREAD */
 
 /* defined if Scotch is installed */
-#undef HAVE_SCOTCH
+#define HAVE_SCOTCH 1
 
 /* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+#define HAVE_STDINT_H 1
 
 /* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
 
 /* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+#define HAVE_STRINGS_H 1
 
 /* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+#define HAVE_STRING_H 1
 
 /* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
+#define HAVE_SYS_STAT_H 1
 
 /* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
+#define HAVE_SYS_TYPES_H 1
 
 /* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+#define HAVE_UNISTD_H 1
 
 /* Define if xmmintrin.h */
-#undef HAVE_XMMINTRIN
+#define HAVE_XMMINTRIN 1
 
 /* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
+#define PACKAGE_BUGREPORT "jtromp AT princeton.edu"
 
 /* Define to the full name of this package. */
-#undef PACKAGE_NAME
+#define PACKAGE_NAME "Specfem 3D"
 
 /* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
+#define PACKAGE_STRING "Specfem 3D 2.1.0"
 
 /* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
+#define PACKAGE_TARNAME "Specfem3D"
 
 /* Define to the home page for this package. */
-#undef PACKAGE_URL
+#define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#undef PACKAGE_VERSION
+#define PACKAGE_VERSION "2.1.0"
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
-#undef PTHREAD_CREATE_JOINABLE
+/* #undef PTHREAD_CREATE_JOINABLE */
 
 /* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
+#define STDC_HEADERS 1
 
 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
    `char[]'. */
-#undef YYTEXT_POINTER
+/* #undef YYTEXT_POINTER */
 
 
 /* Uncomment and define to select optimized file i/o for regional simulations */
 /* map fails when output files are > 4GB, which is often the case for GPU simulations */
 // #define USE_MAP_FUNCTION
 
+
diff --git a/utils/DSM_FOR_SPECFEM3D/UTILS/create_inputs_files.f90 b/utils/DSM_FOR_SPECFEM3D/UTILS/create_inputs_files.f90
index 5e6409f..37eab60 100755
--- a/utils/DSM_FOR_SPECFEM3D/UTILS/create_inputs_files.f90
+++ b/utils/DSM_FOR_SPECFEM3D/UTILS/create_inputs_files.f90
@@ -29,8 +29,6 @@ program create_input_files
 
   ! param.in -------------------------------------------------------------------
   open(10,file='params.in') 
-  call read_value_string(path, 'HOME_SPECFEM3D')
-  write(10,'(a)') 'HOME_SPECFEM3D='//trim(path)
   call read_value_string(path, 'DSM_BINARY_PATH')
   write(10,'(a)') 'BIN='//trim(path)
   call read_value_string(path, 'SPECFEM3D_BINARY_PATH')
@@ -393,8 +391,6 @@ program create_input_files
  open(10,file='station_for_simulation.txt')
  open(20,file='DATA/STATIONS_test')
 
- write(*,*) '!!!!!!!!!!!!!!!!!!!!!!----------- STEP create_input :', DEPTH_CHUNK,'----------!!!!!!!!!!!!!!!!!!'
-
  do 
     read(10,*,end=99) lat,long
     call  Geogr2Cart(X,Y,Z,long,lat,rotation_matrix,ZREF)
diff --git a/utils/DSM_FOR_SPECFEM3D/config.h b/utils/DSM_FOR_SPECFEM3D/config.h
new file mode 100755
index 0000000..7b1f38d
--- /dev/null
+++ b/utils/DSM_FOR_SPECFEM3D/config.h
@@ -0,0 +1,58 @@
+CC=icc
+FC=mpif90
+CCFLAGS = -O3
+# for debugging: change -O3 -check nobounds to      -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
+
+# for full vectorization on CURIE, change -xHost to -xAVX (since the frontend node has Nehalem processors, not Sandy Bridge)
+
+FFLAGS = -O3 -check nobounds -xHost -ftz -assume buffered_io -assume byterecl -vec-report3 -implicitnone -warn truncated_source -warn argument_checking -warn declarations -warn alignments -warn ignore_loc -warn usage -mcmodel=medium -shared-intel
+#FFLAGS = -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv -implicitnone -warn truncated_source -warn argument_checking -warn declarations -warn alignments -warn ignore_loc -warn usage -mcmodel=medium -shared-intel
+
+
+################################################
+#   Intel ifort
+################################################
+
+# it is crucial to use -xAVX here, so that big loops that contain double precision complex numbers are vectorized;
+# this means that only Intel Sandy Bridge processors can vectorize these loops, not Intel Nehalem processors,
+# since they only have SSE4.2 vector instructions but not AVX (Advanced Vector Extensions).
+# option "-assume buffered_io" is important especially on
+# parallel file systems like SFS 3.2 / Lustre 1.8. If omitted
+# I/O throughput lingers at 2.5 MB/s, with it it can increase to ~44 MB/s
+# However it does not make much of a difference on NFS mounted volumes or with SFS 3.1.1 / Lustre 1.6.7.1
+#FC = mpif90
+#FFLAGS = -O3 -check nobounds -xAVX -ftz -assume buffered_io -assume byterecl -vec-report3 -implicitnone -warn truncated_source -warn argument_checking -warn declarations -warn alignments -warn ignore_loc -warn usage -mcmodel=medium -shared-intel
+
+# useful for debugging:
+#  change   -O3 -check nobounds     to      -check all -debug -g -O0 -fp-stack-check -traceback -ftrapuv
+
+# change    -vec-report0      to      -vec-report3     to get a vectorization report
+
+################################################
+#   GNU gfortran
+################################################
+
+#FC = mpif90
+#FFLAGS = -std=gnu -fimplicit-none -frange-check -O2 -pedantic -pedantic-errors -Waliasing -Wampersand -Wline-truncation -Wsurprising -Wunderflow -fbounds-check
+
+################################################
+#   IBM Blue Gene
+################################################
+
+# at IDRIS (France) maybe change -qarch=auto to -qarch=450d
+#
+# you will probably need to add " module load bgq-xl " or similar to your .bash_profile to load the compilers
+#
+# It could also help to put this in your .bash_profile: export XLFRTEOPTS=aggressive_array_io=yes:buffering=enable
+#
+# On some (but not all) IBM machines one might need to add -qsave otherwise the IBM compiler allocates the
+# arrays in the stack and the code crashes if the stack size is too
+# small (which is sometimes the case, but less often these days on large machines)
+#
+# to debug with IBM xlf, one can add this: -g -O0 -C -qddim -qfullpath -qflttrap=overflow:zerodivide:invalid:enable -qfloat=nans -qinitauto=7FBFFFFF
+#
+# options -qreport -qsource -qlist create a *.lst file containing detailed information about vectorization
+#
+#FC = mpixlf95_r
+#FFLAGS = -O4 -qnostrict -qhot -qsimd=auto -qassert=contig -g -Q -qarch=auto -q64 -qfree=f90 -qsuffix=f=f90 -qsuppress=1500-036 -qreport -qsource -qlist
+
diff --git a/utils/DSM_FOR_SPECFEM3D/install.sh b/utils/DSM_FOR_SPECFEM3D/install.sh
index bbe7e85..7812bd1 100755
--- a/utils/DSM_FOR_SPECFEM3D/install.sh
+++ b/utils/DSM_FOR_SPECFEM3D/install.sh
@@ -2,7 +2,7 @@
 
 mkdir -p bin
 
-cd Part1_create_SPECFEM3D_Cartesian_mesh_for_DSM;make;cd ..
+###cd Part1_create_SPECFEM3D_Cartesian_mesh_for_DSM;make;cd ..
 cd Part2_compute_DSM_coefficients_with_FEMs_SH; make;cd ../
 cd Part2_compute_DSM_coefficients_with_FEMs_PSV; make;cd ../
 cd Part3_read_DSM_coefficients_back_SH/TraPSV_MPI_read_vertical_faces; make;cd ..
diff --git a/utils/DSM_FOR_SPECFEM3D/shells/scrpits_specfem3D.sh b/utils/DSM_FOR_SPECFEM3D/shells/scrpits_specfem3D.sh
index d8f4f3f..3561fd5 100755
--- a/utils/DSM_FOR_SPECFEM3D/shells/scrpits_specfem3D.sh
+++ b/utils/DSM_FOR_SPECFEM3D/shells/scrpits_specfem3D.sh
@@ -34,8 +34,10 @@ current_dir=$(pwd)
 
 cp ParFileMeshChunk $MESH/.
 cp $IN_DSM/$MODELE_1D $MESH/.
-cd $MESH
-$BIN/xmesh_chunk_vm
+###cd $MESH
+###$BIN/xmesh_chunk_vm
+cd $current_dir
+$BINSEM/xmeshfem3D
 cp $MESH/model_1D.in ../DATA/.
 cd $current_dir
 
@@ -51,7 +53,7 @@ $BINSEM/xdecompose_mesh $NPROC $MESH OUTPUT_FILES/DATABASES_MPI/
 mv Numglob2loc_elmn.txt $MESH/.
 
 ###cd bin
-echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 1 !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 1 !!!!!!!!!!!!!!!!'
 pwd
 $MPIRUN $OPTION_SIMU $BINSEM/xgenerate_databases
 ###cd ..
@@ -62,7 +64,7 @@ function run_create_tractions_for_specfem ()
 cp ParFileInterface bin/. 
 
 ###cd bin
-echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 2 !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 2 !!!!!!!!!!!!!!!!'
 pwd
 $MPIRUN $OPTION_SIMU $BIN/xread_absorbing_interfaces > out_read.txt
 ###cd ..
@@ -73,12 +75,12 @@ function run_simu ()
 {
 
 ###cd bin
-echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 3 !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 3 !!!!!!!!!!!!!!!!'
 pwd
 $MPIRUN $OPTION_SIMU $BINSEM/xspecfem3D > tmp_sem.out
 ###cd ..
 cp out_read.txt bin/
-echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 4 !!!!!!!!!!!!!!!!'
+###echo '!!!!!!!!!!!!!!!!!!!!! SCRPITS 4 !!!!!!!!!!!!!!!!'
 pwd
 }
 



More information about the CIG-COMMITS mailing list