[cig-commits] r15050 - seismo/3D/SPECFEM3D_SESAME/trunk
pieyre at geodynamics.org
pieyre at geodynamics.org
Tue May 26 02:32:06 PDT 2009
Author: pieyre
Date: 2009-05-26 02:32:06 -0700 (Tue, 26 May 2009)
New Revision: 15050
Modified:
seismo/3D/SPECFEM3D_SESAME/trunk/Makefile.in
seismo/3D/SPECFEM3D_SESAME/trunk/constants.h.in
seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90
seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90
seismo/3D/SPECFEM3D_SESAME/trunk/save_header_file.f90
Log:
added computation of approximate memory needed to run the solver
Modified: seismo/3D/SPECFEM3D_SESAME/trunk/Makefile.in
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/Makefile.in 2009-05-25 23:38:05 UTC (rev 15049)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/Makefile.in 2009-05-26 09:32:06 UTC (rev 15050)
@@ -111,6 +111,7 @@
$O/compute_boundary_kernel.o \
$O/compute_forces_no_Deville.o \
$O/compute_forces_with_Deville.o \
+ $O/memory_eval.o \
$(EMPTY_MACRO)
# solver objects with statically allocated arrays; dependent upon
@@ -260,6 +261,9 @@
$O/locate_receivers.o: constants.h locate_receivers.f90
${FCCOMPILE_CHECK} -c -o $O/locate_receivers.o locate_receivers.f90
+$O/memory_eval.o: constants.h memory_eval.f90
+ ${FCCOMPILE_CHECK} -c -o $O/memory_eval.o memory_eval.f90
+
$O/exit_mpi.o: constants.h exit_mpi.f90
${FCCOMPILE_CHECK} -c -o $O/exit_mpi.o exit_mpi.f90
Modified: seismo/3D/SPECFEM3D_SESAME/trunk/constants.h.in
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/constants.h.in 2009-05-25 23:38:05 UTC (rev 15049)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/constants.h.in 2009-05-26 09:32:06 UTC (rev 15050)
@@ -126,7 +126,7 @@
! Temporarily declared here.
!------------------------------------------------------
! whether or not an external mesh is used (provided by CUBIT for example)
- logical, parameter :: USE_EXTERNAL_MESH = .false.
+ logical, parameter :: USE_EXTERNAL_MESH = .true.
! no lagrange interpolation on seismograms (we take the value on one NGLL point)
logical, parameter :: FASTER_RECEIVERS_POINTS_ONLY = .false.
Modified: seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90 2009-05-25 23:38:05 UTC (rev 15049)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90 2009-05-26 09:32:06 UTC (rev 15050)
@@ -1157,7 +1157,7 @@
subroutine create_regions_mesh_ext_mesh(ibool, &
xstore,ystore,zstore,nspec,npointot,myrank,LOCAL_PATH, &
nnodes_ext_mesh,nelmnts_ext_mesh, &
- nodes_coords_ext_mesh,elmnts_ext_mesh,mat_ext_mesh, &
+ nodes_coords_ext_mesh,elmnts_ext_mesh,mat_ext_mesh,max_static_memory_size, &
ninterface_ext_mesh,max_interface_size_ext_mesh, &
my_neighbours_ext_mesh,my_nelmnts_neighbours_ext_mesh,my_interfaces_ext_mesh, &
ibool_interfaces_ext_mesh,nibool_interfaces_ext_mesh)
@@ -1180,6 +1180,9 @@
integer ibool(NGLLX,NGLLY,NGLLZ,nspec)
+! static memory size needed by the solver
+ double precision :: static_memory_size,max_static_memory_size
+
! data from the external mesh
integer :: nnodes_ext_mesh,nelmnts_ext_mesh
double precision, dimension(NDIM,nnodes_ext_mesh) :: nodes_coords_ext_mesh
@@ -1563,6 +1566,10 @@
write(IOUT) ibool_interfaces_ext_mesh_dummy
close(IOUT)
+! compute the approximate amount of static memory needed to run the solver
+ call memory_eval(nspec,nglob,maxval(nibool_interfaces_ext_mesh),ninterface_ext_mesh,static_memory_size)
+ call max_all_dp(static_memory_size, max_static_memory_size)
+
end subroutine create_regions_mesh_ext_mesh
!
Modified: seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90 2009-05-25 23:38:05 UTC (rev 15049)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90 2009-05-26 09:32:06 UTC (rev 15050)
@@ -204,6 +204,9 @@
integer NPROC,NEX_PER_PROC_XI,NEX_PER_PROC_ETA
integer NER
+! static memory size that will be needed by the solver
+ double precision :: static_memory_size
+
! this for all the regions
integer NSPEC_AB,NGLOB_AB,NSPEC2D_A_XI,NSPEC2D_B_XI, &
NSPEC2D_A_ETA,NSPEC2D_B_ETA, &
@@ -783,7 +786,7 @@
xstore,ystore,zstore,nspec, &
npointot,myrank,LOCAL_PATH, &
nnodes_ext_mesh,nelmnts_ext_mesh, &
- nodes_coords_ext_mesh,elmnts_ext_mesh,mat_ext_mesh, &
+ nodes_coords_ext_mesh,elmnts_ext_mesh,mat_ext_mesh,static_memory_size, &
ninterface_ext_mesh,max_interface_size_ext_mesh, &
my_neighbours_ext_mesh,my_nelmnts_neighbours_ext_mesh,my_interfaces_ext_mesh, &
ibool_interfaces_ext_mesh,nibool_interfaces_ext_mesh)
@@ -895,7 +898,7 @@
! copy number of elements and points in an include file for the solver
call save_header_file(NSPEC_AB,NGLOB_AB,NEX_XI,NEX_ETA,NPROC, &
UTM_X_MIN,UTM_X_MAX,UTM_Y_MIN,UTM_Y_MAX,ATTENUATION,ANISOTROPY,NSTEP, &
- NPOIN2DMAX_XMIN_XMAX,NPOIN2DMAX_YMIN_YMAX,SIMULATION_TYPE)
+ NPOIN2DMAX_XMIN_XMAX,NPOIN2DMAX_YMIN_YMAX,SIMULATION_TYPE,static_memory_size)
call get_value_string(rec_filename, 'solver.STATIONS', 'DATA/STATIONS')
call get_value_string(filtered_rec_filename, 'solver.STATIONS_FILTERED', 'DATA/STATIONS_FILTERED')
Modified: seismo/3D/SPECFEM3D_SESAME/trunk/save_header_file.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/save_header_file.f90 2009-05-25 23:38:05 UTC (rev 15049)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/save_header_file.f90 2009-05-26 09:32:06 UTC (rev 15050)
@@ -27,7 +27,7 @@
subroutine save_header_file(NSPEC_AB,NGLOB_AB,NEX_XI,NEX_ETA,NPROC, &
UTM_X_MIN,UTM_X_MAX,UTM_Y_MIN,UTM_Y_MAX,ATTENUATION,ANISOTROPY,NSTEP, &
- NPOIN2DMAX_XMIN_XMAX,NPOIN2DMAX_YMIN_YMAX,SIMULATION_TYPE)
+ NPOIN2DMAX_XMIN_XMAX,NPOIN2DMAX_YMIN_YMAX,SIMULATION_TYPE,static_memory_size)
implicit none
@@ -40,6 +40,8 @@
double precision UTM_X_MIN,UTM_X_MAX,UTM_Y_MIN,UTM_Y_MAX
+ double precision :: static_memory_size
+
character(len=150) HEADER_FILE
! copy number of elements and points in an include file for the solver
@@ -146,6 +148,19 @@
!! DK DK May 2009: removed all the things that are not supported in the CUBIT + SCOTCH version yet
!! DK DK May 2009: removed all the things that are not supported in the CUBIT + SCOTCH version yet
+ write(IOUT,*) '! approximate static memory needed by the solver:'
+ write(IOUT,*) '! ----------------------------------------------'
+ write(IOUT,*) '!'
+ write(IOUT,*) '! size of static arrays for the biggest slice = ',static_memory_size/1048576.d0,' MB'
+ write(IOUT,*) '! = ',static_memory_size/1073741824.d0,' GB'
+ write(IOUT,*) '!'
+ write(IOUT,*) '! (should be below and typically equal to 80% of 1.5 GB = 1.2 GB on pangu'
+ write(IOUT,*) '! at Caltech, and below and typically equal to 85% of 2 GB = 1.7 GB'
+ write(IOUT,*) '! on Marenostrum in Barcelona)'
+ write(IOUT,*) '! (if significantly more, the job will not run by lack of memory)'
+ write(IOUT,*) '! (if significantly less, you waste a significant amount of memory)'
+ write(IOUT,*) '!'
+
! strain/attenuation
if (ATTENUATION .and. SIMULATION_TYPE == 3) then
! write(IOUT,*) 'integer, parameter :: NSPEC_ATT_AND_KERNEL = ', NSPEC_AB
More information about the CIG-COMMITS
mailing list