diff options
author | tradke <tradke@83718e91-0e4f-0410-abf4-91180603181f> | 2007-09-25 16:58:23 +0000 |
---|---|---|
committer | tradke <tradke@83718e91-0e4f-0410-abf4-91180603181f> | 2007-09-25 16:58:23 +0000 |
commit | 96119a3513ab60ea7ac1c501b8e8ebe3ed0ecf31 (patch) | |
tree | 7998621324e267f2c5568d2789117f7ac99212a7 | |
parent | 4c619710faa37041d2cff2c8a09a0dc043e4f648 (diff) |
guess from the local hostname whether we are running as a PBS job on
damiana.aei.mpg.de (where PBS_O_HOST isn't set by the MPI runtime system)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@139 83718e91-0e4f-0410-abf4-91180603181f
-rw-r--r-- | src/rdf.cc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -127,6 +127,15 @@ namespace Formaline msgbuf << "\tcctk:pbsJobname=\"" << clean (pbsJobname) << "\"" << endl; } const char* pbsHost = getenv ("PBS_O_HOST"); + if (not pbsHost) { + // check whether we are running on damiana where the MPI runtime system + // doesn't pass on PBS environment settings + if (strlen(hostbuf) == 21 && + strncmp(hostbuf, "node", 4) == 0 && + strncmp(hostbuf + 7, ".damiana.admin", 13) == 0) { + pbsHost = "damiana.damiana.admin"; + } + } if (pbsHost) { // fix incomplete and/or strange PBS headnode hostnames if (strncmp(pbsHost, "peyote", 6) == 0) { |