Skip to content

Commit

Permalink
Merge pull request #173 from scrasmussen/bugfix/cray-logical-derived-…
Browse files Browse the repository at this point in the history
…type-member

Bugfix: Cray logical derived type member values

This is a bit of a hack and may mean there are still related bugs with the cray compiler
  • Loading branch information
gutmann committed Nov 28, 2023
2 parents c3609d5 + 87d66ec commit 63e3564
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 63e3564

Please sign in to comment.