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

How to Install WRF/WPS with Intel Classic Compilers

Good morning to all WRF (Weather Research and Forecasting model) users,

As many of you might be aware, there are comprehensive tutorials and guides available for installing WRF using GNU compilers. These can be accessed at the following links:
- [NCAR WRF Online Tutorial] Compiling WRF
- [UCAR Forum: Full WRF and WPS Installation Example (GNU)] Full WRF and WPS Installation Example (GNU)

These resources provide an excellent starting point for anyone looking to install WRF with GNU compilers.

However, when it comes to using Intel Classic Compilers (applicable to versions 2023 and earlier), there are additional considerations to keep in mind. It's important to note that Intel has discontinued the Classic Compilers, transitioning instead to the LLVM-based Intel OneAPI compilers. For more detailed information about Intel's LLVM compilers, you can refer to the following resource: [Getting to Know LLVM-based Intel oneAPI Compilers] Get to Know Intel's LLVM-Based oneAPI Compilers.

For users of Intel Classic Compilers, it is essential to source the installation file for these compilers. This is typically done using the following command:

Bash:
    # add the Intel compiler file paths to various environment variables
    source /opt/intel/oneapi/setvars.sh

For those using Intel Classic Compilers, the following environment variables need to be set in your system:


Bash:
export CC=icc
export CXX=icpc
export FC=ifort
export F77=ifort
export F90=ifort
export CFLAGS="-fPIC -fPIE -O3 -diag-disable=10441"
export FFLAGS="-m64"
export FCFLAGS="-m64"


These settings configure the Intel compilers for optimal performance and compatibility with WRF. By setting these environment variables, you ensure that the Intel compilers are correctly configured for compiling the WRF code.

Once these environment variables are set, you can proceed with the installation as outlined in the NCAR tutorials. Following these guidelines should allow for a smooth installation process using the Intel Classic Compilers.

Remember, while the Intel Classic Compilers are still viable for current installations, it's advisable to start familiarizing yourself with the LLVM-based compilers, as they represent the future direction of Intel's compiler technology.
 
Thank you Sir. This was helpful. I ask out of curiosity.. I could not find mentions on what compiler versions are to be used for WRF anywhere..not the guide nor the README files. How'd you figure out what works and what wouldn't.
 
Thank you Sir. This was helpful. I ask out of curiosity.. I could not find mentions on what compiler versions are to be used for WRF anywhere..not the guide nor the README files. How'd you figure out what works and what wouldn't.
@Vaishnavi_198

When you say compiler versions what do you mean?

when you run ./configure you get these options

WRF
Bash:
------------------------------------------------------------------------
Please select from among the following Linux x86_64 options:

  1. (serial)   2. (smpar)   3. (dmpar)   4. (dm+sm)   PGI (pgf90/gcc)
  5. (serial)   6. (smpar)   7. (dmpar)   8. (dm+sm)   PGI (pgf90/pgcc): SGI MPT
  9. (serial)  10. (smpar)  11. (dmpar)  12. (dm+sm)   PGI (pgf90/gcc): PGI accelerator
 13. (serial)  14. (smpar)  15. (dmpar)  16. (dm+sm)   INTEL (ifort/icc)
                                         17. (dm+sm)   INTEL (ifort/icc): Xeon Phi (MIC architecture)
 18. (serial)  19. (smpar)  20. (dmpar)  21. (dm+sm)   INTEL (ifort/icc): Xeon (SNB with AVX mods)
 22. (serial)  23. (smpar)  24. (dmpar)  25. (dm+sm)   INTEL (ifort/icc): SGI MPT
 26. (serial)  27. (smpar)  28. (dmpar)  29. (dm+sm)   INTEL (ifort/icc): IBM POE
 30. (serial)               31. (dmpar)                PATHSCALE (pathf90/pathcc)
 32. (serial)  33. (smpar)  34. (dmpar)  35. (dm+sm)   GNU (gfortran/gcc)
 36. (serial)  37. (smpar)  38. (dmpar)  39. (dm+sm)   IBM (xlf90_r/cc_r)
 40. (serial)  41. (smpar)  42. (dmpar)  43. (dm+sm)   PGI (ftn/gcc): Cray XC CLE
 44. (serial)  45. (smpar)  46. (dmpar)  47. (dm+sm)   CRAY CCE (ftn $(NOOMP)/cc): Cray XE and XC
 48. (serial)  49. (smpar)  50. (dmpar)  51. (dm+sm)   INTEL (ftn/icc): Cray XC
 52. (serial)  53. (smpar)  54. (dmpar)  55. (dm+sm)   PGI (pgf90/pgcc)
 56. (serial)  57. (smpar)  58. (dmpar)  59. (dm+sm)   PGI (pgf90/gcc): -f90=pgf90
 60. (serial)  61. (smpar)  62. (dmpar)  63. (dm+sm)   PGI (pgf90/pgcc): -f90=pgf90
 64. (serial)  65. (smpar)  66. (dmpar)  67. (dm+sm)   INTEL (ifort/icc): HSW/BDW
 68. (serial)  69. (smpar)  70. (dmpar)  71. (dm+sm)   INTEL (ifort/icc): KNL MIC
 72. (serial)  73. (smpar)  74. (dmpar)  75. (dm+sm)   AMD (flang/clang) :  AMD ZEN1/ ZEN2/ ZEN3 Architectures
 76. (serial)  77. (smpar)  78. (dmpar)  79. (dm+sm)   INTEL (ifx/icx) : oneAPI LLVM
 80. (serial)  81. (smpar)  82. (dmpar)  83. (dm+sm)   FUJITSU (frtpx/fccpx): FX10/FX100 SPARC64 IXfx/Xlfx

WPS

Bash:
Please select from among the following supported platforms.

   1.  Linux x86_64, gfortran    (serial)
   2.  Linux x86_64, gfortran    (serial_NO_GRIB2)
   3.  Linux x86_64, gfortran    (dmpar)
   4.  Linux x86_64, gfortran    (dmpar_NO_GRIB2)
   5.  Linux x86_64, PGI compiler   (serial)
   6.  Linux x86_64, PGI compiler   (serial_NO_GRIB2)
   7.  Linux x86_64, PGI compiler   (dmpar)
   8.  Linux x86_64, PGI compiler   (dmpar_NO_GRIB2)
   9.  Linux x86_64, PGI compiler, SGI MPT   (serial)
  10.  Linux x86_64, PGI compiler, SGI MPT   (serial_NO_GRIB2)
  11.  Linux x86_64, PGI compiler, SGI MPT   (dmpar)
  12.  Linux x86_64, PGI compiler, SGI MPT   (dmpar_NO_GRIB2)
  13.  Linux x86_64, IA64 and Opteron    (serial)
  14.  Linux x86_64, IA64 and Opteron    (serial_NO_GRIB2)
  15.  Linux x86_64, IA64 and Opteron    (dmpar)
  16.  Linux x86_64, IA64 and Opteron    (dmpar_NO_GRIB2)
  17.  Linux x86_64, Intel compiler    (serial)
  18.  Linux x86_64, Intel compiler    (serial_NO_GRIB2)
  19.  Linux x86_64, Intel compiler    (dmpar)
  20.  Linux x86_64, Intel compiler    (dmpar_NO_GRIB2)
  21.  Linux x86_64, Intel compiler, SGI MPT    (serial)
  22.  Linux x86_64, Intel compiler, SGI MPT    (serial_NO_GRIB2)
  23.  Linux x86_64, Intel compiler, SGI MPT    (dmpar)
  24.  Linux x86_64, Intel compiler, SGI MPT    (dmpar_NO_GRIB2)
  25.  Linux x86_64, Intel compiler, IBM POE    (serial)
  26.  Linux x86_64, Intel compiler, IBM POE    (serial_NO_GRIB2)
  27.  Linux x86_64, Intel compiler, IBM POE    (dmpar)
  28.  Linux x86_64, Intel compiler, IBM POE    (dmpar_NO_GRIB2)
  29.  Linux x86_64 g95 compiler     (serial)
  30.  Linux x86_64 g95 compiler     (serial_NO_GRIB2)
  31.  Linux x86_64 g95 compiler     (dmpar)
  32.  Linux x86_64 g95 compiler     (dmpar_NO_GRIB2)
  33.  Cray XE/XC CLE/Linux x86_64, Cray compiler   (serial)
  34.  Cray XE/XC CLE/Linux x86_64, Cray compiler   (serial_NO_GRIB2)
  35.  Cray XE/XC CLE/Linux x86_64, Cray compiler   (dmpar)
  36.  Cray XE/XC CLE/Linux x86_64, Cray compiler   (dmpar_NO_GRIB2)
  37.  Cray XC CLE/Linux x86_64, Intel compiler   (serial)
  38.  Cray XC CLE/Linux x86_64, Intel compiler   (serial_NO_GRIB2)
  39.  Cray XC CLE/Linux x86_64, Intel compiler   (dmpar)
  40.  Cray XC CLE/Linux x86_64, Intel compiler   (dmpar_NO_GRIB2)

Enter selection [1-40] :
 
For example, when i do module avail i see
intel/2020.1.217
intel/2020.2.254
intel/2020.2.304

which do i use?
because in this post(Building WRF --- 'undefined references to **** problems building executables') you had told that installation issue was due to gcc version. I want to know how one would be able to understand which compiler and compiler version has to be used.
I didn't know you were using intel compilers, so ignore the gcc comment.
as for which one to use...I would go with the most recent one which is 2020.2.304 but that's just personal preference. IF you have questions about the compilers themselves you have to ask your system admin who manages the intel compiler builds.
 
Dear sir, thank you. Now oneapi updates with 2024 (llvm) icx, ifx... etc. What should be the exports for compilers & flags etc? It would be great if you please help us.
 
Last edited:
Top