Page 1 of 1

compilation error of vasp-6.4.3 with aocc 5.0.0

Posted: Wed Apr 02, 2025 9:51 am
by rodrigo_mejia

Dear vasp support team,

I am trying to compile vasp 6.4.3 in a new cluster with AMD EPYC 9454 processors. I am using the aocc 5.0.0 compiler with the aocl 5.0.0 libraries (liblis, libflame, libscalapack, lilbfftw), which were provided by the cluster admin team.

Unfortunately the compilation fails with the following error message:

Code: Select all

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
./incar_reader.inc:142:44:

  142 |             call xml_incar_v(key, TYPE_CHECK, val, rdum, cdum, ldum, sdum, size(val))
      |                                            1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[2]: *** [makefile:171: incar_reader.o] Error 1
make[2]: Leaving directory '/pfs/data6/home/ka/ka_scc/ka_an9294/Programs/uc3-software_admin/vasp/vasp-6.4.3/vasp.6.4.3/build/std'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:131: all] Error 1
make[1]: Leaving directory '/pfs/data6/home/ka/ka_scc/ka_an9294/Programs/uc3-software_admin/vasp/vasp-6.4.3/vasp.6.4.3/build/std'
make: *** [makefile:17: std] Error 2

You can find the complete compilation log, and corresponding makefile.include, within the attached zip file.

There is a somewhat related issue in the forum (see https://w.vasp.at/forum/viewtopic.php?p=23217#p23229), where the accepted answer suggests the following:

- switch to a different preprocessor e.g. cpp.
- Add -ffree-form to the preprocessor (CPP in the makefile.include).
- Rename the files that fail to .F90 (note that would require changes to the makefile as well).

Thus I would like ask what does the phrase "note that would require changes to the makefile as well" explicitly refers to?
Maybe these changes could help with my problem. Or, if not the case, what else could I try to complete my installation?

One more thing I want to comment on is the makefile.include for aocc.
I am using a makefile.include which was adapted from https://www.vasp.at/wiki/index.php/Make ... _ompi_aocl .
In my file I needed to adapt the FFLAGS in line 25 from:

Code: Select all

-w -fno-fortran-main -Mbackslash

to:

Code: Select all

-w  -fbackslash

I did this because I was getting this other error message:

Code: Select all

gfortran: error: unrecognized command-line option ‘-fno-fortran-main’
gfortran: error: unrecognized command-line option ‘-Mbackslash’; did you mean ‘-fbackslash’?

Since this is my first time compiling for an AMD architecture I am not sure if something changed in version 5.0.0 of aocl with respect to the previous version which causes these option conlficts.
I just thought you might want to know this happened.

Best regards,
Rodrigo


Re: compilation error of vasp-6.4.3 with aocc 5.0.0

Posted: Tue Apr 08, 2025 12:11 pm
by michael_wolloch

Dear Rodrigo Mejia,

I am very sorry for the delay!

I think a hint to the solution to your problem can be found here:

I did this because I was getting this other error message:

Code: Select all

gfortran: error: unrecognized command-line option ‘-fno-fortran-main’
gfortran: error: unrecognized command-line option ‘-Mbackslash’; did you mean ‘-fbackslash’?

This indicates that you are not using AMD flang/clang, but GNU gfortran.

Please check if the mpif90 wrapper is using the right compiler executable by running

Code: Select all

mpif90 --version

on the command line.
E.g. for me, when I load our aocc 5.0 toolchain:

Code: Select all

$ mpif90 --version
AMD clang version 17.0.6 (CLANG: AOCC_5.0.0-Build#1377 2024_09_24)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/share/spack-0.23/opt/spack/linux-rocky8-x86_64/gcc-8.5.0/aocc-5.0.0-weyxlvlhkb4btty2nomuhgfilcackxr5/bin

You should see something similar. Especially no mentioning of "gfortran"

Is it possible that you have loaded the wrong openMPI module?

If the correct aocc compiler is used, the original FFLAGS line

Code: Select all

FFLAGS      = -w -fno-fortran-main -Mbackslash

will work and your code should compile.

Let me know if this helps, and again sorry for the delayed answer.

Cheers, Michael


Re: compilation error of vasp-6.4.3 with aocc 5.0.0

Posted: Fri Apr 11, 2025 12:53 pm
by rodrigo_mejia

Dear Michael,

Many thanks for your answer. I have contacted the technical team of our HPC cluster to request the right mpi module.
I will post an update as soon as I am able to test the proposed solution.

Best regards,
Rodrigo