[cig-commits] [commit] devel: in the internal mesher, removed some unnecessary checks on NEX_XI being a multiple of 8 in the case of USE_REGULAR = .true. (40407ea)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Sat Jun 14 15:01:45 PDT 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/ed82eef86d436d775ec861ef0f21c5077305c6d3...ef9ac842da149d304509657da0cb3da09614bf63
>---------------------------------------------------------------
commit 40407ea405ffb4f5364175a1f7ce921245399d7e
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date: Sat Jun 14 23:59:43 2014 +0200
in the internal mesher, removed some unnecessary checks on NEX_XI being a multiple of 8 in the case of USE_REGULAR = .true.
>---------------------------------------------------------------
40407ea405ffb4f5364175a1f7ce921245399d7e
src/meshfem3D/compute_parameters.f90 | 3 +--
src/meshfem3D/meshfem3D.f90 | 23 +++++++++++------------
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/meshfem3D/compute_parameters.f90 b/src/meshfem3D/compute_parameters.f90
index 637c19e..d1bdad0 100644
--- a/src/meshfem3D/compute_parameters.f90
+++ b/src/meshfem3D/compute_parameters.f90
@@ -68,11 +68,10 @@
logical USE_REGULAR_MESH
! number of elements horizontally in each slice (i.e. per processor)
- ! these two values MUST be equal in all cases
NEX_PER_PROC_XI = NEX_XI / NPROC_XI
NEX_PER_PROC_ETA = NEX_ETA / NPROC_ETA
- ! total number of processors in each of the six chunks
+ ! total number of processors
NPROC = NPROC_XI * NPROC_ETA
!
diff --git a/src/meshfem3D/meshfem3D.f90 b/src/meshfem3D/meshfem3D.f90
index 6515ad8..528a3b2 100644
--- a/src/meshfem3D/meshfem3D.f90
+++ b/src/meshfem3D/meshfem3D.f90
@@ -564,21 +564,20 @@
if(NPROC_ETA < 1) call exit_MPI(myrank,'NPROC_ETA must be greater than 1')
! check that mesh can be cut into the right number of slices
+ if(mod(NEX_XI,NPROC_XI) /= 0) call exit_MPI(myrank,'NEX_XI must be a multiple of NPROC_XI for a regular mesh')
+ if(mod(NEX_ETA,NPROC_ETA) /= 0) call exit_MPI(myrank,'NEX_ETA must be a multiple of NPROC_ETA for a regular mesh')
+
! also check that mesh can be coarsened in depth twice (block size multiple of 8)
- if(USE_REGULAR_MESH) then
- if(mod(NEX_XI,NPROC_XI) /= 0) call exit_MPI(myrank,'NEX_XI must be a multiple of NPROC_XI for a regular mesh')
- if(mod(NEX_ETA,NPROC_ETA) /= 0) call exit_MPI(myrank,'NEX_ETA must be a multiple of NPROC_ETA for a regular mesh')
+ ! i.e. check that NEX is divisible by 8 and that NEX_PER_PROC is divisible by 8
+ ! This is not required for a regular mesh
+ if(.not. USE_REGULAR_MESH) then
+ if(mod(NEX_XI,8) /= 0) call exit_MPI(myrank,'NEX_XI must be a multiple of 8')
+ if(mod(NEX_ETA,8) /= 0) call exit_MPI(myrank,'NEX_ETA must be a multiple of 8')
+
+ if(mod(NEX_PER_PROC_XI,8) /= 0) call exit_MPI(myrank,'NEX_PER_PROC_XI must be a multiple of 8')
+ if(mod(NEX_PER_PROC_ETA,8) /= 0) call exit_MPI(myrank,'NEX_PER_PROC_ETA must be a multiple of 8')
endif
- ! checks that nex is dividable by 8
- if(mod(NEX_XI,8) /= 0) call exit_MPI(myrank,'NEX_XI must be a multiple of 8')
- if(mod(NEX_ETA,8) /= 0) call exit_MPI(myrank,'NEX_ETA must be a multiple of 8')
-
- ! checks that nex_per_proc is dividable by 8
- if(mod(NEX_PER_PROC_XI,8) /= 0) call exit_MPI(myrank,'NEX_PER_PROC_XI must be a multiple of 8')
- if(mod(NEX_PER_PROC_ETA,8) /= 0) call exit_MPI(myrank,'NEX_PER_PROC_ETA must be a multiple of 8')
-
-
if(myrank == 0) then
write(IMAIN,*) 'region selected:'
write(IMAIN,*)
More information about the CIG-COMMITS
mailing list