Skip to content

Commit

Permalink
(#220) more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Aug 16, 2021
1 parent 5269f0b commit 8845c17
Show file tree
Hide file tree
Showing 2 changed files with 337 additions and 27 deletions.
23 changes: 23 additions & 0 deletions src/wrench/services/compute/htcondor/HTCondorComputeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <wrench/services/compute/batch/BatchComputeServiceProperty.h>
#include <wrench/services/compute/bare_metal/BareMetalComputeService.h>
#include <wrench/workflow/failure_causes/NotEnoughResources.h>
#include <wrench/workflow/failure_causes/NotAllowed.h>
#include "wrench/exceptions/WorkflowExecutionException.h"
#include "wrench/logging/TerminalOutput.h"
#include "wrench/services/compute/htcondor/HTCondorComputeService.h"
Expand Down Expand Up @@ -366,6 +367,28 @@ namespace wrench {
return;
}

// Check that, if the job is non-grid, then is has no service_specific args
bool service_specific_args_valid = true;
if (not service_specific_args.empty()) {
if (service_specific_args.find("universe") == service_specific_args.end()) {
service_specific_args_valid = false;
} else if (service_specific_args.at("universe") != "grid") {
service_specific_args_valid = false;
}
}

if (not service_specific_args_valid) {
std::string error_message = "Non-grid universe jobs submitted to HTCondor cannot have service-specific arguments";
S4U_Mailbox::dputMessage(
answer_mailbox,
new ComputeServiceSubmitStandardJobAnswerMessage(
job, this->getSharedPtr<HTCondorComputeService>(), false, std::shared_ptr<FailureCause>(
new NotAllowed(this->getSharedPtr<HTCondorComputeService>(), error_message)),
this->getMessagePayloadValue(
HTCondorComputeServiceMessagePayload::SUBMIT_STANDARD_JOB_ANSWER_MESSAGE_PAYLOAD)));
return;
}


// Submit the job to the central manager
this->central_manager->submitStandardJob(job, service_specific_args);
Expand Down
Loading

0 comments on commit 8845c17

Please sign in to comment.