Changeset 13 for trunk


Ignore:
Timestamp:
01/02/11 17:13:14 (14 years ago)
Author:
mmatloka
Message:

support for slurm 2.2

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r7 r13  
    22# 
    33# PSNC DRMAA for LoadLeveler 
    4 # Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4# Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55# 
    66# This program is free software: you can redistribute it and/or modify 
  • trunk/configure.ac

    r7 r13  
    44AC_COPYRIGHT([ 
    55PSNC DRMAA for SLURM 
    6 Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     6Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    77 
    88 
     
    2323SLURM_DRMAA_MAJOR=1 
    2424SLURM_DRMAA_MINOR=0 
    25 SLURM_DRMAA_MICRO=0 
    26 SLURM_DRMAA_VERSION_INFO=1:0:0 
     25SLURM_DRMAA_MICRO=1 
     26SLURM_DRMAA_VERSION_INFO=1:0:1 
    2727AC_SUBST([SLURM_DRMAA_MAJOR]) 
    2828AC_SUBST([SLURM_DRMAA_MINOR]) 
  • trunk/doc/Makefile.am

    r5 r13  
    22# 
    33# PSNC DRMAA for LoadLeveler 
    4 # Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4# Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55# 
    66# This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/Makefile.am

    r5 r13  
    22# 
    33# PSNC DRMAA for LoadLeveler 
    4 # Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4# Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55# 
    66# This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/drmaa.c

    r5 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/job.c

    r7 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
     
    6262                                job_desc.job_id = atoi(self->job_id); 
    6363                                job_desc.priority = 0; 
     64                                job_desc.alloc_sid = 0; 
    6465                                if(slurm_update_job(&job_desc) == -1) { 
    6566                                        fsd_exc_raise_fmt(      FSD_ERRNO_INTERNAL_ERROR,"slurm_update_job error: %s,job_id: %s",slurm_strerror(slurm_get_errno()),self->job_id); 
     
    126127                                switch(job_info->job_array[0].state_reason) 
    127128                                { 
    128                                         case WAIT_NO_REASON: 
    129                                         case WAIT_PRIORITY: 
    130                                         case WAIT_DEPENDENCY: 
    131                                         case WAIT_RESOURCES: 
    132                                         case WAIT_PART_NODE_LIMIT:  
    133                                         case WAIT_PART_TIME_LIMIT:  
     129                                        case WAIT_NO_REASON:   /* not set or job not pending */ 
     130                                        case WAIT_PRIORITY:    /* higher priority jobs exist */ 
     131                                        case WAIT_DEPENDENCY:  /* dependent job has not completed */ 
     132                                        case WAIT_RESOURCES:   /* required resources not available */ 
     133                                        case WAIT_PART_NODE_LIMIT:   /* request exceeds partition node limit */ 
     134                                        case WAIT_PART_TIME_LIMIT:   /* request exceeds partition time limit */ 
     135                                        #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    134136                                        case WAIT_PART_STATE:  
     137                                        #endif 
     138                                        #if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
     139                                        case WAIT_PART_DOWN:   /* requested partition is down */ 
     140                                        case WAIT_PART_INACTIVE:  /* requested partition is inactive */ 
     141                                        #endif 
    135142                                                self->state = DRMAA_PS_QUEUED_ACTIVE; 
    136143                                                break; 
    137                                         case WAIT_HELD: 
     144                                        #if SLURM_VERSION_NUMBER >= SLURM_VERSION_NUM(2,2,0) 
     145                                        case WAIT_HELD_USER:   /* job is held by user */ 
     146                                        #endif 
    138147                                                self->state = DRMAA_PS_USER_ON_HOLD; 
    139148                                                break; 
    140                                         case WAIT_TIME: 
    141                                         case WAIT_LICENSES: 
    142                                         case WAIT_ASSOC_JOB_LIMIT: 
    143                                         case WAIT_ASSOC_RESOURCE_LIMIT:  
    144                                         case WAIT_ASSOC_TIME_LIMIT: 
    145                                         case WAIT_RESERVATION:  
    146                                         case WAIT_NODE_NOT_AVAIL: 
     149                                        case WAIT_HELD:  /* job is held by administrator */ 
     150                                                self->state = DRMAA_PS_SYSTEM_ON_HOLD; 
     151                                                break; 
     152                                        case WAIT_TIME:  /* job waiting for specific begin time */ 
     153                                        case WAIT_LICENSES:  /* job is waiting for licenses */ 
     154                                        case WAIT_ASSOC_JOB_LIMIT:  /* user/bank job limit reached */ 
     155                                        case WAIT_ASSOC_RESOURCE_LIMIT:  /* user/bank resource limit reached */ 
     156                                        case WAIT_ASSOC_TIME_LIMIT:  /* user/bank time limit reached */ 
     157                                        case WAIT_RESERVATION:    /* reservation not available */ 
     158                                        case WAIT_NODE_NOT_AVAIL:  /* required node is DOWN or DRAINED */ 
     159                                        #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    147160                                        case WAIT_TBD1: 
     161                                        #endif                                   
    148162                                        case WAIT_TBD2: 
    149163                                                self->state = DRMAA_PS_QUEUED_ACTIVE; 
    150164                                                break; 
    151                                         case FAIL_DOWN_PARTITION: 
    152                                         case FAIL_DOWN_NODE: 
    153                                         case FAIL_BAD_CONSTRAINTS: 
    154                                         case FAIL_SYSTEM: 
    155                                         case FAIL_LAUNCH: 
    156                                         case FAIL_EXIT_CODE: 
    157                                         case FAIL_TIMEOUT: 
    158                                         case FAIL_INACTIVE_LIMIT: 
     165                                        case FAIL_DOWN_PARTITION:  /* partition for job is DOWN */ 
     166                                        case FAIL_DOWN_NODE:       /* some node in the allocation failed */ 
     167                                        case FAIL_BAD_CONSTRAINTS: /* constraints can not be satisfied */ 
     168                                        case FAIL_SYSTEM:          /* slurm system failure */ 
     169                                        case FAIL_LAUNCH:          /* unable to launch job */ 
     170                                        case FAIL_EXIT_CODE:       /* exit code was non-zero */ 
     171                                        case FAIL_TIMEOUT:         /* reached end of time limit */ 
     172                                        case FAIL_INACTIVE_LIMIT:  /* reached slurm InactiveLimit */ 
     173                                        #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    159174                                        case FAIL_BANK_ACCOUNT: 
     175                                        #else 
     176                                        case FAIL_ACCOUNT:         /* invalid account */ 
     177                                        #endif 
     178                                        case FAIL_QOS:             /* invalid QOS */ 
     179                                        case WAIT_QOS_THRES:       /* required QOS threshold has been breached */ 
    160180                                                self->state = DRMAA_PS_FAILED; 
    161181                                                break; 
  • trunk/slurm_drmaa/job.h

    r7 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/session.c

    r5 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/session.h

    r5 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
  • trunk/slurm_drmaa/util.c

    r5 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
     
    175175                        break; 
    176176                case SLURM_NATIVE_MEM: 
     177                #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    177178                        if(job_desc->job_min_memory == NO_VAL ||  fsd_atoi(value) > (int)job_desc->job_min_memory) { 
    178179                                fsd_log_debug(("# job_min_memory = %s",value)); 
    179180                                job_desc->job_min_memory = fsd_atoi(value); 
    180181                        } 
    181                         else { 
     182                #else 
     183                        if(job_desc->pn_min_memory == NO_VAL ||  fsd_atoi(value) > (int)job_desc->pn_min_memory) { 
     184                                fsd_log_debug(("# pn_min_memory = %s",value)); 
     185                                job_desc->pn_min_memory = fsd_atoi(value); 
     186                        } 
     187                #endif 
     188                        else {  
    182189                                fsd_log_debug(("mem value defined lower or equal to mem-per-cpu or value defined before")); 
    183190                        } 
    184191                        break; 
    185192                case SLURM_NATIVE_MEM_PER_CPU: 
     193                #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    186194                        if(job_desc->job_min_memory == NO_VAL ||  fsd_atoi(value) > (int)job_desc->job_min_memory) { 
    187195                                fsd_log_debug(("# job_min_memory = %s",value)); 
    188196                                job_desc->job_min_memory = fsd_atoi(value); 
    189197                        } 
    190                         else { 
     198                #else 
     199                        if(job_desc->pn_min_memory == NO_VAL ||  fsd_atoi(value) > (int)job_desc->pn_min_memory) { 
     200                                fsd_log_debug(("# pn_min_memory = %s",value)); 
     201                                job_desc->pn_min_memory = fsd_atoi(value); 
     202                        } 
     203                #endif 
     204                        else {  
    191205                                fsd_log_debug(("mem-per-cpu value defined lower or equal to mem or value defined before")); 
    192206                        } 
    193207                        break; 
    194208                case SLURM_NATIVE_MINCPUS: 
     209                #if SLURM_VERSION_NUMBER < SLURM_VERSION_NUM(2,2,0) 
    195210                        fsd_log_debug(("# job_min_cpus = %s",value)); 
    196211                        job_desc->job_min_cpus = fsd_atoi(value); 
     212                #else 
     213                        fsd_log_debug(("# min_cpus = %s",value)); 
     214                        job_desc->min_cpus = fsd_atoi(value); 
     215                #endif 
    197216                        break; 
    198217                case SLURM_NATIVE_NODELIST: 
  • trunk/slurm_drmaa/util.h

    r5 r13  
    22/* 
    33 * PSNC DRMAA for SLURM 
    4  * Copyright (C) 2010 Poznan Supercomputing and Networking Center 
     4 * Copyright (C) 2011 Poznan Supercomputing and Networking Center 
    55 * 
    66 *  This program is free software: you can redistribute it and/or modify 
Note: See TracChangeset for help on using the changeset viewer.