-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add charliecloud module load to Beeflow #716
Conversation
beeflow/cli.py
Outdated
@@ -218,14 +218,21 @@ def version_str(version): | |||
"""Convert a version tuple to a string.""" | |||
return '.'.join([str(part) for part in version]) | |||
|
|||
def load_charliecloud(): | |||
"""Load the charliecloud module if it exists.""" | |||
subprocess.run('module load charliecloud', shell=True, check=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this affect the environment of the current process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens on a system with no charliecloud module.
Is this persistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The only impact this will have on the current process it that the charliecloud executables will be in it's path if the module exists.
- If a system does not contain a charliecloud module, nothing will happen this will just throw an error.
- This is not persistent. It only applies to the beeflow process. If the beeflow process is killed such as with beeflow stop, a system restart, or a beeflow restart it will need to be loaded again.
I'll add an additional check to make sure lmod is on the system. It will work either way, but it's kind of silly to attempt to run an application that isn't installed.
I tried this on fog and it gives me this error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it again and it seems to work now. Once you merge in develop I'll approve.
beeflow/cli.py
Outdated
def load_charliecloud(): | ||
"""Load the charliecloud module if it exists.""" | ||
lmod = os.environ.get('MODULESHOME') | ||
from env_modules_python import module #noqa No need to import at top |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a ModuleNotFoundError: No module named 'env_modules_python'
on running beeflow start
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting on conflict resolution
This PR addresses #580.