# Error in compilation of large domain (814x519x42)

**URL:** <https://forum.croco-ocean.org/t/error-in-compilation-of-large-domain-814x519x42/347>\
**Category:** compilation-installation\
**Tags:** compilation-installation, parallelization\
**Created:** [April 8, 2022, 9:16pm UTC](https://forum.croco-ocean.org/t/error-in-compilation-of-large-domain-814x519x42/347 "2022-04-08T21:16:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndresSepulveda](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/andressepulveda/32/262_2.png) [@AndresSepulveda](https://forum.croco-ocean.org/u/AndresSepulveda)\
**Post date:** [April 8, 2022, 9:16pm UTC](https://forum.croco-ocean.org/t/error-in-compilation-of-large-domain-814x519x42/347/1 "2022-04-08T21:16:57Z")

</div>

Hi,

I have a domain that is

# if defined BENGUELA\_LR

```
  parameter (LLm0=814, MMm0=519, N=42) ! BENGUELA_LR

```

And I can’t compile (MPI and OPENMP) a basic configuration (plus define TIDES) with v1.2.1, the errors are the following

MPI

19.2.187/imkl/2019.2.187/mkl/lib/intel64 -L/home/lmod/software/MPI/intel/2019.2.187-GCC-8.2.0-2.31.1/impi/2019.2.187/imkl/2019.2.187/lib -L/home/lmod/software/MPI/intel/2019.2.187-GCC-8.2.0-2.31.1/impi/2019.2.187/netCDF/4.6.2/lib64 -lnetcdf -lnetcdf -liomp5 -lpthread  
main.o:main\_.f:function MAIN\_\_: error: relocation overflow: reference to ‘scalars\_main\_’  
main.o:main\_.f:function MAIN\_\_: error: relocation overflow: reference to ‘scalars\_main\_’

Full compilation output here

[compile.log](https://forum.croco-ocean.org/uploads/default/original/1X/65095032d6c5d874e613cb58dc7adf6dc2597f5b.log)

something similar goes for OPEMNP

OPENMP

clm\_tides.o:clm\_tides\_.f:function clm\_tides\_tile\_: error: relocation overflow: reference to ‘tides\_ptide\_’  
collect2: error: ld returned 1 exit status  
gmake: \*\*\* [croco] Error 1

Is there a library problem?

---

<div class="post-metadata">

**Author:** ![Rachid](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/rachid/32/296_2.png) [@Rachid](https://forum.croco-ocean.org/u/Rachid)\
**Post date:** [April 11, 2022, 12:31pm UTC](https://forum.croco-ocean.org/t/error-in-compilation-of-large-domain-814x519x42/347/2 "2022-04-11T12:31:56Z")

</div>

Hi Andres

You can try to add -mcmodel=medium or -mcmodel=large to your compilation options

regards

Rachid

---

<div class="post-metadata">

**Author:** ![AndresSepulveda](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/andressepulveda/32/262_2.png) [@AndresSepulveda](https://forum.croco-ocean.org/u/AndresSepulveda)\
**Post date:** [April 11, 2022, 2:02pm UTC](https://forum.croco-ocean.org/t/error-in-compilation-of-large-domain-814x519x42/347/3 "2022-04-11T14:02:41Z")

</div>

Thanks Rachid, that was it.
