command = "rsh ";
else if (resInfo.Protocol == ssh)
command = "ssh ";
+ else if (resInfo.Protocol == srun)
+ command = "srun -n 1 -N 1 --share --nodelist=";
else
throw SALOME_Exception("Unknown protocol");
commandRcp += _TmpFileName;
status = system(commandRcp.c_str());
}
+
+ else if (resInfo.Protocol == srun)
+ {
+ command = "srun -n 1 -N 1 --share --nodelist=";
+ std::string commandRcp = "rcp ";
+ commandRcp += _TmpFileName;
+ commandRcp += " ";
+ commandRcp += resInfo.HostName;
+ commandRcp += ":";
+ commandRcp += _TmpFileName;
+ status = system(commandRcp.c_str());
+ }
else
throw SALOME_Exception("Unknown protocol");
command = "rsh ";
else if (resInfo.Protocol == ssh)
command = "ssh ";
+ else if (resInfo.Protocol == srun)
+ command = "srun -n 1 -N 1 --share --nodelist=";
else
throw SALOME_Exception("Unknown protocol");
std::string resource_protocol = "ssh";
if (_resource_definition.ClusterInternalProtocol == rsh)
resource_protocol = "rsh";
-
+ else if (_resource_definition.ClusterInternalProtocol == srun)
+ resource_protocol = "srun";
+
launch_script_stream << "if [ \"x$LIBBATCH_NODEFILE\" != \"x\" ]; then " << std::endl;
launch_script_stream << "CATALOG_FILE=" << "CatalogResources_" << _launch_date << ".xml" << std::endl;
launch_script_stream << "export USER_CATALOG_RESOURCES_FILE=" << "$CATALOG_FILE" << std::endl;
resource.Protocol = rsh;
break;
case 's':
- resource.Protocol = ssh;
+ if (protocol[1] == 's')
+ resource.Protocol = ssh;
+ else
+ resource.Protocol = srun;
break;
default:
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
resource.ClusterInternalProtocol = rsh;
break;
case 's':
- resource.ClusterInternalProtocol = ssh;
+ if (iprotocol[1] == 's')
+ resource.ClusterInternalProtocol = ssh;
+ else
+ resource.ClusterInternalProtocol = srun;
break;
default:
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
resource.Protocol = rsh;
break;
case 's':
- resource.Protocol = ssh;
+ if (protocol[1] == 's')
+ resource.Protocol = ssh;
+ else
+ resource.Protocol = srun;
break;
default:
// If it'not in all theses cases, the protocol is affected to rsh
resource.ClusterInternalProtocol = rsh;
break;
case 's':
- resource.ClusterInternalProtocol = ssh;
+ if (iprotocol[1] == 's')
+ resource.ClusterInternalProtocol = ssh;
+ else
+ resource.ClusterInternalProtocol = srun;
break;
default:
// If it'not in all theses cases, the protocol is affected to rsh
case ssh:
xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "ssh");
break;
+ case srun:
+ xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "srun");
+ break;
default:
xmlNewProp(node, BAD_CAST test_protocol, BAD_CAST "rsh");
}
case ssh:
xmlNewProp(node, BAD_CAST test_cluster_internal_protocol, BAD_CAST "ssh");
break;
+ case srun:
+ xmlNewProp(node, BAD_CAST test_cluster_internal_protocol, BAD_CAST "srun");
+ break;
default:
xmlNewProp(node, BAD_CAST test_cluster_internal_protocol, BAD_CAST "rsh");
}
{
if (Protocol == rsh)
return "rsh";
+ else if (Protocol == srun)
+ return "srun";
else
return "ssh";
}
{
if (ClusterInternalProtocol == rsh)
return "rsh";
+ else if (ClusterInternalProtocol == srun)
+ return "srun";
else
return "ssh";
}
#pragma warning(disable:4251) // Warning DLL Interface ...
#endif
-enum AccessProtocolType {rsh, ssh};
+enum AccessProtocolType {rsh, ssh, srun};
enum AccessModeType {interactive, batch};
p_ptr->protocol = "rsh";
else if( resource.Protocol == ssh )
p_ptr->protocol = "ssh";
+ else if( resource.Protocol == srun )
+ p_ptr->protocol = "srun";
if( resource.ClusterInternalProtocol == rsh )
p_ptr->iprotocol = "rsh";
else if( resource.ClusterInternalProtocol == ssh )
p_ptr->iprotocol = "ssh";
+ else if( resource.ClusterInternalProtocol == srun )
+ p_ptr->iprotocol = "srun";
p_ptr->username = CORBA::string_dup(resource.UserName.c_str());
p_ptr->applipath = CORBA::string_dup(resource.AppliPath.c_str());
p_ptr->componentList.length(resource.ComponentsList.size());
resource.Protocol = rsh;
else if (protocol == "ssh")
resource.Protocol = ssh;
+ else if (protocol == "srun")
+ resource.Protocol = srun;
else if (protocol == "")
resource.Protocol = rsh;
else {
resource.ClusterInternalProtocol = rsh;
else if (iprotocol == "ssh")
resource.ClusterInternalProtocol = ssh;
+ else if (iprotocol == "srun")
+ resource.ClusterInternalProtocol = srun;
else if (iprotocol == "")
resource.ClusterInternalProtocol = rsh;
else {