[cig-commits] r20957 - in seismo/3D/SPECFEM3D/trunk/src: decompose_mesh_SCOTCH generate_databases shared

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sat Oct 27 06:57:43 PDT 2012


Author: dkomati1
Date: 2012-10-27 06:57:42 -0700 (Sat, 27 Oct 2012)
New Revision: 20957

Added:
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/metis-4.0.3.tar.gz
Modified:
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/Makefile.in
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
   seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/calc_jacobian.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/get_MPI.f90
   seismo/3D/SPECFEM3D/trunk/src/generate_databases/memory_eval.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/check_mesh_resolution.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90
Log:
merged my modifications with Joseph Charles' modifications to move NGNOD to Par_file;
also removed useless white spaces


Modified: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/Makefile.in
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/Makefile.in	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/Makefile.in	2012-10-27 13:57:42 UTC (rev 20957)
@@ -54,6 +54,8 @@
 @COND_MPI_FALSE at COND_MPI_CPPFLAGS =
 
 SCOTCH_LIBS = -L"@SCOTCH_LIBDIR@" -lscotch -lscotcherr
+### DK DK added support for METIS as well
+#SCOTCH_LIBS = -L"@SCOTCH_LIBDIR@" -lscotch -lscotcherr -L./src/decompose_mesh_SCOTCH/metis-4.0.3 -L./metis-4.0.3 -lmetis
 SCOTCH_INC = -I"@SCOTCH_INCLUDEDIR@"
 
 AR = ar

Modified: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/decompose_mesh_SCOTCH.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -33,7 +33,7 @@
   include 'scotchf.h'
 
 ! number of partitions
-  integer :: nparts ! e.g. 4 for partitioning for 4 CPUs or 4 processes
+  integer :: nparts
 
 ! mesh arrays
   integer :: nspec
@@ -90,7 +90,7 @@
 
   double precision, dimension(SCOTCH_GRAPHDIM)  :: scotchgraph
   double precision, dimension(SCOTCH_STRATDIM)  :: scotchstrat
-  character(len=256), parameter :: scotch_strategy='b{job=t,map=t,poli=S,sep=h{pass=30}}'
+!!!!!! character(len=256), parameter :: scotch_strategy='b{job=t,map=t,poli=S,sep=h{pass=30}}'
   integer  :: ier,idummy
 
   !pll
@@ -736,12 +736,12 @@
 
     call scotchfstratinit (scotchstrat(1), ier)
      if (ier /= 0) then
-       stop 'ERROR : MAIN : Cannot initialize strat'
+       stop 'ERROR : MAIN : Cannot initialize strategy'
     endif
 
     !call scotchfstratgraphmap (scotchstrat(1), trim(scotch_strategy), ier)
     ! if (ier /= 0) then
-    !   stop 'ERROR : MAIN : Cannot build strat'
+    !   stop 'ERROR : MAIN : Cannot build strategy'
     !endif
 
     call scotchfgraphinit (scotchgraph (1), ier)
@@ -761,14 +761,6 @@
                           nb_edges, adjncy (1), &
                           adjncy (1), ier)
 
-    ! w/out element load, but adjacency array
-    !call scotchfgraphbuild (scotchgraph (1), 0, nspec, &
-    !                      xadj (1), xadj (1), &
-    !                      xadj (1), xadj (1), &
-    !                      nb_edges, adjncy (1), &
-    !                      adjncy (1), ier)
-
-
     if (ier /= 0) then
        stop 'ERROR : MAIN : Cannot build graph'
     endif
@@ -790,7 +782,7 @@
 
     call scotchfstratexit (scotchstrat(1), ier)
     if (ier /= 0) then
-       stop 'ERROR : MAIN : Cannot destroy strat'
+       stop 'ERROR : MAIN : Cannot destroy strategy'
     endif
 
     ! re-partitioning puts poroelastic-elastic coupled elements into same partition
@@ -819,15 +811,15 @@
     ! mpi interfaces
     ! acoustic/elastic/poroelastic boundaries will be split into different MPI partitions
     call build_interfaces(nspec, sup_neighbour, part, elmnts, &
-                         xadj, adjncy, tab_interfaces, &
-                         tab_size_interfaces, ninterfaces, &
-                         nparts, NGNOD)
+                             xadj, adjncy, tab_interfaces, &
+                             tab_size_interfaces, ninterfaces, &
+                             nparts, NGNOD)
 
-    !or: uncomment if you want acoustic/elastic boundaries NOT to be separated into different MPI partitions
-    !call build_interfaces_no_ac_el_sep(nspec, sup_neighbour, part, elmnts, &
-    !                          xadj, adjncy, tab_interfaces, &
-    !                          tab_size_interfaces, ninterfaces, &
-    !                          count_def_mat, mat_prop(3,:), mat(1,:), nparts, NGNOD)
+    ! obsolete: from when we wanted acoustic/elastic boundaries NOT to be separated into different MPI partitions
+    ! call build_interfaces_no_ac_el_sep(nspec, sup_neighbour, part, elmnts, &
+    !                           xadj, adjncy, tab_interfaces, &
+    !                           tab_size_interfaces, ninterfaces, &
+    !                           count_def_mat, mat_prop(3,:), mat(1,:), nparts, NGNOD)
 
   end subroutine scotch_partitioning
 
@@ -922,7 +914,7 @@
        call write_moho_surface_database(IIN_database, ipart, nspec, &
                                   glob2loc_elmnts, glob2loc_nodes_nparts, &
                                   glob2loc_nodes_parts, glob2loc_nodes, part, &
-                                  nspec2D_moho, ibelm_moho,nodes_ibelm_moho, NGNOD2D)
+                                  nspec2D_moho, ibelm_moho, nodes_ibelm_moho, NGNOD2D)
 
        close(IIN_database)
 

Added: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/metis-4.0.3.tar.gz
===================================================================
(Binary files differ)


Property changes on: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/metis-4.0.3.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -391,170 +391,170 @@
   end subroutine build_interfaces
 
 
-  !--------------------------------------------------
-  ! build interfaces between partitions.
-  ! Two adjacent elements in distinct partitions make an entry in array tab_interfaces :
-  ! 1/ first element, 2/ second element, 3/ number of common nodes, 4/ first node,
-  ! 5/ second node, if relevant.
+!! DK DK Oct 2012: obsolete routine, now unused
+!
+!  !--------------------------------------------------
+!  ! build interfaces between partitions.
+!  ! Two adjacent elements in distinct partitions make an entry in array tab_interfaces :
+!  ! 1/ first element, 2/ second element, 3/ number of common nodes, 4/ first node,
+!  ! 5/ second node, if relevant.
+!
+!  ! No interface between acoustic and elastic elements.
+!
+!  ! Elements with undefined material are considered as elastic elements.
+!  !--------------------------------------------------
+!   subroutine build_interfaces_no_ac_el_sep(nspec, &
+!                              sup_neighbour, part, elmnts, xadj, adjncy, &
+!                              tab_interfaces, tab_size_interfaces, ninterfaces, &
+!                              nb_materials, cs_material, num_material,nparts)
+!
+!    integer, intent(in)  :: nb_materials,nparts
+!    integer, intent(in)  :: nspec
+!    integer, intent(in) :: sup_neighbour
+!    integer, dimension(0:nspec-1), intent(in)  :: part
+!    integer, dimension(0:NGNOD*nspec-1), intent(in)  :: elmnts
+!    integer, dimension(0:nspec), intent(in)  :: xadj
+!    integer, dimension(0:sup_neighbour*nspec-1), intent(in)  :: adjncy
+!    integer, dimension(:),pointer  :: tab_size_interfaces, tab_interfaces
+!    integer, intent(out)  :: ninterfaces
+!    integer, dimension(1:nspec), intent(in)  :: num_material
+!    ! vs velocities
+!    double precision, dimension(1:nb_materials), intent(in)  :: cs_material
+!
+!    ! local parameters
+!    integer  :: num_part, num_part_bis, el, el_adj, num_interface, num_edge, ncommon_nodes, &
+!         num_node, num_node_bis
+!    integer  :: i, j
+!    logical  :: is_acoustic_el, is_acoustic_el_adj
+!    integer :: ier
+!
+!    ! counts number of interfaces between partitions
+!    ninterfaces = 0
+!    do  i = 0, nparts-1
+!       do j = i+1, nparts-1
+!          ninterfaces = ninterfaces + 1
+!       enddo
+!    enddo
+!
+!    allocate(tab_size_interfaces(0:ninterfaces),stat=ier)
+!    if( ier /= 0 ) stop 'error allocating array tab_size_interfaces'
+!    tab_size_interfaces(:) = 0
+!
+!    num_interface = 0
+!    num_edge = 0
+!
+!! determines acoustic/elastic elements based upon given vs velocities
+!! and counts same elements for each interface
+!    do num_part = 0, nparts-1
+!       do num_part_bis = num_part+1, nparts-1
+!          do el = 0, nspec-1
+!             if ( part(el) == num_part ) then
+!                ! determines whether element is acoustic or not
+!                if(num_material(el+1) > 0) then
+!                   if ( cs_material(num_material(el+1)) < TINYVAL) then
+!                      is_acoustic_el = .true.
+!                   else
+!                      is_acoustic_el = .false.
+!                   endif
+!                else
+!                   is_acoustic_el = .false.
+!                endif
+!                ! looks at all neighbor elements
+!                do el_adj = xadj(el), xadj(el+1)-1
+!                   ! determines whether neighbor element is acoustic or not
+!                   if(num_material(adjncy(el_adj)+1) > 0) then
+!                      if ( cs_material(num_material(adjncy(el_adj)+1)) < TINYVAL) then
+!                         is_acoustic_el_adj = .true.
+!                      else
+!                         is_acoustic_el_adj = .false.
+!                      endif
+!                   else
+!                      is_acoustic_el_adj = .false.
+!                   endif
+!                   ! adds element if neighbor element has same material acoustic/not-acoustic
+!                   ! and lies in next partition
+!                   if ( (part(adjncy(el_adj)) == num_part_bis) .and. &
+!                       (is_acoustic_el .eqv. is_acoustic_el_adj) ) then
+!                      num_edge = num_edge + 1
+!                   endif
+!                enddo
+!             endif
+!          enddo
+!          ! stores number of elements at interface
+!          tab_size_interfaces(num_interface+1) = tab_size_interfaces(num_interface) + num_edge
+!          num_edge = 0
+!          num_interface = num_interface + 1
+!
+!       enddo
+!    enddo
+!
+!
+!! stores element indices for elements from above search at each interface
+!    num_interface = 0
+!    num_edge = 0
+!
+!    allocate(tab_interfaces(0:(tab_size_interfaces(ninterfaces)*7-1)),stat=ier)
+!    if( ier /= 0 ) stop 'error allocating array tab_interfaces'
+!    tab_interfaces(:) = 0
+!
+!    do num_part = 0, nparts-1
+!       do num_part_bis = num_part+1, nparts-1
+!          do el = 0, nspec-1
+!             if ( part(el) == num_part ) then
+!                if(num_material(el+1) > 0) then
+!                   if ( cs_material(num_material(el+1)) < TINYVAL) then
+!                      is_acoustic_el = .true.
+!                   else
+!                      is_acoustic_el = .false.
+!                   endif
+!                else
+!                   is_acoustic_el = .false.
+!                endif
+!                do el_adj = xadj(el), xadj(el+1)-1
+!                   if(num_material(adjncy(el_adj)+1) > 0) then
+!                      if ( cs_material(num_material(adjncy(el_adj)+1)) < TINYVAL) then
+!                         is_acoustic_el_adj = .true.
+!                      else
+!                         is_acoustic_el_adj = .false.
+!                      endif
+!                   else
+!                      is_acoustic_el_adj = .false.
+!                   endif
+!                   if ( (part(adjncy(el_adj)) == num_part_bis) .and. &
+!                       (is_acoustic_el .eqv. is_acoustic_el_adj) ) then
+!                      tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+0) = el
+!                      tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+1) = adjncy(el_adj)
+!                      ncommon_nodes = 0
+!                      do num_node = 0, NGNOD_EIGHT_CORNERS-1
+!                         do num_node_bis = 0, NGNOD_EIGHT_CORNERS-1
+!                            if ( elmnts(el*NGNOD+num_node) == elmnts(adjncy(el_adj)*NGNOD+num_node_bis) ) then
+!                               tab_interfaces(tab_size_interfaces(num_interface)*7 &
+!                                             +num_edge*7+3+ncommon_nodes) &
+!                                    = elmnts(el*NGNOD+num_node)
+!                               ncommon_nodes = ncommon_nodes + 1
+!                            endif
+!                         enddo
+!                      enddo
+!                      if ( ncommon_nodes > 0 ) then
+!                         tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+2) = ncommon_nodes
+!                      else
+!                         print *, "Error while building interfaces!", ncommon_nodes
+!                      endif
+!                      num_edge = num_edge + 1
+!                   endif
+!                enddo
+!             endif
+!
+!          enddo
+!          num_edge = 0
+!          num_interface = num_interface + 1
+!       enddo
+!    enddo
+!
+!  end subroutine build_interfaces_no_ac_el_sep
 
-  ! No interface between acoustic and elastic elements.
 
-  ! Elements with undefined material are considered as elastic elements.
   !--------------------------------------------------
-   subroutine build_interfaces_no_ac_el_sep(nspec, &
-                              sup_neighbour, part, elmnts, xadj, adjncy, &
-                              tab_interfaces, tab_size_interfaces, ninterfaces, &
-                              nb_materials, cs_material, num_material,nparts,NGNOD)
-
-    integer, intent(in)  :: nb_materials,nparts
-    integer, intent(in)  :: nspec
-    integer, intent(in)  :: NGNOD
-    integer, intent(in) :: sup_neighbour
-    integer, dimension(0:nspec-1), intent(in)  :: part
-    integer, dimension(0:NGNOD*nspec-1), intent(in)  :: elmnts
-    integer, dimension(0:nspec), intent(in)  :: xadj
-    integer, dimension(0:sup_neighbour*nspec-1), intent(in)  :: adjncy
-    integer, dimension(:),pointer  :: tab_size_interfaces, tab_interfaces
-    integer, intent(out)  :: ninterfaces
-    integer, dimension(1:nspec), intent(in)  :: num_material
-    ! vs velocities
-    double precision, dimension(1:nb_materials), intent(in)  :: cs_material
-
-    ! local parameters
-    integer  :: num_part, num_part_bis, el, el_adj, num_interface, num_edge, ncommon_nodes, &
-         num_node, num_node_bis
-    integer  :: i, j
-    logical  :: is_acoustic_el, is_acoustic_el_adj
-    integer :: ier
-
-    ! counts number of interfaces between partitions
-    ninterfaces = 0
-    do  i = 0, nparts-1
-       do j = i+1, nparts-1
-          ninterfaces = ninterfaces + 1
-       enddo
-    enddo
-
-    allocate(tab_size_interfaces(0:ninterfaces),stat=ier)
-    if( ier /= 0 ) stop 'error allocating array tab_size_interfaces'
-    tab_size_interfaces(:) = 0
-
-    num_interface = 0
-    num_edge = 0
-
-! determines acoustic/elastic elements based upon given vs velocities
-! and counts same elements for each interface
-    do num_part = 0, nparts-1
-       do num_part_bis = num_part+1, nparts-1
-          do el = 0, nspec-1
-             if ( part(el) == num_part ) then
-                ! determines whether element is acoustic or not
-                if(num_material(el+1) > 0) then
-                   if ( cs_material(num_material(el+1)) < TINYVAL) then
-                      is_acoustic_el = .true.
-                   else
-                      is_acoustic_el = .false.
-                   endif
-                else
-                   is_acoustic_el = .false.
-                endif
-                ! looks at all neighbor elements
-                do el_adj = xadj(el), xadj(el+1)-1
-                   ! determines whether neighbor element is acoustic or not
-                   if(num_material(adjncy(el_adj)+1) > 0) then
-                      if ( cs_material(num_material(adjncy(el_adj)+1)) < TINYVAL) then
-                         is_acoustic_el_adj = .true.
-                      else
-                         is_acoustic_el_adj = .false.
-                      endif
-                   else
-                      is_acoustic_el_adj = .false.
-                   endif
-                   ! adds element if neighbor element has same material acoustic/not-acoustic
-                   ! and lies in next partition
-                   if ( (part(adjncy(el_adj)) == num_part_bis) .and. &
-                       (is_acoustic_el .eqv. is_acoustic_el_adj) ) then
-                      num_edge = num_edge + 1
-                   endif
-                enddo
-             endif
-          enddo
-          ! stores number of elements at interface
-          tab_size_interfaces(num_interface+1) = tab_size_interfaces(num_interface) + num_edge
-          num_edge = 0
-          num_interface = num_interface + 1
-
-       enddo
-    enddo
-
-
-! stores element indices for elements from above search at each interface
-    num_interface = 0
-    num_edge = 0
-
-    allocate(tab_interfaces(0:(tab_size_interfaces(ninterfaces)*7-1)),stat=ier)
-    if( ier /= 0 ) stop 'error allocating array tab_interfaces'
-    tab_interfaces(:) = 0
-
-    do num_part = 0, nparts-1
-       do num_part_bis = num_part+1, nparts-1
-          do el = 0, nspec-1
-             if ( part(el) == num_part ) then
-                if(num_material(el+1) > 0) then
-                   if ( cs_material(num_material(el+1)) < TINYVAL) then
-                      is_acoustic_el = .true.
-                   else
-                      is_acoustic_el = .false.
-                   endif
-                else
-                   is_acoustic_el = .false.
-                endif
-                do el_adj = xadj(el), xadj(el+1)-1
-                   if(num_material(adjncy(el_adj)+1) > 0) then
-                      if ( cs_material(num_material(adjncy(el_adj)+1)) < TINYVAL) then
-                         is_acoustic_el_adj = .true.
-                      else
-                         is_acoustic_el_adj = .false.
-                      endif
-                   else
-                      is_acoustic_el_adj = .false.
-                   endif
-                   if ( (part(adjncy(el_adj)) == num_part_bis) .and. &
-                       (is_acoustic_el .eqv. is_acoustic_el_adj) ) then
-                      tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+0) = el
-                      tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+1) = adjncy(el_adj)
-                      ncommon_nodes = 0
-                      do num_node = 0, NGNOD_EIGHT_CORNERS-1
-                         do num_node_bis = 0, NGNOD_EIGHT_CORNERS-1
-                            if ( elmnts(el*NGNOD+num_node) == elmnts(adjncy(el_adj)*NGNOD+num_node_bis) ) then
-                               tab_interfaces(tab_size_interfaces(num_interface)*7 &
-                                             +num_edge*7+3+ncommon_nodes) &
-                                    = elmnts(el*NGNOD+num_node)
-                               ncommon_nodes = ncommon_nodes + 1
-                            endif
-                         enddo
-                      enddo
-                      if ( ncommon_nodes > 0 ) then
-                         tab_interfaces(tab_size_interfaces(num_interface)*7+num_edge*7+2) = ncommon_nodes
-                      else
-                         print *, "Error while building interfaces!", ncommon_nodes
-                      endif
-                      num_edge = num_edge + 1
-                   endif
-                enddo
-             endif
-
-          enddo
-          num_edge = 0
-          num_interface = num_interface + 1
-       enddo
-    enddo
-
-  end subroutine build_interfaces_no_ac_el_sep
-
-
-
-  !--------------------------------------------------
   ! Write nodes (their coordinates) pertaining to iproc partition in the corresponding Database
   !--------------------------------------------------
   subroutine write_glob2loc_nodes_database(IIN_database, iproc, npgeo, &

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/calc_jacobian.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/calc_jacobian.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/calc_jacobian.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -30,7 +30,7 @@
                           xstore,ystore,zstore, &
                           xelm,yelm,zelm,shape3D,dershape3D,ispec,nspec)
 
-  use generate_databases_par, only: NGNOD 
+  use generate_databases_par, only: NGNOD
 
   implicit none
 

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/create_regions_mesh.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -423,7 +423,7 @@
                         nodes_coords_ext_mesh,nnodes_ext_mesh,&
                         elmnts_ext_mesh,nelmnts_ext_mesh)
 
-  use generate_databases_par, only: NGNOD,NGNOD2D 
+  use generate_databases_par, only: NGNOD,NGNOD2D
   use create_regions_mesh_ext_par
   implicit none
 

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/generate_databases.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -304,7 +304,7 @@
     write(IMAIN,*)
 
 ! check that the constants.h file is correct
-    if ( NGNOD /= 8 .and. NGNOD /= 27 ) then 
+    if ( NGNOD /= 8 .and. NGNOD /= 27 ) then
        stop 'elements should have 8 or 27 control nodes, please modify NGNOD in Par_file'
     endif
 

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/get_MPI.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/get_MPI.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/get_MPI.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -33,7 +33,7 @@
                     my_neighbours_ext_mesh)
 
 ! sets up the MPI interface for communication between partitions
-  use generate_databases_par, only: NPROC,NGNOD 
+  use generate_databases_par, only: NPROC,NGNOD
   use create_regions_mesh_ext_par
 
   implicit none

Modified: seismo/3D/SPECFEM3D/trunk/src/generate_databases/memory_eval.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/generate_databases/memory_eval.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/generate_databases/memory_eval.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -157,7 +157,7 @@
                               nspec2D_ymin,nspec2D_ymax,nspec2D_bottom,nspec2D_top, &
                               memory_size_request)
 
-  use generate_databases_par, only: NGNOD,NGNOD2D 
+  use generate_databases_par, only: NGNOD,NGNOD2D
 
   implicit none
 

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/check_mesh_resolution.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/check_mesh_resolution.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/check_mesh_resolution.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -275,13 +275,17 @@
     write(IMAIN,*) 'minimum and maximum number of elements'
     write(IMAIN,*) 'and points in the CUBIT + SCOTCH mesh:'
     write(IMAIN,*)
-    write(IMAIN,*) 'NSPEC_AB_global_min = ',NSPEC_AB_global_min
-    write(IMAIN,*) 'NSPEC_AB_global_max = ',NSPEC_AB_global_max
-    write(IMAIN,*) 'NSPEC_AB_global_sum = ',NSPEC_AB_global_sum
+    write(IMAIN,*) 'NSPEC_global_min = ',NSPEC_AB_global_min
+    write(IMAIN,*) 'NSPEC_global_max = ',NSPEC_AB_global_max
+    write(IMAIN,*) 'NSPEC_global_max / NSPEC_global_min imbalance = ',sngl(dble(NSPEC_AB_global_max) / dble(NSPEC_AB_global_min)),&
+                      ' = ',sngl((dble(NSPEC_AB_global_max) / dble(NSPEC_AB_global_min) - 1.d0) * 100.d0),' %'
+    write(IMAIN,*) 'NSPEC_global_sum = ',NSPEC_AB_global_sum
     write(IMAIN,*)
-    write(IMAIN,*) 'NGLOB_AB_global_min = ',NGLOB_AB_global_min
-    write(IMAIN,*) 'NGLOB_AB_global_max = ',NGLOB_AB_global_max
-    write(IMAIN,*) 'NGLOB_AB_global_sum = ',NGLOB_AB_global_sum
+    write(IMAIN,*) 'NGLOB_global_min = ',NGLOB_AB_global_min
+    write(IMAIN,*) 'NGLOB_global_max = ',NGLOB_AB_global_max
+    write(IMAIN,*) 'NGLOB_global_max / NGLOB_global_min imbalance = ',sngl(dble(NGLOB_AB_global_max) / dble(NGLOB_AB_global_min)),&
+                      ' = ',sngl((dble(NGLOB_AB_global_max) / dble(NGLOB_AB_global_min) - 1.d0) * 100.d0),' %'
+    write(IMAIN,*) 'NGLOB_global_sum = ',NGLOB_AB_global_sum
     write(IMAIN,*)
     write(IMAIN,*) '********'
     write(IMAIN,*) 'Model: P velocity min,max = ',vpmin_glob,vpmax_glob

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90	2012-10-27 06:23:01 UTC (rev 20956)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/read_parameter_file.f90	2012-10-27 13:57:42 UTC (rev 20957)
@@ -166,7 +166,7 @@
      NGNOD2D = 4
   else if ( NGNOD == 27 ) then
      NGNOD2D = 9
-  else if ( NGNOD /= 8 .and. NGNOD /= 27 ) then 
+  else if ( NGNOD /= 8 .and. NGNOD /= 27 ) then
      stop 'elements should have 8 or 27 control nodes, please modify NGNOD in Par_file'
   endif
 



More information about the CIG-COMMITS mailing list