# Compiling Nemo 4.0

**URL:** <https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413>\
**Category:** v4.0.x\
**Tags:** gyre\
**Created:** [14 December 2022 13:01 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413 "2022-12-14T13:01:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@arun](https://nemo-ocean.discourse.group/u/arun)\
**Post date:** [14 December 2022 13:01 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413/1 "2022-12-14T13:01:29Z")

</div>

Hi,  
I completed compiling XIOS on a machine running on Ubuntu and now proceeded to compiling NEMO.  
I followed all the instructions on [nemo4.0(beta) webpage](https://nemo-related.readthedocs.io/en/latest/compilation_notes/nemo40.html), created GYRE\_testing and edited the cfg file etc.  
However, when I run ./makenemo as described on the above page, I simply get “compiler not existing”.  
All the compilers named in the relevant.fcm file are searchable with the “which” command in the terminal.  
I am unsure which compiler the make process seems to find missing and/or what I should be doing different compared to the instructions on the webpage.  
Please let me know if there is any further information I could provide that would help in solving this problem.  
Thank you very much in advance!

---

<div class="post-metadata">

**Author:** ![smasson](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@smasson](https://nemo-ocean.discourse.group/u/smasson)\
**Post date:** [15 December 2022 11:06 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413/2 "2022-12-15T11:06:59Z")

</div>

makenemo is not finding your arch file.

Your arch file must be in the arch directory or in one of its subdirectories.

If you do `./makenemo -m XXX`, your arch file must be named `arch-XXX.fcm`

---

<div class="post-metadata">

**Author:** ![arun](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@arun](https://nemo-ocean.discourse.group/u/arun)\
**Post date:** [15 December 2022 12:00 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413/3 "2022-12-15T12:00:16Z")

</div>

Thank you for your reply.  
While the arch file is in the arch directory, your comment lead to me realise that the filename needs to start with arch-. This is not the case on the tutorial on the webpage.  
Now, the compilation starts.  
Thanks for your help!

---

<div class="post-metadata">

**Author:** ![arun](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@arun](https://nemo-ocean.discourse.group/u/arun)\
**Post date:** [15 December 2022 13:42 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413/4 "2022-12-15T13:42:15Z")

</div>

Unfortunately I have run into a new error:  
“Type mismatch between actual argument…”  
In another fortran-based compilation, I have overcome this by adding -fallow-argument-mismatch to the FCflags, but I am not sure how to do this here.  
Could someone help me with this?  
Thanks!

---

<div class="post-metadata">

**Author:** ![arun](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@arun](https://nemo-ocean.discourse.group/u/arun)\
**Post date:** [15 December 2022 14:19 UTC](https://nemo-ocean.discourse.group/t/compiling-nemo-4-0/413/5 "2022-12-15T14:19:27Z")

</div>

Of course the flag can be included in the fcm file!
