Skip to content

Instantly share code, notes, and snippets.

@sithhell
Created September 11, 2017 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sithhell/2554451f0ef2686abc4523041b68a4a1 to your computer and use it in GitHub Desktop.
Save sithhell/2554451f0ef2686abc4523041b68a4a1 to your computer and use it in GitHub Desktop.
diff --git a/src/util/batch_environments/slurm_environment.cpp b/src/util/batch_environments/slurm_environment.cpp
index 7f2ac52..d88a36a 100644
--- a/src/util/batch_environments/slurm_environment.cpp
+++ b/src/util/batch_environments/slurm_environment.cpp
@@ -274,11 +274,15 @@ namespace hpx { namespace util { namespace batch_environments
void slurm_environment::retrieve_nodelist(std::vector<std::string> & nodes,
bool debug)
{
- char* slurm_nodelist_env = std::getenv("SLURM_NODELIST");
+ char* slurm_nodelist_env = std::getenv("SLURM_STEP_NODELIST");
+ if (!slurm_nodelist_env)
+ {
+ slurm_nodelist_env = std::getenv("SLURM_NODELIST");
+ }
if (slurm_nodelist_env)
{
if (debug) {
- std::cerr << "SLURM nodelist found (SLURM_NODELIST): "
+ std::cerr << "SLURM nodelist found: "
<< slurm_nodelist_env << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment