Salome HOME
Revert "Synchronize adm files"
[modules/kernel.git] / src / ResourcesManager / ResourcesManager.cxx
index 44e3f577e48257270e5a1d9bb36315fff53f5ec3..1aed4d065e5a13450778ee5de2039cfc9794bb48 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,6 +21,7 @@
 //
 
 #include "ResourcesManager.hxx" 
+#include "SALOME_ResourcesCatalog_Handler.hxx"
 #include <Basics_Utils.hxx>
 #include <fstream>
 #include <iostream>
@@ -30,7 +31,7 @@
 #include <list>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifdef WNT
+#ifdef WIN32
 #else
 #include <unistd.h>
 #endif
@@ -49,6 +50,18 @@ const string ResourcesManager_cpp::DEFAULT_RESOURCE_NAME = "localhost";
 static LoadRateManagerFirst first;
 static LoadRateManagerCycl cycl;
 static LoadRateManagerAltCycl altcycl;
+
+resourceParams::resourceParams()
+: can_launch_batch_jobs(false),
+  can_run_containers(false),
+  nb_proc(-1),
+  nb_node(-1),
+  nb_proc_per_node(-1),
+  cpu_clock(-1),
+  mem_mb(-1)
+{
+}
+
 //=============================================================================
 /*!
  * just for test
@@ -580,7 +593,7 @@ void ResourcesManager_cpp::AddDefaultResourceInCatalog()
   resource.HostName = Kernel_Utils::GetHostname();
   resource.DataForSort._Name = DEFAULT_RESOURCE_NAME;
   resource.Protocol = sh;
-  resource.Batch = ssh_batch;
+  resource.Batch = none;
   if (getenv("HOME") != NULL && getenv("APPLI") != NULL)
   {
     resource.AppliPath = string(getenv("HOME")) + "/" + getenv("APPLI");