Opened 9 years ago
Last modified 9 years ago
#46 reopened defect
printfs in src/C++/pbs_wrap.cxx
Reported by: | glen.beane@… | Owned by: | bas |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | pbs | Version: | 4.4.0 |
Keywords: | Cc: |
Description
pbs_wrap.cxx has several printf statements that have been commented out in pbs_wrap.c.
For example, both new_attrl and new_attropl have printf("constructor called\n"); statements which are commented out in src/C/pbs_wrap.c.
new_attrl also includes printf("basje \n"); which is completely absent in the version in src/C/pbs_wrap.c
I don't know how many other printf statements need to be removed or commented out, the only message I noticed when I used pbs_python was "constructor called" (which appears many times when I run my code)
Attachments (1)
Change History (11)
comment:1 Changed 9 years ago by bas
comment:2 Changed 9 years ago by Glen.Beane@…
This is in trunk from subversion
comment:3 Changed 9 years ago by Glen.Beane@…
pbs_wrap.cxx: struct attrl *new_attrl(int number) { struct attrl *ptr; struct attrl *prev, *current; int i; /* allocate memory as a one block is handy for Python scripts and fill in the next fields so it also works for the C-library */ printf("basje \n"); ptr = (struct attrl *) malloc(number * sizeof(struct attrl)); prev = NULL; current = ptr + (number - 1); for (i=0; i < number; i++) { printf("constructor called\n"); pbs_wrap.c: struct attrl *new_attrl(int number) { struct attrl *ptr; struct attrl *prev, *current; int i; /* allocate memory as a one block is handy for Python scripts and fill in the next fields so it also works for the C-library */ ptr = (struct attrl *) malloc(number * sizeof(struct attrl)); prev = NULL; current = ptr + (number - 1); for (i=0; i < number; i++) { // printf("constructor called\n");
comment:4 Changed 9 years ago by bas
I will remove them. I was busy to reduce the memory footprint.
comment:5 Changed 9 years ago by bas
- Resolution set to fixed
- Status changed from new to closed
In 325:
comment:6 Changed 9 years ago by anonymous
- Resolution fixed deleted
- Status changed from closed to reopened
Looks like this didn't make it into trunk, as
printf("constructor called\n");
is still executed in pbs_wrap.cxx
I just checked out trunk today and had to edit the source to remove these printf statements
comment:7 Changed 9 years ago by anonymous
Looks like they were commented out for Torque 5 only but not Torque 4
comment:8 Changed 9 years ago by bas
I will fixed it for torque 4, sorry ;-(. I only have torque 5 and 2.5 installed
comment:9 Changed 9 years ago by ewan.higgs@…
- Priority changed from major to blocker
This is still not fixed in trunk or 4.6.0:
Trunk: https://oss.trac.surfsara.nl/pbs_python/browser/trunk/src/C%2B%2B/pbs_wrap.cxx#L3018
4.6.0: https://oss.trac.surfsara.nl/pbs_python/browser/tags/4.6.0/src/C%2B%2B/pbs_wrap.cxx#L3018
Upping this to a blocker since it's unusable in user facing scripts.
comment:10 Changed 9 years ago by bas
thanks patch applied for trunk and devel op version. This is only for torque version 4. Torque version 5 has no printf statements
Glenn,