The OASIS Coupler Forum

  HOME

compiling OASIS-MCT

Up to Installation and compilation

Posted by Anonymous at December 19 2023

Hello,
I want to compile OASIS-MCT so that i can couple WRF and CROCO model. But I am unbale to compile. I am using Ubuntu 20.04 version where g++ and gfortran version GNU(9.4.0). Can anyone help me by give me proper steps to compile OASIS MCT.

Posted by Anonymous at December 19 2023

Hi,

Steps to compile OASIS3-MCT are described in section 6.1 of the User Guide;
https://oasis.cerfacs.fr/wp-content/uploads/sites/114/2022/03/GLOBC_TR_Valcke_oasis3mct50_2021.pdf

You have to create a header Makefile adapted to your platform. I think there is no specific header Makefile for Ubuntu with the distribution but you should be able to create one. Maybe someone followng this forum will be able to answer you more precisely?

  With best regards,
  Sophie, for the oasis team

Posted by Anonymous at December 20 2023

Hello, 
When I try to compile showing error in 
Terminal: 
make[1]: *** [TopMakefileOasis3:246: makescrip-static] Error 2
make: *** [TopMakefileOasis3:93: static-libs-fortran] Error 2

in COMP.err:

  719 | 1120                 FORMAT ('      STORE add1,add2,blon,blat,ilon,ilat,WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:719:132:

  719 | 1120                 FORMAT ('      STORE add1,add2,blon,blat,ilon,ilat,WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:720:132:

  720 | 1121                 FORMAT ('      overlap STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:720:132:

  720 | 1121                 FORMAT ('      overlap STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:721:132:

  721 | 1122                 FORMAT ('      lfracnei STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:721:132:

  721 | 1122                 FORMAT ('      lfracnei STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected end of format string in format string at (1)
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:728:119:

  728 |                               write(nulou,1120) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                       1
Error: FORMAT label 1120 at (1) not defined
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:736:122:

  736 |                                  write(nulou,1121) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                          1
Error: FORMAT label 1121 at (1) not defined
/home/awlad/oasis/oasis3-mct/lib/scrip/src/remap_conserv.F90:1340:119:

 1340 |                               write(nulou,1120) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                       1
Error: FORMAT label 1120 at (1) not defined
f951: some warnings being treated as errors
make[2]: *** [Makefile:42: remap_conserv.o] Error 1


It seems that When try to make compile makescrip it showing fortran formating error. 

Thank you.

Posted by Anonymous at March 16 2024

Yo,

the "Error: Line truncated at (1) [-Werror=line-truncation]" points to a line in the code that's too long for your compiler's taste, usually set to a max of 132 characters for gfortran. You can remove this limit by adding the compiler flag -ffree-line-length-none and see whether the error is gone. All other errors seem to be a consequence of the truncation. See the link below for more info: 

https://stackoverflow.com/questions/19311766/gfortran-line-length-limit

After 4 months I assume that you either figured it out or [EDITED], but just in case someone else from the future finds themself in a similar situation.

Love,
Jorjo, from the past.

Posted by Anonymous at July 10 2025

Hello Jorjo, 
could you kindly point out where exactly (which line of code) in the TopMakefileOasis3 file for compilation I should add this compiler flag (-ffree-line-length-none)?
As I'm facing the same truncation error.
Thanks a lot in advance,
Tonia.

Posted by Anonymous at July 10 2025

Hi,
You should not add the compiler flags in the TopMakefileOasis3 but in the variable F90FLAGS in your header makefile (i.e. your specific header that is included in the make.inc).
  Hoping this helps,
 Sophie

Posted by Anonymous at July 11 2025

Dear Sophie, 
thanks a lot for your prompt answer!
I have then added the compiler flag in the make_ubuntu script, at line 44 in the following way:

# CPP keys and compiler options
# 
CPPDEF    = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY
#
# 
F90FLAGS_1  = -ffixed-line-length-none 
f90FLAGS_1  = $(F90FLAGS_1)
FFLAGS_1    = $(F90FLAGS_1)
fFLAGS_1    = $(F90FLAGS_1)
CCFLAGS_1   = 
LDFLAGS     = 
#
###################


Is this the correct location for it?
Because when I compile I get again an error, slightly different from the previous, but apparently still concerning the formatting of the code:

Warning: Unused variable ‘dl_test’ declared at (1) [-Wunused-variable]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:719:132:

  719 | 1120                 FORMAT ('      STORE add1,add2,blon,blat,ilon,ilat,WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:719:132:

  719 | 1120                 FORMAT ('      STORE add1,add2,blon,blat,ilon,ilat,WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:720:132:

  720 | 1121                 FORMAT ('      overlap STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:720:132:

  720 | 1121                 FORMAT ('      overlap STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:721:132:

  721 | 1122                 FORMAT ('      lfracnei STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:721:132:

  721 | 1122                 FORMAT ('      lfracnei STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected end of format string in format string at (1)
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:728:119:

  728 |                               write(nulou,1120) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                       1
Error: FORMAT label 1120 at (1) not defined
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:736:122:

  736 |                                  write(nulou,1121) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                          1
Error: FORMAT label 1121 at (1) not defined
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:1340:119:

 1340 |                               write(nulou,1120) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                       1
Error: FORMAT label 1120 at (1) not defined
f951: some warnings being treated as errors

Posted by Anonymous at July 12 2025

Hum, I am not sure. Look at your COMP.log and COMP.err files, you will have exactly the lines used for compilation.
I am surprised that it looks like the compilation is trying to include a pio library that has nothing to do with OASIS3-MCT (but most probably with CROCO?
  Good luck,
 Sophie
PS: I am off next week, coming back on the 22hd.

Posted by Anonymous at July 13 2025

Hi Tonia,
Try this: 
-ffixed-line-length-none -Wno-line-truncation
Let me know.
Best,
*

Posted by Anonymous at July 15 2025

Hello,
thank you so much for your advise!
So I added the flag you indicated in make_ubuntu in this way:

###############################################################################
#
# CHAN	: communication technique used in OASIS3 (MPI1/MPI2/NONE)
CHAN            = MPI1
#
# Paths for libraries, object files and binaries
#
# COUPLE	: path for oasis3-mct main directory
COUPLE          = /home/pc330/Downloads/croco/oasis3-mct
#
# ARCHDIR       : directory created when compiling
ARCHDIR         = $(COUPLE)/../compile_oa3-mct
#
# MPI library
MPIDIR      = /usr
MPIBIN      = $(MPIDIR)/bin
MPI_INCLUDE = $(MPIDIR)/include
MPILIB      = -L$(MPIDIR)/lib 
#
# NETCDF library
NETCDF_INCLUDE  = /usr/include
NETCDF_LIBRARY  = -L/usr/lib -lnetcdff
#
# Compiling and other commands
MAKE        = gmake 
F90         = $(MPIBIN)/mpif90 -Wall -I$(MPI_INCLUDE)
F           = $(F90)
f90         = $(F90)
f           = $(F90)
CC          = gcc -I$(MPI_INCLUDE)
LD          = $(MPIBIN)/mpif90 $(MPILIB)
AR          = ar
ARFLAGS     = -ruv
#
# CPP keys and compiler options
# 
CPPDEF    = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY
#
# 
F90FLAGS_1  = -ffixed-line-length-none -Wno-line-truncation
f90FLAGS_1  = $(F90FLAGS_1)
FFLAGS_1    = $(F90FLAGS_1)
fFLAGS_1    = $(F90FLAGS_1)
CCFLAGS_1   =
LDFLAGS     = 
#
###################

But I now get no compilation at all, with the following messages in COMP_err:

configure: error: in `/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details

And this in COMP_log:

checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc -I/usr/include  accepts -g... yes
checking for gcc -I/usr/include  option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking whether the compiler supports GNU Fortran... yes
checking whether /usr/bin/mpif90 -Wall -I/usr/include  accepts -g... yes
checking for Fortran flag to compile .F90 files... none
checking for mpif90... /usr/bin/mpif90 -Wall -I/usr/include 
checking for MPI_Init... no
checking for MPI_Init in -lfmpi... no
checking for MPI_Init in -lmpichf90... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
Checking Compiler Version
checking how to get the version output from /usr/bin/mpif90 -Wall -I/usr/include ... --version
checking for Fortran flag to compile preprocessed .F files... none
checking how to define symbols for preprocessed Fortran... -D
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to get verbose linking output from /usr/bin/mpif90 -Wall -I/usr/include ... -v
checking for Fortran libraries of /usr/bin/mpif90 -Wall -I/usr/include ...  -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lmpichfort -lmpich -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran libraries... unknown

Do you have any idea on how to solve this?
Thanks a lot in advance!!!

Posted by Anonymous at July 20 2025

Hi,
Its shows that: 
checking for MPI_Init in -lmpi... no    (NO)

Please check :
which mpif90
which mpicc


make sure this are correct or not! in your case

# MPI library
MPIDIR      = /usr      (here)
MPIBIN      = $(MPIDIR)/bin
MPI_INCLUDE = $(MPIDIR)/include
MPILIB      = -L$(MPIDIR)/lib 



or directly use: 
1.
export FC=mpif90
export CC=mpicc
2.
# Compiling and other commands
MAKE        = make
F90         = mpif90
F           = $(F90)
f90         = $(F90)
f           = $(F90)
CC          = mpicc
LD          = $(F90)
AR          = ar
ARFLAGS     = -ruv


Let me know.
Best,
*

Posted by Anonymous at July 21 2025

Hi there,
the result of 'which mpif90' and 'which mpicc' is '/usr/bin/mpif90' and '/usr/bin/mpicc', respectively 
But anyways I added the lines you suggested in the make_ubuntu script in the following way:

# ARCHDIR       : directory created when compiling
ARCHDIR         = $(COUPLE)/../compile_oa3-mct
#

#
# NETCDF library
NETCDF_INCLUDE  = /usr/include
NETCDF_LIBRARY  = -L/usr/lib -lnetcdff

export FC=mpif90
export CC=mpicc

# Compiling and other commands
MAKE        = make
F90         = mpif90
F           = $(F90)
f90         = $(F90)
f           = $(F90)
CC          = mpicc
LD          = $(F90)
AR          = ar
ARFLAGS     = -ruv
#
# CPP keys and compiler options
# 
CPPDEF    = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY

Which I suppose correct as now when I compile all the mpi libraries are correctly found:

checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether mpicc  accepts -g... yes
checking for mpicc  option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking whether the compiler supports GNU Fortran... yes
checking whether mpif90  accepts -g... yes
checking for Fortran flag to compile .F90 files... none
checking for mpif90... mpif90 
checking for MPI_Init... yes
checking for mpif.h... yes
Checking Compiler Version
checking how to get the version output from mpif90 ... --version
checking for Fortran flag to compile preprocessed .F files... none
checking how to define symbols for preprocessed Fortran... -D
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to get verbose linking output from mpif90 ... -v
checking for Fortran libraries of mpif90 ...  -L/usr/lib -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lmpifort -lmpi -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
Hostname=pc330-Z790-AORUS-ELITE-AX
Machine=x86_64
OS=Linux
Fortran Compiler is GNU
checking if Fortran compiler supports allow-mismatch flag... no
checking if Fortran compiler supports mismatch_all flag... no
checking for ranlib... ranlib

Output Variables: {CC=mpicc } {CFLAGS=-g -O2} {FC=mpif90 } {FCFLAGS=} {PROGFCFLAGS=}{CPPDEFS= -DSYSLINUX -DCPRGNU} {OPT=-O2} {DEBUG=} {REAL8=} {BIT64=} {ENDIAN=} {MPIFC=mpif90 } {MPILIBS=} {MPIHEADER=} {INCLUDEFLAG=-I} {INCLUDEPATH=} {AR=ar cq} {RANLIB=ranlib} {BABELROOT=} {COMPILER_ROOT=} {PYTHON=} {PYTHONOPTS=} {FORT_SIZE=} {prefix=NONE} {SRCDIR=} {FC_DEFINE=-D}

configure: creating ./config.status
config.status: creating Makefile.conf
config.status: creating config.h
Please check the Makefile.conf
Have a nice day!
make[2]: Entering directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir'
make[3]: Entering directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu'
mpicc  -c -DSYSLINUX -DCPRGNU -g -O2  -I. -I../ get_zeits.c
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_mpif.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_realkinds.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_stdio.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_mpif90.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_dropdead.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_chars.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_flow.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_ioutil.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_mpout.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_die.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_IndexBin_char.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_IndexBin_integer.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_IndexBin_logical.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_mall.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_String.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_List.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_MergeSorts.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_Filename.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_FcComms.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_Permuter.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_rankMerge.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_SortingTools.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_StrTemplate.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_FileResolv.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_inpak90.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_TraceBack.F90
mpif90  -c  -I. -I../ -DSYSLINUX -DCPRGNU -O2     m_zeit.F90
rm -f libmpeu.a
ar cq libmpeu.a get_zeits.o m_IndexBin_char.o m_IndexBin_integer.o m_IndexBin_logical.o m_List.o m_MergeSorts.o m_Filename.o m_FcComms.o m_Permuter.o m_SortingTools.o m_String.o m_StrTemplate.o m_chars.o m_die.o m_dropdead.o m_FileResolv.o m_flow.o m_inpak90.o m_ioutil.o m_mall.o m_mpif.o m_mpif90.o m_mpout.o m_rankMerge.o m_realkinds.o m_stdio.o m_TraceBack.o m_zeit.o
ranlib libmpeu.a
make[3]: Leaving directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu'
make[3]: Entering directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mct'
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_MCTWorld.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_AttrVect.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GlobalMap.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GlobalSegMap.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GlobalSegMapComms.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Accumulator.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_AttrVectComms.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SparseMatrix.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Navigator.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_AttrVectReduce.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_AccumulatorComms.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GeneralGrid.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GeneralGridComms.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SpatialIntegralV.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SpatialIntegral.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_GlobalToLocal.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_ConvertMaps.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_ExchangeMaps.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Router.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SPMDutils.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Rearranger.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SparseMatrixDecomp.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SparseMatrixComms.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SparseMatrixToMaps.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_SparseMatrixPlus.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_MatAttrVectMul.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Merge.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu m_Transfer.F90
mpif90  -c  -DSYSLINUX -DCPRGNU -O2    -I/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mpeu mct_mod.F90
rm -f libmct.a
ar cq libmct.a m_MCTWorld.o m_AttrVect.o m_GlobalMap.o m_GlobalSegMap.o m_GlobalSegMapComms.o m_Accumulator.o m_SparseMatrix.o m_Navigator.o m_AttrVectComms.o m_AttrVectReduce.o m_AccumulatorComms.o m_GeneralGrid.o m_GeneralGridComms.o m_SpatialIntegral.o m_SpatialIntegralV.o m_MatAttrVectMul.o m_Merge.o m_GlobalToLocal.o m_ExchangeMaps.o m_ConvertMaps.o m_SparseMatrixDecomp.o m_SparseMatrixToMaps.o m_SparseMatrixComms.o m_SparseMatrixPlus.o m_Router.o m_Rearranger.o m_SPMDutils.o m_Transfer.o mct_mod.o
ranlib libmct.a
make[3]: Leaving directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir/mct'
make[2]: Leaving directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/mctdir'
make[2]: Entering directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/scrip'
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/kinds_mod.f90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/constants.f90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/mod_oasis_flush.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/iounits.f90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/grids.f90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_vars.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/fracnnei.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/netcdf.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/timers.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_bicubic_reduced.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_bi_interp.F90
mpif90 -ffixed-line-length-none -Wno-line-truncation -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/psmile.MPI1 -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio  -I/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/mct  -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -I/usr/include -c   /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90
make[2]: Leaving directory '/home/pc330/Downloads/croco/compile_oa3-mct/build/lib/scrip'

However, I still get thsi error message which makes the compilation failng:

1
Error: FORMAT label 1121 at (1) not defined
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:1340:119:

 1340 |                               write(nulou,1120) grid1_add, grid2_add,beglon, beglat, intrsct_lon,intrsct_lat,weights(1)
      |                                                                                                                       1
Error: FORMAT label 1120 at (1) not defined
make[2]: *** [Makefile:42: remap_conserv.o] Error 1


Tons of thanks for your kind help!

Posted by Anonymous at July 21 2025

Hi,
Tonia
change this two line for your compiler.
https://gitlab.com/cerfacs/oasis3-mct/-/blob/OASIS3-MCT_5.0/lib/scrip/src/remap_conserv.F90#L728
https://gitlab.com/cerfacs/oasis3-mct/-/blob/OASIS3-MCT_5.0/lib/scrip/src/remap_conserv.F90#L1340

! As below:--------------

write(nulou,*) 'grid1_add=', grid1_add, ', grid2_add=', grid2_add, &
       ', beglon=', beglon, ', beglat=', beglat, ', intrsct_lon=', intrsct_lon, &
               ', intrsct_lat=', intrsct_lat, ', weight=', weights(1)

!----------------------
otherwise you need to change here
https://gitlab.com/cerfacs/oasis3-mct/-/blob/OASIS3-MCT_5.0/lib/scrip/src/remap_conserv.F90#L719

check it.
but i have no motivation to change like this. 
Best,
*

Posted by Anonymous at July 21 2025

Dear *, 
changing those lines in the way you wrote, brought me exactly to a compilation error where you have expected it:

f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio’ [-Wmissing-include-dirs]
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:719:132:

  719 | 1120                 FORMAT ('      STORE add1,add2,blon,blat,ilon,ilat,WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:720:132:

  720 | 1121                 FORMAT ('      overlap STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected element ‘\x00’ in format string at (1)
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90:721:132:

  721 | 1122                 FORMAT ('      lfracnei STORE grid1_add, grid2_add, WEIGHTS=', 1X,I8,1X,I8,1X,F12.8,1X,F12.8,1X,F12.8,1X,F12.8,1X, E16.8)
      |                                                                                                                                    1
Error: Unexpected end of format string in format string at (1)
make[2]: *** [Makefile:42: remap_conserv.o] Error 1

So, how should I change this line: https://gitlab.com/cerfacs/oasis3-mct/-/blob/OASIS3-MCT_5.0/lib/scrip/src/remap_conserv.F90#L719 in order to solve it?

Thank you very, very much for your support!!!

Posted by Anonymous at July 21 2025

Hi,
Tonia
1.
/home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90
edit it. find this line. and change it. then make clean and compile it, as you did before.
(check line number 728,  1340 or near by in your remap_conserv.F90 file)

we will check it later. 
f951: Warning: 
""""""Nonexistent include directory""""""""" 
/home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio

ls it :
ls /home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio

please post your complete make.gfortran10.2.0_openmpi4.1.0_fundy or similar file what you using. 
Best,
*

Posted by Anonymous at July 22 2025

Hi there, 
the problem is that I don't know how to edit the /home/pc330/Downloads/croco/oasis3-mct/lib/scrip/src/remap_conserv.F90 file. what should I write instead of the lines that gives issues in the compilation (apart those lines you told me already to modify)?

Regarding 'ls /home/pc330/Downloads/croco/oasis3-mct/../compile_oa3-mct/build/lib/pio', meaning that this library is missing even though PIO is installed.

And finally you asked me to post 'make.gfortran10.2.0_openmpi4.1.0_fundy'... what is that? How can I post it?

Thanking you lots for your help!
Reply to this