polyluxus / runxtb.bash

wrapper for the extended tight-binding semi-empirical program package xtb
GNU General Public License v3.0
2 stars 3 forks source link

Modules are clunky and meh. #34

Open polyluxus opened 6 months ago

polyluxus commented 6 months ago

So the rwth uses Lmod now: https://lmod.readthedocs.io/en/latest/#

That appears to be a sensible choice.

The old way was seriously broken and this needed to be workarounded with a temporary file. Maybe now is the time to make this work (or get rid of it completely).

If this is changed, it needs to support unloading modules, too. This should avoid any hw/sw-dependence on a singular machine and move such stuff to configuration.

There's also hidden bugs with this: Currently the submit platform must be identical with the run platform. You can't use modules in the queue if you're not using them locally. Bummer.
Testing to write a submitscript on a different machine simply fails.

This all is not going to be a quick fix and unfortunately #33 doesn't really fix this, it just workarounds more of it.

polyluxus commented 5 months ago

On ubuntu this is actually quite easy to install with something like apt install lmod.

The /etc/bash.bashrc should source the files in /etc/profile.d/.

Then it needs modules.

Pro: The module command now actually fails with exit > 0. Yay! There is code that is not needed anymore.

Con: I cannot get it to shut up properly, and I will probably need helper functions to handle the piped output. This cannot be done in subshells, as the environment will just cease to exist.

Instead of unloading modules, it would be a good idea to simply purge all modules first. It's as easy as module purge. Should be an option though.