A class to parse the PBS_NODEFILE and PBS_GPUFILE.
More...
#include <nodefileparser.h>
|
bool | parse (QString &filename, bool ignoreCores=false, bool ignoreGPUs=true) |
|
A class to parse the PBS_NODEFILE and PBS_GPUFILE.
LangmuirCore::NodeFileParser::NodeFileParser |
( |
const QString & |
nodefile = "" , |
|
|
const QString & |
gpufile = "" , |
|
|
QObject * |
parent = 0 |
|
) |
| |
|
explicit |
create NodeFileParser
- Parameters
-
nodefile | path to NODEFILE |
gpufile | path to GPUFILE |
parent | QObject this belongs to |
void LangmuirCore::NodeFileParser::clear |
( |
| ) |
|
const QStringList& LangmuirCore::NodeFileParser::cpus |
( |
| ) |
|
void LangmuirCore::NodeFileParser::createNode |
( |
const QString & |
name, |
|
|
int |
cores = 0 , |
|
|
QList< int > |
gpus = QList< int >() |
|
) |
| |
add cpu to records
- Parameters
-
name | name of cpu |
cores | number of cores |
gpus | list of GPU ids |
int LangmuirCore::NodeFileParser::GPUid |
( |
const QString & |
name, |
|
|
int |
i |
|
) |
| |
get the ith gpu id on host
- Parameters
-
const QList<int>& LangmuirCore::NodeFileParser::gpus |
( |
const QString & |
name | ) |
|
get the number of gpus on host
- Parameters
-
const QString& LangmuirCore::NodeFileParser::hostName |
( |
| ) |
|
get the hostname of this cpu
int LangmuirCore::NodeFileParser::numCPUs |
( |
| ) |
|
int LangmuirCore::NodeFileParser::numGPUS |
( |
| ) |
|
get the number of gpus on all hosts
int LangmuirCore::NodeFileParser::numGPUs |
( |
const QString & |
name | ) |
|
get the number of gpus on host
- Parameters
-
int LangmuirCore::NodeFileParser::numProc |
( |
| ) |
|
get the number of processes on all hosts
int LangmuirCore::NodeFileParser::numProc |
( |
const QString & |
name | ) |
|
get the number of processes on host
- Parameters
-
bool LangmuirCore::NodeFileParser::parse |
( |
QString & |
filename, |
|
|
bool |
ignoreCores = false , |
|
|
bool |
ignoreGPUs = true |
|
) |
| |
|
private |
parse NODEFILE or GPUFILE
- Parameters
-
filename | name of file to parse |
ignoreCores | do not parse core information |
ignoreGPUs | do not parse gpu information |
- Returns
- true if success
const QMap<QString,int>& LangmuirCore::NodeFileParser::procs |
( |
| ) |
|
get the number of processes on all hosts
void LangmuirCore::NodeFileParser::setDefault |
( |
| ) |
|
set the default based on QThreadPool and hostname
void LangmuirCore::NodeFileParser::setHostName |
( |
const QString & |
hostName | ) |
|
set the name of this CPU
- Parameters
-
void LangmuirCore::NodeFileParser::setHostName |
( |
| ) |
|
set the name of this CPU using boost::asio::ip::hostname()
void LangmuirCore::NodeFileParser::setPaths |
( |
const QString & |
nodefile = "" , |
|
|
const QString & |
gpufile = "" |
|
) |
| |
aquire the paths of the GPUFILE and the NODEFILE and parse them
- Parameters
-
nodefile | path to NODEFILE |
gpufile | path to GPUFILE |
If nodefile is empty the enviroment variable PBS_NODEFILE is used. If gpufile is empty, the enviroment variable PBS_GPUFILE is used. If both paths remain empty, then setDefault() is used.
operator overload for QDebug
QMap<QString,int> LangmuirCore::NodeFileParser::m_cores |
|
private |
list of core counts per cpu
QString LangmuirCore::NodeFileParser::m_gpufile |
|
private |
QMap<QString,QList<int> > LangmuirCore::NodeFileParser::m_gpus |
|
private |
QString LangmuirCore::NodeFileParser::m_hostName |
|
private |
hostname of this computer
QStringList LangmuirCore::NodeFileParser::m_names |
|
private |
QString LangmuirCore::NodeFileParser::m_nodefile |
|
private |
The documentation for this class was generated from the following file: