Skip to content
Snippets Groups Projects
Commit 10e70c8e authored by Danny Auble's avatar Danny Auble
Browse files

added logic to set the block id in runjob

parent 38afa31f
No related branches found
No related tags found
No related merge requests found
...@@ -94,6 +94,15 @@ Plugin::~Plugin() ...@@ -94,6 +94,15 @@ Plugin::~Plugin()
void Plugin::execute(bgsched::runjob::Verify& verify) void Plugin::execute(bgsched::runjob::Verify& verify)
{ {
boost::lock_guard<boost::mutex> lock( _mutex ); boost::lock_guard<boost::mutex> lock( _mutex );
char *bg_block_id = getenv("MPIRUN_PARTITION");
if (!bg_block_id || (strlen(bg_block_id) < 3)) {
printf("YOU ARE OUTSIDE OF SLURM!!!!\n");
verify.denyJob(DenyJob::Yes);
return;
}
verify.block(bg_block_id);
std::cout << "starting job from pid " << verify.pid() << std::endl; std::cout << "starting job from pid " << verify.pid() << std::endl;
std::cout << "executable: " << verify.exe() << std::endl; std::cout << "executable: " << verify.exe() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment