The OASIS Coupler Forum

  HOME

Errors compiling script and psmile

Up to Installation and compilation

Posted by Anonymous at September 19 2025

Hello

I've been trying to compile oasis3-mct several times, but keep failing. I clone the source file, modify the makefile and make.inc, and got this error:


lalolanda@lalolanda-B450-GAMING-X:~/oasis3-mct/util/make_dir$ make -f TopMakefileOasis3

Compilation of the OASIS3-MCT static libraries
Build output to ~/oasis3-mct/util/make_dir/COMP.log
Build errors to ~/oasis3-mct/util/make_dir/COMP.err
=> Creating directories for compiling the static libraries
   in ~/oasis3-mct/compile_oa3-mct_gfopenmpi_openmp/build-static/lib
=> Configuring libraries mpeu and mct
=> Compiling libraries mpeu and mct
=> Installing libraries mpeu and mct
=> Compiling library scrip
=> Installing scrip modules
cp: no se puede efectuar `stat' sobre '*.mod': No existe el archivo o el directorio
gmake[1]: *** [TopMakefileOasis3:248: makescrip-static] Error 1
make: *** [TopMakefileOasis3:93: static-libs-fortran] Error 2

I tried a couple of things (mostly with AI, I'm not familirized with touching fortran files), and got able to compile SCRIPT, but never psmile.
I'm using the following makefile, for a linux pc, using gfortran and openmpi:

###############################################################################
#
# CHAN	: communication technique used in OASIS3 (MPI1/MPI2)
CHAN            = MPI1
#
# Paths for libraries, object files and binaries
#
# COUPLE	: path for oasis3 main directory
COUPLE          = ~/oasis3-mct
#
# ARCHDIR       : directory created when compiling
ARCHDIR         = ~/oasis3-mct/compile_oa3-mct_gfopenmpi_openmp
#
# MPI library
MPIDIR      = /usr/lib/x86_64-linux-gnu/openmpi
MPIBIN      = /usr/bin
MPI_INCLUDE = /usr/lib/x86_64-linux-gnu/openmpi/include
MPILIB      = -L$(MPIDIR)/lib -lmpi -lmpi_mpifh
MPIRUN      = $(MPIBIN)/mpirun --oversubscribe
#
# NETCDF library of the system
NETCDF_INCLUDE = -I/usr/local/netcdff/include
NETCDF_LIBRARY = -L/usr/local/netcdff/lib -Wl,-rpath,/usr/local/netcdff/lib -lnetcdff -lnetcdf -lm
#
# Compiling and other commands
MAKE        = gmake
F90         = $(MPIBIN)/mpif90 -I$(MPI_INCLUDE) -fallow-argument-mismatch
F           = $(F90)
f90         = $(F90)
f           = $(F90)
CC          = $(MPIBIN)/mpicc -I$(MPI_INCLUDE)
LD          = $(MPIBIN)/mpif90 $(MPILIB)
# Static libraries compilation options
STATOPT     =
# Shared libraries options
DYNOPT      = -fPIC
LDDYNOPT    = -shared
AR          = ar
ARFLAGS     = -ruv
# Fortran libraries for C linking
F2C_LIBS    = -lmpi_mpifh -lgfortran -lm
#
# CPP keys and compiler options
#  
CPPDEF    = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY
#
FCBASEFLAGS = -O2 -fallow-argument-mismatch -ffree-line-length-0 -fopenmp -J$(ARCHDIR)/include
#FCBASEFLAGS = -O2 -fallow-argument-mismatch -ffree-line-length-0 -fopenmp 
#FCBASEFLAGS  = -g -fallow-argument-mismatch -ffree-line-length-0 -fbounds-check -fopenmp
CCBASEFLAGS  = -fopenmp
#
# INC_DIR : includes all *mod for each library
 INC_DIR = -I$(ARCHDIR)/include
# FLIBS : for toys when linking in local Makefile
 FLIBS=${NETCDF_LIBRARY}
###################
#
F90FLAGS    = $(FCBASEFLAGS) $(INC_DIR) $(CPPDEF) -I$(NETCDF_INCLUDE)
f90FLAGS    = $(FCBASEFLAGS) $(INC_DIR) $(CPPDEF) -I$(NETCDF_INCLUDE)
FFLAGS      = $(FCBASEFLAGS) $(INC_DIR) $(CPPDEF) -I$(NETCDF_INCLUDE)
fFLAGS      = $(FCBASEFLAGS) $(INC_DIR) $(CPPDEF) -I$(NETCDF_INCLUDE)
CCFLAGS     = $(CCBASEFLAGS) $(INC_DIR) $(CPPDEF) -I$(NETCDF_INCLUDE)
LDFLAGS     = $(FCBASEFLAGS)
F2C_LDFLAGS = $(F2C_LIBS)
#
#############################################################################







Posted by Anonymous at September 19 2025

Hi Sergio,

You should have a look at the compiling log files
Build output to ~/oasis3-mct/util/make_dir/COMP.log
Build errors to ~/oasis3-mct/util/make_dir/COMP.err
to have a more precise idea of the problem.

  Hoping this helps.
 Sophie
Reply to this