# Compiling NEMO 4.2.2 with Intel compilers version 2024

**URL:** <https://nemo-ocean.discourse.group/t/compiling-nemo-4-2-2-with-intel-compilers-version-2024/733>\
**Category:** v4.2.x\
**Tags:** orca\
**Created:** [26 July 2024 14:52 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-2-2-with-intel-compilers-version-2024/733 "2024-07-26T14:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joakim](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/joakim/32/139_2.png) [@joakim](https://nemo-ocean.discourse.group/u/joakim)\
**Post date:** [26 July 2024 14:52 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-2-2-with-intel-compilers-version-2024/733/1 "2024-07-26T14:52:41Z")

</div>

Good afternoon

I’m trying to compile NEMO 4.2.2 on a machine that only has the latest Intel compilers (v 2024.2). With the new versions, the names of the compilers have changed as follows:  
icc → icx  
ifort → ifx  
As I understand, quite a few flags etc have changed with this switch. I managed to get XIOS to compile, but I’m failing on NEMO.

The final error is:  
gmake: \*\*\* No rule to make target ‘nemogcm.o’, needed by ‘nemo.o’. Stop.  
gmake -f /scratch/usr/shkjocke/models\_p3/focioifs-4.0/nemo-ORCA05\_Z46\_SI3\_COUPLED/cfgs/ORCA05\_Z46\_SI3\_COUPLED/BLD/Makefile -j 1 all failed (2) at /scratch/usr/shkjocke/models\_p3/focioifs-4.0/nemo-ORCA05\_Z46\_SI3\_COUPLED/ext/FCM/bin/…/lib/Fcm/Build.pm line 597.  
-\>Make: 0 second  
-\>TOTAL: 19 seconds  
Build failed on Fri Jul 26 16:34:45 2024.

but before that, I get a lot of messages like this:  
icx: command line warning #10430: Unsupported command line options encountered  
These options as listed are not supported.  
For more information, use ‘-qnextgen-diag’.  
option list:  
-traditional  
icx: warning: argument unused during compilation: ‘-I /scratch/usr/shkjocke/models\_p3/focioifs-4.0/nemo-ORCA05\_Z46\_SI3\_COUPLED/cfgs/ORCA05\_Z46\_SI3\_COUPLED/BLD/inc’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-I /sw/comm/impi/mpi/2021.13/include’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-P’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-C’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_si3’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_xios’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_netcdf4’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_nosignedzero’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_qco’ [-Wunused-command-line-argument]  
icx: warning: argument unused during compilation: ‘-D key\_oasis3’ [-Wunused-command-line-argument]

I had a look and I could not find that the “-C”, “-P”, or “-D” flags have changed at all from icc/ifort to icx/ifx.  
[https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-icc-users-to-dpcpp-or-icx.html](https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-icc-users-to-dpcpp-or-icx.html)

I’m a bit lost. Has anyone else managed to compile NEMO with the new “icx” and “ifx” compilers? Is there anything major that I need to change in the arch file? I did not change the arch file since the older Intel versions.

Many thanks  
Joakim

---

<div class="post-metadata">

**Author:** ![joakim](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/joakim/32/139_2.png) [@joakim](https://nemo-ocean.discourse.group/u/joakim)\
**Post date:** [5 August 2024 07:28 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-2-2-with-intel-compilers-version-2024/733/2 "2024-08-05T07:28:01Z")

</div>

After posting the same issue to the Intel community forum I realised that the way forward is to not use the C compiler to preprocess:

```auto
%CPP ${CC} -E

```

but to instead use the system preprocessor:

```auto
%CPP cpp -P 
%FPPFLAGS -P -traditional

```

I suppose the preprocessing was supported with older versions (icc) but not the new (icx).

/Joakim
