Legend:
- Unmodified
- Added
- Removed
-
devel/5.X/log.h
r324 r327 151 151 typedef enum getter_setter SGetter; 152 152 153 // H VB extern int LOGLEVEL;153 // HvB extern int LOGLEVEL; 154 154 155 155 extern long *log_event_mask; -
devel/5.X/pbs.i
r326 r327 417 417 and fill in the next fields so it also works for the C-library 418 418 */ 419 printf("basje \n"); 419 420 if (SARA_DEBUG) 421 { 422 printf("new_attrl \n"); 423 } 420 424 ptr = (struct attrl *) malloc(number * sizeof(struct attrl)); 421 425 -
devel/5.X/pbs.py
r324 r327 929 929 Get the default values from the mom daemon 930 930 """ 931 err = 0 932 print default_mom_res 931 933 for res in default_mom_res: 932 addreq(id, res) 933 resp = getreq(id) 934 print res 935 #addreq(id, res) 936 addreq_err(id, err, res) 937 print err 938 #resp = getreq(id) 939 resp = getreq_err(err, id) 940 print "error: ", err 941 942 print resp,id 934 943 check_resp(d, resp) 935 944 -
devel/5.X/pbs_node_info
r324 r327 19 19 attrs = node.attribs 20 20 for attr in attrs: 21 print '\t ', attr.name, ' = ', attr.value21 print '\t ', attr.name, ' = ', attr.value 22 22 23 try: 24 mom_port = socket.getservbyname('pbs_resmom', 'tcp') 25 mom_id = pbs.openrm(node.name, mom_port) 26 except socket.error, detail: 27 mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT) 23 # try: 24 # mom_port = socket.getservbyname('pbs_resmom', 'tcp') 25 # mom_id = pbs.openrm(node.name, mom_port) 26 # except socket.error, detail: 27 # mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT) 28 29 err = 0 30 mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT) 31 e, e_txt = pbs.error() 32 print "openrm", e, e_txt 33 print node.name, mom_id, pbs.PBS_MANAGER_SERVICE_PORT 34 pbs.flushreq() 35 #pbs.fullresp(1) 36 e, e_txt = pbs.error() 37 print "flush", e, e_txt 38 39 #pbs.addreq_err(mom_id, err, "arch") 40 pbs.addreq(mom_id, "arch") 41 e, e_txt = pbs.error() 42 print "addreq:", e, e_txt 43 44 print pbs.activereq() 45 e, e_txt = pbs.error() 46 print "addreq:", e, e_txt 47 48 #resp = pbs.getreq_err(err, mom_id) 49 resp = pbs.getreq(mom_id) 50 e, e_txt = pbs.error() 51 print e, e_txt 52 print err, resp 53 54 sys.exit(1) 55 print 'rm interface' 28 56 29 57 mom_keys = pbs.get_mom_values(mom_id) 30 58 for key in mom_keys.keys(): 31 print '\t %s = %s' %(key, mom_keys[key])59 print '\t mom %s = %s' %(key, mom_keys[key]) 32 60 33 61 print 'Testing list with user supplied keywords' -
devel/5.X/pbs_wrap.c
r324 r327 3014 3014 and fill in the next fields so it also works for the C-library 3015 3015 */ 3016 printf("basje \n"); 3016 3017 if (SARA_DEBUG) 3018 { 3019 printf("new_attrl \n"); 3020 } 3017 3021 ptr = (struct attrl *) malloc(number * sizeof(struct attrl)); 3018 3022 … … 3021 3025 for (i=0; i < number; i++) 3022 3026 { 3023 printf("constructor called\n");3027 // printf("constructor called\n"); 3024 3028 current->name = (char *) malloc(MAXNAMLEN * sizeof(char)); 3025 3029 current->resource = (char *) malloc(MAXNAMLEN * sizeof(char)); … … 3058 3062 for (i=0; i < number; i++) 3059 3063 { 3060 printf("constructor called\n");3064 // printf("constructor called\n"); 3061 3065 current->name = (char *) malloc(MAXNAMLEN * sizeof(char)); 3062 3066 current->resource = (char *) malloc(MAXNAMLEN * sizeof(char)); … … 5550 5554 char *buf4 = 0 ; 5551 5555 int alloc4 = 0 ; 5552 void *argp5 = 0 ;5553 int res5 = 0 ;5554 5556 int res6 ; 5555 5557 char *buf6 = 0 ; … … 5584 5586 } 5585 5587 arg4 = (char *)(buf4); 5586 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_attropl, 0 | 0 ); 5587 if (!SWIG_IsOK(res5)) { 5588 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_manager" "', argument " "5"" of type '" "struct attropl *""'"); 5589 } 5590 arg5 = (struct attropl *)(argp5); 5588 { 5589 PyObject *py_obj; 5590 struct attropl *ptr, *prev; 5591 char s[255]; 5592 int i=0, size=0; 5593 5594 // printf("Python --> C\n"); 5595 5596 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 5597 5598 size = Get_List_Size(obj4); 5599 5600 if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size); 5601 5602 if ( size == -1 ) { 5603 PyErr_SetString(PyExc_TypeError, "not a list"); 5604 return NULL; 5605 } 5606 //printf("Size = %d\n", size); 5607 5608 if (SARA_DEBUG) printf("\t<Contents>\n"); 5609 5610 arg5 = prev = NULL; 5611 for ( i=0; i < size; i++ ) { 5612 py_obj = PyList_GetItem(obj4, i); 5613 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 5614 sprintf(s,"list item %d has wrong type", i); 5615 PyErr_SetString(PyExc_TypeError, s); 5616 return NULL; 5617 5618 // This will skipp the wrong entry 5619 // continue; 5620 } 5621 5622 /* 5623 * Make first entry head of C linked list 5624 */ 5625 if ( i == 0) { 5626 arg5 = ptr; 5627 ptr->next = prev; 5628 } 5629 else { 5630 prev->next = ptr; 5631 ptr->next = NULL; 5632 } 5633 prev = ptr; 5634 5635 } // end for 5636 if (SARA_DEBUG) printf("\t</Contents>\n"); 5637 } 5591 5638 res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); 5592 5639 if (!SWIG_IsOK(res6)) { … … 6309 6356 PyObject *resultobj = 0; 6310 6357 struct batch_status *arg1 = (struct batch_status *) 0 ; 6311 void *argp1 = 0 ;6312 int res1 = 0 ;6313 6358 PyObject * obj0 = 0 ; 6314 6359 6315 6360 if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail; 6316 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 | 0 ); 6317 if (!SWIG_IsOK(res1)) { 6318 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_statfree" "', argument " "1"" of type '" "struct batch_status *""'"); 6319 } 6320 arg1 = (struct batch_status *)(argp1); 6361 { 6362 PyObject *py_obj; 6363 struct batch_status *ptr, *prev; 6364 char s[255]; 6365 int i=0, size=0; 6366 6367 // printf("Python --> C\n"); 6368 6369 if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n"); 6370 6371 size = Get_List_Size(obj0); 6372 if (SARA_DEBUG) printf("\tSize of batch_status list: %d\n", size); 6373 6374 if ( size == -1 ) { 6375 PyErr_SetString(PyExc_TypeError, "not a list"); 6376 return NULL; 6377 } 6378 // printf("Size = %d\n", size); 6379 6380 if (SARA_DEBUG) printf("\t<Contents>\n"); 6381 6382 arg1 = prev = NULL; 6383 for ( i=0; i < size; i++ ) { 6384 py_obj = PyList_GetItem(obj0, i); 6385 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) { 6386 sprintf(s,"list item %d has wrong type", i); 6387 PyErr_SetString(PyExc_TypeError, s); 6388 return NULL; 6389 6390 // This will skipp the wrong entry 6391 // continue; 6392 } 6393 6394 /* 6395 * Make first entry head of C linked list 6396 */ 6397 if ( i == 0) { 6398 arg1 = ptr; 6399 ptr->next = prev; 6400 } 6401 else { 6402 prev->next = ptr; 6403 ptr->next = NULL; 6404 } 6405 6406 if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name); 6407 prev = ptr; 6408 6409 } // end for 6410 6411 if (SARA_DEBUG) printf("\t</Contents>\n"); 6412 } 6321 6413 pbs_statfree(arg1); 6322 6414 resultobj = SWIG_Py_Void(); … … 6929 7021 int val1 ; 6930 7022 int ecode1 = 0 ; 6931 void *argp2 = 0 ;6932 int res2 = 0 ;6933 7023 int res3 ; 6934 7024 char *buf3 = 0 ; … … 6953 7043 } 6954 7044 arg1 = (int)(val1); 6955 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, 0 | 0 ); 6956 if (!SWIG_IsOK(res2)) { 6957 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_submit" "', argument " "2"" of type '" "struct attropl *""'"); 6958 } 6959 arg2 = (struct attropl *)(argp2); 7045 { 7046 PyObject *py_obj; 7047 struct attropl *ptr, *prev; 7048 char s[255]; 7049 int i=0, size=0; 7050 7051 // printf("Python --> C\n"); 7052 7053 if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n"); 7054 7055 size = Get_List_Size(obj1); 7056 7057 if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size); 7058 7059 if ( size == -1 ) { 7060 PyErr_SetString(PyExc_TypeError, "not a list"); 7061 return NULL; 7062 } 7063 //printf("Size = %d\n", size); 7064 7065 if (SARA_DEBUG) printf("\t<Contents>\n"); 7066 7067 arg2 = prev = NULL; 7068 for ( i=0; i < size; i++ ) { 7069 py_obj = PyList_GetItem(obj1, i); 7070 if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) { 7071 sprintf(s,"list item %d has wrong type", i); 7072 PyErr_SetString(PyExc_TypeError, s); 7073 return NULL; 7074 7075 // This will skipp the wrong entry 7076 // continue; 7077 } 7078 7079 /* 7080 * Make first entry head of C linked list 7081 */ 7082 if ( i == 0) { 7083 arg2 = ptr; 7084 ptr->next = prev; 7085 } 7086 else { 7087 prev->next = ptr; 7088 ptr->next = NULL; 7089 } 7090 prev = ptr; 7091 7092 } // end for 7093 if (SARA_DEBUG) printf("\t</Contents>\n"); 7094 } 6960 7095 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 6961 7096 if (!SWIG_IsOK(res3)) { … … 7522 7657 int val1 ; 7523 7658 int ecode1 = 0 ; 7524 void *argp2 = 0;7659 int temp2 ; 7525 7660 int res2 = 0 ; 7526 7661 int res3 ; … … 7538 7673 } 7539 7674 arg1 = (int)(val1); 7540 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 ); 7541 if (!SWIG_IsOK(res2)) { 7542 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq_err" "', argument " "2"" of type '" "int *""'"); 7543 } 7544 arg2 = (int *)(argp2); 7675 if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) { 7676 int val; 7677 int ecode = SWIG_AsVal_int(obj1, &val); 7678 if (!SWIG_IsOK(ecode)) { 7679 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "addreq_err" "', argument " "2"" of type '" "int""'"); 7680 } 7681 temp2 = (int)(val); 7682 arg2 = &temp2; 7683 res2 = SWIG_AddTmpMask(ecode); 7684 } 7545 7685 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); 7546 7686 if (!SWIG_IsOK(res3)) { … … 7550 7690 result = (int)addreq_err(arg1,arg2,arg3); 7551 7691 resultobj = SWIG_From_int((int)(result)); 7692 if (SWIG_IsTmpObj(res2)) { 7693 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); 7694 } else { 7695 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 7696 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); 7697 } 7552 7698 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); 7553 7699 return resultobj; … … 7661 7807 int *arg1 = (int *) 0 ; 7662 7808 int arg2 ; 7663 void *argp1 = 0;7809 int temp1 ; 7664 7810 int res1 = 0 ; 7665 7811 int val2 ; … … 7670 7816 7671 7817 if (!PyArg_ParseTuple(args,(char *)"OO:getreq_err",&obj0,&obj1)) SWIG_fail; 7672 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 ); 7673 if (!SWIG_IsOK(res1)) { 7674 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getreq_err" "', argument " "1"" of type '" "int *""'"); 7675 } 7676 arg1 = (int *)(argp1); 7818 if (!(SWIG_IsOK((res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1),SWIGTYPE_p_int,0))))) { 7819 int val; 7820 int ecode = SWIG_AsVal_int(obj0, &val); 7821 if (!SWIG_IsOK(ecode)) { 7822 SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "getreq_err" "', argument " "1"" of type '" "int""'"); 7823 } 7824 temp1 = (int)(val); 7825 arg1 = &temp1; 7826 res1 = SWIG_AddTmpMask(ecode); 7827 } 7677 7828 ecode2 = SWIG_AsVal_int(obj1, &val2); 7678 7829 if (!SWIG_IsOK(ecode2)) { … … 7682 7833 result = (char *)getreq_err(arg1,arg2); 7683 7834 resultobj = SWIG_FromCharPtr((const char *)result); 7835 if (SWIG_IsTmpObj(res1)) { 7836 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); 7837 } else { 7838 int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; 7839 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags)); 7840 } 7684 7841 return resultobj; 7685 7842 fail: -
devel/5.X/resmom.py
r324 r327 87 87 Get the default values from the mom daemon 88 88 """ 89 err = 0 90 print default_mom_res 89 91 for res in default_mom_res: 90 addreq(id, res) 91 resp = getreq(id) 92 print res 93 #addreq(id, res) 94 addreq_err(id, err, res) 95 print err 96 #resp = getreq(id) 97 resp = getreq_err(err, id) 98 print "error: ", err 99 100 print resp,id 92 101 check_resp(d, resp) 93 102 -
devel/5.X/rm.h
r324 r327 82 82 ** to the resource monitor. 83 83 */ 84 85 84 #ifdef __cplusplus 86 85 extern "C" … … 92 91 int downrm(int *, int); 93 92 int configrm(int, int *, char *); 94 int addreq_err(int, int * , char *);93 int addreq_err(int, int *INOUT, char *); 95 94 int begin_rm_req(int ,int *,int ); 96 95 int addreq(int, char *); 97 96 int allreq(char *); 98 char * getreq_err(int *, int);99 char *getreq(int);97 char *getreq_err(int *INOUT, int); 98 char *getreq(int); 100 99 int flushreq(void); 101 100 int activereq(void); … … 104 103 } 105 104 #endif 106
Note: See TracChangeset
for help on using the changeset viewer.