[cig-commits] r22495 - in seismo/3D/SPECFEM3D/trunk: . src/shared src/specfem3D

elliott.sales.de.andrade at geodynamics.org elliott.sales.de.andrade at geodynamics.org
Tue Jul 2 14:43:47 PDT 2013


Author: elliott.sales.de.andrade
Date: 2013-07-02 14:43:47 -0700 (Tue, 02 Jul 2013)
New Revision: 22495

Modified:
   seismo/3D/SPECFEM3D/trunk/configure
   seismo/3D/SPECFEM3D/trunk/configure.ac
   seismo/3D/SPECFEM3D/trunk/src/shared/parallel.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90
   seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90
Log:
Use mpi module instead of header file.

Modified: seismo/3D/SPECFEM3D/trunk/configure
===================================================================
--- seismo/3D/SPECFEM3D/trunk/configure	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/configure	2013-07-02 21:43:47 UTC (rev 22495)
@@ -6632,34 +6632,41 @@
 
 if test "$want_mpi" = yes; then
 
-# Generate a Fortran 9x-compatible 'mpif.h', if necessary.
+# Use 'mpi' module or 'mpif.h', as appropriate.  UNFINISHED.
+# The default actions are to create FILENAME that either uses the
+# appropriate module or includes the existing mpif.h.
+# This strategy doesn't play well with "implicit none": whether the
+# generated header must be included before or after "implicit none"
+# depends upon the result of the test!  It might be possible to make
+# "use mpi" always work: simply generate an 'mpi' module if the MPI
+# library doesn't provide one.  The generated module would simply
+# "include 'mpif.h'".
 ac_ext=${ac_fc_srcext-f}
 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
 
-ofile="mpif.h"
+ofile=mpif.h
 cfgfile="${ofile}T"
 trap "rm \"$cfgfile\"; exit 1" 1 2 15
 rm -f "$cfgfile"
 
+cit_fc_header=none
 cit_fc_save_fc=$FC
 cit_fc_save_fcflags=$FCFLAGS
 FC=$MPIFC
 FCFLAGS="$FCFLAGS $FLAGS_CHECK"
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mpif.h works" >&5
-$as_echo_n "checking whether mpif.h works... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"use mpi\" works" >&5
+$as_echo_n "checking whether \"use mpi\" works... " >&6; }
 cat > conftest.$ac_ext <<_ACEOF
 
-      program main
+          program main
 
-      include 'mpif.h'
-      integer, parameter :: CUSTOM_MPI_TYPE = MPI_REAL
+      use mpi
       integer ier
       call MPI_INIT(ier)
-      call MPI_BARRIER(MPI_COMM_WORLD,ier)
       call MPI_FINALIZE(ier)
 
       end
@@ -6669,72 +6676,35 @@
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+    :
 
 else
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    cit_mpif_h=unknown
-    cit_mpifc_info=`$FC -compile_info 2>/dev/null`
-    for cit_arg in $cit_mpifc_info; do
-        case $cit_arg in
-            */mpif.h) cit_mpif_h="$cit_arg"; break;;
-        esac
-    done
-    if test "$cit_mpif_h" == "unknown"; then
+
         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compile a trivial MPI program using $MPIFC
 See \`config.log' for more details" "$LINENO" 5; }
-    fi
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test "$cit_fc_header" != "none"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
 $as_echo "$as_me: creating $ofile" >&6;}
     cat >"$cfgfile" <<END_OF_HEADER
-! $ofile.  Generated from $cit_mpif_h by configure.
+! $ofile.  Generated by configure.
 
+      $cit_fc_header
+
 END_OF_HEADER
-    grep -v MPI_DISPLACEMENT_CURRENT "$cit_mpif_h" >>"$cfgfile"
     mv -f "$cfgfile" "$ofile" || \
         (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generated mpif.h works" >&5
-$as_echo_n "checking whether generated mpif.h works... " >&6; }
-    cat > conftest.$ac_ext <<_ACEOF
-
-      program main
-
-      include 'mpif.h'
-      integer, parameter :: CUSTOM_MPI_TYPE = MPI_REAL
-      integer ier
-      call MPI_INIT(ier)
-      call MPI_BARRIER(MPI_COMM_WORLD,ier)
-      call MPI_FINALIZE(ier)
-
-      end
-
-_ACEOF
-if ac_fn_fc_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compile a trivial MPI program using $MPIFC
-See \`config.log' for more details" "$LINENO" 5; }
-
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 FC=$cit_fc_save_fc
 FCFLAGS=$cit_fc_save_fcflags
 

Modified: seismo/3D/SPECFEM3D/trunk/configure.ac
===================================================================
--- seismo/3D/SPECFEM3D/trunk/configure.ac	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/configure.ac	2013-07-02 21:43:47 UTC (rev 22495)
@@ -429,7 +429,9 @@
 # Checks for header files.
 
 if test "$want_mpi" = yes; then
-    CIT_FC_MPI_HEADER([$MPIFC], [$FLAGS_CHECK])
+    CIT_FC_MPI_MODULE([mpif.h], [$MPIFC], [$FLAGS_CHECK], [:], [
+        AC_MSG_FAILURE([cannot compile a trivial MPI program using $MPIFC])
+    ])
 fi
 
 # Checks for typedefs, structures, and compiler characteristics.

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/parallel.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/parallel.f90	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/parallel.f90	2013-07-02 21:43:47 UTC (rev 22495)
@@ -31,11 +31,11 @@
 
   subroutine stop_all()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer ier
 
 ! stop all the MPI processes, and exit
@@ -50,11 +50,11 @@
 
   double precision function wtime()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   wtime = MPI_WTIME()
 
   end function wtime
@@ -65,11 +65,11 @@
 
   subroutine sync_all()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer ier
 
   call MPI_BARRIER(MPI_COMM_WORLD,ier)
@@ -82,11 +82,11 @@
 
   subroutine bcast_all_i(buffer, count)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer count
   integer, dimension(count) :: buffer
 
@@ -102,11 +102,11 @@
 
   subroutine bcast_all_cr(buffer, count)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -125,11 +125,11 @@
 
   subroutine bcast_all_dp(buffer, count)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer count
   double precision, dimension(count) :: buffer
 
@@ -145,11 +145,11 @@
 
   subroutine bcast_all_r(buffer, count)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -169,11 +169,11 @@
 
   subroutine gather_all_i(sendbuf, sendcnt, recvbuf, recvcount, NPROC)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer sendcnt, recvcount, NPROC
   integer, dimension(sendcnt) :: sendbuf
   integer, dimension(recvcount,0:NPROC-1) :: recvbuf
@@ -192,11 +192,11 @@
 
   subroutine gather_all_dp(sendbuf, sendcnt, recvbuf, recvcount, NPROC)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer sendcnt, recvcount, NPROC
   double precision, dimension(sendcnt) :: sendbuf
   double precision, dimension(recvcount,0:NPROC-1) :: recvbuf
@@ -215,11 +215,11 @@
 
   subroutine gather_all_cr(sendbuf, sendcnt, recvbuf, recvcount, NPROC)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -241,11 +241,11 @@
 
   subroutine gather_all_all_cr(sendbuf, recvbuf, counts, NPROC)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -266,11 +266,11 @@
 
   subroutine gatherv_all_cr(sendbuf, sendcnt, recvbuf, recvcount, recvoffset,recvcounttot, NPROC)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -293,11 +293,11 @@
 
   subroutine init()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer ier
 
 ! initialize the MPI communicator and start the NPROCTOT MPI processes.
@@ -311,11 +311,11 @@
 
   subroutine finalize()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer ier
 
 ! stop all the MPI processes, and exit
@@ -329,11 +329,11 @@
 
   subroutine world_size(size)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer size
   integer ier
 
@@ -347,11 +347,11 @@
 
   subroutine world_rank(rank)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer rank
   integer ier
 
@@ -365,11 +365,11 @@
 
   subroutine min_all_dp(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   double precision sendbuf, recvbuf
   integer ier
 
@@ -384,11 +384,11 @@
 
   subroutine max_all_dp(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   double precision sendbuf, recvbuf
   integer ier
 
@@ -403,11 +403,11 @@
 
   subroutine max_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -425,10 +425,11 @@
 
   subroutine min_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -447,10 +448,11 @@
 
   subroutine min_all_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -469,10 +471,11 @@
 !
 !  subroutine min_all_all_dp(sendbuf, recvbuf)
 !
+!! standard include of the MPI library
+!  use :: mpi
+!
 !  implicit none
 !
-!! standard include of the MPI library
-!  include 'mpif.h'
 !  include "constants.h"
 !  include "precision.h"
 !
@@ -490,11 +493,11 @@
 
   subroutine max_all_i(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -512,10 +515,11 @@
 
   subroutine max_all_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -535,10 +539,11 @@
 
   subroutine max_all_all_dp(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -557,11 +562,11 @@
 
   subroutine min_all_i(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -579,11 +584,11 @@
 
   subroutine maxloc_all_dp(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   double precision, dimension(2) :: sendbuf,recvbuf
   integer ier
 
@@ -600,11 +605,11 @@
 
   subroutine sum_all_dp(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   double precision sendbuf, recvbuf
   integer ier
 
@@ -619,10 +624,11 @@
 
   subroutine sum_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -640,10 +646,11 @@
 
   subroutine sum_all_all_cr(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
   include "constants.h"
   include "precision.h"
 
@@ -661,11 +668,11 @@
 
   subroutine sum_all_i(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer sendbuf, recvbuf
   integer ier
 
@@ -680,11 +687,11 @@
 
   subroutine sum_all_all_i(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer sendbuf, recvbuf
   integer ier
 
@@ -699,11 +706,11 @@
 
   subroutine any_all_l(sendbuf, recvbuf)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   logical sendbuf, recvbuf
   integer ier
 
@@ -719,11 +726,11 @@
   subroutine sendrecv_all_cr(sendbuf, sendcount, dest, sendtag, &
                              recvbuf, recvcount, source, recvtag)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -748,11 +755,11 @@
 
   integer function proc_null()
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   proc_null = MPI_PROC_NULL
 
   end function proc_null
@@ -763,11 +770,11 @@
 
   subroutine isend_cr(sendbuf, sendcount, dest, sendtag, req)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -787,11 +794,11 @@
 
   subroutine irecv_cr(recvbuf, recvcount, dest, recvtag, req)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -811,11 +818,11 @@
 
   subroutine isend_i(sendbuf, sendcount, dest, sendtag, req)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -835,11 +842,11 @@
 
   subroutine irecv_i(recvbuf, recvcount, dest, recvtag, req)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -859,11 +866,11 @@
 
   subroutine recv_i(recvbuf, recvcount, dest, recvtag )
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer dest,recvtag
   integer recvcount
   !integer recvbuf
@@ -881,11 +888,11 @@
 
   subroutine recvv_cr(recvbuf, recvcount, dest, recvtag )
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -906,11 +913,11 @@
 
   subroutine send_i(sendbuf, sendcount, dest, sendtag)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   !integer sendbuf,sendcount,dest,sendtag
   integer dest,sendtag
   integer sendcount
@@ -928,11 +935,11 @@
 
   subroutine send_i_t(sendbuf,sendcount,dest)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer :: dest,sendcount,ier
   integer :: tag = 100
   integer, dimension(sendcount) :: sendbuf
@@ -952,11 +959,11 @@
 
   subroutine recv_i_t(recvbuf,recvcount,source)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-  ! standard include of the MPI library
-  include 'mpif.h'
-
   integer :: source,recvcount,ier
   integer :: tag = 100
   integer, dimension(recvcount) :: recvbuf
@@ -976,11 +983,11 @@
 !
 !  subroutine send_dp_t(sendbuf,sendcount,dest)
 !
+!! standard include of the MPI library
+!  use :: mpi
+!
 !  implicit none
 !
-!  ! standard include of the MPI library
-!  include 'mpif.h'
-!
 !  integer :: dest,sendcount,ier
 !  integer :: tag = 100
 !  double precision, dimension(sendcount) :: sendbuf
@@ -999,11 +1006,11 @@
 !
 !  subroutine recv_dp_t(recvbuf,recvcount,source)
 !
+!! standard include of the MPI library
+!  use :: mpi
+!
 !  implicit none
 !
-!  ! standard include of the MPI library
-!  include 'mpif.h'
-!
 !  integer :: recvcount,source,ier
 !  integer :: tag = 100
 !  double precision, dimension(recvcount) :: recvbuf
@@ -1023,11 +1030,11 @@
 
   subroutine send_dp(sendbuf, sendcount, dest, sendtag)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer dest,sendtag
   integer sendcount
   double precision,dimension(sendcount):: sendbuf
@@ -1043,11 +1050,11 @@
 
   subroutine recv_dp(recvbuf, recvcount, dest, recvtag)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer dest,recvtag
   integer recvcount
   double precision,dimension(recvcount):: recvbuf
@@ -1064,11 +1071,11 @@
 
   subroutine sendv_cr(sendbuf, sendcount, dest, sendtag)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   include "constants.h"
   include "precision.h"
 
@@ -1085,11 +1092,11 @@
 
   subroutine wait_req(req)
 
+! standard include of the MPI library
+  use :: mpi
+
   implicit none
 
-! standard include of the MPI library
-  include 'mpif.h'
-
   integer :: req
 
   integer, dimension(MPI_STATUS_SIZE) :: req_mpi_status

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/smooth_vol_data.f90	2013-07-02 21:43:47 UTC (rev 22495)
@@ -60,9 +60,10 @@
 ! NOTE:  smoothing can be different in vertical & horizontal directions; mesh is in Cartesian geometry.
 !              algorithm uses vertical as Z, horizontal as X/Y direction
 
+  use :: mpi
+
   implicit none
   include "constants.h"
-  include 'mpif.h'
   include "precision.h"
 
  ! data must be of dimension: (NGLLX,NGLLY,NGLLZ,NSPEC_AB)

Modified: seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/src/shared/sum_kernels.f90	2013-07-02 21:43:47 UTC (rev 22495)
@@ -89,10 +89,10 @@
 
 program sum_kernels
 
+  use :: mpi
   use sum_par
   implicit none
 
-  include 'mpif.h'
   include 'precision.h'
 
 
@@ -269,10 +269,10 @@
 
 subroutine sum_kernel_pre(kernel_name,kernel_list,nker,myrank)
 
+  use :: mpi
   use sum_par
   implicit none
 
-  include 'mpif.h'
   include 'precision.h'
 
   real(kind=CUSTOM_REAL) :: norm,norm_sum
@@ -440,10 +440,10 @@
 ! H_nn = \frac{ \partial^2 \chi }{ \partial \rho_n \partial \rho_n }
 ! on all GLL points, which are indexed (i,j,k,ispec)
 
+  use :: mpi
   use sum_par
   implicit none
 
-  include 'mpif.h'
   include 'precision.h'
 
   integer :: myrank

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90	2013-07-02 21:43:40 UTC (rev 22494)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/model_update.f90	2013-07-02 21:43:47 UTC (rev 22495)
@@ -27,13 +27,13 @@
 
 program model_update
 
+  use :: mpi
   use specfem_par
   use specfem_par_elastic
   use specfem_par_acoustic
   use specfem_par_poroelastic
   implicit none
 
-  include 'mpif.h'
   include 'precision.h'
 
   ! ======================================================



More information about the CIG-COMMITS mailing list