1 | # |
---|
2 | # Include file for OASIS3 Makefile for nemo lenovo at Cerfacs with OpenMP |
---|
3 | # To use this, |
---|
4 | # module purge |
---|
5 | # module load compiler/intel/18.0.1.163 |
---|
6 | # module load mpi/intelmpi/2018.1.163-ddt |
---|
7 | # module load lib/phdf5/1.10.4_impi |
---|
8 | # module load lib/netcdf-fortran/4.4.4_phdf5_1.10.4 |
---|
9 | # To use the python interface, in addition (pyoasis target for TopMakefileOasis3): |
---|
10 | # module load python/3.7.7 |
---|
11 | # source /scratch/globc/andrea/PY_ENV/PyO/bin/activate |
---|
12 | # |
---|
13 | ############################################################################### |
---|
14 | # |
---|
15 | # CHAN : communication technique used in OASIS3 (MPI1/MPI2) |
---|
16 | CHAN = MPI1 |
---|
17 | # |
---|
18 | # Paths for libraries, object files and binaries |
---|
19 | # |
---|
20 | # COUPLE : path for oasis3-mct main directory (defined in .bash_profile) |
---|
21 | COUPLE = $(OASIS3_ROOT) |
---|
22 | # |
---|
23 | # ARCHDIR : directory created when compiling |
---|
24 | ARCHDIR = $(COUPLE)/NEMO_LENOVO_INTEL |
---|
25 | # |
---|
26 | # MPI library # 27/10/2020: /data/softs/intel/impi/2018.1.163/ (module load mpi/intelmpi/2018.1.163-ddt) |
---|
27 | MPIRUN = mpirun |
---|
28 | # |
---|
29 | # NETCDF library |
---|
30 | #NETCDF_LIB_DIR= |
---|
31 | NETCDF_INC_DIR= ${NETCDF4_INCDIR} # 27/10/2020: /data/softs/local_intel18/netcdf/4.4.4_phdf5_1.10.4/include (module load lib/netcdf-fortran/4.4.4_phdf5_1.10.4) |
---|
32 | NETCDF_INCLUDE = ${NETCDF_INC_DIR} |
---|
33 | NETCDF_LIBRARY = `nf-config --flibs` # 27/10/2020: -L/data/softs/local_intel18/netcdf/4.4.4_phdf5_1.10.4/lib -lnetcdff -L/data/softs/local_intel18/phdf5/1.10.4_impi/lib -L/data/softs/local_intel18/netcdf/4.4.4_phdf5_1.10.4/lib -Wl,-rpath,/data/softs/local_intel18/phdf5/1.10.4_impi/lib -Wl,-rpath,/data/softs/local_intel18/netcdf/4.4.4_phdf5_1.10.4/lib -lhdf5_hl -lhdf5 -lz -lcurl -lnetcdf -lnetcdf |
---|
34 | # |
---|
35 | # Compiling and other commands |
---|
36 | MAKE = gmake |
---|
37 | F90 = mpiifort # 27/10/2020: /data/softs/intel/impi/2018.1.163/bin64/mpiifort -va chercher /data/softs/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64/ifort (module load compiler/intel/18.0.1.163) |
---|
38 | F = $(F90) |
---|
39 | f90 = $(F90) |
---|
40 | f = $(F90) |
---|
41 | CC = mpiicc |
---|
42 | LD = mpiifort |
---|
43 | AR = ar |
---|
44 | ARFLAGS = -ruv |
---|
45 | DYNOPT = -fPIC |
---|
46 | LDDYNOPT = -shared ${NETCDF_LIBRARY} |
---|
47 | # Fortran libraries for C linking |
---|
48 | F2C_LIBS = -lifcore -lifcoremt -lifport -limf |
---|
49 | # |
---|
50 | # CPP keys and compiler options |
---|
51 | # |
---|
52 | CPPDEF = -Duse_netCDF -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY |
---|
53 | CCPPDEF = -Duse_netCDF -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY |
---|
54 | # |
---|
55 | # -g is necessary in F90FLAGS and LDFLAGS for pgf90 versions lower than 6.1 |
---|
56 | # |
---|
57 | F90FLAGS_1 = -O2 -xCORE-AVX2 -I. -assume byterecl -mt_mpi -qopenmp |
---|
58 | #F90FLAGS_1 = -g -traceback -fpe0 -O0 -I. -assume byterecl -mt_mpi -qopenmp |
---|
59 | f90FLAGS_1 = $(F90FLAGS_1) |
---|
60 | FFLAGS_1 = $(F90FLAGS_1) |
---|
61 | fFLAGS_1 = $(F90FLAGS_1) |
---|
62 | CCFLAGS_1 = -O2 -qopenmp |
---|
63 | LDFLAGS = $(F90FLAGS_1) ${NETCDF_LIBRARY} |
---|
64 | # |
---|
65 | ################### |
---|
66 | # |
---|
67 | |
---|
68 | # Additional definitions that should not be changed |
---|
69 | # |
---|
70 | # BINDIR : directory for executables |
---|
71 | BINDIR = $(ARCHDIR)/bin |
---|
72 | # INCPSMILE : includes all *o and *mod for each library |
---|
73 | INCPSMILE = -I$(ARCHDIR)/include |
---|
74 | |
---|
75 | F90FLAGS = $(F90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
76 | f90FLAGS = $(f90FLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
77 | FFLAGS = $(FFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
78 | fFLAGS = $(fFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
79 | CCFLAGS = $(CCFLAGS_1) $(INCPSMILE) $(CPPDEF) -I$(NETCDF_INCLUDE) |
---|
80 | F2C_LDFLAGS = $(F2C_LIBS) |
---|
81 | # |
---|
82 | ############################################################################# |
---|