Dear Stefan,

On 10/10/2018 14:27, Dr. Stefan Harfst wrote:
Dear EasyBuilders,

the easyconfig for AUGUSTUS includes a setting for the AUGUSTUS_CONFIG_PATH which is located in the installation directory. However, it seems that workflows using AUGUSTUS frequently require write permission on this path. We solved this now (after a manual fix to the module file) by adding the modluafooter below to the eb-file. It is not pretty but it seems to do the trick.

I am just wondering if this is abusing the footer too much (i.e. can it lead to unexpected side-effects) and if there is a better way dealing with this problem?

I'd say this is a bit much to shove into modluafooter (especially with the auto-copying to the home directory), but on the other hand it's your call.

My approach would be to somehow document that people need to copy the contents of where $AUGUSTUS_CONFIG_PATH points to, and then redefine $AUGUSTUS_CONFIG_PATH after loading the module.

That's expecting more from the user though, of course.

A cleaner solution would be a fix in AUGUSTUS: if it doesn't have write permissions, it should fall back to writing to a location like $HOME/.config/AUGUSTUS or something like that, while providing an option to specify a different location, perhaps via $AUGUSTUS_USER_CONFIG_PATH?


regards,

Kenneth


Best wishes

Stefan

#modextravars = {'AUGUSTUS_CONFIG_PATH': '%(installdir)s/config'}

modluafooter = (

'local global_config = "%(installdir)s/config"\n'

'local local_config = pathJoin(os.getenv("HOME"), "augustus_config")\n\n'

'setenv("AUGUSTUS_CONFIG_PATH", local_config)\n\n'

'if mode() == "load" then\n'

'   if (isDir(local_config)) then\n'

'      LmodMessage("setting AUGUSTUS_CONFIG_PATH to " .. local_config)\n'

'   else\n'

'      LmodMessage("creating a copy of EBROOTAUGUSTUS/config in your $HOME and ")\n'

'      execute {cmd="cp -r " .. global_config .. " " .. local_config, modeA={"load"}}\n'

'      LmodMessage("setting AUGUSTUS_CONFIG_PATH to " .. local_config)\n'

'   end\n'

'end\n'

)

--

Scientific Computing

Carl von Ossietzky University Oldenburg

School of Mathematics and Natural Sciences

26111 Oldenburg, Germany

Office: W03 1-139

Phone: +49-441-798 3147

E-Mail: [email protected] <mailto:[email protected]>

www: http://www.uni-oldenburg.de/fk5/wr

Reply via email to