Skip to content
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

SLURM job crashes if Conda is not installed #60

Closed
Andrew-S-Rosen opened this issue May 9, 2023 · 1 comment · Fixed by #61
Closed

SLURM job crashes if Conda is not installed #60

Andrew-S-Rosen opened this issue May 9, 2023 · 1 comment · Fixed by #61

Comments

@Andrew-S-Rosen
Copy link
Contributor

Andrew-S-Rosen commented May 9, 2023

Environment

  • Covalent version: 0.220.0
  • Covalent-Slurm plugin version: 0.12.1
  • Python version: Python 3.9.16
  • Operating system: Ubuntu

What is happening?

Note: this one is motivated by some "getting started" snags by a colleague of mine, @rwexler.

# sets up conda environment
slurm_conda = f"""
source $HOME/.bashrc
conda activate {conda_env_str}
retval=$?
if [ $retval -ne 0 ] ; then
>&2 echo "Conda environment {conda_env_str} is not present on the compute node. "\
"Please create the environment and try again."
exit 99
fi

Because of this line, there is currently no way to use the plugin if you aren't using conda. There are many situations in which the user may not want to use an Anaconda environment. For instance, maybe the user is loading an HPC-hosted Python module, which they've installed packages with via pip. They would have to load the module in their prerun_commands but otherwise shouldn't be required to use conda.

How can we reproduce the issue?

Submit a job without conda in the PATH.

What should happen?

Covalent should support running with Python in the PATH but not necessarily relying on Conda.

Any suggestions?

Only add the conda-related lines if conda_env is not False.

@Andrew-S-Rosen Andrew-S-Rosen changed the title Executor crashes if Conda is not installed SLURM job crashes if Conda is not installed May 10, 2023
@santoshkumarradha
Copy link
Member

@arosen93 thank you for this ! this is an side effect of initial versions of covalent being only installable from conda due to few non python dependencies. But that's not the case now, I assume everything should work sans conda check. @wjcunningham7 can you confirm this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants