namespace Batch {
BatchManager_eCCC::BatchManager_eCCC(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager(parent, host)
{
// Nothing to do
public:
// Constructeur et destructeur
BatchManager_eCCC(const FactBatchManager * parent, const char * host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi"); // connexion a la machine host
virtual ~BatchManager_eCCC();
}
BatchManager_eClient * FactBatchManager_eCCC::operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node) const
{
// MESSAGE("Building new BatchManager_CCC on host '" << hostname << "'");
- return new BatchManager_eCCC(this, hostname, protocolType, mpiImpl);
+ return new BatchManager_eCCC(this, hostname, username, protocolType, mpiImpl);
}
}
virtual BatchManager * operator() (const char * hostname) const;
virtual BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node = 1) const;
namespace Batch {
BatchManager_eClient::BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host,
+ const char * username,
CommunicationProtocolType protocolType, const char* mpiImpl)
- : BatchManager(parent, host), _protocol(CommunicationProtocol::getInstance(protocolType)), _username("")
+ : BatchManager(parent, host), _protocol(CommunicationProtocol::getInstance(protocolType)),
+ _username(username)
{
// instanciation of mpi implementation needed to launch executable in batch script
_mpiImpl = FactoryMpiImpl(mpiImpl);
Parametre params = job.getParametre();
Versatile V = params[OUTFILE];
Versatile::iterator Vit;
- _username = string(params[USER]);
// Create local result directory
int status = CommunicationProtocol::getInstance(SH).makeDirectory(directory, "", "");
public:
// Constructeur et destructeur
BatchManager_eClient(const Batch::FactBatchManager * parent, const char* host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char* mpiImpl="mpich1");
virtual ~BatchManager_eClient();
void importOutputFiles( const Job & job, const std::string directory );
- void setUsername(const std::string & username) {_username = username;}
-
protected:
const CommunicationProtocol & _protocol; // protocol to access _hostname
- std::string _username; // username to access _hostname
+ const std::string _username; // username to access _hostname
MpiImpl *_mpiImpl; // Mpi implementation to launch executable in batch script
std::string generateTemporaryFileName(const std::string & prefix);
virtual ~FactBatchManager_eClient();
virtual Batch::BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpi,
int nb_proc_per_node = 1) const = 0;
namespace Batch {
BatchManager_eLSF::BatchManager_eLSF(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager(parent, host)
{
// Nothing to do
public:
// Constructeur et destructeur
BatchManager_eLSF(const FactBatchManager * parent, const char * host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi"); // connexion a la machine host
virtual ~BatchManager_eLSF();
}
BatchManager_eClient * FactBatchManager_eLSF::operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node) const
{
// MESSAGE("Building new BatchManager_LSF on host '" << hostname << "'");
- return new BatchManager_eLSF(this, hostname, protocolType, mpiImpl);
+ return new BatchManager_eLSF(this, hostname, username, protocolType, mpiImpl);
}
}
virtual BatchManager * operator() (const char * hostname) const;
virtual BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node = 1) const;
namespace Batch {
BatchManager_ePBS::BatchManager_ePBS(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl,
int nb_proc_per_node)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager(parent, host)
{
// Nothing to do
public:
// Constructeur et destructeur
BatchManager_ePBS(const FactBatchManager * parent, const char * host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi",
int nb_proc_per_node=1); // connexion a la machine host
virtual ~BatchManager_ePBS();
}
BatchManager_eClient * FactBatchManager_ePBS::operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node) const
{
// MESSAGE("Building new BatchManager_PBS on host '" << hostname << "'");
- return new BatchManager_ePBS(this, hostname, protocolType, mpiImpl, nb_proc_per_node);
+ return new BatchManager_ePBS(this, hostname, username, protocolType, mpiImpl, nb_proc_per_node);
}
virtual BatchManager * operator() (const char * hostname) const;
virtual BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node = 1) const;
p[INFILE] += Couple("setb.sh", "tmp/Batch/setb.sh");
p[OUTFILE] = Couple("result.txt", "tmp/Batch/result.txt");
p[TMPDIR] = "tmp/Batch/";
- p[USER] = user;
p[NBPROC] = 1;
p[MAXWALLTIME] = 1;
p[MAXRAMSIZE] = 1;
// Create a BatchManager of type ePBS on localhost
FactBatchManager_eClient * fbm = (FactBatchManager_eClient *)(c("ePBS"));
- BatchManager_eClient * bm = (*fbm)(host.c_str(), protocol, "lam");
+ BatchManager_eClient * bm = (*fbm)(host.c_str(), user.c_str(), protocol, "lam");
// Submit the job to the BatchManager
JobId jobid = bm->submitJob(job);
namespace Batch {
BatchManager_eSGE::BatchManager_eSGE(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager(parent, host)
{
// Nothing to do
public:
// Constructeur et destructeur
BatchManager_eSGE(const FactBatchManager * parent, const char * host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi"); // connexion a la machine host
virtual ~BatchManager_eSGE();
}
BatchManager_eClient * FactBatchManager_eSGE::operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node) const
{
// MESSAGE("Building new BatchManager_SGE on host '" << hostname << "'");
- return new BatchManager_eSGE(this, hostname, protocolType, mpiImpl);
+ return new BatchManager_eSGE(this, hostname, username, protocolType, mpiImpl);
}
virtual BatchManager * operator() (const char * hostname) const;
virtual BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node = 1) const;
namespace Batch {
BatchManager_eSSH::BatchManager_eSSH(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager_Local(parent, host, protocolType),
BatchManager(parent, host)
{
public:
// Constructeur et destructeur
BatchManager_eSSH(const FactBatchManager * parent, const char * host="localhost",
+ const char * username="",
CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi"); // connexion a la machine host
virtual ~BatchManager_eSSH();
Batch::BatchManager_eClient *
Batch::FactBatchManager_eSSH::operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node) const
//protocolType and mpiImpl are ignored.
std::cerr << "[Batch::FactBatchManager_eSSH] creating new Batch::BatchManager_eSSH with hostname = " << hostname << std::endl;
- return new Batch::BatchManager_eSSH(this, hostname);
+ return new Batch::BatchManager_eSSH(this, hostname, username);
}
virtual BatchManager * operator() (const char * hostname) const; // From FactBacthManager
virtual BatchManager_eClient * operator() (const char * hostname,
+ const char * username,
CommunicationProtocolType protocolType,
const char * mpiImpl,
int nb_proc_per_node = 1) const; // From FactBatchManager_eClient