Skip to content

Commit

Permalink
Included some missing targets when making FAST_SIB and FLUX_FIX a
Browse files Browse the repository at this point in the history
compiler-time option.

--HG--
branch : week-of-code
  • Loading branch information
John Wise committed Jun 22, 2009
1 parent 0dc683c commit 309bec3
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 20 deletions.
35 changes: 33 additions & 2 deletions src/enzo/Make.config.assemble
Original file line number Diff line number Diff line change
Expand Up @@ -563,20 +563,51 @@
$(error Illegal value '$(CONFIG_TPVEL)' for $$(CONFIG_TPVEL))
endif

#-----------------------------------------------------------------------
# DETERMINE RADIATIVE TRANSFER SETTINGS
#-----------------------------------------------------------------------

ERROR_PHOTON = 1

# Settings to turn radiative transfer ON

ifeq ($(CONFIG_PHOTON),yes)
ERROR_PHOTON = 0
ASSEMBLE_PHOTON_DEFINES = -DTRANSFER
OBJS_PHOTON_LIB = $(POBJS_CONFIG_LIB)
endif

# Settings to turn radiative transfer OFF

ifeq ($(CONFIG_PHOTON),no)
ERROR_PHOTON = 0
ASSEMBLE_PHOTON_DEFINES =
OBJS_PHOTON_LIB =
endif

# error if CONFIG_PHOTON is incorrect

ifeq ($(ERROR_PHOTON),1)
.PHONY: error_transfer
error_tpvel:
$(error Illegal value '$(CONFIG_PHOTON)' for $$(CONFIG_PHOTON))
endif


#-----------------------------------------------------------------------
# DETERMINE FAST SIBLING SETTINGS
#-----------------------------------------------------------------------

ERROR_FAST_SIB = 1

# Settings to turn radiative transfer ON
# Settings to turn fast sibling search ON

ifeq ($(CONFIG_FAST_SIB),yes)
ERROR_FAST_SIB = 0
ASSEMBLE_FAST_SIB_DEFINES = -DFAST_SIB
endif

# Settings to turn radiative transfer OFF
# Settings to turn fast sibling search OFF

ifeq ($(CONFIG_FAST_SIB),no)
ERROR_FAST_SIB = 0
Expand Down
70 changes: 54 additions & 16 deletions src/enzo/Make.config.targets
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,26 @@ help-config:
@echo " gmake photon-yes"
@echo " gmake photon-no"
@echo
@echo " Include fast sibling search"
@echo
@echo " gmake fastsib-yes"
@echo " gmake fastsib-no"
@echo
@echo " Include sibling subgrid boundary fix"
@echo
@echo " gmake fluxfix-yes"
@echo " gmake fluxfix-no"
@echo
@echo " Set whether to use HDF4"
@echo
@echo " gmake use-hdf4-yes"
@echo " gmake use-hdf4-no"
@echo
@echo " Set whether to use inline python"
@echo
@echo " gmake python-yes"
@echo " gmake python-no"
@echo

#-----------------------------------------------------------------------

Expand Down Expand Up @@ -198,6 +213,8 @@ show-config:
@echo " CONFIG_TPVEL: $(CONFIG_TPVEL)"
@echo " CONFIG_PHOTON: $(CONFIG_PHOTON)"
@echo " CONFIG_USE_HDF4: $(CONFIG_USE_HDF4)"
@echo " CONFIG_FAST_SIB: $(CONFIG_FAST_SIB)"
@echo " CONFIG_FLUX_FIX: $(CONFIG_FLUX_FIX)"
@echo

#-----------------------------------------------------------------------
Expand Down Expand Up @@ -589,6 +606,43 @@ CONFIG_PHOTON-%:
$(MAKE) show-config | grep CONFIG_PHOTON:
@echo

#-----------------------------------------------------------------------

VALID_FAST_SIB = fastsib-yes fastsib-no
.PHONY: $(VALID_FAST_SIB)

fastsib-yes: CONFIG_FAST_SIB-yes
fastsib-no: CONFIG_FAST_SIB-no
fastsib-%:
@printf "\n\tInvalid target: $@\n\n\tValid targets: [$(VALID_FAST_SIB)]\n\n"
CONFIG_FAST_SIB-%: suggest-clean
@tmp=.config.temp; \
grep -v CONFIG_FAST_SIB $(MAKE_CONFIG_OVERRIDE) > $${tmp}; \
mv $${tmp} $(MAKE_CONFIG_OVERRIDE); \
echo "CONFIG_FAST_SIB = $*" >> $(MAKE_CONFIG_OVERRIDE); \
$(MAKE) show-config | grep CONFIG_FAST_SIB:
@echo


#-----------------------------------------------------------------------

VALID_FLUX_FIX = fluxfix-yes fluxfix-no
.PHONY: $(VALID_FLUX_FIX)

fluxfix-yes: CONFIG_FLUX_FIX-yes
fluxfix-no: CONFIG_FLUX_FIX-no
fluxfix-%:
@printf "\n\tInvalid target: $@\n\n\tValid targets: [$(VALID_FLUX_FIX)]\n\n"
CONFIG_FLUX_FIX-%: suggest-clean
@tmp=.config.temp; \
grep -v CONFIG_FLUX_FIX $(MAKE_CONFIG_OVERRIDE) > $${tmp}; \
mv $${tmp} $(MAKE_CONFIG_OVERRIDE); \
echo "CONFIG_FLUX_FIX = $*" >> $(MAKE_CONFIG_OVERRIDE); \
$(MAKE) show-config | grep CONFIG_FLUX_FIX:
@echo


#-----------------------------------------------------------------------

VALID_USE-HDF4 = use-hdf4-yes use-hdf4-no
.PHONY: $(VALID_USE-HDF4)
Expand All @@ -607,19 +661,3 @@ CONFIG_USE-HDF4-%: suggest-clean


#-----------------------------------------------------------------------

VALID_PHOTON = photon-yes photon-no
.PHONY: $(VALID_PHOTON)

photon-yes: CONFIG_PHOTON-yes
photon-no: CONFIG_PHOTON-no
photon-%:
@printf "\n\tInvalid target: $@\n\n\tValid targets: [$(VALID_PHOTON)]\n\n"
CONFIG_PHOTON-%:
@tmp=.config.temp; \
grep -v CONFIG_PHOTON $(MAKE_CONFIG_OVERRIDE) > $${tmp}; \
mv $${tmp} $(MAKE_CONFIG_OVERRIDE); \
echo "CONFIG_PHOTON = $*" >> $(MAKE_CONFIG_OVERRIDE); \
$(MAKE) show-config | grep CONFIG_PHOTON:
@echo

3 changes: 1 addition & 2 deletions src/enzo/Make.mach.darwin
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ MACH_LD_NOMPI = g++ # Linker when not using MPI
# compile HDF5 with --with-default-api-version=v16, or Enzo with
# -DH5_USE_16_API.

MACH_DEFINES = -DLINUX -DH5_USE_16_API -DFAST_SIB \
-DSTATIC_SIBLING_LIST -DNO_FLUX_FIX -DNO_IO_LOG
MACH_DEFINES = -DLINUX -DH5_USE_16_API

#-----------------------------------------------------------------------
# Compiler flag settings
Expand Down
24 changes: 24 additions & 0 deletions src/enzo/Options.C
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ int ENZO_OptionsinEffect(void)
fprintf(opf, " Adaptive ray tracing disabled\n");
#endif

#ifdef USE_PYTHON
fprintf(opf, " Inline python enabled\n");
#else
fprintf(opf, " Inline python disabled\n");
#endif

#ifdef FAST_SIB
fprintf(opf, " Fast sibiling search enabled\n");
#else
fprintf(opf, " Fast sibiling search disabled\n");
#endif

#ifdef USE_HDF4
fprintf(opf, " HDF4 reading enabled\n");
#else
fprintf(opf, " HDF4 reading disabled\n");
#endif

#ifdef FLUX_FIX
fprintf(opf, " Flux fix for subgrid siblings enabled\n");
#else
fprintf(opf, " Flux fix for subgrid siblings disabled\n");
#endif


fprintf(opf, "\n");
fprintf(opf, "Macro and Parameter Definitions\n");
Expand Down

0 comments on commit 309bec3

Please sign in to comment.