-
Notifications
You must be signed in to change notification settings - Fork 2
Condor using saga
cuchac edited this page Nov 3, 2010
·
4 revisions
If you are running Condor as root user, just point saga adaptor to correct condor config dir.
File saga_adaptor_condor_job.ini:
[saga.condor.defaults]
config = /etc/condor/condor_config
If you are running Condor under non-administrator user, you have to also modify location of log file ( set it on fixed location), create this file and set permissions so that user running GCFS, user that created a job and Condor can write into this file.
touch /tmp/saga-condor.log
chmod 0777 /tmp/saga-condor.log
File saga_adaptor_condor_job.ini:
[saga.condor.defaults]
config = /etc/condor/condor_config
[saga.adaptors.condor_job.cli]
condor_log = /tmp/saga-condor.log
You have to apply this small workaround around bug in Boost.Process library.
Index: condor_job/condor_job.cpp
===================================================================
--- condor_job/condor_job.cpp (revision 224)
+++ condor_job/condor_job.cpp (working copy)
@@ -282,11 +282,17 @@
for (std::string line; getline(out, line); output += "\n " + line)
/* Nothing to do */;
- boost::process::status status = c.wait();
- if (!status.exited() || status.exit_status())
- SAGA_ADAPTOR_THROW("Failed to submit job to condor pool. "
- "Output from condor_submit follows:\n" + output,
- saga::NoSuccess);
+ // This call can throw exception if proces allready died
+ try
+ {
+ boost::process::status status = c.wait();
+
+ if (!status.exited() || status.exit_status())
+ SAGA_ADAPTOR_THROW("Failed to submit job to condor pool. "
+ "Output from condor_submit follows:\n" + output,
+ saga::NoSuccess);
+ }
+ catch (std::exception const & e){}; /* Ignore exception */
}
catch (saga::adaptors::exception const &)
{
You need to apply this patch to Condor adaptor to get file sending working. Hopefully this tiny patch will be merged upstream.
--- condor_job/description.hpp (revision 224)
+++ condor_job/description.hpp (working copy)
@@ -256,8 +256,8 @@
if (!r.root_name().empty()
|| !r.root_directory().empty()
- || ("./" != r.relative_path().string()
- && "." != r.relative_path().string()))
+ || ("" != r.parent_path().string()
+ && "." != r.parent_path().string()))
SAGA_ADAPTOR_THROW_NO_CONTEXT("The Condor adaptor "
"does not support placing files outside the "
"remote working directory "
@@ -276,14 +276,14 @@
"(FileTransfer entry: '" + *it + "').",
saga::BadParameter);
- input += " " + left;
+ input += left + ", ";
break;
case copy_remote_local:
if (!r.root_name().empty()
|| !r.root_directory().empty()
- || ("./" != r.relative_path().string()
- && "." != r.relative_path().string()))
+ || ("" != r.parent_path().string()
+ && "." != r.parent_path().string()))
SAGA_LOG_WARN(("Transferring files from outside "
"the remote working directory is undefined "
"behaviour in Condor "
@@ -306,7 +306,7 @@
SAGA_LOG_WARN(("Destination file exists "
"(FileTransfer entry: '" + *it + "').").c_str());
- output += " " + right;
+ output += right + ", ";
break;
// Just in case...