From 644d0479d8ea52732394ec0a9eaddbdbd2fa9efa Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Thu, 30 Sep 2021 09:17:20 -0700 Subject: [PATCH] increase the maximum number of points in the depth distribution - this mitigates the liklihood of truncated output when the "bin" size is small (e.g., < 1 nm). - an additional compiler flag is needed for this (-mcmodel=medium), which relaxes some of the assumptions about addresses and sizes of sections in the generated code. See: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html - improve the Makefile during the update, too. --- fortran/Makefile | 16 ++++++++-------- fortran/trimspNL.F | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fortran/Makefile b/fortran/Makefile index e78f305..0c45fd8 100644 --- a/fortran/Makefile +++ b/fortran/Makefile @@ -7,19 +7,19 @@ # generator in the code. Use gfortran which is now # a standard part of gcc in moder systems. # -FC=gfortran -#DEBUG = -g -O -fbacktrace -ffpe-trap='underflow' -DEBUG = -#WARN= -Wall -W -WARN= -DIALECT = + +FC = gfortran +DEBUG = # -g -O -fbacktrace -ffpe-trap='underflow' +WARN = # -Wall -Wextra +DIALECT = -std=gnu prefix = /usr/local -OPS=-c $(DIALECT) $(WARN) $(DEBUG) +# OPS = -c $(DIALECT) $(WARN) $(DEBUG) +FCFLAGS = $(DIALECT) $(WARN) $(DEBUG) -O3 -mcmodel=medium all : trimspNL trimspNL : trimspNL.F - $(FC) -O3 -o $@ $< + $(FC) $(FCFLAGS) -o $@ $< clean: rm -f *.o *~ \#* .#* trimspNL diff --git a/fortran/trimspNL.F b/fortran/trimspNL.F index 50067f9..54cf15b 100644 --- a/fortran/trimspNL.F +++ b/fortran/trimspNL.F @@ -53,7 +53,7 @@ C and maximum number of points in the depth distribution MAXD C This is the only point where the number of layers and depth C profile are changed. All other parameters shouold be changed C accordingly. - PARAMETER (MAXD=500) + PARAMETER (MAXD=10000) PARAMETER (MAXNL=100) PARAMETER (MAXD1=MAXD+1) PARAMETER (MAXD2=MAXD+2)