Skip to content

Commit

Permalink
AWScloud platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Parallel Works app-run user authored and Parallel Works app-run user committed Nov 28, 2023
1 parent 54409ac commit d78f273
Show file tree
Hide file tree
Showing 4 changed files with 9,529 additions and 48 deletions.
2 changes: 2 additions & 0 deletions builds/awscloud/intel22.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module load intel/2022.1.2
module load hdf5/1.10.4 netcdf/4.6.1
module load intelmpi
which mpiifort
which mpiicc
196 changes: 148 additions & 48 deletions builds/awscloud/intel22.mk
Original file line number Diff line number Diff line change
@@ -1,101 +1,203 @@
# $Id: intel.mk,v 1.1.2.1.2.1.2.2.2.1.4.1 2014/06/05 19:16:00 Seth.Underwood Exp $
# template for the Intel fortran compiler
# typical use with mkmf
# mkmf -t template.ifc -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
# Template for the Intel Compilers on a Cray System
#
# Typical use with mkmf
# mkmf -t ncrc-cray.mk -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include

############
# commands #
# Commands Macros
############
FC = mpiifort
CC = mpiicc
CXX = mpiicpc
LD = mpiifort
#########
# flags #
#########
DEBUG =
REPRO =
VERBOSE =
OPENMP =

#######################
# Build target macros
#
# Macros that modify compiler flags used in the build. Target
# macrose are usually set on the call to make:
#
# make REPRO=on NETCDF=3
#
# Most target macros are activated when their value is non-blank.
# Some have a single value that is checked. Others will use the
# value of the macro in the compile command.

DEBUG = # If non-blank, perform a debug build (Cannot be
# mixed with REPRO or TEST)

REPRO = # If non-blank, erform a build that guarentees
# reprodicuibilty from run to run. Cannot be used
# with DEBUG or TEST

TEST = # If non-blank, use the compiler options defined in
# the FFLAGS_TEST and CFLAGS_TEST macros. Cannot be
# use with REPRO or DEBUG

VERBOSE = # If non-blank, add additional verbosity compiler
# options

OPENMP = # If non-blank, compile with openmp enabled

NO_OVERRIDE_LIMITS = # If non-blank, do not use the -qoverride-limits
# compiler option. Default behavior is to compile
# with -qoverride-limits.

NETCDF = # If value is '3' and CPPDEFS contains
# '-Duse_netCDF', then the additional cpp macro
# '-Duse_LARGEFILE' is added to the CPPDEFS macro.

INCLUDES = # A list of -I Include directories to be added to the
# the compile command.

#ISA = -xsse2 # The Intel Instruction Set Archetecture (ISA) compile
ISA = -march=core-avx-i -qno-opt-dynamic-align
# option to use. If blank, than use the default SSE
# settings for the host. Current default is to use SSE2.

COVERAGE = # Add the code coverage compile options.

# Need to use at least GNU Make version 3.81
need := 3.81
ok := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
ifneq ($(need),$(ok))
$(error Need at least make version $(need). Load module gmake/3.81)
endif

# REPRO, DEBUG and TEST need to be mutually exclusive of each other.
# Make sure the user hasn't supplied two at the same time
ifdef REPRO
ifneq ($(DEBUG),)
$(error Options REPRO and DEBUG cannot be used together)
else ifneq ($(TEST),)
$(error Options REPRO and TEST cannot be used together)
endif
else ifdef DEBUG
ifneq ($(TEST),)
$(error Options DEBUG and TEST cannot be used together)
endif
endif

MAKEFLAGS += --jobs=$(shell grep '^processor' /proc/cpuinfo | wc -l)

FPPFLAGS := -fpp -Wp,-w
# Required Preprocessor Macros:
CPPDEFS += -Duse_netCDF

FFLAGS := $(shell pkg-config --cflags-only-I netcdf)
FFLAGS += $(shell pkg-config --cflags-only-I mpich)
FFLAGS += -I/apps/netcdf/4.6.1/intel/16.1.150/include
FFLAGS += -I/apps/intel/impi/2019.8.254/intel64/include
#FFLAGS += -I/apps/openmpi/3.1.4/gnu/gcc-9.2.0/include
FFLAGS += -fno-alias -stack-temps -safe-cray-ptr -ftz -assume byterecl -i4 -r8 -nowarn -g -sox -traceback
FFLAGS_OPT = -O2
FFLAGS_REPRO = -fltconsistency
FFLAGS_DEBUG = -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -debug variable_locations -fpe0 -ftrapuv
# Additional Preprocessor Macros needed due to Autotools and CMake
#CPPDEFS += -DHAVE_SCHED_GETAFFINITY -DHAVE_GETTID

# Macro for Fortran preprocessor
FPPFLAGS := -fpp -Wp,-w $(INCLUDES)
# Fortran Compiler flags for the NetCDF library
FPPFLAGS += $(shell nf-config --fflags)

# Base set of Fortran compiler flags
FFLAGS := -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -i4 -r8 -nowarn -sox -traceback

# Flags based on perforance target (production (OPT), reproduction (REPRO), or debug (DEBUG)
FFLAGS_OPT = -O3 -debug minimal -fp-model source
FFLAGS_REPRO = -O2 -debug minimal -fp-model source
FFLAGS_DEBUG = -g -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fpe0 -ftrapuv

# Flags to add additional build options
FFLAGS_OPENMP = -qopenmp
FFLAGS_VERBOSE = -v -V -what
FFLAGS_OVERRIDE_LIMITS = -qoverride-limits
FFLAGS_VERBOSE = -v -V -what -warn all -qopt-report-phase=vec -qopt-report=2
FFLAGS_COVERAGE = -prof-gen=srcpos

# Macro for C preprocessor
CPPFLAGS := -D__IFC $(INCLUDES)
# C Compiler flags for the NetCDF library
CPPFLAGS += $(shell nc-config --cflags)

# Base set of C compiler flags
CFLAGS := -sox -traceback

CFLAGS += -no-multibyte-chars #for AWS cloud

CFLAGS := -D__IFC -sox -traceback
CFLAGS += $(shell pkg-config --cflags-only-I netcdf)
CFLAGS += -I/apps/netcdf/4.6.1/intel/16.1.150/include
OTHER_CXXFLAGS := -I/net/aja/miniconda3/envs/py38/include/python3.8 -I/net/aja/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include
CFLAGS_OPT = -O2
# Flags based on perforance target (production (OPT), reproduction (REPRO), or debug (DEBUG)
CFLAGS_OPT = -O2 -debug minimal
CFLAGS_REPRO = -O2 -debug minimal
CFLAGS_DEBUG = -O0 -g -ftrapuv

# Flags to add additional build options
CFLAGS_OPENMP = -qopenmp
CFLAGS_DEBUG = -O0 -g -ftrapuv
CFLAGS_VERBOSE = -w3
CFLAGS_COVERAGE = -prof-gen=srcpos

# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT
# *_TEST will match the production if no new option(s) is(are) to be tested.
FFLAGS_TEST = -O2
CFLAGS_TEST = -O2
FFLAGS_TEST := $(FFLAGS_OPT)
CFLAGS_TEST := $(CFLAGS_OPT)

# Linking flags
LDFLAGS :=
LDFLAGS_OPENMP := -qopenmp
LDFLAGS_VERBOSE := -Wl,-V,--verbose,-cref,-M
LDFLAGS_COVERAGE = -prof-gen=srcpos

# Start with blank LIBS
LIBS :=

ifneq ($(REPRO),)
# Get compile flags based on target macros.
ifdef REPRO
CFLAGS += $(CFLAGS_REPRO)
FFLAGS += $(FFLAGS_REPRO)
endif
ifneq ($(DEBUG),)
else ifdef DEBUG
CFLAGS += $(CFLAGS_DEBUG)
FFLAGS += $(FFLAGS_DEBUG)
else ifneq ($(TEST),)
else ifdef TEST
CFLAGS += $(CFLAGS_TEST)
FFLAGS += $(FFLAGS_TEST)
else
CFLAGS += $(CFLAGS_OPT)
FFLAGS += $(FFLAGS_OPT)
endif

ifneq ($(OPENMP),)
ifdef OPENMP
CFLAGS += $(CFLAGS_OPENMP)
FFLAGS += $(FFLAGS_OPENMP)
LDFLAGS += $(LDFLAGS_OPENMP)
endif

ifneq ($(VERBOSE),)
ifdef ISA
CFLAGS += $(ISA)
FFLAGS += $(ISA)
endif

ifdef NO_OVERRIDE_LIMITS
FFLAGS += $(FFLAGS_OVERRIDE_LIMITS)
endif

ifdef VERBOSE
CFLAGS += $(CFLAGS_VERBOSE)
FFLAGS += $(FFLAGS_VERBOSE)
LDFLAGS += $(LDFLAGS_VERBOSE)
endif

ifeq ($(NETCDF),3)
# add the use_LARGEFILE cppdef
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
CPPDEFS += -Duse_LARGEFILE
endif
CPPDEFS += -Duse_LARGEFILE
endif

ifdef COVERAGE
ifdef BUILDROOT
PROF_DIR=-prof-dir=$(BUILDROOT)
endif
CFLAGS += $(CFLAGS_COVERAGE) $(PROF_DIR)
FFLAGS += $(FFLAGS_COVERAGE) $(PROF_DIR)
LDFLAGS += $(LDFLAGS_COVERAGE) $(PROF_DIR)
endif

FFLAGS += -I/apps/netcdf/4.6.1/intel/16.1.150/include
FFLAGS += -I/apps/intel/impi/2019.8.254/intel64/include
LIBS := $(shell nc-config --libs) $(shell pkg-config --libs mpich2-f90)
LDFLAGS += $(LIBS)
#LDFLAGS += -L/app/spack/linux-rhel7-x86_64/intel-19.0.5/mpich/3.2.1-wf5xw2s3lm45sr4j373szc4lm5yjkzg4/lib -lmpi -lmpifort -lrt -lpthread
LDFLAGS += -L/apps/intel/impi/2019.8.254/intel64/lib
LDFLAGS += -lmpi
LDFLAGS += -lnetcdf -lnetcdff
LDFLAGS += -lm
LDFLAGS += -L/apps/intel/lib/intel64 -limf -lsvml -lintlc -lifcore -lifport
#LDFLAGS += -L/apps/intel/mkl/lib/intel64 -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential

#LDFLAGS += -L/net/aja/miniconda3/envs/py38/lib -lpython3.8 -lstdc++

#---------------------------------------------------------------------------
# you should never need to change any lines below.
Expand All @@ -120,10 +222,8 @@ RM = rm -f
SHELL = /bin/csh -f
TMPFILES = .*.m *.B *.L *.i *.i90 *.l *.s *.mod *.opt

.SUFFIXES: .F .F90 .H .L .T .f .f90 .h .i .i90 .l .o .s .opt .x .C
.SUFFIXES: .F .F90 .H .L .T .f .f90 .h .i .i90 .l .o .s .opt .x

.C.o:
$(CXX) $(CCLAGS) -c $*.C
.f.L:
$(FC) $(FFLAGS) -c -listing $*.f
.f.opt:
Expand Down Expand Up @@ -184,7 +284,7 @@ TMPFILES = .*.m *.B *.L *.i *.i90 *.l *.s *.mod *.opt
$(FC) $(CPPDEFS) $(FPPFLAGS) -P $*.F90
.F90.o:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c $*.F90
.F90.s:
.F90.s:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -c -S $*.F90
.F90.x:
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) -o $*.x $*.F90 *.o $(LDFLAGS)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Step, Day, Truncs, Energy/Mass, Maximum CFL, Mean Sea Level, Total Mass, Mean Salin, Mean Temp, Frac Mass Err, Salin Err, Temp Err
[days] [m2 s-2] [Nondim] [m] [kg] [PSU] [degC] [Nondim] [PSU] [degC]
0, 731595.000, 0, En 1.6212740006039348E-26, CFL 0.00000, SL -1.8190E-12, M 4.09505E+15, S 34.6560, T 4.2976, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00
18, 731595.250, 0, En 1.1360359150592967E-06, CFL 0.00934, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2978, Me 3.69E-17, Se 7.81E-15, Te 6.21E-16
36, 731595.500, 0, En 7.5241822506438328E-06, CFL 0.01842, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2980, Me 3.57E-18, Se 1.07E-14, Te 1.35E-15
54, 731595.750, 0, En 2.1969479209565854E-05, CFL 0.02506, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2982, Me 2.47E-17, Se 6.35E-15, Te 1.39E-15
72, 731596.000, 0, En 3.2098100646933540E-05, CFL 0.02617, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2984, Me 2.97E-17, Se 8.79E-15, Te 8.81E-16
90, 731596.250, 0, En 3.9819408140775848E-05, CFL 0.03009, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2986, Me 1.97E-17, Se 3.91E-15, Te 4.06E-16
108, 731596.500, 0, En 5.0769875957472587E-05, CFL 0.03661, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2988, Me 2.22E-17, Se 9.77E-16, Te 2.69E-16
126, 731596.750, 0, En 6.3471076284158721E-05, CFL 0.04022, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2990, Me -5.17E-17, Se -2.93E-15, Te -1.24E-16
144, 731597.000, 0, En 6.9194786278202610E-05, CFL 0.04224, SL -1.3642E-12, M 4.09505E+15, S 34.6560, T 4.2992, Me -1.61E-18, Se -8.30E-15, Te 6.29E-16
Loading

0 comments on commit d78f273

Please sign in to comment.