[cig-commits] r18987 - in seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER: . src/shared src/specfem3D

rietmann at geodynamics.org rietmann at geodynamics.org
Thu Sep 29 02:09:00 PDT 2011


Author: rietmann
Date: 2011-09-29 02:09:00 -0700 (Thu, 29 Sep 2011)
New Revision: 18987

Modified:
   seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/AUTHORS
   seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README
   seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/shared/constants.h
   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/noise_tomography_cuda.cu
   seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_mesh_constants_cuda.cu
   seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90
Log:
First running version with fixes in saving surface movie, but is not yet correct.


Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/AUTHORS
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/AUTHORS	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/AUTHORS	2011-09-29 09:09:00 UTC (rev 18987)
@@ -27,6 +27,7 @@
 Hom Nath Gharti,
 Tarje Nissen-Meyer,
 Daniel Peter,
+Max Rietmann,
 Brian Savage,
 Bernhard Schuberth,
 Anne Sieminski,

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/README	2011-09-29 09:09:00 UTC (rev 18987)
@@ -18,3 +18,5 @@
 ! that completes an orthonormal.
   logical, parameter :: EXT_MESH_RECV_NORMAL = .true.
 
+Settings for Eiger
+./configure --with-cuda FC=mpif90 MPIFC=mpif90 CUDA_LIB=-L/apps/eiger/Cuda-4.0/cuda/lib64 MPI_INC=-I/apps/eiger/mvapich2/1.5.1p1/mvapich2-gnu/include
\ No newline at end of file

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/shared/constants.h
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/shared/constants.h	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/shared/constants.h	2011-09-29 09:09:00 UTC (rev 18987)
@@ -186,12 +186,12 @@
   logical, parameter :: SOURCES_CAN_BE_BURIED_EXT_MESH = .true.
 
 ! sources and receivers Z coordinates given directly instead of with depth
-  logical, parameter :: USE_SOURCES_RECVS_Z = .false.
+  logical, parameter :: USE_SOURCES_RECVS_Z = .true.
 
 ! the seismograms are normal to surface
 ! Z record corresponds to the normal, while E and N are two tangent vectors
 ! that completes an orthonormal.
-  logical, parameter :: EXT_MESH_RECV_NORMAL = .false.
+  logical, parameter :: EXT_MESH_RECV_NORMAL = .true.
 
 ! shakemaps and movies can not be generated during the same run. Mutually exclusive.
   logical, parameter :: EXTERNAL_MESH_MOVIE_SURFACE = .false.

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/iterate_time.f90	2011-09-29 09:09:00 UTC (rev 18987)
@@ -63,7 +63,8 @@
 ! ************* MAIN LOOP OVER THE TIME STEPS *************
 ! *********************************************************
 
-  do it = 1,NSTEP
+  ! do it = 1,NSTEP
+  do it = 1,150
 
     ! simulation status output and stability check
     if(mod(it,NTSTEP_BETWEEN_OUTPUT_INFO) == 0 .or. it == 5) then

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography.f90	2011-09-29 09:09:00 UTC (rev 18987)
@@ -208,10 +208,11 @@
   character(len=256) :: filename
 
   ! read master receiver ID -- the ID in "STATIONS"
-  filename = trim(OUTPUT_FILES_PATH)//'/../OUTPUT_FILES/NOISE_TOMOGRAPHY/irec_master_noise'
+  filename = trim(OUTPUT_FILES_PATH)//'/../NOISE_TOMOGRAPHY/irec_master_noise'
   open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ios)
   if( ios /= 0 ) &
     call exit_MPI(myrank, 'file '//trim(filename)//' does NOT exist! This file contains the ID of the master receiver')
+  
   read(IIN_NOISE,*,iostat=ios) irec_master_noise
   if( ios /= 0 ) call exit_MPI(myrank,'error reading file irec_master_noise')
   close(IIN_NOISE)
@@ -450,7 +451,7 @@
 
   noise_src(:) = 0._CUSTOM_REAL
   ! noise file (source time function)
-  filename = trim(OUTPUT_FILES_PATH)//'/../OUTPUT_FILES/NOISE_TOMOGRAPHY/S_squared'
+  filename = trim(OUTPUT_FILES_PATH)//'/..//NOISE_TOMOGRAPHY/S_squared'
   open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ios)
   if( ios /= 0 .and. myrank == 0 )  &
     call exit_MPI(myrank, 'file '//trim(filename)//' does NOT exist! This file should have been generated using Matlab scripts')
@@ -465,7 +466,7 @@
 
 
   ! master receiver component direction, \nu_master
-  filename = trim(OUTPUT_FILES_PATH)//'/../OUTPUT_FILES/NOISE_TOMOGRAPHY/nu_master'
+  filename = trim(OUTPUT_FILES_PATH)//'/../NOISE_TOMOGRAPHY/nu_master'
   open(unit=IIN_NOISE,file=trim(filename),status='old',action='read',iostat=ios)
   if( ios /= 0 .and. myrank == 0 ) &
     call exit_MPI(myrank,&

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography_cuda.cu
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography_cuda.cu	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/noise_tomography_cuda.cu	2011-09-29 09:09:00 UTC (rev 18987)
@@ -30,12 +30,12 @@
     int i = free_surface_ijk[0+3*(igll + 25*(iface))]-1;
     int j = free_surface_ijk[1+3*(igll + 25*(iface))]-1;
     int k = free_surface_ijk[2+3*(igll + 25*(iface))]-1;
+        
+    int iglob = ibool[INDEX4(5,5,5,i,j,k,ispec)]-1;    
     
-    int iglob = ibool[INDEX4(5,5,5,i,j,k,ispec)]-1;
-    
     noise_surface_movie[INDEX3(3,25,0,igll,iface)] = displ[iglob*3];
-    noise_surface_movie[INDEX3(3,25,0,igll,iface)] = displ[iglob*3+1];
-    noise_surface_movie[INDEX3(3,25,0,igll,iface)] = displ[iglob*3+2];
+    noise_surface_movie[INDEX3(3,25,1,igll,iface)] = displ[iglob*3+1];
+    noise_surface_movie[INDEX3(3,25,2,igll,iface)] = displ[iglob*3+2];
   }
 }
 

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_mesh_constants_cuda.cu
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_mesh_constants_cuda.cu	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_mesh_constants_cuda.cu	2011-09-29 09:09:00 UTC (rev 18987)
@@ -560,8 +560,11 @@
   printf("jacobian_size = %d\n",25*(*nfaces_surface_ext_mesh));
 }
 
-extern "C" void prepare_noise_constants_device_(long* Mesh_pointer_f, int* NGLLX, int* NSPEC_AB, int* NGLOB_AB,
-				     int* free_surface_ispec, int* num_free_surface_faces, int* SIMULATION_TYPE) {
+extern "C" void prepare_noise_constants_device_(long* Mesh_pointer_f, int* NGLLX,
+						int* NSPEC_AB, int* NGLOB_AB,
+						int* free_surface_ispec,int* free_surface_ijk,
+						int* num_free_surface_faces,
+						int* size_free_surface_ijk, int* SIMULATION_TYPE) {
 
   Mesh* mp = (Mesh*)(*Mesh_pointer_f);
 
@@ -572,6 +575,9 @@
 
   // alloc storage for the surface buffer to be copied
   print_CUDA_error_if_any(cudaMalloc((void**) &mp->d_noise_surface_movie, 3*25*(*num_free_surface_faces)*sizeof(float)),1);
+
+  print_CUDA_error_if_any(cudaMalloc((void**) &mp->d_free_surface_ijk, (*size_free_surface_ijk)*sizeof(float)),1);
+  print_CUDA_error_if_any(cudaMemcpy(mp->d_free_surface_ijk,free_surface_ijk,(*size_free_surface_ijk)*sizeof(float),cudaMemcpyHostToDevice),1);
   
 }
 

Modified: seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90
===================================================================
--- seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90	2011-09-29 00:40:03 UTC (rev 18986)
+++ seismo/3D/SPECFEM3D/branches/SPECFEM3D_SUNFLOWER/src/specfem3D/prepare_timerun.f90	2011-09-29 09:09:00 UTC (rev 18987)
@@ -740,7 +740,7 @@
     if ( NOISE_TOMOGRAPHY > 0 ) then
 
         call prepare_noise_constants_device(Mesh_pointer, NGLLX, NSPEC_AB, NGLOB_AB, &
-             free_surface_ispec, nfaces_surface_ext_mesh, SIMULATION_TYPE)
+             free_surface_ispec,free_surface_ijk, num_free_surface_faces,size(free_surface_ijk), SIMULATION_TYPE)
 
         call prepare_adjoint_constants_device(Mesh_pointer, NGLLX,&
              ispec_selected_rec,islice_selected_rec,nrec,size(islice_selected_rec),&



More information about the CIG-COMMITS mailing list