Åke Sandgren <[email protected]> writes: >> I changed my parse hook to: >> >> if self.name == 'CP2K': >> self.cfg['toolchainopts']['openmp'] = True >> self.log.info("[pre-configure hook] Added toolchain option >> \"{openmp: True}\"") >> self.cfg['type'] = 'psmp' >> self.log.info("[pre-configure hook] Added type =\"=psmp\"") >> return > > You need to look at the hooks examples in the framework/contrib dir. You > can't do things that way in the parse_hook. > And if you're in the pre_configure_hook (as the log.info parts suggest) > you can't change things like toolchainopts.
The log message is correct - this code is in the pre_configure_hook. I have read https://docs.easybuild.io/en/latest/Hooks.html?highlight=hook#manipulating-easyconfig-parameters again and understand in principle the warnings given there. However, it seems to me that all the things I want to do, such as changing 'toolchainopts' or 'type', should be done in the parse_hook. Can someone give an example of something that *cannot* be done in parse_hook, but needs to be implemented in a more specific hook? Cheers, Loris -- Dr. Loris Bennett (Herr/Mr) ZEDAT, Freie Universität Berlin Email [email protected]

