<< 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

Dear Julian,

I have the same problem with phonond.F90 by using ./mkgulp -m, the error is:

…/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

I tried with the above method mentioned by Camps, but the error is still here.

and I also tried using ./mkgulp -m -j 8 -c intel, the error is:

…/reaxffds.F90:2016:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2016 | call MPI_IRecv(nntmp,ntmp,MPI_integer,nnode, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2018:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2018 | call MPI_IRecv(botmp,ntmp,MPI_double_precision,nnode, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2037:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2037 | call MPI_ISend(nntmp,ntmp,MPI_integer,0, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2039:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2039 | call MPI_ISend(botmp,ntmp,MPI_double_precision,0, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2081:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2081 | call MPI_IRecv(nntmp,ntmp,MPI_integer,nnode, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2083:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2083 | call MPI_IRecv(botmp,ntmp,MPI_double_precision,nnode, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2101:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2101 | call MPI_ISend(nntmp,ntmp,MPI_integer,0, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2103:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2103 | call MPI_ISend(botmp,ntmp,MPI_double_precision,0, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2145:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2145 | call MPI_IRecv(nntmp,ntmp,MPI_integer,nnode, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2147:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2147 | call MPI_IRecv(botmp,ntmp,MPI_double_precision,nnode, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2165:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2165 | call MPI_ISend(nntmp,ntmp,MPI_integer,0, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2167:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2167 | call MPI_ISend(botmp,ntmp,MPI_double_precision,0, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2209:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2209 | call MPI_IRecv(nntmp,ntmp,MPI_integer,nnode, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2211:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2211 | call MPI_IRecv(botmp,ntmp,MPI_double_precision,nnode, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2229:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2229 | call MPI_ISend(nntmp,ntmp,MPI_integer,0, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2231:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2231 | call MPI_ISend(botmp,ntmp,MPI_double_precision,0, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2552:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2552 | call MPI_IRecv(nntmp,ntmp,MPI_integer,nnode, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2554:27:

1944 | call MPI_IRecv(nloc,ntmp,MPI_integer,nnode, &
| 2

2554 | call MPI_IRecv(botmp,ntmp,MPI_double_precision,nnode, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
…/reaxffds.F90:2573:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2573 | call MPI_ISend(nntmp,ntmp,MPI_integer,0, &
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
…/reaxffds.F90:2575:27:

1954 | call MPI_ISend(nloc,ntmp,MPI_integer,0, &
| 2

2575 | call MPI_ISend(botmp,ntmp,MPI_double_precision,0, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
make: *** [makefile:1268: reaxffds.o] Error 1
make: *** Waiting for unfinished jobs…
mv: cannot stat ‘gulp’: No such file or directory

this is my makefile:
mkgulp (12.5 KB)

how can I fix these problems, thank you in advance.

Best regards,
wang

Dear Wang,

The solution is in the README file for GULP (see below):

NB: The -fallow-argument-mismatch flag is specified which is needed for gfortran v10 onwards

Either you’re using an old mkgulp from sometime ago or you’ve removed the above option when editing the mkgulp file.
Regards,
Julian