WRF v4.4 Compilation error: Can't find an intrinsic module named 'ieee_arithmetic'

k.kedia

New member
Hi all,

I am trying to compile WRF v4.4 on my institute HPC but the compilation is failing to generate the executables.
I am receiving the following warning during wrf compilation:

************************** W A R N I N G ************************************

There are some IEEE Fortran 2003 features in WRF that your compiler does not recognize. The IEEE function calls have been removed.

*****************************************************************************

I then receive the following error during compilation (log.compile attached):

module_firebrand_spotting.f90:12.21:
USE, INTRINSIC :: IEEE_ARITHMETIC
1
Fatal Error: Can't find an intrinsic module named 'ieee_arithmetic' at (1)
0.05user 0.06system 0:00.11elapsed 97%CPU (0avgtext+0avgdata 6528maxresident)k184inputs+16outputs (0major+13460minor)pagefaults 0swaps
make[3]: [module_firebrand_spotting.o] Error 1 (ignored)

My compiler details are:
>gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
>gfortran --version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

My WRF version details are
>git log
commit c11bb76939647c4073e9a105ae00faaef55ca7fd
Merge: f10d917 dd4de64

I found a similar issue on this thread and this thread but could not find a suitable solution.
Furthermore, the compilation was successful on my laptop (Ubuntu 20.04). Thus, I would like to know if this is a fortran compiler related issue.

Please suggest a sustainable fix for this issue.

Thank you
Krishna
 

Attachments

  • configure.wrf.txt
    20.7 KB · Views: 1
  • log.compile.txt
    754.3 KB · Views: 1

kwerner

Administrator
Staff member
Hi Krishna,
The version of GNU you are using is very old and outdated. Since GNU/gfortran is a free compiler, can you (or a system admin at your institution) update to a newer version and try again? The newer WRF code is developed to comply with some of the more-recent versions of the compilers.
 

sadya_islam20

New member
Hi Krishna,
The version of GNU you are using is very old and outdated. Since GNU/gfortran is a free compiler, can you (or a system admin at your institution) update to a newer version and try again? The newer WRF code is developed to comply with some of the more-recent versions of the compilers.


Hi Kelly,

I am also trying to compile WRF v4.4 on my institute HPC (with vortex following option). I have some questions:
1. I am following the compilation tutorial exactly (Compiling WRF). In that case, after the
./configure command, there are 75 options, and I chose 34. (dmpar). Is it the correct one?

2. I am also getting "Fatal Error: Can't find an intrinsic module named 'ieee_arithmetic' at (1)" this error. I am attaching my configure and log file.
My compiler details are:
>gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
>gfortran --version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

Would upgrading those compilers only solves the issues?

Thanks!
 

Attachments

  • configure.wrf.txt
    20.8 KB · Views: 0
  • log.compile.txt
    773.3 KB · Views: 1

k.kedia

New member
Hi Sadya,

I think I can help you with this.
I think option 34 is the standard option to choose for gcc compiler and seeing your compiler configuration I think it is the right one.
Also, my system administrator informed me that I can use the following command to use an updated fortran compiler to avoid the IEEE arithmetic error. The command is: module load gcc-6.4
This loads the gfortran compiler of later version than the 4.8.5 installed in your system and any gfortran version from 5.0 onwards should have the IEEE arithmetic features.
Since your system administrator may have installed a different gfortran version in addition to the standard 4.8.5, you can check the available additional gfortran versions by issuing the following command in your home directory in the HPC: module avail
The above should inform you of other gcc compiler versions that may be installed in your system. I have also attached a screenshot of what it looks like for my institute HPC.

Additionally, after following the above steps, your wrf.exe will now be compiled with a later gcc version than in your system. Thus, if you later submit a job using slurm or PBS script to run your wrf simulation, make sure to add the "module load" command before the wrf execution command in the script since the computation nodes will also be required to load this updated gcc version rather than the standard version which is installed across all nodes (head and computation).

I hope the above steps help. You can find more information on "module" command on this link.

Cheers
Krishna
 

Attachments

  • module avail.png
    module avail.png
    23.4 KB · Views: 2

sadya_islam20

New member
Hi Sadya,

I think I can help you with this.
I think option 34 is the standard option to choose for gcc compiler and seeing your compiler configuration I think it is the right one.
Also, my system administrator informed me that I can use the following command to use an updated fortran compiler to avoid the IEEE arithmetic error. The command is: module load gcc-6.4
This loads the gfortran compiler of later version than the 4.8.5 installed in your system and any gfortran version from 5.0 onwards should have the IEEE arithmetic features.
Since your system administrator may have installed a different gfortran version in addition to the standard 4.8.5, you can check the available additional gfortran versions by issuing the following command in your home directory in the HPC: module avail
The above should inform you of other gcc compiler versions that may be installed in your system. I have also attached a screenshot of what it looks like for my institute HPC.

Additionally, after following the above steps, your wrf.exe will now be compiled with a later gcc version than in your system. Thus, if you later submit a job using slurm or PBS script to run your wrf simulation, make sure to add the "module load" command before the wrf execution command in the script since the computation nodes will also be required to load this updated gcc version rather than the standard version which is installed across all nodes (head and computation).

I hope the above steps help. You can find more information on "module" command on this link.

Cheers
Krishna


Hi Krishna,

Thank you so much for your help. I am sorry for replying so late as I was out of town for several days. I followed your way and was able to compile WRF properly. But now I am facing issues to compile WPS (in metgrid part). Following your instruction, I started with "module load gcc/8.3.0". WRF and WPS directories are listed in the following path:
/Users/sadislam/WRF/WRF-4.4.0
/Users/sadislam/WRF/WPS-4.4

My compiler details are:
> gcc --version
gcc (GCC) 8.3.0
> gfortran --version
GNU Fortran (GCC) 8.3.0

The first error in the log file is " Fatal Error: Cannot read module file ‘netcdf.mod’ opened at (1), because it was created by a different version of GNU Fortran compilation terminated."

I attached my configure and log.compile files. Did you face such issues? Do you have idea how to fix it?
 

Attachments

  • configure_wps.txt
    3.5 KB · Views: 1
  • log_compile_wps.txt
    105.8 KB · Views: 0

k.kedia

New member
Hi Sadya,

This type of error is generally due to improper library installation.
Since you are now using a different gfortran compiler version, you will need to install your libraries again.
So I am assuming you are following the procedure on WRF website for configuring WRF. Thus, once you use the module load gcc/8.3.0 command, you will need to install your netcdf, mpich, libpng, Jasper, and zlib libraries again so that they are now built with the new compiler version. This should resolve your netcdf.mod error.

I received the same error after using the updated gfortran version and I forgot to mention this point in my previous response. Hopefully, reinstalling your libraries should resolve the issue for you as it did for me.

Do let me know how it goes.

Cheers
Krishna
 

sadya_islam20

New member
Hi Sadya,

This type of error is generally due to improper library installation.
Since you are now using a different gfortran compiler version, you will need to install your libraries again.
So I am assuming you are following the procedure on WRF website for configuring WRF. Thus, once you use the module load gcc/8.3.0 command, you will need to install your netcdf, mpich, libpng, Jasper, and zlib libraries again so that they are now built with the new compiler version. This should resolve your netcdf.mod error.

I received the same error after using the updated gfortran version and I forgot to mention this point in my previous response. Hopefully, reinstalling your libraries should resolve the issue for you as it did for me.

Do let me know how it goes.

Cheers
Krishna


Hi Krishna,

Thanks so much again. I did all the steps again and this time it worked.

I have another question. I installed WRF in my home folder in HPC. Now I cannot do "module load WRF/V4.4" before using WRF. Do you have any idea about that?

Again, really appreciate your help.

Sadya
 

k.kedia

New member
Hi Sadya,

I haven't used the module load command for in context of WRF versions so I am not entirely sure about this.
Have you been using "module load WRF/V4.4" command before this?
If yes, could you please issue the "module avail" command in your home directory and attach a screenshot of it. The folders you will see are the ones "module load" command will search for installed modulefiles of various libraries or compilers.

According to my understanding I don't think that you need to issue the "module load WRF/V4.4" command before using WRF. Typically "module load" command is used for loading libraries or compilers of different versions. Once you have issued the "module load gcc/8.3.0" command and installed your libraries again, you can proceed with the WRF compilation process as in the tutorial. You need to ensure two things:

1. Your WPS and WRF directories are at the same level. Based on your earlier response, I think you might have to reorganise and bring the WRF and WPS directories in the same folder.

2. Ensure that you issue the "module load gcc/8.3.0" command each time you login in to your terminal. For convenience you may add this command to your .bashrc file to avoid manually issuing this command at every login.

Happy to help if you need any further assistance.

Krishna
 

sadya_islam20

New member
Hi Sadya,

I haven't used the module load command for in context of WRF versions so I am not entirely sure about this.
Have you been using "module load WRF/V4.4" command before this?
If yes, could you please issue the "module avail" command in your home directory and attach a screenshot of it. The folders you will see are the ones "module load" command will search for installed modulefiles of various libraries or compilers.

According to my understanding I don't think that you need to issue the "module load WRF/V4.4" command before using WRF. Typically "module load" command is used for loading libraries or compilers of different versions. Once you have issued the "module load gcc/8.3.0" command and installed your libraries again, you can proceed with the WRF compilation process as in the tutorial. You need to ensure two things:

1. Your WPS and WRF directories are at the same level. Based on your earlier response, I think you might have to reorganise and bring the WRF and WPS directories in the same folder.

2. Ensure that you issue the "module load gcc/8.3.0" command each time you login in to your terminal. For convenience you may add this command to your .bashrc file to avoid manually issuing this command at every login.

Happy to help if you need any further assistance.

Krishna
I need to use the "module load" command before running WPS and WRF (not for installing WRF). I attached the job script that I used for submitting jobs previously. The previous version of WRF was centrally installed in our HPC. Now, I installed the V4.4 in my home folder in HPC and can't do the module load anymore.
 

Attachments

  • wrf.sh.txt
    194 bytes · Views: 2

k.kedia

New member
Hi Sadya,

Based on my understanding of module command, I think you will have to contact your system administrator in this scenario to setup the WRF V4.4 centrally. As you can see in the image I attached in one of the previous responses, the module avail commands searches these 3 (/usr/share/Modules, /etc/Modulefiles, /soft/Modules-SL7) common folders for available modules and loads the desired module from there. You will have to check what these shared folders are for your HPC using module avail command and if a WRF4.4 module isn't available in one of these, then you will need assistance of your system administrators to build the same.
 
Top