incorporate envssetup into Cactus option list

Create issue
Issue #2397 new
Roland Haas created an issue

Currently, on clusters that use environment modules, simfactory uses the envsetup entry of the machine definition files to load modules required by the option list.

This ties together option list and machine definition file, making it hard to offer different “flavors” of the same machine.

It should be possible to instead use the information in envsetup in the Cactus option list. Since this implies that “make” needs to change its own environment the simplest way to achieve that is to have the top level Makefile load the environment then pass everything down one level:

  export ENV_VAR="somesetting" ; $(MAKE) -f Makefile.real $(MAKECMDGOALS)

or one can try something like wrapping two Makefiles in one

.PHONY: all

ifneq ($(MODULES_LOADED), yes)
    export ENV_VAR="dummy" ; make MODULES_LOADED=yes $(MAKECMDGOALS)

    echo "ENV_VAR is $$ENV_VAR"


which has no advantage other than saving one file, so seems not best way of doing this.

Comments (0)

  1. Log in to comment