Skip to content
Snippets Groups Projects
Commit d1237c00 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 16/12/2021: Cray: add OPENACC targets for compilation + improve Rules

parent ebf3469d
No related branches found
No related tags found
No related merge requests found
......@@ -9,24 +9,35 @@
##########################################################
#OBJDIR_PATH=/home/escj/azertyuiopqsdfghjklm/wxcvbn/azertyuiopqsdfghjklmwxcvbn
#
#OPT_BASE = -r8 -g -w -assume nosource_include -assume byterecl -fpe0 -ftz -fpic -traceback -fp-model precise -switch fe_inline_all_arg_copy_inout
OPT_BASE = -sreal64 -hpic -em -ef
OPT_BASE = -hpic -em -ef
OPT_PERF0 = -O0 -g
OPT_PERF2 = -O2 -hflex_mp=intolerant -Ofp0 -hnoomp
OPT_PERF1 = -O1 -hflex_mp=intolerant -Ofp0 -hnoomp -hcpu=istanbul -hfp0 -K trap=fp
# –hcpu=Istanbul –hfp0
#OPT_CHECK = -CB -ftrapuv
OPT_PERF2 = -O2 -hflex_mp=intolerant -Ofp0 -hnoomp
#
OPT_NOOPENACC = -hnoacc
OPT_OPENACC = -hacc
#
OPT_CHECK = -Rbc
OPT_I8 = -sdefault64
OPT_I8 = -sinteger64
OPT_R8 = -sreal64
#
# Integer 4/8 option
ifeq "$(VER_USER)" "ZSOLVER"
CPPFLAGS += -DCARTESIANGEOMETRY -DOVERLAPCOMMS -DPIECEWISELINEAR
PROG_LIST += MG_MAIN MG_MAIN_MNH_ALL
endif
#
# Real/integer 4/8 option
#
MNH_REAL ?=8
MNH_INT ?=4
#
ifneq "$(MNH_REAL)" "4"
OPT_BASE += $(OPT_R8)
endif
#
OPT_BASE_I4 := $(OPT_BASE)
ifeq "$(MNH_INT)" "8"
#OPT_BASE += $(OPT_I8)
OPT_BASE = -sdefault64 -hpic -em -ef
OPT_BASE += $(OPT_I8)
LFI_INT ?=8
else
LFI_INT ?=4
......@@ -42,17 +53,48 @@ OPT0 = $(OPT_BASE) $(OPT_PERF0) $(OPT_CHECK)
OPT_NOCB = $(OPT_BASE) $(OPT_PERF0)
CFLAGS += -g
endif
ifeq "$(OPTLEVEL)" "O2PAR"
PAR= -homp
OPT = $(OPT_BASE) $(OPT_PERF2) $(PAR)
OPT0 = $(OPT_BASE) $(OPT_PERF0) $(PAR)
OPT_NOCB = $(OPT_BASE) $(OPT_PERF2) $(PAR)
#
ifeq "$(OPTLEVEL)" "OPENACC"
CPPFLAGS += -DMNH_OPENACC
OPT = $(OPT_BASE) $(OPT_OPENACC) $(OPT_PERF2)
OPT0 = $(OPT_BASE) $(OPT_OPENACC) $(OPT_PERF0)
OPT_NOCB = $(OPT_BASE) $(OPT_OPENACC) $(OPT_PERF2)
#CXXFLAGS = -acc -Kieee -Mnofma $(OPT_OPENACC)
#OBJS_REPROD= spll_mode_sum_ll.o
#$(OBJS_REPROD) : OPT = $(OPT_BASE) $(OPT_OPENACC) $(OPT_PERF2) -Mvect=nosimd -Minfo=all -g
#OBJS_O1_OPENACC= spll_ice4_tendencies.o spll_turb_ver_thermo_flux.o
#$(OBJS_O1_OPENACC) : OPT = $(OPT_BASE) $(OPT_OPENACC) $(OPT_PERF1)
endif
#
ifeq "$(OPTLEVEL)" "OPENACCDEFONLY"
CPPFLAGS += -DMNH_OPENACC -D_FAKEOPENACC
OPT = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2)
OPT0 = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF0)
OPT_NOCB = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2)
#CXXFLAGS = -Kieee -Mnofma $(OPT_NOOPENACC)
#OBJS_REPROD= spll_mode_sum_ll.o
#$(OBJS_REPROD) : OPT = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2) -Mvect=nosimd -Minfo=all -g
endif
#
ifeq "$(OPTLEVEL)" "NOOPENACC"
OPT = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2)
OPT0 = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF0)
OPT_NOCB = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2)
#CXXFLAGS = -Kieee -Mnofma $(OPT_NOOPENACC)
#OBJS_REPROD= spll_mode_sum_ll.o
#$(OBJS_REPROD) : OPT = $(OPT_BASE) $(OPT_NOOPENACC) $(OPT_PERF2) -Mvect=nosimd -Minfo=all -g
endif
#
ifeq "$(OPTLEVEL)" "O2NOVEC"
OPT = $(OPT_BASE) $(OPT_PERF2) -O vector0
OPT0 = $(OPT_BASE) $(OPT_PERF0) -O vector0
OPT_NOCB = $(OPT_BASE) $(OPT_PERF2) -O vector0
endif
ifeq "$(OPTLEVEL)" "O2"
OPT = $(OPT_BASE) $(OPT_PERF2)
OPT0 = $(OPT_BASE) $(OPT_PERF0)
OPT_NOCB = $(OPT_BASE) $(OPT_PERF2)
endif
ifeq "$(OPTLEVEL)" "O1"
OPT = $(OPT_BASE) $(OPT_PERF1)
OPT0 = $(OPT_BASE) $(OPT_PERF0)
......@@ -157,6 +199,3 @@ OBJS_I4=spll_modd_netcdf.o
$(OBJS_I4) : OPT = $(OPT_BASE_I4)
endif
#mpi.mod :
# ln -sf /opt/cray/mpt/5.6.3/gni/mpich2-cray/74/include/MPI.mod $(OBJDIR_MASTER)/mpi.mod
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment