Page 1 of 1

Error occurs when compiling VASP.6.3.2 with AOCC

Posted: Wed Jan 18, 2023 6:04 am
by liu_jiyuan
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

Re: Error occurs when compiling VASP.6.3.2 with AOCC

Posted: Wed Jan 18, 2023 11:04 am
by martin.schlipf
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.

Re: Error occurs when compiling VASP.6.3.2 with AOCC

Posted: Fri Jan 20, 2023 10:58 am
by martin.schlipf
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.

Re: Error occurs when compiling VASP.6.3.2 with AOCC

Posted: Mon Jan 23, 2023 6:41 am
by martin.schlipf
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).

Re: Error occurs when compiling VASP.6.3.2 with AOCC

Posted: Thu May 18, 2023 4:24 am
by liu_jiyuan
Hi Martin,

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