[petsc-users] error with MPI + ifort
Praveen C
cpraveen at gmail.com
Wed Mar 7 08:53:53 CST 2018
Dear all
In a code like this
subroutine checkgrid(g)
#include <petsc/finclude/petscsys.h>
use petscsys
use mgrid
use celldata
use comdata
implicit none
type(grid),intent(in) :: g
! Local variables
integer :: i, j, v, tc, nv
PetscInt :: v1, v2
PetscErrorCode :: ierr
! Sum g%nvl over all partitions.
Call MPI_Allreduce(g%nvl, nv, 1, MPI_INT, MPI_SUM, &
PETSC_COMM_WORLD, ierr); CHKERRQ(ierr)
end subroutine checkgrid
we get an error while compiling with mpich-3.2.1 + ifort + petsc-3.8.x
mpifort -c -O3 -fpp -nogen-interface -W1 -WB -DNS -DVERSION=\"f8e6c025\"
-I/usr/local/share/applications/Intel_Compiler/petsc/include
-I/usr/local/share/applications/Intel_Compiler/hdf5/include -DHDF5 -Tf
checkgrid.F90 -o checkgrid.o -free
checkgrid.F90(40): error #6405: The same named entity from different
modules and/or program units cannot be referenced. [MPI_SUM]
Call MPI_Allreduce(g%nvl, nv, 1, MPI_INT, MPI_SUM, &
---------------------------------------------^
compilation aborted for checkgrid.F90 (code 1)
It works fine with clang and gnu compilers.
Thanks
praveen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180307/c90321f3/attachment-0001.html>
More information about the petsc-users
mailing list