Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Issues when compiling and installing WRF

bcastro97

New member
Hi everyone,

I was following the instructions to compile and install the libraries required to build WRF using Intel/ifort: Full WRF and WPS Installation Example (Intel). All was working perfect, but when I configure WRF I got an error messague.

Is important to say that I had done all the previous System Environment Tests and any of them fail. The results of all of these tests was according to the expected.

Also, I read another posts about the topic and follow the recomendations that they said but the error still being there. Before the instalation process I wrote the following into the terminal to define the environment variables:

Code:
export PATH=.:/home/bcastro/WRF/libs/netcdf/bin:/home/bcastro/WRF/libs/bin:${PATH}
export LD_LIBRARY_PATH=/home/bcastro/WRF/libs/lib:/home/bcastro/WRF/libs/netcdf/lib:/home/bcastro/WRF/libs/grib2/lib
export JASPERLIB=/home/bcastro/WRF/libs/grib2/lib
export JASPERINC=/home/bcastro/WRF/libs/grib2/include
export NETCDF=/home/bcastro/WRF/libs/netcdf

export DIR=/home/bcastro/WRF/libs
export F77=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export LDFLAGS="-L/home/bcastro/WRF/libs/lib -L/home/bcastro/WRF/libs/netcdf/lib -L/home/bcastro/WRF/libs/grib2/lib"
export CPPFLAGS="-I/home/bcastro/WRF/libs/include -I/home/bcastro/WRF/libs/netcdf/include -I/home/bcastro/WRF/libs/grib2/include"

Is important to say that I did not export the following environment variables, because I got an error message when I tried to build the libraries with them:

Code:
export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export FC=ifort
export CPP='icc -E'
export CXXCPP='icpc -E'

Then I Install all the libraries successfully (mpich, zlib, HDF5, NetCDF-c, netcdf-fortran, libpng and jasper), and wrote the following lines according to the instructions of the tutorial:

Code:
git clone --recurse-submodule https://github.com/wrf-model/WRF.git
cd WRF
./configure

Then I enter the option 15 of the Linux x86_64 options and basic nesting. But I got this error messague:

Testing for NetCDF, C and Fortran compiler:

One of compilers testing failed!
Please check your compiler
When looking at the compilers that are currently working

$dpkg --list | grep compiler
ii g++
ii g++-11
ii gcc
ii gcc-10
ii gcc-11
ii gfortran
ii gfortran-10
ii gfortran-11
ii libllvm13:amd64
ii libllvm15:amd64
ii libxkbcommon0:amd64
ii rpcsvc-proto
4:11.2.0-1ubuntu1
11.4.0-1ubuntu1~22.04
4:11.2.0-1ubuntu1
10.5.0-1ubuntu1~22.04
11.4.0-1ubuntu1~22.04
4:11.2.0-1ubuntu1
10.5.0-1ubuntu1~22.04
11.4.0-1ubuntu1~22.04
1:13.0.1-2ubuntu2.2
1:15.0.7-0ubuntu0.22.04.3
1.4.0-1
1.4.2-0ubuntu6
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
GNU C++ compiler
GNU C++ compiler
GNU C compiler
GNU C compiler
GNU C compiler
GNU Fortran 95 compiler
GNU Fortran compiler
GNU Fortran compiler
Modular compiler and toolchain technologies, runtime library
Modular compiler and toolchain technologies, runtime library
library interface to the XKB compiler - shared library
RPC protocol compiler and definitions

Can you help me with this Issue? Please let me know if there is any additional information I may need to add.

Thanks for any advice in advance.

Bruno
 
Last edited:
Apologies for the long delay in response while our team tended to time-sensitive obligations. Thank you for your patience. Since it's been a while, have you made any progress with this issue?
 
Hi everyone,

I was following the instructions to compile and install the libraries required to build WRF using Intel/ifort: Full WRF and WPS Installation Example (Intel). All was working perfect, but when I configure WRF I got an error messague.

Is important to say that I had done all the previous System Environment Tests and any of them fail. The results of all of these tests was according to the expected.

Also, I read another posts about the topic and follow the recomendations that they said but the error still being there. Before the instalation process I wrote the following into the terminal to define the environment variables:

Code:
export PATH=.:/home/bcastro/WRF/libs/netcdf/bin:/home/bcastro/WRF/libs/bin:${PATH}
export LD_LIBRARY_PATH=/home/bcastro/WRF/libs/lib:/home/bcastro/WRF/libs/netcdf/lib:/home/bcastro/WRF/libs/grib2/lib
export JASPERLIB=/home/bcastro/WRF/libs/grib2/lib
export JASPERINC=/home/bcastro/WRF/libs/grib2/include
export NETCDF=/home/bcastro/WRF/libs/netcdf

export DIR=/home/bcastro/WRF/libs
export F77=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export LDFLAGS="-L/home/bcastro/WRF/libs/lib -L/home/bcastro/WRF/libs/netcdf/lib -L/home/bcastro/WRF/libs/grib2/lib"
export CPPFLAGS="-I/home/bcastro/WRF/libs/include -I/home/bcastro/WRF/libs/netcdf/include -I/home/bcastro/WRF/libs/grib2/include"

Is important to say that I did not export the following environment variables, because I got an error message when I tried to build the libraries with them:

Code:
export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export FC=ifort
export CPP='icc -E'
export CXXCPP='icpc -E'

Then I Install all the libraries successfully (mpich, zlib, HDF5, NetCDF-c, netcdf-fortran, libpng and jasper), and wrote the following lines according to the instructions of the tutorial:

Code:
git clone --recurse-submodule https://github.com/wrf-model/WRF.git
cd WRF
./configure

Then I enter the option 15 of the Linux x86_64 options and basic nesting. But I got this error messague:


When looking at the compilers that are currently working

$dpkg --list | grep compiler
ii g++
ii g++-11
ii gcc
ii gcc-10
ii gcc-11
ii gfortran
ii gfortran-10
ii gfortran-11
ii libllvm13:amd64
ii libllvm15:amd64
ii libxkbcommon0:amd64
ii rpcsvc-proto
4:11.2.0-1ubuntu1
11.4.0-1ubuntu1~22.04
4:11.2.0-1ubuntu1
10.5.0-1ubuntu1~22.04
11.4.0-1ubuntu1~22.04
4:11.2.0-1ubuntu1
10.5.0-1ubuntu1~22.04
11.4.0-1ubuntu1~22.04
1:13.0.1-2ubuntu2.2
1:15.0.7-0ubuntu0.22.04.3
1.4.0-1
1.4.2-0ubuntu6
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
amd64
GNU C++ compiler
GNU C++ compiler
GNU C compiler
GNU C compiler
GNU C compiler
GNU Fortran 95 compiler
GNU Fortran compiler
GNU Fortran compiler
Modular compiler and toolchain technologies, runtime library
Modular compiler and toolchain technologies, runtime library
library interface to the XKB compiler - shared library
RPC protocol compiler and definitions

Can you help me with this Issue? Please let me know if there is any additional information I may need to add.

Thanks for any advice in advance.

Bruno
Which version of intel compilers are you using? @bcastro97
 
Apologies for the long delay in response while our team tended to time-sensitive obligations. Thank you for your patience. Since it's been a while, have you made any progress with this issue?
Hi,

Yes, I have tried some ways to solve this issue:
  • I reinstalled again all libraries but I change the path to WRF top level directory to "wrf_model" because at the beggining is named WRF. Also I reset all the environment variables to this new directory. But the error was still appearing.
  • I tried to installed WRF with the verssion 4.2.3 of the "mpich" library, because at the beginning I used the version 4.3.1 downloaded from the following link: Downloads | MPICH. But the error was still appearing.
  • Finally, I reinstalled all the libraries using GNU/gcc instead of Intel/ifort compiler. After installing successfully all libraries I tried to build WRF, and when I entered the option 34 and nesting option 3 all seems to run properly. I found all the executables files in the "./WRF/main" directory ("ndown.exe", "real.exe", "tc.exe", "wrf.exe") and in the end of "log.compile" file it showed that the executables were successfully built. Also the WPS seems to built properly with the executables generated (geogrid.exe, metgrid.exe, ungrib.exe). So I am following the next steps of the WRF compiling tutorial.
But I have a question, what is the main difference in installing libraries with GNU/gcc and Intel/ifort?.

Thanks in advance,

Bruno
 
Which version of intel compilers are you using? @bcastro97
Hi,

I think that I do not have the compilers installed, because when I type the following:

Code:
$ dpkg --list | intel compiler

ii  g++                                           4:13.2.0-7ubuntu1                        amd64        GNU C++ compiler
ii  g++-11                                        11.4.0-9ubuntu1                          amd64        GNU C++ compiler
ii  g++-13                                        13.3.0-6ubuntu2~24.04                    amd64        GNU C++ compiler
ii  g++-13-x86-64-linux-gnu                       13.3.0-6ubuntu2~24.04                    amd64        GNU C++ compiler for x86_64-linux-gnu architecture
ii  g++-x86-64-linux-gnu                          4:13.2.0-7ubuntu1                        amd64        GNU C++ compiler for the amd64 architecture
ii  gcc                                           4:13.2.0-7ubuntu1                        amd64        GNU C compiler
ii  gcc-10                                        10.5.0-4ubuntu2                          amd64        GNU C compiler
ii  gcc-11                                        11.4.0-9ubuntu1                          amd64        GNU C compiler
ii  gcc-13                                        13.3.0-6ubuntu2~24.04                    amd64        GNU C compiler
ii  gcc-13-x86-64-linux-gnu                       13.3.0-6ubuntu2~24.04                    amd64        GNU C compiler for the x86_64-linux-gnu architecture
ii  gcc-x86-64-linux-gnu                          4:13.2.0-7ubuntu1                        amd64        GNU C compiler for the amd64 architecture
ii  gfortran                                      4:13.2.0-7ubuntu1                        amd64        GNU Fortran 95 compiler
ii  gfortran-10                                   10.5.0-4ubuntu2                          amd64        GNU Fortran compiler
ii  gfortran-11                                   11.4.0-9ubuntu1                          amd64        GNU Fortran compiler
ii  gfortran-13                                   13.3.0-6ubuntu2~24.04                    amd64        GNU Fortran compiler
ii  gfortran-13-x86-64-linux-gnu                  13.3.0-6ubuntu2~24.04                    amd64        GNU Fortran compiler for the x86_64-linux-gnu architecture
ii  gfortran-x86-64-linux-gnu                     4:13.2.0-7ubuntu1                        amd64        GNU Fortran 95 compiler for the amd64 architecture
ii  libllvm17t64:amd64                            1:17.0.6-9ubuntu1                        amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm18:amd64                               1:18.1.3-1ubuntu1                        amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm19:amd64                               1:19.1.1-1ubuntu1~24.04.2                amd64        Modular compiler and toolchain technologies, runtime library
ii  libxkbcommon0:amd64                           1.6.0-1build1                            amd64        library interface to the XKB compiler - shared library
ii  rpcsvc-proto                                  1.4.2-0ubuntu7                           amd64        RPC protocol compiler and definitions

I do not find the intel compilers or there is another way to verify that?

Thanks in advance,

Bruno
 
Hello.

Intel Compilers have to be installed from somewhere else.

Intel ver. 2023.x are the last compiler set that have classic compilers: icc, icpc, and ifort ; 2024.x onwards, removed them and will only use icx, icpx and ifx (llvm compilers); WRF 4.6 onwardsis able to compile with these, but I haven't done that personally.
Also with 2023.x you should do this:
Bash:
export __INTEL_PRE_CFLAGS=-diag-disable=10441
to compile in peace with the classic compilers

To get them you can find them around via google... or install easybuild/spack + environment modules for loading easily the installed suites.

Using easybuild you can easily create and download GCC or Intel Classic/LLVM based toolchains, in different versions, with specific library versions you need, but setting it up properly could be a bit time consuming, but in the long run saves a lot of time.

Other alternative is getting the full intel installers: here is a tutorial that has the links to the 2023.2

Also, using the LLVM compilers, you may need to build some of the pre-requisite libraries for WRF with them.

Hope this helps/
 
Hi,

Yes, I have tried some ways to solve this issue:
  • I reinstalled again all libraries but I change the path to WRF top level directory to "wrf_model" because at the beggining is named WRF. Also I reset all the environment variables to this new directory. But the error was still appearing.
  • I tried to installed WRF with the verssion 4.2.3 of the "mpich" library, because at the beginning I used the version 4.3.1 downloaded from the following link: Downloads | MPICH. But the error was still appearing.
  • Finally, I reinstalled all the libraries using GNU/gcc instead of Intel/ifort compiler. After installing successfully all libraries I tried to build WRF, and when I entered the option 34 and nesting option 3 all seems to run properly. I found all the executables files in the "./WRF/main" directory ("ndown.exe", "real.exe", "tc.exe", "wrf.exe") and in the end of "log.compile" file it showed that the executables were successfully built. Also the WPS seems to built properly with the executables generated (geogrid.exe, metgrid.exe, ungrib.exe). So I am following the next steps of the WRF compiling tutorial.
But I have a question, what is the main difference in installing libraries with GNU/gcc and Intel/ifort?.

Thanks in advance,

Bruno
In your environment unless you download the compilers (llvm intel) directly from them you would need to stay with GNU.

The main difference between the two is really just one is develop by cannonical and the other by intel. Intel are supposed to be more optimized for intel cpus. Or at least that is my understanding.
 
Top