Ignore:
Timestamp:
10/31/12 14:10:21 (12 years ago)
Author:
mmamonski
Message:

bump version, avoid segault on missing jobs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/slurm_drmaa/util.c

    r28 r29  
    9494        else if (strcasecmp(mail_type_str, "FAIL") == 0) 
    9595                rc = MAIL_JOB_FAIL; 
     96#if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
    9697        else if (strcasecmp(mail_type_str, "REQUEUE") == 0) 
    9798                rc = MAIL_JOB_REQUEUE; 
     99#endif 
    98100        else if (strcasecmp(mail_type_str, "ALL") == 0) 
     101#if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
    99102                rc = MAIL_JOB_BEGIN | MAIL_JOB_END | MAIL_JOB_FAIL | MAIL_JOB_REQUEUE; 
    100         else 
    101                 rc = 0; /* failure */ 
     103#else 
     104                rc = MAIL_JOB_BEGIN | MAIL_JOB_END | MAIL_JOB_FAIL; 
     105#endif 
     106        else { 
     107                fsd_log_error(("Unknown mail type: %s", mail_type_str)); 
     108        } 
    102109 
    103110        return rc; 
     
    163170        fsd_free(job_desc->std_err);     
    164171        fsd_free(job_desc->work_dir); 
     172        fsd_free(job_desc->exc_nodes); 
     173#if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
    165174        fsd_free(job_desc->gres); 
    166         fsd_free(job_desc->exc_nodes); 
    167  
     175#endif 
    168176         
    169177        fsd_log_return(( "" )); 
     
    309317                        break;   
    310318                case SLURM_NATIVE_GRES: 
     319                        #if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
    311320                        fsd_log_debug(("# gres = %s",value)); 
    312321                        job_desc->gres = fsd_strdup(value); 
     322                        #else 
     323                        fsd_log_error(("GRES not supported in this version of SLURM.")); 
     324                        #endif 
    313325                        break; 
    314326                case SLURM_NATIVE_NO_KILL: 
Note: See TracChangeset for help on using the changeset viewer.