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

Error message : One of compilers testing failed! Please check your compiler

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

MorningGlory

New member
Hello,

Up until a certain point, I have attentively and successfully followed the guidelines provided by the following website to install WRF (https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php).

However, at the step of "Building WRF" I get stuck at the ./configure step, with the message :

Code:
Testing for NetCDF, C and Fortran compiler

  One of compilers testing failed!
  Please check your compiler

I have tried opting for configuration 1 (serial - PGI(pgf90/gcc)) and 3 (dmpar - PGI(pgf90/gcc)), but both give me the same error message.

I have deleted and reinstalled everything, but the same message appears.

When looking at the compilers that are currently working

Code:
dpkg --list | grep compiler
ii  g++                            4:7.4.0-1ubuntu2.3                amd64        GNU C++ compiler
ii  g++-7                          7.4.0-1ubuntu1~18.04.1            amd64        GNU C++ compiler
ii  gcc                            4:7.4.0-1ubuntu2.3                amd64        GNU C compiler
ii  gcc-7                          7.4.0-1ubuntu1~18.04.1            amd64        GNU C compiler
ii  gfortran                       4:7.4.0-1ubuntu2.3                amd64        GNU Fortran 95 compiler
ii  gfortran-7                     7.4.0-1ubuntu1~18.04.1            amd64        GNU Fortran compiler
ii  libluajit-5.1-2:amd64          2.1.0~beta3+dfsg-5.1              amd64        Just in time compiler for Lua - library version
ii  libluajit-5.1-common           2.1.0~beta3+dfsg-5.1              all          Just in time compiler for Lua - common files
ii  libxkbcommon0:amd64            0.8.2-1~ubuntu18.04.1             amd64        library interface to the XKB compiler - shared library

What could explain this predicament? Please let me know if there is any additional information I may need to add.

Thank you,
SRD
 
Hi,
When you went through the compile tutorial page, did you pass all the tests in this section:
https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php#STEP3

If so, is it possible that after everything was built and passing the tests, you logged out of your window and then the paths were no longer set when you tried to build?
 
Hello,

An update required me to restart my computer. I should notify that I am using WSL ubuntu on windows. I have resetted the appropriate paths:

Code:
>> export -p "Only relevant paths are shown
declare -x CC="gcc"
declare -x CPPFLAGS="-I/path_to_directory/Build_WRF/LIBRARIES/grib2/include"
declare -x CXX="g++"
declare -x DIR="/path_to_directory/Build_WRF/LIBRARIES"
declare -x F77="gfortran"
declare -x FC="gfortran"
declare -x FCFLAGS="-m64"
declare -x FFLAGS="-m64"
declare -x JASPERINC="/path_to_directory/Build_WRF/LIBRARIES/grib2/include"
declare -x JASPERLIB="/path_to_directory/Build_WRF/LIBRARIES/grib2/lib"
declare -x LDFLAGS="-L/path_to_directory/Build_WRF/LIBRARIES/grib2/lib"
declare -x NETCDF="/path_to_directory/Build_WRF/LIBRARIES/netcdf"
declare -x PATH="/path_to_directory/Build_WRF/LIBRARIES/mpich/bin:/path_to_directory/Build_WRF/LIBRARIES/netcdf/bin:/
declare -x PWD="/mnt/c/WRF_Folder/TESTS"
declare -x OLDPWD="/mnt/c/WRF_Folder"

and redid the tests

Code:
>>/mnt/c/WRF_Folder/TESTS$ gfortran -c 01_fortran+c+netcdf_f.f
>>/mnt/c/WRF_Folder/TESTS$ gcc -c 01_fortran+c+netcdf_c.c
>>/mnt/c/WRF_Folder/TESTS$ ^C
>>/mnt/c/WRF_Folder/TESTS$ gfortran 01_fortran+c+netcdf_f.o 01_fortran+c+netcdf_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf
>>/mnt/c/WRF_Folder/TESTS$ ./a.out
C function called by Fortran
Values are xx =  2.00 and ii = 1
SUCCESS test 1 fortran + c + netcdf

Code:
>>/mnt/c/WRF_Folder/TESTS$ mpif90 -c 02_fortran+c+netcdf+mpi_f.f
>>/mnt/c/WRF_Folder/TESTS$ mpicc -c 02_fortran+c+netcdf+mpi_c.c
>>/mnt/c/WRF_Folder/TESTS$ mpif90 02_fortran+c+netcdf+mpi_f.o 02_fortran+c+netcdf+mpi_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf
>>/mnt/c/WRF_Folder/TESTS$ mpirun ./a.out
C function called by Fortran
Values are xx =  2.00 and ii = 1
status =            2
SUCCESS test 2 fortran + c + netcdf + mpi

But still the error is shown, without me ever severing the connexion.

Thank you,
 
Hi,
Regarding the path setting:
Code:
>> export -p "Only relevant paths are shown
declare -x CC="gcc"
declare -x CPPFLAGS="-I/path_to_directory/Build_WRF/LIBRARIES/grib2/include"
declare -x CXX="g++"
declare -x DIR="/path_to_directory/Build_WRF/LIBRARIES"
declare -x F77="gfortran"
declare -x FC="gfortran"
declare -x FCFLAGS="-m64"
declare -x FFLAGS="-m64"
declare -x JASPERINC="/path_to_directory/Build_WRF/LIBRARIES/grib2/include"
declare -x JASPERLIB="/path_to_directory/Build_WRF/LIBRARIES/grib2/lib"
declare -x LDFLAGS="-L/path_to_directory/Build_WRF/LIBRARIES/grib2/lib"
declare -x NETCDF="/path_to_directory/Build_WRF/LIBRARIES/netcdf"
declare -x PATH="/path_to_directory/Build_WRF/LIBRARIES/mpich/bin:/path_to_directory/Build_WRF/LIBRARIES/netcdf/bin:/
declare -x PWD="/mnt/c/WRF_Folder/TESTS"
declare -x OLDPWD="/mnt/c/WRF_Folder"

Are you actually setting the paths specifically as indicated above? For example, is your NETCDF path set to:
Code:
/path_to_directory/Build_WRF/LIBRARIES/netcdf

If so, you need to replace "path_to_directory" with the actual directory location on your machine.
Another thing worth mentioning is that if you are building with PGI, some of those settings are very specific to a GNU (gfortran) build, so you'll need to check to make sure you're setting things correctly for a PGI build. The compiling tutorial is meant to be for a build using GNU as a compiler. You may want to try to build with GNU first to make sure you are able to do so. Then if that works, switch to PGI, making sure to set everything correctly for that. You'll need to discuss those settings with a systems administrator at your institution for that information.
 
Haha that's great, can't believe I missed that one.

Thanks that got me through, although now i'm stuck at this error "Error : Not found /mnt/c/WRF_Folder/Build_WRF/LIBRARIES/netcdf-4.1.3/include/netcdf.inc", but I'll try to figure it out myself. Judging from my first mistake, it's probably some silly mistake on my part.

Thanks!
 
Top