<< Compiling error in phonond.F90 >>

I had several issues running GULP 6.2 after compiled it with Intel compilers from Intel OneAPI 2024.2.1, so I decided to move to 2019 version of Intel compilers (19.0.0.117 20180804).

Now, I am facing the following errors:

../phonond.F90:1834:29:

 1245 |             call MPI_IRecv(dtmp,ntmp,MPI_double_precision,nnode, &
      |                           2  
......
 1834 |               call MPI_IRecv(ctmp,nsizec,MPI_double_complex,snode,ntag,MPI_Comm_GULP,Requestc,MPIerror)
      |                             1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
../phonond.F90:1882:29:

 1261 |             call MPI_ISend(dtmp,ntmp,MPI_double_precision,0, &
      |                           2  
......
 1882 |               call MPI_ISend(ctmp,nsizec,MPI_double_complex,snode,ntag,MPI_Comm_GULP,Requestc,MPIerror)
      |                             1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
../phonond.F90:2320:49:

 2314 |                 call nagammarigid(mtvrptr,rfmass,bornkloc,maxd2,derv2)
      |                                                 2
......
 2320 |                 call nagammarigid(mtvrptr,rfmass,bornk(1,ncf),maxd2,derv2)
      |                                                 1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2322:65:

 2316 |                 call nagamma(nphonatc,nphonatc,nphonatptr,rfmass,bornkloc,maxd2,derv2)
      |                                                                 2
......
 2322 |                 call nagamma(nphonatc,nphonatc,nphonatptr,rfmass,bornk(1,ncf),maxd2,derv2)
      |                                                                 1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2499:52:

 2493 |                   call nagammacrigid(mtvrptr,rfmass,bornkloc,maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                    2
......
 2499 |                   call nagammacrigid(mtvrptr,rfmass,bornk(1,ncf),maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                    1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2501:79:

 2495 |                   call nagammac(nphonatc,nphonatc,nphonatptr,nphonatptr,rfmass,bornkloc,maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                                               2
......
 2501 |                   call nagammac(nphonatc,nphonatc,nphonatptr,nphonatptr,rfmass,bornk(1,ncf),maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                                               1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2678:50:

 2493 |                   call nagammacrigid(mtvrptr,rfmass,bornkloc,maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                    2
......
 2678 |                 call nagammacrigid(mtvrptr,rfmass,bornk(1,ncf),maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                  1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2680:77:

 2495 |                   call nagammac(nphonatc,nphonatc,nphonatptr,nphonatptr,rfmass,bornkloc,maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                                               2
......
 2680 |                 call nagammac(nphonatc,nphonatc,nphonatptr,nphonatptr,rfmass,bornk(1,ncf),maxd2,derv2,dervi,xkt,ykt,zkt)
      |                                                                             1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2692:49:

 2314 |                 call nagammarigid(mtvrptr,rfmass,bornkloc,maxd2,derv2)
      |                                                 2
......
 2692 |                 call nagammarigid(mtvrptr,rfmass,bornk(1,ncf),maxd2,derv2)
      |                                                 1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
../phonond.F90:2694:65:

 2316 |                 call nagamma(nphonatc,nphonatc,nphonatptr,rfmass,bornkloc,maxd2,derv2)
      |                                                                 2
......
 2694 |                 call nagamma(nphonatc,nphonatc,nphonatptr,rfmass,bornk(1,ncf),maxd2,derv2)
      |                                                                 1
Error: Element of assumed-shape or pointer array as actual argument at (1) cannot correspond to actual argument at (2)
make: *** [makefile:342: phonond.o] Error 1
mv: cannot stat 'gulp': No such file or directory

Any help is very appreciated.

Regards,
Camps

Hi Camps,

I’ve just compiled GULP under Intel using compilers, MPI and MKL all version 2019.3.199 (which is the oldest I have access to & is close to your 2019 version) using the line:

./mkgulp -m -j 8 -c intel

Everything works fine & there are no compilation errors & the code runs as expected. From looking at the errors you report, it seems that they look like gfortran errors rather than Intel, so I’m wondering if you missed the -c intel option above? With gfortran you need to follow the guidance in the README about the options to allow argument mismatch (if this isn’t set in the mkgulp you have already).
Regards,
Julian

Hey, Julian.

I think I found the problem.

In the script mkgulp, lines 293-294 are commented, forcing the compilation to be done with mpif90, I removed the comments, then the compilation was done with mpiifort instead. Some warnings but the gulp executable was generated and tested in parallel with 2 processors with examples 1-5 without any other issues.

Thanks!

Camps

PS: I will test with oneAPI too.

Hi Camps
That all makes sense. On many systems when you load the “intel-mpi” module it automatically aliases mpiifort to mpif90 etc so there is no need to explicitly change the standard MPI commands. This is why it worked for me. However, if your system doesn’t apply this alias then you would indeed need to change mpif90 to mpiifort.
Best regards,
Julian