Name conflict between MPI-3 and abinit-7.0.3/src/52_fft_mpi_  [SOLVED]

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
t-nissie
Posts: 12
Joined: Sat Jul 10, 2010 4:21 am
Contact:

Name conflict between MPI-3 and abinit-7.0.3/src/52_fft_mpi_

Post by t-nissie » Mon Nov 26, 2012 4:00 am

Congratulations for the new version of ABINIT!

"MPI_Comm" is used in MPI-3 as a type.
Therefore, following changes may be requred
in files in abinit-7.0.3/src/52_fft_mpi_noabirule/ .

Code: Select all

--- accrho.F90~   2012-11-26 11:46:57.000000000 +0900
+++ accrho.F90   2012-11-26 11:48:20.000000000 +0900
@@ -5,7 +5,7 @@
 #include "abi_common.h"
 
         subroutine accrho(icplexwf,ndat,n1,n2,n3,nd1,nd2,nd3proc,&
-&        max1,max2,max3,m1,m2,m3,md1,md2proc,md3,mpi_comm,nproc,iproc,paral_kgb,zf,rho,weight)
+&        max1,max2,max3,m1,m2,m3,md1,md2proc,md3,mpi_communicator,nproc,iproc,paral_kgb,zf,rho,weight)
 
  use m_profiling
 ! Accumulates the real space density rho from the ndat wavefunctions zf
@@ -25,7 +25,7 @@
 !        OUTPUT:
 !           RHOoutput(i1,i2,i3) = RHOinput(i1,i2,i3) + sum on idat of (FFT(ZF))**2 *weight
 !               i1=1,n1 , i2=1,n2 , i3=1,n3
-!          mpi_comm: MPI communicator
+!          mpi_communicator: MPI communicator
 !          nproc: number of processors used as returned by MPI_COMM_SIZE
 !          iproc: [0:nproc-1] number of processor as returned by MPI_COMM_RANK
 !           n1,n2,n3: logical dimension of the transform. As transform lengths
@@ -73,7 +73,7 @@
 !Arguments ------------------------------------
 ! real space input
         integer            :: icplexwf,ndat,n1,n2,n3,nd1,nd2,nd3proc,max1,max2,max3,m1,m2,m3
-        integer            :: md1,md2proc,md3,mpi_comm,nproc,iproc,paral_kgb
+        integer            :: md1,md2proc,md3,mpi_communicator,nproc,iproc,paral_kgb
         REAL(DP), DIMENSION(nd1,nd2,nd3proc) :: rho
 ! Fourier space output
         REAL(DP), DIMENSION(2,md1,md3,md2proc,ndat) :: zf
@@ -221,7 +221,7 @@
         call MPI_ALLTOALL(zmpi2,md1*md2proc*nd3proc, &
                           MPI_double_precision, &
                           zmpi1,md1*md2proc*nd3proc, &
-                          MPI_double_precision,mpi_comm,ierr)
+                          MPI_double_precision,mpi_communicator,ierr)
  endif
 #endif
         lock=lock+1
--- applypot.F90~   2012-11-26 11:46:57.000000000 +0900
+++ applypot.F90   2012-11-26 11:48:20.000000000 +0900
@@ -6,7 +6,7 @@
 
         subroutine applypot(icplexwf,icplex,ndat,n1,n2,n3,nd1,nd2,nd3proc,&
 &        max1i,max2i,max3i,m1i,m2i,m3i,md1,md2proc,md3,&
-&        max1o,max2o,max3o,m1o,m2o,m3o,mpi_comm,nproc,iproc,paral_kgb,pot,zf)
+&        max1o,max2o,max3o,m1o,m2o,m3o,mpi_communicator,nproc,iproc,paral_kgb,pot,zf)
 
  use m_profiling
           use defs_basis
@@ -29,7 +29,7 @@
 !               icplex=1 or 2 ,  i1=1,n1 , i2=1,n2 , i3=1,n3
 !          nd1,nd2,nd3: dimension of pot
 !
-!          mpi_comm: MPI communicator
+!          mpi_communicator: MPI communicator
 !          nproc: number of processors used as returned by MPI_COMM_SIZE
 !          iproc: [0:nproc-1] number of processor as returned by MPI_COMM_RANK
 !           n1,n2,n3: logical dimension of the transform. As transform lengths
@@ -75,7 +75,7 @@
 ! real space input
         integer :: icplexwf,icplex,ndat,n1,n2,n3,nd1,nd2,nd3proc
         integer :: paral_kgb,max1i,max2i,max3i,m1i,m2i,m3i,md1,md2proc,md3
-        integer :: max1o,max2o,max3o,m1o,m2o,m3o,mpi_comm,nproc,iproc
+        integer :: max1o,max2o,max3o,m1o,m2o,m3o,mpi_communicator,nproc,iproc
         REAL(KIND=DP), DIMENSION(icplex*nd1,nd2,nd3proc) :: pot
 ! Fourier space output
         REAL(KIND=DP), DIMENSION(2,md1,md3,md2proc,ndat) :: zf
@@ -248,7 +248,7 @@
         call MPI_ALLTOALL(zmpi2,md1*md2proc*nd3proc, &
                           MPI_double_precision, &
                           zmpi1,md1*md2proc*nd3proc, &
-                          MPI_double_precision,mpi_comm,ierr)
+                          MPI_double_precision,mpi_communicator,ierr)
   endif
 #endif
         lock=lock+1
@@ -428,7 +428,7 @@
         call MPI_ALLTOALL(zmpi1,n1*md2proc*nd3proc, &
                           MPI_double_precision, &
                           zmpi2,n1*md2proc*nd3proc, &
-                          MPI_double_precision,mpi_comm,ierr)
+                          MPI_double_precision,mpi_communicator,ierr)
   endif
 #endif
         lock=lock+1
--- interfaces_52_fft_mpi_noabirule.F90~   2012-11-26 11:46:57.000000000 +0900
+++ interfaces_52_fft_mpi_noabirule.F90   2012-11-26 11:48:13.000000000 +0900
@@ -29,7 +29,7 @@
 
 interface
  subroutine accrho(icplexwf,ndat,n1,n2,n3,nd1,nd2,nd3proc,& 
-  &  max1,max2,max3,m1,m2,m3,md1,md2proc,md3,mpi_comm,nproc,iproc,paral_kgb,zf,rho,weight)
+  &  max1,max2,max3,m1,m2,m3,md1,md2proc,md3,mpi_communicator,nproc,iproc,paral_kgb,zf,rho,weight)
   use defs_basis
   implicit none
   integer :: icplexwf
@@ -43,7 +43,7 @@
   integer :: md1
   integer :: md2proc
   integer :: md3
-  integer :: mpi_comm
+  integer :: mpi_communicator
   integer :: n1
   integer :: n2
   integer :: n3
@@ -79,7 +79,7 @@
 interface
  subroutine applypot(icplexwf,icplex,ndat,n1,n2,n3,nd1,nd2,nd3proc,& 
   &  max1i,max2i,max3i,m1i,m2i,m3i,md1,md2proc,md3,& 
-  &  max1o,max2o,max3o,m1o,m2o,m3o,mpi_comm,nproc,iproc,paral_kgb,pot,zf)
+  &  max1o,max2o,max3o,m1o,m2o,m3o,mpi_communicator,nproc,iproc,paral_kgb,pot,zf)
   use defs_basis
   implicit none
   integer :: icplex
@@ -100,7 +100,7 @@
   integer :: md1
   integer :: md2proc
   integer :: md3
-  integer :: mpi_comm
+  integer :: mpi_communicator
   integer :: n1
   integer :: n2
   integer :: n3
@@ -578,7 +578,7 @@
 end interface
 
 interface
- subroutine slice(mpi_comm,nproc,iproc,m1,m2,m3,n1,n2,n3,md1,md2,md3,nd1,nd2,nd3,zf,zr)
+ subroutine slice(mpi_communicator,nproc,iproc,m1,m2,m3,n1,n2,n3,md1,md2,md3,nd1,nd2,nd3,zf,zr)
   use defs_basis
   implicit none
   integer :: iproc
@@ -588,7 +588,7 @@
   integer :: md1
   integer :: md2
   integer :: md3
-  integer :: mpi_comm
+  integer :: mpi_communicator
   integer :: n1
   integer :: n2
   integer :: n3
Takeshi Nishimatsu
love && peace && free_software
http://loto.sourceforge.net/feram/
Fast MD program for perovskite-type ferroelectrics

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: Name conflict between MPI-3 and abinit-7.0.3/src/52_fft_  [SOLVED]

Post by mverstra » Mon Sep 16, 2013 5:14 pm

I have put this in my devel branch - Should be corrected in abinit 7.6, tb released in a month or so.

Thanks for the contributions!

Matthieu

My version of your patch in shell script:

for fil in `egrep -i 'mpi_comm[ =]' ../src/*/*.F90 | sed 's/:/ /' | awk '{print $1}' | uniq` ;
do
sed 's/mpi_comm /mpi_communicator /; s/mpi_comm=/mpi_communicator=/; s/mpi_comm,/mpi_communicator,/; s/mpi_comm)/mpi_communicator)/; s/mpi_comm$/mpi_communicator/; s/mpi_comm\./mpi_communicator\./;' $fil > tmpfil;
mv tmpfil $fil ;
done
Matthieu Verstraete
University of Liege, Belgium

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Name conflict between MPI-3 and abinit-7.0.3/src/52_fft_

Post by jbeuken » Thu Oct 03, 2013 3:49 pm

Hi,

already done in 7.4.2 production version
problem detected with MPICH 3.x
we have replaced mpi_comm by mpicomm

jmb
------
Jean-Michel Beuken
Computer Scientist

Locked