# Cannot run model for more than 70 years/compiling model with 64 bit integers

**URL:** <https://nemo-ocean.discourse.group/t/cannot-run-model-for-more-than-70-years-compiling-model-with-64-bit-integers/497>\
**Category:** v4.2.x\
**Created:** [30 April 2023 14:39 UTC](https://nemo-ocean.discourse.group/t/cannot-run-model-for-more-than-70-years-compiling-model-with-64-bit-integers/497 "2023-04-30T14:39:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samar](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Samar](https://nemo-ocean.discourse.group/u/Samar)\
**Post date:** [30 April 2023 14:39 UTC](https://nemo-ocean.discourse.group/t/cannot-run-model-for-more-than-70-years-compiling-model-with-64-bit-integers/497/1 "2023-04-30T14:39:46Z")

</div>

Hello, I’m trying to do a long model spin-up with NEMO 4.2. This is for GYRE\_PISCES, although that doesn’t really matter. I set nn\_itend=12960000 to do a 3000 year long spin-up and got this error:

===\>\>\> : E R R O R

```
      ===========

```

The number of seconds between each restart exceeds the integer 4 max value: 2^31-1.  
You must do a restart at higher frequency (or remove this stop and recompile the code in I8)

That led me to reduce nn\_stock but I kept getting the same error (even when nn\_stock=0). Looking at daymod.F90 the offending line of code is:  
IF( REAL( nitend - nit000 + 1 ) \* rn\_Dt \> REAL( HUGE( nsec1jan000 ) ) ) THEN

What that means is I basically can’t integrate the model for more than ~68 years (2^31/86400/365) in a single run. I don’t understand why there should be such a restriction but in any case I tried compiling the model with the -fdefault-integer-8 gfortran flag. This throws a whole bunch of compilation errors like:

2066 | CALL mpi\_abort( MPI\_COMM\_WORLD, 123, info )  
| 1  
Error: There is no specific subroutine for the generic ‘mpi\_abort’ at (1)

This leads me to think I need to rebuild my MPI with the same flag and potentially also hdf5, netcdf-fortran, etc. Which is an awful lot of trouble.

Can someone please tell me how to get around this restriction of run length?

Thanks very much!

Samar
