Error occurs when compiling VASP.6.3.2 with AOCC

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Locked
Message
Author
liu_jiyuan
Newbie
Newbie
Posts: 4
Joined: Tue Mar 29, 2022 6:44 am

Error occurs when compiling VASP.6.3.2 with AOCC

#1 Post by liu_jiyuan » Wed Jan 18, 2023 6:04 am

Hi all,

I encountered an error when compile VASP.6.3.2 with AOCC 4.0.0 by using the template makefile.include.aocc_ompi_aocl_omp.
...
mpif90 -fopenmp -ffree-form -ffree-line-length-none -w -fno-fortran-main -Mbackslash -march=native -O2 -I/app/libs/aocl/4.0.0-aocc4.0/amd-fftw/include -c tutor.f90
mpif90 -fopenmp -ffree-form -ffree-line-length-none -w -fno-fortran-main -Mbackslash -march=native -O2 -I/app/libs/aocl/4.0.0-aocc4.0/amd-fftw/include -c version.f90
mpif90 -fopenmp -ffree-form -ffree-line-length-none -w -fno-fortran-main -Mbackslash -march=native -O2 -I/app/libs/aocl/4.0.0-aocc4.0/amd-fftw/include -c command_line.f90
mpif90 -fopenmp -ffree-form -ffree-line-length-none -w -fno-fortran-main -Mbackslash -march=native -O2 -I/app/libs/aocl/4.0.0-aocc4.0/amd-fftw/include -c incar_reader.f90
F90-S-0023-Syntax error - unbalanced parentheses (incar_reader.F: 194)
F90-S-0023-Syntax error - unbalanced parentheses (incar_reader.F: 196)
0 inform, 0 warnings, 2 severes, 0 fatal for incar_from_unit
make[2]: *** [makefile:166: incar_reader.o] Error 1
make[2]: Leaving directory '/home/users/ntu/jiyuanli/apps/vasp.6.3.2_vtst_sol_aocc/build/gam'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:129: all] Error 1
make[1]: Leaving directory '/home/users/ntu/jiyuanli/apps/vasp.6.3.2_vtst_sol_aocc/build/gam'
make: *** [makefile:17: gam] Error 2
What's the problem?

Thanks,

Jiyuan

martin.schlipf
Global Moderator
Global Moderator
Posts: 455
Joined: Fri Nov 08, 2019 7:18 am

Re: Error occurs when compiling VASP.6.3.2 with AOCC

#2 Post by martin.schlipf » Wed Jan 18, 2023 11:04 am

We currently did not test with AOCC 4.0.0. Please consider our recommended toolchains. That being said, we do want to support AOCC 4.0.0 in the near future, so I will investigate whether I can reproduce this issue.

martin.schlipf
Global Moderator
Global Moderator
Posts: 455
Joined: Fri Nov 08, 2019 7:18 am

Re: Error occurs when compiling VASP.6.3.2 with AOCC

#3 Post by martin.schlipf » Fri Jan 20, 2023 10:58 am

Can you post the incar_reader.f90 file after the preprocessor. Then I can inspect it to see if something goes wrong in that step.

martin.schlipf
Global Moderator
Global Moderator
Posts: 455
Joined: Fri Nov 08, 2019 7:18 am

Re: Error occurs when compiling VASP.6.3.2 with AOCC

#4 Post by martin.schlipf » Mon Jan 23, 2023 6:41 am

We installed the AOCC 4.0.0 and found the issue. There is a bug in the flang preprocessor for files with the ending .F. Because that traditionally indicates fixed format, the preprocessor cannot handle long lines with the __LINE__ macro in them.

Here is a list of fixes:
  • 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).

liu_jiyuan
Newbie
Newbie
Posts: 4
Joined: Tue Mar 29, 2022 6:44 am

Re: Error occurs when compiling VASP.6.3.2 with AOCC

#5 Post by liu_jiyuan » Thu May 18, 2023 4:24 am

Hi Martin,

Thanks for your suggestions. We renamed all filename to F90 and successfully complied.

Locked