- Timestamp:
- 03/09/15 23:06:35 (9 years ago)
- Location:
- devel/5.X
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/5.X/cpit
r330 r331 1 1 #!/bin/sh 2 2 3 cp /usr/include/torque/pbs_ifl.h .4 3 #cp /usr/include/torque/log.h . 5 4 cp /usr/include/torque/rm.h . 5 6 ## No changes 6 7 cp /usr/include/torque/pbs_error.h . 7 8 8 cp /usr/include/torque/pbs_error_db.h . 9 cp /usr/include/torque/pbs_ifl.h . -
devel/5.X/errors.py
r324 r331 92 92 """ 93 93 e = get_error() 94 if errors_txt.has_key(e):95 return (e, errors_txt[e])96 else:97 return (e, "Could not find a text for this error, uhhh")94 return (e, pbs_strerror(e)) 95 # return (e, errors_txt[e]) 96 # else: 97 # return (e, "Could not find a text for this error, uhhh") -
devel/5.X/pbs.i
r327 r331 23 23 #include "log.h" 24 24 25 #define SARA_DEBUG 025 #define SARA_DEBUG 1 26 26 27 27 //extern int pbs_errno; … … 494 494 int get_error() 495 495 { 496 char *errmsg;497 498 errmsg = pbse_to_txt(pbs_errno);499 496 if (SARA_DEBUG) 500 497 { 501 printf("Bas = %d\n", pbs_errno); 502 printf("Bas = %d, text = %s\n", pbs_errno, errmsg); 498 printf("Bas pbs_errno = %d, pbs_strerror %s\n", pbs_errno, pbs_strerror(pbs_errno)); 503 499 } 504 500 return (pbs_errno); … … 521 517 %include "rm.h" 522 518 %include "log.h" 519 %include "pbs_error.h" 523 520 524 521 -
devel/5.X/pbs.py
r327 r331 841 841 TRUE = _pbs.TRUE 842 842 FALSE = _pbs.FALSE 843 PBSE_TOTAL_CEILING = _pbs.PBSE_TOTAL_CEILING 844 PBSE_ = _pbs.PBSE_ 845 PBSE_NONE = _pbs.PBSE_NONE 846 847 def pbse_to_txt(*args): 848 return _pbs.pbse_to_txt(*args) 849 pbse_to_txt = _pbs.pbse_to_txt 850 851 def pbs_strerror(*args): 852 return _pbs.pbs_strerror(*args) 853 pbs_strerror = _pbs.pbs_strerror 843 854 # PBS python interface 844 855 # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> … … 1080 1091 """ 1081 1092 e = get_error() 1082 if errors_txt.has_key(e):1083 return (e, errors_txt[e])1084 else:1085 return (e, "Could not find a text for this error, uhhh")1093 return (e, pbs_strerror(e)) 1094 # return (e, errors_txt[e]) 1095 # else: 1096 # return (e, "Could not find a text for this error, uhhh") 1086 1097 1087 1098 # This file is compatible with both classic and new-style classes. -
devel/5.X/pbs_node_info
r328 r331 11 11 12 12 nodes = pbs.pbs_statnode(c, '', 'NULL', 'NULL') 13 e, txt = pbs.error()13 e, txt = pbs.error() 14 14 if e: 15 print txt 15 print "statnode erro: %s" %pbs.pbs_strerror(e) 16 print "txt %s\n" %txt 16 17 17 18 for node in nodes: … … 30 31 #mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT) 31 32 mom_id = pbs.openrm("localhost", 15003) 33 print mom_id 32 34 e, e_txt = pbs.error() 33 35 print "openrm", e, e_txt 34 36 print node.name, mom_id, pbs.PBS_MANAGER_SERVICE_PORT 35 pbs.flushreq()37 #pbs.flushreq() 36 38 #pbs.fullresp(1) 37 e, e_txt = pbs.error()38 print "flush", e, e_txt39 #e, e_txt = pbs.error() 40 #print "flush", e, e_txt 39 41 40 42 #pbs.addreq_err(mom_id, err, "arch") 41 pbs.addreq(mom_id, " arch")43 pbs.addreq(mom_id, "larch") 42 44 e, e_txt = pbs.error() 43 45 print "addreq:", e, e_txt -
devel/5.X/pbs_wrap.c
r327 r331 2979 2979 #include "log.h" 2980 2980 2981 #define SARA_DEBUG 02981 #define SARA_DEBUG 1 2982 2982 2983 2983 //extern int pbs_errno; … … 3091 3091 int get_error() 3092 3092 { 3093 char *errmsg;3094 3095 errmsg = pbse_to_txt(pbs_errno);3096 3093 if (SARA_DEBUG) 3097 3094 { 3098 printf("Bas = %d\n", pbs_errno); 3099 printf("Bas = %d, text = %s\n", pbs_errno, errmsg); 3095 printf("Bas pbs_errno = %d, pbs_strerror %s\n", pbs_errno, pbs_strerror(pbs_errno)); 3100 3096 } 3101 3097 return (pbs_errno); … … 8375 8371 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6); 8376 8372 return NULL; 8373 } 8374 8375 8376 SWIGINTERN PyObject *_wrap_pbse_to_txt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 8377 PyObject *resultobj = 0; 8378 int arg1 ; 8379 int val1 ; 8380 int ecode1 = 0 ; 8381 PyObject * obj0 = 0 ; 8382 char *result = 0 ; 8383 8384 if (!PyArg_ParseTuple(args,(char *)"O:pbse_to_txt",&obj0)) SWIG_fail; 8385 ecode1 = SWIG_AsVal_int(obj0, &val1); 8386 if (!SWIG_IsOK(ecode1)) { 8387 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbse_to_txt" "', argument " "1"" of type '" "int""'"); 8388 } 8389 arg1 = (int)(val1); 8390 result = (char *)pbse_to_txt(arg1); 8391 resultobj = SWIG_FromCharPtr((const char *)result); 8392 return resultobj; 8393 fail: 8394 return NULL; 8395 } 8396 8397 8398 SWIGINTERN PyObject *_wrap_pbs_strerror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 8399 PyObject *resultobj = 0; 8400 int arg1 ; 8401 int val1 ; 8402 int ecode1 = 0 ; 8403 PyObject * obj0 = 0 ; 8404 char *result = 0 ; 8405 8406 if (!PyArg_ParseTuple(args,(char *)"O:pbs_strerror",&obj0)) SWIG_fail; 8407 ecode1 = SWIG_AsVal_int(obj0, &val1); 8408 if (!SWIG_IsOK(ecode1)) { 8409 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pbs_strerror" "', argument " "1"" of type '" "int""'"); 8410 } 8411 arg1 = (int)(val1); 8412 result = (char *)pbs_strerror(arg1); 8413 resultobj = SWIG_FromCharPtr((const char *)result); 8414 return resultobj; 8415 fail: 8416 return NULL; 8417 } 8418 8419 8420 SWIGINTERN int Swig_var_pbs_errno_set(PyObject *_val) { 8421 { 8422 int val; 8423 int res = SWIG_AsVal_int(_val, &val); 8424 if (!SWIG_IsOK(res)) { 8425 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""pbs_errno""' of type '""int""'"); 8426 } 8427 pbs_errno = (int)(val); 8428 } 8429 return 0; 8430 fail: 8431 return 1; 8432 } 8433 8434 8435 SWIGINTERN PyObject *Swig_var_pbs_errno_get(void) { 8436 PyObject *pyobj = 0; 8437 8438 pyobj = SWIG_From_int((int)(pbs_errno)); 8439 return pyobj; 8377 8440 } 8378 8441 … … 8490 8553 { (char *)"log_init", _wrap_log_init, METH_VARARGS, NULL}, 8491 8554 { (char *)"chk_file_sec", _wrap_chk_file_sec, METH_VARARGS, NULL}, 8555 { (char *)"pbse_to_txt", _wrap_pbse_to_txt, METH_VARARGS, NULL}, 8556 { (char *)"pbs_strerror", _wrap_pbs_strerror, METH_VARARGS, NULL}, 8492 8557 { NULL, NULL, 0, NULL } 8493 8558 }; … … 9640 9705 SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1))); 9641 9706 SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0))); 9707 SWIG_Python_SetConstant(d, "PBSE_TOTAL_CEILING",SWIG_From_int((int)(PBSE_TOTAL_CEILING))); 9708 SWIG_Python_SetConstant(d, "PBSE_",SWIG_From_int((int)(15000))); 9709 SWIG_Python_SetConstant(d, "PBSE_NONE",SWIG_From_int((int)(0))); 9710 SWIG_addvarlink(SWIG_globals(),(char*)"pbs_errno",Swig_var_pbs_errno_get, Swig_var_pbs_errno_set); 9642 9711 #if PY_VERSION_HEX >= 0x03000000 9643 9712 return m; -
devel/5.X/rm.h
r327 r331 95 95 int addreq(int, char *); 96 96 int allreq(char *); 97 char *getreq_err(int *INOUT, int);98 char *getreq(int);97 char* getreq_err(int *INOUT, int); 98 char* getreq(int); 99 99 int flushreq(void); 100 100 int activereq(void);
Note: See TracChangeset
for help on using the changeset viewer.