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

WRF build with Intel

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.


New member
Hello all again,

I posted a similar question a few months back, but I'd like to formulate it differently: does anybody know of an Intel resource for how to build WRF with their oneAPI toolkit compiler, or for that matter, any resource anywhere ? I keep having problems with my build giving seg faults at executions and I don't know where to begin...

Thank you in advance of your kind help.
Richard H
Hi Richard,

I am not aware of anything specific regarding setting things up for WRF compiling. If you're able to compile successfully, I don't believe the installation of oneAPI would be incorrect. Have you verified that you can execute your WRF simulation to completion when NOT using oneAPI? I doubt this will help, but I have some notes I've written up for myself for installing Intel OneAPI. I'll paste them here and you can see if there is anything drastically different. These notes are somewhat specific to compiling on an Amazon Web Services cloud instance (just FYI).

For HPC computing, you must install both of the following toolkits in the order presented
OneAPI Base Toolkit
OneAPI HPC Toolkit

First go to the OneAPI Base Toolkit page and follow the prompts to select the correct version for your system.
1. Select operating system: Linux
2. Select distribution: web and local
3. Select installer: online
4. Follow “Command Line Download” instructions (enter 'wget' command to obtain code, and then the 'sudo bash' command to initiate the build)

Follow prompts to continue through (I chose to not install GPU or Eclipse)
default install location is /opt/intel/oneapi

After you exit, issue the following commands:
sudo yum update
sudo yum -y install cmake pkgconfig
sudo yum groupinstall “Development Tools”
which cmake pkg-config make gcc g++
you should get

Now install Intel oneAPI HPC Toolkit (that includes the compilers). From the website, choose the same prompts you chose in step 1, and then from your local machine, issue the given 'wget' and then 'sudo bash' commands to obtain the code and initiate installation.

Follow prompts to continue through (I chose to not install GPU or Eclipse)
default install location is /opt/intel/oneapi

Then go to .bashrc and add the following.

source /opt/intel/oneapi/
# settings for building libraries
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 F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CPP='icc -E'
export CXXCPP='icpc -E'
export LD_LIBRARY_PATH=/shared/libs/lib:/shared/libs/netcdf/lib:$LD_LIBRARY_PATH
export LDFLAGS=”-L/shared/libs/lib -L/shared/libs/netcdf/lib”
export CPPFLAGS=”-I/shared/libs/include -I/shared/libs/netcdf/include”

Save the .bashrc and then source it.
source .bashrc

Additional Links:
Get Started Guide:

Developer forum:

Release notes:
I found this thread because I am experimenting with the Intel OneAPI (2021) compilers on Macos (10.15), with mpich 3.4.1. (Actually it is ifort+clang 12.0.0, and I may try to set up ifort+icc.)

WRF 4.3.1 compiles fine, but ideal.exe quits immediately with a "Bus Error", and wrf.exe gives an immediate seg fault.I have no idea what the cause might be, but it hits something bad right away. Other programs (cloud model, test program) compile and run (so far), which suggests the install of intel is OK, at least for less complex programs. My really old version of ifort (2013) + clang still works just fine with WRF (mpich 3.3.2).

I have not tried to compile non-mp or with debugging enabled. I didn't see where Richard said what kind of system he is using (linux?).

-- Ted