[6328] | 1 | # |
---|
| 2 | # Include file for OASIS3 Makefile for a Linux system using |
---|
| 3 | # Intel compilers and MPI |
---|
| 4 | # |
---|
| 5 | ############################################################################### |
---|
| 6 | # |
---|
| 7 | # CHAN : communication technique used in OASIS3 (MPI1/MPI2) |
---|
| 8 | CHAN = MPI1 |
---|
| 9 | # |
---|
| 10 | # Paths for libraries, object files and binaries |
---|
| 11 | # |
---|
| 12 | # COUPLE : path for oasis3-mct main directory |
---|
| 13 | COUPLE = $(HOME)/oasis3-mct |
---|
| 14 | # |
---|
| 15 | # ARCHDIR : directory created when compiling |
---|
| 16 | ARCHDIR = $(COUPLE)/compile_intelmpi_training |
---|
| 17 | # |
---|
| 18 | # MPI library ((see the file /etc/modulefiles/mpi/openmpi-x86_64) |
---|
| 19 | MPIDIR = /usr/local/intel/impi/2018.1.163 |
---|
| 20 | MPIBIN = $(MPIDIR)/bin64 |
---|
| 21 | MPI_INCLUDE = $(MPIDIR)/include64 |
---|
| 22 | MPILIB = -L$(MPIDIR)/lib64 |
---|
| 23 | MPIRUN = $(MPIBIN)/mpirun |
---|
| 24 | # |
---|
| 25 | # NETCDF library of the system |
---|
| 26 | NETCDF_LIB_DIR1=/softs/local_intel/netcdf-fortran/4.4.4_phdf5/lib |
---|
| 27 | NETCDF_LIB_DIR2=/softs/local_intel/netcdf-c/4.6.1_phdf5/lib |
---|
| 28 | NETCDF_INCLUDE1=/softs/local_intel/netcdf-fortran/4.4.4_phdf5/include |
---|
| 29 | NETCDF_INCLUDE2=/softs/local_intel/netcdf-c/4.6.1_phdf5/include |
---|
| 30 | NETCDF_LIBRARY = -Wl,-rpath,/softs/local_intel/netcdf-fortran/4.4.4_phdf5/lib -L/softs/local_intel/netcdf-fortran/4.4.4_phdf5/lib -Wl,-rpath,/softs/local_intel/netcdf-c/4.6.1_phdf5/lib -L/softs/local_intel/netcdf-c/4.6.1_phdf5/lib -lnetcdff -lnetcdf |
---|
| 31 | # |
---|
| 32 | # Compiling and other commands |
---|
| 33 | MAKE = gmake |
---|
| 34 | F90 = $(MPIBIN)/mpiifort -I$(MPI_INCLUDE) |
---|
| 35 | F = $(F90) |
---|
| 36 | f90 = $(F90) |
---|
| 37 | f = $(F90) |
---|
| 38 | CC = $(MPIBIN)/mpiicc -I$(MPI_INCLUDE) |
---|
| 39 | LD = $(MPIBIN)/mpiifort $(MPILIB) |
---|
| 40 | # Static libraries compilation options |
---|
| 41 | STATOPT = |
---|
| 42 | # Shared libraries options |
---|
| 43 | DYNOPT = -fPIC |
---|
| 44 | LDDYNOPT = -shared |
---|
| 45 | # Static archiver |
---|
| 46 | AR = ar |
---|
| 47 | ARFLAGS = -ruv |
---|
| 48 | # |
---|
| 49 | # CPP keys and compiler options |
---|
| 50 | # |
---|
| 51 | CPPDEF = -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY |
---|
| 52 | # |
---|
| 53 | # |
---|
| 54 | #F90FLAGS_1 = -g -ffree-line-length-0 -fbounds-check -fopenmp |
---|
| 55 | F90FLAGS_1 = -g -traceback -O2 -xAVX -I. -assume byterecl -mt_mpi -qopenmp |
---|
| 56 | f90FLAGS_1 = $(F90FLAGS_1) |
---|
| 57 | FFLAGS_1 = $(F90FLAGS_1) |
---|
| 58 | fFLAGS_1 = $(F90FLAGS_1) |
---|
| 59 | CCFLAGS_1 = |
---|
| 60 | LDFLAGS = $(F90FLAGS_1) |
---|
| 61 | # |
---|
| 62 | # |
---|
| 63 | ################### |
---|
| 64 | # |
---|
| 65 | # Additional definitions that should not be changed |
---|
| 66 | # |
---|
| 67 | FLIBS = $(NETCDF_LIBRARY) |
---|
| 68 | # BINDIR : directory for executables |
---|
| 69 | BINDIR = $(ARCHDIR)/bin |
---|
| 70 | # LIBBUILD : contains a directory for each library |
---|
| 71 | LIBBUILD = $(ARCHDIR)/build/lib |
---|
| 72 | # INCPSMILE : includes all *o and *mod for each library |
---|
| 73 | INCPSMILE = -I$(ARCHDIR)/include |
---|
| 74 | |
---|
| 75 | F90FLAGS = $(F90FLAGS_1) $(CPPDEF) $(INCPSMILE) -I$(NETCDF_INCLUDE1) -I$(NETCDF_INCLUDE2) |
---|
| 76 | f90FLAGS = $(f90FLAGS_1) $(CPPDEF) $(INCPSMILE) -I$(NETCDF_INCLUDE1) -I$(NETCDF_INCLUDE2) |
---|
| 77 | FFLAGS = $(FFLAGS_1) $(CPPDEF) $(INCPSMILE) -I$(NETCDF_INCLUDE1) -I$(NETCDF_INCLUDE2) |
---|
| 78 | fFLAGS = $(fFLAGS_1) $(CPPDEF) $(INCPSMILE) -I$(NETCDF_INCLUDE1) -I$(NETCDF_INCLUDE2) |
---|
| 79 | CCFLAGS = $(CCFLAGS_1) $(CPPDEF) $(INCPSMILE) -I$(NETCDF_INCLUDE1) -I$(NETCDF_INCLUDE2) |
---|
| 80 | LDFLAGS = $(F90FLAGS_1) |
---|
| 81 | # |
---|
| 82 | ############################################################################# |
---|