Skip to content

Commit 194e0cb

Browse files
committed
Working version of NVHPC with -O2 and clean up build_examples
1 parent 973c80f commit 194e0cb

13 files changed

Lines changed: 50 additions & 2100 deletions

standalone/build/build_examples_cesm.sh

Lines changed: 0 additions & 132 deletions
This file was deleted.

standalone/templates/ncar-gnu.mk

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# template for the GNU fortran compiler
2-
#
3-
# typical use with mkmf
4-
# mkmf -t linux-gnu.mk -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include
52

63
############
74
# commands #
@@ -15,27 +12,23 @@ LD = mpif90 $(MAIN_PROGRAM)
1512
# flags #
1613
#########
1714

18-
DEBUG = 0
19-
15+
DEBUG =
16+
2017
MAKEFLAGS += --jobs=$(shell grep '^processor' /proc/cpuinfo | wc -l)
2118

2219
FPPFLAGS :=
20+
FC_AUTO_R8 := -fdefault-real-8 -fdefault-double-8
21+
FFLAGS := $(FC_AUTO_R8) -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch -fallow-invalid-boz -fcray-pointer
22+
FFLAGS_REPRO = -O
23+
FFLAGS_DEBUG = -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds
2324

24-
FFLAGS := -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -fallow-argument-mismatch
25-
FFLAGS += $(shell pkg-config --cflags-only-I mpich2-c)
26-
FFLAGS_REPRO = -O2 -fbounds-check
27-
FFLAGS_DEBUG = -O0 -g -W -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow
28-
29-
CFLAGS := -D__IFC
30-
31-
CFLAGS += $(shell pkg-config --cflags-only-I mpich2-c)
32-
CFLAGS_REPRO = -O2
33-
CFLAGS_DEBUG = -O0 -g
3425

26+
CFLAGS := -std=gnu99
27+
CFLAGS_REPRO = -O
28+
CFLAGS_DEBUG = -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds
3529

3630
LDFLAGS :=
3731

38-
ifneq ($(REPRO),)
3932

4033
ifeq ($(DEBUG),1)
4134
CFLAGS += $(CFLAGS_DEBUG)
@@ -45,13 +38,16 @@ CFLAGS += $(CFLAGS_REPRO)
4538
FFLAGS += $(FFLAGS_REPRO)
4639
endif
4740

41+
42+
# NetCDF Flags
4843
FFLAGS += -I$(shell nc-config --includedir)
4944
CFLAGS += -I$(shell nc-config --includedir)
5045
# add the use_LARGEFILE cppdef
51-
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
46+
ifneq ($(findstring -Duse_netCDF,$(CPPDEFS)),)
5247
CPPDEFS += -Duse_LARGEFILE
53-
endif
48+
endif
5449

50+
# Linking Flags
5551
LIBS := $(shell nf-config --flibs) $(shell pkg-config --libs mpich2-f90)
5652
LDFLAGS += $(LIBS)
5753

standalone/templates/ncar-gnu_cesm.mk

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)