-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
}
}
-std::string
-SALOME_ResourcesManager::getMachineFile(std::string resource_name,
+char *
+SALOME_ResourcesManager::getMachineFile(const char * resource_name,
CORBA::Long nb_procs,
- std::string parallelLib)
+ const char * parallelLib)
{
std::string machine_file_name("");
- if (parallelLib == "Dummy")
+ if (std::string(parallelLib) == "Dummy")
{
MESSAGE("[getMachineFile] parallelLib is Dummy");
MapOfParserResourcesType resourcesList = _rm.GetList();
- if (resourcesList.find(resource_name) != resourcesList.end())
+ if (resourcesList.find(std::string(resource_name)) != resourcesList.end())
{
- ParserResourcesType resource = resourcesList[resource_name];
+ ParserResourcesType resource = resourcesList[std::string(resource_name)];
// Check if resource is cluster or not
if (resource.ClusterMembersList.empty())
else
INFOS("[getMachineFile] Error resource_name not found in resourcesList -> " << resource_name);
}
- else if (parallelLib == "Mpi")
+ else if (std::string(parallelLib) == "Mpi")
{
MESSAGE("[getMachineFile] parallelLib is Mpi");
MapOfParserResourcesType resourcesList = _rm.GetList();
- if (resourcesList.find(resource_name) != resourcesList.end())
+ if (resourcesList.find(std::string(resource_name)) != resourcesList.end())
{
- ParserResourcesType resource = resourcesList[resource_name];
+ ParserResourcesType resource = resourcesList[std::string(resource_name)];
// Check if resource is cluster or not
if (resource.ClusterMembersList.empty())
{
else
INFOS("[getMachineFile] Error parallelLib is not handled -> " << parallelLib);
- return machine_file_name;
+ return CORBA::string_dup(machine_file_name.c_str());
}