我是 MPI 的新手。我正在尝试编写一个使用 MPI 和 FORTRAN 计算 PI 的程序。但是当我尝试构建程序时,我收到以下消息。
make all
gfortran -O2 -g \
-o bin/MpiTest.exe \
src/MpiTest.f -fno-range-check
C:/Program Files/MicrosoftMPI/Inc/mpif.h:344.38:
Included at src/MpiTest.f:11:
PARAMETER (MPI_AINT=z'4c00043b')
1
Error: PARAMETER attribute of 'mpi_aint' conflicts with PARAMETER attribute at (1)
C:/Program Files/MicrosoftMPI/Inc/mpif.h:359.35:
Included at src/MpiTest.f:11:
PARAMETER (MPI_ADDRESS_KIND=INT_PTR_KIND())
1
Error: Function 'int_ptr_kind' in initialization expression at (1) must be an intrinsic function
make: *** [all] Error 1
有人能帮我一下吗 ?
PS:
PROGRAM CalculatePI
include "C:/Program Files/MicrosoftMPI/Inc/mpif.h"
INTEGER :: i = 0, nThrows = 0, nSuccess = 0, ierror =0, numOfProcessors=0,myID=0
REAL :: x = 0, y = 0, results = 0
INTEGER :: Counter = 0
call mpi_init(ierror)
call mpi_comm_rank(MPI_COMM_WORLD, myID, ierror)
call mpi_comm_size(MPI_COMM_WORLD, numOfProcessors, ierror)
....