[cig-commits] r19289 - in seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER: . src/specfem3D
rietmann at geodynamics.org
rietmann at geodynamics.org
Sat Dec 10 01:10:12 PST 2011
Author: rietmann
Date: 2011-12-10 01:10:12 -0800 (Sat, 10 Dec 2011)
New Revision: 19289
Modified:
seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README
seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90
seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90
seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90
Log:
seemingly fixed problem with partitions that do not have a surface file. still should poke around in the code and put some more if statements to be sure
Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README 2011-12-10 09:10:08 UTC (rev 19288)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README 2011-12-10 09:10:12 UTC (rev 19289)
@@ -23,13 +23,17 @@
Settings for todi.cscs.ch
export GNU_FCFLAGS="-Ofast -mfpmath=sse -funroll-loops"
+export GNU_CHECK="-O3"
+export DEBUG_FLAGS="-g -fbacktrace"
export ICC_FCFLAGS="-O3 -fp-model fast=2 -x SSE4.2 -ftz -funroll-loops -unroll5"
export ICC_FCFLAGS="-O3 -fp-model fast=2 -funroll-loops -unroll5 -msse3 -ftree-vectorize"
export ICC_CHECK="-O2"
export CRAY_FCFLAGS="-eF -em -rm -O3,fp3"
export CRAY_CHECK="-eF -em -rm"
-./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $ICC_CHECK`" FLAGS_NO_CHECK='`echo $ICC_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include
+./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $CRAY_CHECK`" FLAGS_NO_CHECK='`echo $CRAY_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include
+./configure --with-cuda CC=cc FC=ftn MPIFC=ftn MPICC=cc FLAGS_CHECK="`echo $GNU_CHECK`" FLAGS_NO_CHECK='`echo $GNU_FCFLAGS`' CUDA_LIB=-L$CUDA_HOME/lib64 MPI_INC=-I$MPICH_DIR/include
+
suggested compiler options:
intel: -O3 -fp-model fast=2 -x SSE4.2 -ftz -funroll-loops -unroll5
gnu: -Ofast -mfpmath=sse -funroll-loops
Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90 2011-12-10 09:10:08 UTC (rev 19288)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90 2011-12-10 09:10:12 UTC (rev 19289)
@@ -109,15 +109,18 @@
if( MOVIE_SIMULATION ) then
call write_movie_output()
endif
-
+
! first step of noise tomography, i.e., save a surface movie at every time step
- if ( NOISE_TOMOGRAPHY == 1 ) then
- call noise_save_surface_movie(displ, &
- ibool, &
- noise_surface_movie,it, &
- NSPEC_AB,NGLOB_AB, &
- num_free_surface_faces,free_surface_ispec,free_surface_ijk,&
- Mesh_pointer,GPU_MODE)
+ if ( NOISE_TOMOGRAPHY == 1) then
+ if( num_free_surface_faces == 0) then
+ else
+ call noise_save_surface_movie(displ, &
+ ibool, &
+ noise_surface_movie,it, &
+ NSPEC_AB,NGLOB_AB, &
+ num_free_surface_faces,free_surface_ispec,free_surface_ijk,&
+ Mesh_pointer,GPU_MODE)
+ endif
endif
!
Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90 2011-12-10 09:10:08 UTC (rev 19288)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90 2011-12-10 09:10:12 UTC (rev 19289)
@@ -446,35 +446,38 @@
endif
if (NOISE_TOMOGRAPHY/=0) then
- ! save/read the surface movie using the same c routine as we do for absorbing boundaries (file ID is 2)
+ ! save/read the surface movie using the same c routine as we do for absorbing boundaries (file ID is 2)
+
+ ! size of single record
+ reclen=CUSTOM_REAL*NDIM*NGLLSQUARE*NSPEC_TOP
- ! size of single record
- reclen=CUSTOM_REAL*NDIM*NGLLSQUARE*NSPEC_TOP
+ ! only open files if there are surface faces in this paritition
+ if(NSPEC_TOP .gt. 0) then
- ! check integer size limit: size of b_reclen_field must fit onto an 4-byte integer
- if( NSPEC_TOP > 2147483647 / (CUSTOM_REAL * NGLLSQUARE * NDIM) ) then
- print *,'reclen of noise surface_movie needed exceeds integer 4-byte limit: ',reclen
- print *,' ',CUSTOM_REAL, NDIM, NGLLSQUARE, NSPEC_TOP
- print*,'bit size fortran: ',bit_size(NSPEC_TOP)
- call exit_MPI(myrank,"error NSPEC_TOP integer limit")
- endif
+ ! check integer size limit: size of b_reclen_field must fit onto an 4-byte integer
+ if( NSPEC_TOP > 2147483647 / (CUSTOM_REAL * NGLLSQUARE * NDIM) ) then
+ print *,'reclen of noise surface_movie needed exceeds integer 4-byte limit: ',reclen
+ print *,' ',CUSTOM_REAL, NDIM, NGLLSQUARE, NSPEC_TOP
+ print*,'bit size fortran: ',bit_size(NSPEC_TOP)
+ call exit_MPI(myrank,"error NSPEC_TOP integer limit")
+ endif
- ! total file size
- filesize = reclen
- filesize = filesize*NSTEP
+ ! total file size
+ filesize = reclen
+ filesize = filesize*NSTEP
- write(outputname,"('/proc',i6.6,'_surface_movie')") myrank
- if (NOISE_TOMOGRAPHY==1) call open_file_abs_w(2,trim(LOCAL_PATH)//trim(outputname), &
- len_trim(trim(LOCAL_PATH)//trim(outputname)), &
- filesize)
- if (NOISE_TOMOGRAPHY==2) call open_file_abs_r(2,trim(LOCAL_PATH)//trim(outputname), &
- len_trim(trim(LOCAL_PATH)//trim(outputname)), &
- filesize)
- if (NOISE_TOMOGRAPHY==3) call open_file_abs_r(2,trim(LOCAL_PATH)//trim(outputname), &
- len_trim(trim(LOCAL_PATH)//trim(outputname)), &
- filesize)
+ write(outputname,"('/proc',i6.6,'_surface_movie')") myrank
+ if (NOISE_TOMOGRAPHY==1) call open_file_abs_w(2,trim(LOCAL_PATH)//trim(outputname), &
+ len_trim(trim(LOCAL_PATH)//trim(outputname)), &
+ filesize)
+ if (NOISE_TOMOGRAPHY==2) call open_file_abs_r(2,trim(LOCAL_PATH)//trim(outputname), &
+ len_trim(trim(LOCAL_PATH)//trim(outputname)), &
+ filesize)
+ if (NOISE_TOMOGRAPHY==3) call open_file_abs_r(2,trim(LOCAL_PATH)//trim(outputname), &
+ len_trim(trim(LOCAL_PATH)//trim(outputname)), &
+ filesize)
+ endif
endif
-
end subroutine check_parameters_noise
! =============================================================================================================
Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90 2011-12-10 09:10:08 UTC (rev 19288)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90 2011-12-10 09:10:12 UTC (rev 19289)
@@ -794,7 +794,8 @@
! checks if free surface is defined
if( num_free_surface_faces == 0 ) then
- stop 'error: noise simulations need a free surface'
+ write(*,*) myrank, " doesn't have a free_surface_face"
+ ! stop 'error: noise simulations need a free surface'
endif
! allocates arrays
More information about the CIG-COMMITS
mailing list