Compiling WRF with intel 2023 icx compiler

Anyone has had any success compiling WRF with the new Intel 2023 icx (rather than icc) compiler?

I assume you are refeering to the parts of WRF that require being compiled with C which is mostly the support libraries (hdf5, netcdf, etc). (I’m also assuming you’re referring to the latest and greatest 4.x versions of WRF).

I played around with a lit a little bit, and here are my observations:

The Intel 2023 Fortran parts work as expected, but the C compiler is a bit of a different story starting with 2023.

At first, I just stuck with icc/icpc, but it generated a warning message about this compiler invocation going away by the next release, so we should use icx/icpx instead. I found it does work when substituting icx/icpx for the C compiler.

Normally I use hdf5-1.10.x but I found that this would not compile for me with icx. I downloaded the latest and greatest hdf5, 1.14.0, and compiled with the following configure options:

–enable-fortran --with-pic --with-szlib={myszlib-dir} --with-zlib={myzlib-dir} --with-default-api-version=v110

When building WRF I did have to edit the configure.wrf file after it was generated by configure, substituting the following. Note that I selected dmpar, not dm+sm, so your options may vary:

SFC = ifort
SCC = icx
CCOMP = icx
DM_FC = mpiifort
DM_CC = mpiicc

(At least in. my installation, Intel MPI does not yet have an mpiicx invocation, probably because it is still version 2021.8.0)

WRF compiled just fine for em_real with these options.

For WPS, I had to edit configure.wps post-configure step:

SFC = ifort
SCC = icx
DM_FC = mpiifort
DM_CC = mpiicc

I was able to run a simple test case across a couple of processors. I haven’t had a chance to play with different or more complex cases, but there is nothing to suggest this wouldn’t work. In short, Intel’s updated compiler didn’t throw any real curveballs other than, at least in my instance, requiring me to update my version of hdf5 and building appropriately.

1 Like