Skip to content

Commit

Permalink
The Cray v15.0.1 compiler is make optimizations of the derived type l…
Browse files Browse the repository at this point in the history
…ogical members that leads to incorrect values when ICAR is setting logical values after reading from namelists. Turning optimization off for the options_obs.F90 will fix this issue.
  • Loading branch information
scrasmussen committed Nov 28, 2023
1 parent c3609d5 commit 87d66ec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ ASSERT=-DUSE_ASSERTIONS=$(USE_ASSERTIONS)
LFLAGS=$(LINK) $(PROF) $(CAF_FLAG) $(CAF_LINK) $(LIBNETCDF) $(LIBFFT)
FFLAGS=$(COMP) $(PROF) $(CAF_FLAG) $(PREPROC) -DVERSION=\"$(GIT_VERSION)\" $(INCNETCDF) $(INCFFT) $(MODOUTPUT) $(ASSERT)

# this line is to handle the fact the Cray compiler does optimizations that
# make setting logical values in derived types unrealiable in options_obs.F90
ifeq ($(COMPILER), cray)
OPTIONS_FLAGS=${FFLAGS} -O0
else
OPTIONS_FLAGS=${FFLAGS}
endif

$(info $$NODENAME = ${NODENAME})
$(info $$FC = ${F90})
$(info $$FFTW_PATH = ${FFTW_PATH})
Expand Down Expand Up @@ -592,6 +600,9 @@ caf_threads_test: $(BUILD)test_caf_threads.o
# Generic compilation rules
###################################################################

$(BUILD)options_obj.o: $(OBJECTS)options_obj.f90
${F90} ${OPTIONS_FLAGS} $< -o $@

$(BUILD)%.o: $(UTIL)%.f90
${F90} ${FFLAGS} $< -o $@

Expand Down

0 comments on commit 87d66ec

Please sign in to comment.