1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
23 // File : SALOME_ResourcesCatalog_Parser.hxx
24 // Author : Estelle Deville
28 #ifndef SALOME_RESOURCES_CATALOG_PARSER
29 #define SALOME_RESOURCES_CATALOG_PARSER
31 #include "ResourcesManager_Defs.hxx"
39 enum AccessProtocolType {rsh, ssh};
41 enum AccessModeType {interactive, batch};
43 enum BatchType {none, pbs, lsf, sge};
45 enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurm, prun};
47 class RESOURCESMANAGER_EXPORT ResourceDataToSort
51 std::string _hostName;
52 unsigned int _nbOfNodes;
53 unsigned int _nbOfProcPerNode;
54 unsigned int _CPUFreqMHz;
55 unsigned int _memInMB;
56 static unsigned int _nbOfNodesWanted;
57 static unsigned int _nbOfProcPerNodeWanted;
58 static unsigned int _CPUFreqMHzWanted;
59 static unsigned int _memInMBWanted;
63 ResourceDataToSort(const std::string& hostname,
64 unsigned int nbOfNodes,
65 unsigned int nbOfProcPerNode,
66 unsigned int CPUFreqMHz,
67 unsigned int memInMB);
68 bool operator< (const ResourceDataToSort& other) const;
72 unsigned int GetNumberOfPoints() const;
75 struct RESOURCESMANAGER_EXPORT ParserResourcesClusterMembersType
78 AccessProtocolType Protocol;
80 std::string AppliPath;
81 ResourceDataToSort DataForSort;
84 struct RESOURCESMANAGER_EXPORT ParserResourcesType
86 ResourceDataToSort DataForSort;
89 AccessProtocolType Protocol;
94 std::string AppliPath;
95 std::vector<std::string> ComponentsList;
96 std::vector<std::string> ModulesList;
98 std::string batchQueue;
99 std::string userCommands;
101 std::list<ParserResourcesClusterMembersType> ClusterMembersList;
102 unsigned int nbOfProc;
108 typedef std::map<std::string, ParserResourcesType> MapOfParserResourcesType;
109 typedef std::map<std::string, ParserResourcesType>::iterator MapOfParserResourcesType_it;
111 #endif //SALOME_RESOURCES_CATALOG_PARSER