[cig-commits] [commit] devel,master: renames constants_tomography.h to constants_tomography.h.in to allow out-of-source builds; small updates in tomo rules and files (5958372)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:32:33 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit 5958372e7c9df380f251f5c8639acaea74d38194
Author: daniel peter <peterda at ethz.ch>
Date:   Tue Oct 14 14:22:25 2014 +0200

    renames constants_tomography.h to constants_tomography.h.in to allow out-of-source builds; small updates in tomo rules and files


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

5958372e7c9df380f251f5c8639acaea74d38194
 configure                                          |  3 +-
 configure.ac                                       |  1 +
 ...ants_tomography.h => constants_tomography.h.in} |  0
 src/specfem3D/read_write_netcdf.f90                | 36 ++++++++++++++
 src/specfem3D/rules.mk                             |  5 +-
 src/tomography/rules.mk                            | 56 ++++++++--------------
 src/tomography/sum_kernels.f90                     | 43 ++++++++++-------
 src/tomography/sum_preconditioned_kernels.f90      | 43 ++++++++++-------
 src/tomography/tomography_par.f90                  |  4 +-
 9 files changed, 113 insertions(+), 78 deletions(-)

diff --git a/configure b/configure
index b8dea86..97add03 100755
--- a/configure
+++ b/configure
@@ -7675,7 +7675,7 @@ $as_echo "## ----------------------------------- ##
 ## ----------------------------------- ##"
 
 # Output results.
-ac_config_files="$ac_config_files Makefile setup/constants.h setup/precision.h setup/config.fh"
+ac_config_files="$ac_config_files Makefile setup/constants.h setup/constants_tomography.h setup/precision.h setup/config.fh"
 
 ac_config_files="$ac_config_files DATA/Par_file:DATA/Par_file DATA/CMTSOLUTION:DATA/CMTSOLUTION DATA/STATIONS:DATA/STATIONS"
 
@@ -8426,6 +8426,7 @@ do
     "setup/config.h") CONFIG_HEADERS="$CONFIG_HEADERS setup/config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "setup/constants.h") CONFIG_FILES="$CONFIG_FILES setup/constants.h" ;;
+    "setup/constants_tomography.h") CONFIG_FILES="$CONFIG_FILES setup/constants_tomography.h" ;;
     "setup/precision.h") CONFIG_FILES="$CONFIG_FILES setup/precision.h" ;;
     "setup/config.fh") CONFIG_FILES="$CONFIG_FILES setup/config.fh" ;;
     "DATA/Par_file") CONFIG_FILES="$CONFIG_FILES DATA/Par_file:DATA/Par_file" ;;
diff --git a/configure.ac b/configure.ac
index 487b549..0c5c95d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,6 +323,7 @@ AS_BOX([setting up default simulation setup])
 AC_CONFIG_FILES([
     Makefile
     setup/constants.h
+    setup/constants_tomography.h
     setup/precision.h
     setup/config.fh
 ])
diff --git a/setup/constants_tomography.h b/setup/constants_tomography.h.in
similarity index 100%
rename from setup/constants_tomography.h
rename to setup/constants_tomography.h.in
diff --git a/src/specfem3D/read_write_netcdf.f90 b/src/specfem3D/read_write_netcdf.f90
index 9fe371e..7e4ec60 100644
--- a/src/specfem3D/read_write_netcdf.f90
+++ b/src/specfem3D/read_write_netcdf.f90
@@ -1,3 +1,31 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  6 . 0
+!          --------------------------------------------------
+!
+!     Main historical authors: Dimitri Komatitsch and Jeroen Tromp
+!                        Princeton University, USA
+!                and CNRS / University of Marseille, France
+!                 (there are currently many more authors!)
+! (c) Princeton University and CNRS / University of Marseille, April 2014
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+
 subroutine write_coordinates_netcdf (fName)
 
   ! This writes the corresponding kernel coordinates.
@@ -55,6 +83,10 @@ subroutine write_coordinates_netcdf (fName)
 
 end subroutine write_coordinates_netcdf
 
+!
+!-------------------------------------------------------------------------------------------------
+!
+
 subroutine write_kernel_netcdf (fName, param)
 
   ! This guy converts the kernels to global numbering, and writes to a NetCDF file in parallel.
@@ -135,6 +167,10 @@ subroutine write_kernel_netcdf (fName, param)
 
 end subroutine write_kernel_netcdf
 
+!
+!-------------------------------------------------------------------------------------------------
+!
+
 subroutine checkNC (status)
 
   ! This little guy just checks for an error from the NetCDF libraries and throws a tantrum if
diff --git a/src/specfem3D/rules.mk b/src/specfem3D/rules.mk
index 9aa1ee2..b2a6e92 100644
--- a/src/specfem3D/rules.mk
+++ b/src/specfem3D/rules.mk
@@ -322,7 +322,8 @@ $O/%.visualcc.o: $S/%.cpp ${SETUP}/config.h
 $O/%.visualc.o: $S/%.c ${SETUP}/config.h
 	${CC} -c $(CPPFLAGS) $(MPI_INCLUDES) -o $@ $<
 
-## CEM
-
+###
+### CEM
+###
 $O/%.checknetcdf.o: $S/%.f90 $O/shared_par.shared_module.o $O/specfem3D_par.solverstatic_module.o
 	${FCCOMPILE_CHECK} ${FCFLAGS_f90} $(NETCDF_INCLUDE) -c -o $@ $<
diff --git a/src/tomography/rules.mk b/src/tomography/rules.mk
index e3eaa31..c04627c 100644
--- a/src/tomography/rules.mk
+++ b/src/tomography/rules.mk
@@ -101,7 +101,7 @@ tomography: $(tomography_TARGETS)
 #######################################
 
 xadd_model_SHARED_OBJECTS = \
-	$O/tomography_par.tomo.o \
+	$O/tomography_par.tomo_module.o \
 	$O/compute_kernel_integral.tomo.o \
 	$O/get_gradient_cg.tomo.o \
 	$O/get_gradient_steepest.tomo.o \
@@ -117,18 +117,6 @@ xadd_model_SHARED_OBJECTS = \
 	$O/gll_library.shared.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/compute_kernel_integral.tomo.o: $O/tomography_par.tomo.o
-$O/get_gradient_cg.tomo.o: $O/tomography_par.tomo.o
-$O/get_gradient_steepest.tomo.o: $O/tomography_par.tomo.o
-$O/read_kernels.tomo.o: $O/tomography_par.tomo.o
-$O/read_kernels_cg.tomo.o: $O/tomography_par.tomo.o
-$O/read_model.tomo.o: $O/tomography_par.tomo.o
-$O/read_parameters_tomo.tomo.o: $O/tomography_par.tomo.o
-$O/write_gradients.tomo.o: $O/tomography_par.tomo.o
-$O/write_new_model.tomo.o: $O/tomography_par.tomo.o
-$O/write_new_model_perturbations.tomo.o: $O/tomography_par.tomo.o
-
 ##
 ## xadd_model_iso
 ##
@@ -136,9 +124,6 @@ xadd_model_iso_OBJECTS = \
 	$O/add_model_iso.tomo.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/add_model_iso.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xadd_model_iso: $(xadd_model_iso_OBJECTS) $(xadd_model_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -150,9 +135,6 @@ xadd_model_tiso_OBJECTS = \
 	$O/add_model_tiso.tomo.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/add_model_tiso.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xadd_model_tiso: $(xadd_model_tiso_OBJECTS) $(xadd_model_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -163,9 +145,6 @@ xadd_model_tiso_cg_OBJECTS = \
 	$O/add_model_tiso_cg.tomo.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/add_model_tiso_cg.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xadd_model_tiso_cg: $(xadd_model_tiso_cg_OBJECTS) $(xadd_model_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -177,9 +156,6 @@ xadd_model_tiso_iso_OBJECTS = \
 	$O/add_model_tiso_iso.tomo.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/add_model_tiso_iso.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xadd_model_tiso_iso: $(xadd_model_tiso_iso_OBJECTS) $(xadd_model_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -248,7 +224,7 @@ ${E}/xsmooth_sem: $(xsmooth_sem_OBJECTS) $(xsmooth_sem_SHARED_OBJECTS)
 ## xsum_kernels
 ##
 xsum_kernels_OBJECTS = \
-	$O/tomography_par.tomo.o \
+	$O/tomography_par.tomo_module.o \
 	$O/sum_kernels.tomo.o \
 	$(EMPTY_MACRO)
 
@@ -256,9 +232,6 @@ xsum_kernels_SHARED_OBJECTS = \
 	$O/parallel.sharedmpi.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/sum_kernels.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xsum_kernels: $(xsum_kernels_OBJECTS) $(xsum_kernels_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -267,7 +240,7 @@ ${E}/xsum_kernels: $(xsum_kernels_OBJECTS) $(xsum_kernels_SHARED_OBJECTS)
 ## xsum_preconditioned_kernels
 ##
 xsum_preconditioned_kernels_OBJECTS = \
-	$O/tomography_par.tomo.o \
+	$O/tomography_par.tomo_module.o \
 	$O/sum_preconditioned_kernels.tomo.o \
 	$(EMPTY_MACRO)
 
@@ -275,9 +248,6 @@ xsum_preconditioned_kernels_SHARED_OBJECTS = \
 	$O/parallel.sharedmpi.o \
 	$(EMPTY_MACRO)
 
-# extra dependencies
-$O/sum_preconditioned_kernels.tomo.o: $O/tomography_par.tomo.o
-
 ${E}/xsum_preconditioned_kernels: $(xsum_preconditioned_kernels_OBJECTS) $(xsum_preconditioned_kernels_SHARED_OBJECTS)
 	${MPIFCCOMPILE_CHECK} -o $@ $+ $(MPILIBS)
 
@@ -287,6 +257,12 @@ ${E}/xsum_preconditioned_kernels: $(xsum_preconditioned_kernels_OBJECTS) $(xsum_
 S := ${S_TOP}/src/tomography
 $(tomography_OBJECTS): S := ${S_TOP}/src/tomography
 
+###
+### Model dependencies
+###
+$O/tomography_par.tomo_module.o: $O/shared_par.shared_module.o
+
+
 ####
 #### rule for each .o file below
 ####
@@ -294,15 +270,21 @@ $(tomography_OBJECTS): S := ${S_TOP}/src/tomography
 ##
 ## tomography
 ##
-$O/%.tomo.o: $S/%.f90 $O/shared_par.shared_module.o ${OUTPUT}/values_from_mesher.h $O/parallel.sharedmpi.o
+
+$O/%.tomo_module.o: $S/%.f90 ${SETUP}/constants_tomography.h ${OUTPUT}/values_from_mesher.h $O/shared_par.shared_module.o
 	${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $<
 
-$O/%.tomo.o: $S/%.F90 $O/shared_par.shared_module.o ${OUTPUT}/values_from_mesher.h $O/parallel.sharedmpi.o
+
+$O/%.tomo.o: $S/%.f90 $O/tomography_par.tomo_module.o $O/parallel.sharedmpi.o
 	${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $<
 
-$O/%.tomoadios.o: $S/%.F90 $O/shared_par.shared_module.o ${OUTPUT}/values_from_mesher.h $O/parallel.sharedmpi.o $O/adios_helpers.shared_adios.o
+$O/%.tomo.o: $S/%.F90 $O/tomography_par.tomo_module.o $O/parallel.sharedmpi.o
+	${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $<
+
+
+$O/%.tomoadios.o: $S/%.F90 $O/tomography_par.tomo_module.o $O/parallel.sharedmpi.o $O/adios_helpers.shared_adios.o
 	${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $< $(FC_DEFINE)ADIOS_INPUT
 
-$O/%.tomoadios.o: $S/%.f90 $O/shared_par.shared_module.o ${OUTPUT}/values_from_mesher.h $O/parallel.sharedmpi.o $O/adios_helpers.shared_adios.o
+$O/%.tomoadios.o: $S/%.f90 $O/tomography_par.tomo_module.o $O/parallel.sharedmpi.o $O/adios_helpers.shared_adios.o
 	${FCCOMPILE_CHECK} ${FCFLAGS_f90} -c -o $@ $<
 
diff --git a/src/tomography/sum_kernels.f90 b/src/tomography/sum_kernels.f90
index 11328d7..e7ba43a 100644
--- a/src/tomography/sum_kernels.f90
+++ b/src/tomography/sum_kernels.f90
@@ -35,11 +35,11 @@
 !   - proc***_reg1_bulk_betah_kernel.bin
 !   - proc***_reg1_eta_kernel.bin
 !
-! input file: kernels_run.globe
+! input file: kernels_list.txt
 !   lists all event kernel directories which should be summed together
 !
 ! input directory:  INPUT_KERNELS/
-!    contains links to all event kernel directories (listed in "kernel_list.globe")
+!    contains links to all event kernel directories (listed in "kernels_list.txt")
 !
 ! output directory: OUTPUT_SUM/
 !    the resulting kernel files will be stored in this directory
@@ -87,6 +87,13 @@ program sum_kernels_globe
     write(*,*)
   endif
 
+  ! user output
+  if(myrank == 0) then
+    print*,'summing kernels in INPUT_KERNELS/ directories:'
+    print*,kernel_list(1:nker)
+    print*
+  endif
+
   ! synchronizes
   call synchronize_all()
 
@@ -96,13 +103,13 @@ program sum_kernels_globe
     !  isotropic kernels
     if( myrank == 0 ) write(*,*) 'isotropic kernels: bulk_c, bulk_beta, rho'
 
-    kernel_name = 'reg1_bulk_c_kernel'
+    kernel_name = 'reg1_' // 'bulk_c_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_beta_kernel'
+    kernel_name = 'reg1_' // 'bulk_beta_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_rho_kernel'
+    kernel_name = 'reg1_' // 'rho_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
   else if( USE_ALPHA_BETA_RHO ) then
@@ -110,13 +117,13 @@ program sum_kernels_globe
     ! isotropic kernels
     if( myrank == 0 ) write(*,*) 'isotropic kernels: alpha, beta, rho'
 
-    kernel_name = 'reg1_alpha_kernel'
+    kernel_name = 'reg1_' // 'alpha_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_beta_kernel'
+    kernel_name = 'reg1_' // 'beta_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_rho_kernel'
+    kernel_name = 'reg1_' // 'rho_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
   else
@@ -124,21 +131,21 @@ program sum_kernels_globe
     ! transverse isotropic kernels
     if( myrank == 0 ) write(*,*) 'transverse isotropic kernels: bulk_c, bulk_betav, bulk_betah,eta'
 
-    kernel_name = 'reg1_bulk_c_kernel'
+    kernel_name = 'reg1_' // 'bulk_c_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_betav_kernel'
+    kernel_name = 'reg1_' // 'bulk_betav_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_betah_kernel'
+    kernel_name = 'reg1_' // 'bulk_betah_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_eta_kernel'
+    kernel_name = 'reg1_' // 'eta_kernel'
     call sum_kernel(kernel_name,kernel_list,nker)
 
   endif
 
-  if(myrank==0) write(*,*) 'done writing all kernels'
+  if(myrank==0) write(*,*) 'done writing all kernels, see directory OUTPUT_SUM/'
 
   ! stop all the MPI processes, and exit
   call finalize_mpi()
@@ -186,8 +193,8 @@ subroutine sum_kernel(kernel_name,kernel_list,nker)
 
     open(IIN,file=trim(k_file),status='old',form='unformatted',action='read',iostat=ios)
     if( ios /= 0 ) then
-     write(*,*) '  kernel not found:',trim(k_file)
-     cycle
+     write(*,*) '  kernel not found: ',trim(k_file)
+     stop 'Error kernel file not found'
     endif
     read(IIN) kernel
     close(IIN)
@@ -207,8 +214,8 @@ subroutine sum_kernel(kernel_name,kernel_list,nker)
                             //'/proc',myrank,'_reg1_mask_source.bin'
       open(IIN,file=trim(k_file),status='old',form='unformatted',action='read',iostat=ios)
       if( ios /= 0 ) then
-        write(*,*) '  file not found:',trim(k_file)
-        cycle
+        write(*,*) '  file not found: ',trim(k_file)
+        stop 'Error source mask file not found'
       endif
       read(IIN) mask_source
       close(IIN)
@@ -228,7 +235,7 @@ subroutine sum_kernel(kernel_name,kernel_list,nker)
 
   open(IOUT,file=trim(k_file),form='unformatted',status='unknown',action='write',iostat=ios)
   if( ios /= 0 ) then
-    write(*,*) 'Error kernel not written:',trim(k_file)
+    write(*,*) 'Error kernel not written: ',trim(k_file)
     stop 'Error kernel write'
   endif
   write(IOUT) total_kernel
diff --git a/src/tomography/sum_preconditioned_kernels.f90 b/src/tomography/sum_preconditioned_kernels.f90
index f34170c..c799850 100644
--- a/src/tomography/sum_preconditioned_kernels.f90
+++ b/src/tomography/sum_preconditioned_kernels.f90
@@ -39,11 +39,11 @@
 !   - proc***_reg1_hess_kernel.bin
 !          to precondition the transverse isotropic kernel files
 !
-! input file: kernels_run.globe
+! input file: kernels_list.txt
 !   lists all event kernel directories which should be summed together
 !
 ! input directory:  INPUT_KERNELS/
-!    contains links to all event kernel directories (listed in "kernel_list.globe")
+!    contains links to all event kernel directories (listed in "kernels_list.txt")
 !
 ! output directory: OUTPUT_SUM/
 !    the resulting kernel files will be stored in this directory
@@ -91,6 +91,13 @@ program sum_preconditioned_kernels_globe
     write(*,*)
   endif
 
+  ! user output
+  if(myrank == 0) then
+    print*,'summing kernels in INPUT_KERNELS/ directories:'
+    print*,kernel_list(1:nker)
+    print*
+  endif
+
   ! synchronizes
   call synchronize_all()
 
@@ -100,13 +107,13 @@ program sum_preconditioned_kernels_globe
     !  isotropic kernels
     if( myrank == 0 ) write(*,*) 'isotropic kernels: bulk_c, bulk_beta, rho'
 
-    kernel_name = 'reg1_bulk_c_kernel'
+    kernel_name = 'reg1_' // 'bulk_c_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_beta_kernel'
+    kernel_name = 'reg1_' // 'bulk_beta_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_rho_kernel'
+    kernel_name = 'reg1_' // 'rho_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
   else if( USE_ALPHA_BETA_RHO ) then
@@ -114,13 +121,13 @@ program sum_preconditioned_kernels_globe
     ! isotropic kernels
     if( myrank == 0 ) write(*,*) 'isotropic kernels: alpha, beta, rho'
 
-    kernel_name = 'reg1_alpha_kernel'
+    kernel_name = 'reg1_' // 'alpha_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_beta_kernel'
+    kernel_name = 'reg1_' // 'beta_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_rho_kernel'
+    kernel_name = 'reg1_' // 'rho_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
   else
@@ -128,21 +135,21 @@ program sum_preconditioned_kernels_globe
     ! transverse isotropic kernels
     if( myrank == 0 ) write(*,*) 'transverse isotropic kernels: bulk_c, bulk_betav, bulk_betah,eta'
 
-    kernel_name = 'reg1_bulk_c_kernel'
+    kernel_name = 'reg1_' // 'bulk_c_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_betav_kernel'
+    kernel_name = 'reg1_' // 'bulk_betav_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_bulk_betah_kernel'
+    kernel_name = 'reg1_' // 'bulk_betah_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
-    kernel_name = 'reg1_eta_kernel'
+    kernel_name = 'reg1_' // 'eta_kernel'
     call sum_kernel_pre(kernel_name,kernel_list,nker)
 
   endif
 
-  if(myrank==0) write(*,*) 'done writing all kernels'
+  if(myrank==0) write(*,*) 'done writing all kernels, see directory OUTPUT_SUM/'
 
   ! stop all the MPI processes, and exit
   call finalize_mpi()
@@ -197,8 +204,8 @@ subroutine sum_kernel_pre(kernel_name,kernel_list,nker)
 
     open(IIN,file=trim(k_file),status='old',form='unformatted',action='read',iostat=ios)
     if( ios /= 0 ) then
-      write(*,*) '  kernel not found:',trim(k_file)
-      cycle
+      write(*,*) '  kernel not found: ',trim(k_file)
+      stop 'Error kernel file not found'
     endif
     read(IIN) kernel
     close(IIN)
@@ -242,8 +249,8 @@ subroutine sum_kernel_pre(kernel_name,kernel_list,nker)
                             //'/proc',myrank,'_reg1_mask_source.bin'
       open(IIN,file=trim(k_file),status='old',form='unformatted',action='read',iostat=ios)
       if( ios /= 0 ) then
-        write(*,*) '  file not found:',trim(k_file)
-        cycle
+        write(*,*) '  file not found: ',trim(k_file)
+        stop 'Error source mask file not found'
       endif
       read(IIN) mask_source
       close(IIN)
@@ -291,7 +298,7 @@ subroutine sum_kernel_pre(kernel_name,kernel_list,nker)
 
   open(IOUT,file=trim(k_file),form='unformatted',status='unknown',action='write',iostat=ios)
   if( ios /= 0 ) then
-    write(*,*) 'Error kernel not written:',trim(k_file)
+    write(*,*) 'Error kernel not written: ',trim(k_file)
     stop 'Error kernel write'
   endif
   write(IOUT) total_kernel
diff --git a/src/tomography/tomography_par.f90 b/src/tomography/tomography_par.f90
index 67e228a..c8046c4 100644
--- a/src/tomography/tomography_par.f90
+++ b/src/tomography/tomography_par.f90
@@ -35,10 +35,10 @@ module tomography_par
   implicit none
 
   ! array dimensions for static compilation
-  include 'OUTPUT_FILES/values_from_mesher.h'
+  include "OUTPUT_FILES/values_from_mesher.h"
 
   ! tomography parameter settings
-  include 'constants_tomography.h'
+  include "constants_tomography.h"
 
   integer, parameter :: NSPEC = NSPEC_CRUST_MANTLE
   integer, parameter :: NGLOB = NGLOB_CRUST_MANTLE



More information about the CIG-COMMITS mailing list