Small confusion in configuration for compiling with oneAPI tools

satjemkes

Member
The latest distribution of WPS (4.7.0) has a minor mistake in the configuration for oneAPI. Unless this is done on purpose, but the DM_FC variable should point to the mpiifx script in the oneAPI distribution. The standard configuration points to mpifort, which is also distributed but it loads the gfortran compiler and not the ifx compiler. Hence for consistency reasons the mpiifx script should be used. Unless of course there is a good reason to use the gnu compiler with mpi. This would be interesting to learn.
stephen
 
The latest distribution of WPS (4.7.0) has a minor mistake in the configuration for oneAPI. Unless this is done on purpose, but the DM_FC variable should point to the mpiifx script in the oneAPI distribution. The standard configuration points to mpifort, which is also distributed but it loads the gfortran compiler and not the ifx compiler. Hence for consistency reasons the mpiifx script should be used. Unless of course there is a good reason to use the gnu compiler with mpi. This would be interesting to learn.
stephen
I just looked at the arch config and I see this:


C:
########################################################################################################################
#ARCH    Linux x86_64, Intel oneAPI compilers   # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS    = CONFIGURE_COMP_L
COMPRESSION_INC     = CONFIGURE_COMP_I
FDEFS               = CONFIGURE_FDEFS
SFC                 = ifx
SCC                 = icx
DM_FC               = mpif90
DM_CC               = mpicc
FC                  = CONFIGURE_FC
CC                  = CONFIGURE_CC
LD                  = $(FC)
FFLAGS              = -FR -convert big_endian
F77FLAGS            = -FI -convert big_endian
FCSUFFIX            =
FNGFLAGS            = $(FFLAGS)
LDFLAGS             =
CFLAGS              = -w
CPP                 = /lib/cpp -P -traditional
CPPFLAGS            = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 CONFIGURE_MPI
ARFLAGS             =
CC_TOOLS            =
 
Yeah that is a typo from my side. I should have referred to mpif90 in the standard configuration file.

mpif90 maps onto gfortran.

I installed a fresh copy of ubuntu 26.04 and installed a recent version of intel oneAPI (not sure if there is a more recent one)

/opt/intel/oneapi/mpi/2021.18/bin

As I had no gnu fortran installed (yet), compilation of WPS failed because the mpif90 points to gfortran (at line 127 FC=gfortran in the script).

The mpiifort (I believe ifort is the previous name of the ifx compiler) points to the mpiifx wrapper (mpiifort, mpif90 and mpiifx are "readible" csh scripts).

Hence maybe 99% of the users will have a gfortran compiler installed along side of the intel ones, and as the mpif90 wrapper will find the gfortran compiler hence in 99% of the cases compilation is successful.

But it might lead to an inconsistency, i have no idea if you have a mixed setup (oneAPI and gnu in parallel as for 99% of the cases) which e.g. MPI.mod will be loaded.

Hence the configuration for the oneAPI set of compilers should point to either mpiifort but better mpiifx as my understanding is that ifort is renamed into ifx to have a consistent naming with the c-compiler (icx)


In the end after switching to mpiifx in the configuration file I was able to compile WPS successfully, but have not tested the executables.
 
Yeah that is a typo from my side. I should have referred to mpif90 in the standard configuration file.

mpif90 maps onto gfortran.

I installed a fresh copy of ubuntu 26.04 and installed a recent version of intel oneAPI (not sure if there is a more recent one)

/opt/intel/oneapi/mpi/2021.18/bin

As I had no gnu fortran installed (yet), compilation of WPS failed because the mpif90 points to gfortran (at line 127 FC=gfortran in the script).

The mpiifort (I believe ifort is the previous name of the ifx compiler) points to the mpiifx wrapper (mpiifort, mpif90 and mpiifx are "readible" csh scripts).

Hence maybe 99% of the users will have a gfortran compiler installed along side of the intel ones, and as the mpif90 wrapper will find the gfortran compiler hence in 99% of the cases compilation is successful.

But it might lead to an inconsistency, i have no idea if you have a mixed setup (oneAPI and gnu in parallel as for 99% of the cases) which e.g. MPI.mod will be loaded.

Hence the configuration for the oneAPI set of compilers should point to either mpiifort but better mpiifx as my understanding is that ifort is renamed into ifx to have a consistent naming with the c-compiler (icx)


In the end after switching to mpiifx in the configuration file I was able to compile WPS successfully, but have not tested the executables.
Yeah, I brought this up with ncar before i believe it was with @islas or @mgduda that told me because it's a wrapper that's why it isn't included in the arch.
 
Back
Top