installation problem with VASP 6.3.2
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 3
- Joined: Mon Oct 24, 2022 11:40 pm
installation problem with VASP 6.3.2
Hello,
I am trying to install VASP 6.3.2 on WSL2 Ubuntu 22.04. But the installation is not successful. And I got some gfortran errors like unrecognized command-line option ‘-Mbackslash’; did you mean ‘-fbackslash’? and unrecognized command-line option ‘-fno-fortran-main’. I wonder if you could help me with this issue.
Thank you very much!
I am trying to install VASP 6.3.2 on WSL2 Ubuntu 22.04. But the installation is not successful. And I got some gfortran errors like unrecognized command-line option ‘-Mbackslash’; did you mean ‘-fbackslash’? and unrecognized command-line option ‘-fno-fortran-main’. I wonder if you could help me with this issue.
Thank you very much!
You do not have the required permissions to view the files attached to this post.
-
- Global Moderator
- Posts: 236
- Joined: Mon Apr 26, 2021 7:40 am
Re: installation problem with VASP 6.3.2
Hello!
I think you may have used the wrong makefile.include template. The one you attached seems to be
which is used if you want to build VASP with the AMD compiler aocc. Was that your intention? If you wanted a straightforward gfortran build under Ubuntu 22.04 you need to use
instead. I have not tested this in combination with WSL but I would suggest to follow these guidelines for Ubuntu 22.04.
Best,
Andreas Singraber
I think you may have used the wrong makefile.include template. The one you attached seems to be
Code: Select all
makefile.include.aocc_ompi_aocl_omp
Code: Select all
makefile.include.gnu_omp
Best,
Andreas Singraber
-
- Newbie
- Posts: 3
- Joined: Mon Oct 24, 2022 11:40 pm
Re: installation problem with VASP 6.3.2
Hello Andreas,
Thank you so much for your reply. I am trying to install it on an AMD computer. AOCC is installed. And I tried makefile.include.aocc_ompi_aocl_omp and makefile.include.aocc_ompi_aocl. Both gave me similar error message. Is it the right makefile.include template? I wonder if you could give me some suggestions about installing it on an AMD computer.
Thank you!
Best,
Zhaoxu
Thank you so much for your reply. I am trying to install it on an AMD computer. AOCC is installed. And I tried makefile.include.aocc_ompi_aocl_omp and makefile.include.aocc_ompi_aocl. Both gave me similar error message. Is it the right makefile.include template? I wonder if you could give me some suggestions about installing it on an AMD computer.
Thank you!
Best,
Zhaoxu
-
- Global Moderator
- Posts: 236
- Joined: Mon Apr 26, 2021 7:40 am
Re: installation problem with VASP 6.3.2
Hello Zhaoxu,
yes, you are using the correct templates for an aocc build. The difference between the two is only that the _omp version also enables OpenMP threading parallelization. This may be helpful if you are working on a large machine (>= 64 cores, see also wiki/index.php/Combining_MPI_and_OpenMP).
As far as I know for a build with aocc you need to provide a few more things before you can compile VASP. The problem you are facing at the moment is that your mpif90 (which is used as Fortran compiler in makefile.include) is the default MPI compiler wrapper for the Ubuntu 22.04 system. If you type
it will show that under the hood it is actually using gfortran and not aocc. Hence, the first step would be to build OpenMPI with the aocc compiler. This may not be trivial because there may be additional dependencies. Once this is done, you will get an alternative mpif90 command that is correctly using the aocc compiler. Then when building VASP, you have to give the correct mpif90 binary in the FC and FCL variables. This all is somewhat tricky, maybe it is better to install all necessary requirements via the SPACK environment. For example, here I found instructions how to install OpenMPI for aocc: https://developer.amd.com/spack/hpc-app ... s-openmpi/
Also note that in addition to the aocc compiler you need to install AMD's AOCL library package and give the correct paths to it in the makefile.include. Please understand that I cannot give you complete instructions on how to perform this installation as it may be a quite intricate process. If you are not bound to use the aocc compiler let me mention that you can get comparable performance for AMD machines also with alternative toolchains. A simpler alternative would be to use gfortran as the compiler and link to AMD's AOCL libraries for numerics. Hence, there would be no need to build OpenMPI from scratch and you could use the mpif90 as it is now. The corresponding makefile.include template is this one:
Best,
Andreas Singraber
yes, you are using the correct templates for an aocc build. The difference between the two is only that the _omp version also enables OpenMP threading parallelization. This may be helpful if you are working on a large machine (>= 64 cores, see also wiki/index.php/Combining_MPI_and_OpenMP).
As far as I know for a build with aocc you need to provide a few more things before you can compile VASP. The problem you are facing at the moment is that your mpif90 (which is used as Fortran compiler in makefile.include) is the default MPI compiler wrapper for the Ubuntu 22.04 system. If you type
Code: Select all
mpif90 -show
Also note that in addition to the aocc compiler you need to install AMD's AOCL library package and give the correct paths to it in the makefile.include. Please understand that I cannot give you complete instructions on how to perform this installation as it may be a quite intricate process. If you are not bound to use the aocc compiler let me mention that you can get comparable performance for AMD machines also with alternative toolchains. A simpler alternative would be to use gfortran as the compiler and link to AMD's AOCL libraries for numerics. Hence, there would be no need to build OpenMPI from scratch and you could use the mpif90 as it is now. The corresponding makefile.include template is this one:
Code: Select all
makefile.include.gnu_ompi_aocl_omp
Andreas Singraber
-
- Newbie
- Posts: 3
- Joined: Mon Oct 24, 2022 11:40 pm
Re: installation problem with VASP 6.3.2
Hi Andreas,
Thank you so much for your help! I found that the AOCC is using gfortran as compiler, and I cannot successfully change it to flang.
So, I am trying to install it on an Intel PC. After I installed oneAPI and HPC toolkit (Math Kernel Library and MPI Library included), I used makefile.include.intel to install. But some error messages showed as following:
if [ ! -d build/std ] ; then mkdir -p build/std ; fi
cp src/makefile src/.objects src/makedeps.awk makefile.include build/std
make -C build/std VERSION=std check
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
exit 0
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make -C build/std VERSION=std cleandependencies -j1
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
rm -f .depend
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make -C build/std VERSION=std all
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
rsync -ru ../../src/lib .
cp makefile.include lib
make -C lib -j1
make[2]: Entering directory '/opt/vasp.6.3.2/build/std/lib'
make libdmy.a
make[3]: Entering directory '/opt/vasp.6.3.2/build/std/lib'
fpp -f_com=no -free -w0 preclib.F preclib.f90
make[3]: fpp: No such file or directory
make[3]: *** [makefile:25: preclib.f90] Error 127
make[3]: Leaving directory '/opt/vasp.6.3.2/build/std/lib'
make[2]: *** [makefile:18: all] Error 2
make[2]: Leaving directory '/opt/vasp.6.3.2/build/std/lib'
make[1]: *** [makefile:145: lib] Error 2
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make: *** [makefile:17: std] Error 2
I wonder if you could give me some hints of possible causes. Thank you so much!
Best,
Zhaoxu
Thank you so much for your help! I found that the AOCC is using gfortran as compiler, and I cannot successfully change it to flang.
So, I am trying to install it on an Intel PC. After I installed oneAPI and HPC toolkit (Math Kernel Library and MPI Library included), I used makefile.include.intel to install. But some error messages showed as following:
if [ ! -d build/std ] ; then mkdir -p build/std ; fi
cp src/makefile src/.objects src/makedeps.awk makefile.include build/std
make -C build/std VERSION=std check
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
exit 0
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make -C build/std VERSION=std cleandependencies -j1
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
rm -f .depend
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make -C build/std VERSION=std all
make[1]: Entering directory '/opt/vasp.6.3.2/build/std'
rsync -ru ../../src/lib .
cp makefile.include lib
make -C lib -j1
make[2]: Entering directory '/opt/vasp.6.3.2/build/std/lib'
make libdmy.a
make[3]: Entering directory '/opt/vasp.6.3.2/build/std/lib'
fpp -f_com=no -free -w0 preclib.F preclib.f90
make[3]: fpp: No such file or directory
make[3]: *** [makefile:25: preclib.f90] Error 127
make[3]: Leaving directory '/opt/vasp.6.3.2/build/std/lib'
make[2]: *** [makefile:18: all] Error 2
make[2]: Leaving directory '/opt/vasp.6.3.2/build/std/lib'
make[1]: *** [makefile:145: lib] Error 2
make[1]: Leaving directory '/opt/vasp.6.3.2/build/std'
make: *** [makefile:17: std] Error 2
I wonder if you could give me some hints of possible causes. Thank you so much!
Best,
Zhaoxu
-
- Global Moderator
- Posts: 236
- Joined: Mon Apr 26, 2021 7:40 am
Re: installation problem with VASP 6.3.2
Hello Zhaoxu!
There seems to be only one final step missing before you can compile VASP: after installation of Intel's oneAPI and HPC toolkit you need to set some environment variables to enable the Intel compiler. These variables do not need to be set by hand, instead there is a script in the Intel installation directory that does this for you. The details are explained here. So the simplest solution is to set (in every terminal session where you intend to use the Intel compiler):
The environment variable changes performed by this script are not permanent, so you need to reapply it every time you open a new terminal session. Note, that this is also required when you want to execute VASP, because otherwise the correct mpirun from Intel cannot be found and the system's default (most likely OpenMPI) is used instead (this will then not work properly). To make changes permanent add the line to your .bashrc or follow the steps in the link above to include the Intel compiler in your modulefiles setup.
Best,
Andreas Singraber
There seems to be only one final step missing before you can compile VASP: after installation of Intel's oneAPI and HPC toolkit you need to set some environment variables to enable the Intel compiler. These variables do not need to be set by hand, instead there is a script in the Intel installation directory that does this for you. The details are explained here. So the simplest solution is to set (in every terminal session where you intend to use the Intel compiler):
Code: Select all
source /path/to/your/intel/installation/setvars.sh
Best,
Andreas Singraber