Hi,
Please find attached a patch of changes I had to make to file libDrmaa.c
of drmaa-1.6.1 C-source code in order to get it play nice with
drmaa-python 0.7.6 on 64-bit Windows 7.
A short summary of changes:
- An offset of 200 (STAT_NOR_BASE) is added to the status code of
drmaa_wait() on normal job termination (see also file WISDOM), but that
offset was not accounted for in functions drmaa_wtermsig and
drmaa_wcoredump. These functions returned DRMAA_ERRNO_INVALID_ARGUMENT
for a stat value of 200 (= normal termination, 0 + 200).
- The minimum accepted signal buffer size was 100 while drmaa-python has
buffer size 32 (I assumed DRMAA_SIGNAL_BUFFER as defined in drmaa.h:52
is the correct value).
Could someone please confirm that these changes are correct?
Thanks,
Mikko
P.S. Apologies if this is not the right forum for patches/bug reports.
1415c1415
< if (!is_valid_stat(stat) || stat < STAT_SIG_BASE || stat >= STAT_NOR_BASE) {
---
> if (!is_valid_stat(stat) || stat < STAT_SIG_BASE ) {
1418c1418
< } else if (signal == NULL || signal_len <= MIN_SIGNAL_NM_LEN) {
---
> } else if (signal == NULL || signal_len < DRMAA_SIGNAL_BUFFER) {
1422a1423,1424
> if(stat >= STAT_NOR_BASE)
> stat = stat - STAT_NOR_BASE;
1436c1438
< if (!is_valid_stat(stat) || stat < STAT_SIG_BASE || stat >= STAT_NOR_BASE || !core_dumped)
---
> if (!is_valid_stat(stat) || stat < STAT_SIG_BASE || !core_dumped)
1438c1440,1441
<
---
> if(stat >= STAT_NOR_BASE)
> stat = stat - STAT_NOR_BASE;
|