diff --git a/NEWS b/NEWS index a3d62a2efc60b86edad116e49a1c5753dcadbe69..5af279de9b7bce298245a7ff91a99458a55feecf 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,14 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.1.1 ============================= + -- Fix for case sensitive databases when a slurmctld has a mixed case + clustername to lower case the string to easy compares. + -- Fix squeue if job is completing and failed to print remaining + nodes instead of failed message. + -- Fix sview core when searching for partitions by state. + -- Fixed setting the start time when querying in sacct to the + beginning of the day if not set previously. + -- Defined slurm_free_reservation_info_msg in common/slurm_protocol_defs.h * Changes in SLURM 2.1.0 ============================= diff --git a/doc/html/checkpoint_blcr.shtml b/doc/html/checkpoint_blcr.shtml index f24e319f1e89b85517a6ddfaf71a91f5aada1f12..5d9a64133dd6987286aa17b8d2fb441c80ea9990 100644 --- a/doc/html/checkpoint_blcr.shtml +++ b/doc/html/checkpoint_blcr.shtml @@ -16,9 +16,23 @@ Functionality provided includes: node failure</li> </ol></p> -<b>Note:</b> checkpoint/blcr cannot restart interactive jobs. It can +<p>The general mode of operation is to +<ol> +<li>Start the job step using the <b>srun_cr</b> command as described +below.</li> +<li>Create a checkpoint of <b>srun_cr</b> using BLCR's <b>cr_checkpoint</b> +command and cancel the job. <b>srun_cr</b> will automatically checkpoint +your job.</li> +<li>Restart <b>srun_cr</b> using BLCR's <b>cr_restart</b> command. +The job will be restarted using a newly allocated jobid.</li> +</ol> + +<p><b>NOTE:</b> checkpoint/blcr cannot restart interactive jobs. It can create checkpoints for both interactive and batch steps, but only -batch jobs can be restarted. +batch jobs can be restarted.</p> + +<p><b>NOTE:</b> BLCR operation has been verified with MVAPICH2. +Some other MPI implementations should also work.</p> <h2>User Commands</h2> @@ -33,9 +47,8 @@ Basic familiarity with SLURM commands is assumed.</p> checkpoints of the job step. By default, the job step will have no checkpoints created. Acceptable time formats include "minutes", "minutes:seconds", -"hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and -"days\-hours:minutes:seconds". -</li> +"hours:minutes:seconds", "days-hours", "days-hours:minutes" and +"days-hours:minutes:seconds".</li> <li><b>--checkpoint-dir</b>:Specify the directory where the checkpoint image files of a job step will be stored. The default value is the current working directory. @@ -105,8 +118,12 @@ execution of the tasks from the previous checkpoint.</p> <p>Several options have been added to support checkpoint restart:</p> <ul> -<li><b>--checkpoint</b>: Specify the interval between periodic checkpoint -of a batch job, in seconds</li> +<li><b>--checkpoint</b>: Specifies the interval between periodic checkpoint +of a batch job. +By default, the job will have no checkpoints created. +Acceptable time formats include "minutes", "minutes:seconds", +"hours:minutes:seconds", "days-hours", "days-hours:minutes" and +"days-hours:minutes:seconds".</li> <li><b>--checkpoint-dir</b>:Specify the directory when the checkpoint image files of a batch job will be stored. The default value is the current working directory. @@ -170,6 +187,6 @@ or reading job checkpoint files</li> <p class="footer"><a href="#top">top</a></p> -<p style="text-align:center;">Last modified 1 December 2009</p> +<p style="text-align:center;">Last modified 7 January 2010</p> <!--#include virtual="footer.txt"--> diff --git a/doc/html/download.shtml b/doc/html/download.shtml index 9e63f40529fd3627faefb9e5ebf86c8e5d793656..62e86616c131d2448f62917f8a6680a8e0f974db 100644 --- a/doc/html/download.shtml +++ b/doc/html/download.shtml @@ -129,9 +129,15 @@ Moab Cluster Suite</a></li> <i>contribs/perlapi</i> directory and packaged in the <i>perapi</i> RPM.</li> <li><a href="http://www.gingergeeks.co.uk/pyslurm/">PySlurm</a> is a -Python/Pyrex module to interface with SLURM. There is also a Python module -in the SLURM distribution to expand and collect hostlist expressions at -<i>contribs/python/hostlist</i>.</li> +Python/Pyrex module to interface with SLURM. +There is also a Python module to expand and collect hostlist expressions +available at <a href="http://www.nsc.liu.se/~kent/python-hostlist/"> +http://www.nsc.liu.se/~kent/python-hostlist/</a>.</li> + +<li><a href="http://www.lua.org/">Lua</a> may be used to implement a +SLURM process tracking plugin. +The Lua script available in <i>contribs/lua/protrack.lua</i> +implements containers using CPUSETs. </ul><br> <li><b>SPANK Plugins</b><br> @@ -178,6 +184,6 @@ Portable Linux Processor Affinity (PLPA)</a></li> </ul> -<p style="text-align:center;">Last modified 13 October 2009</p> +<p style="text-align:center;">Last modified 6 January 2010</p> <!--#include virtual="footer.txt"--> diff --git a/doc/html/faq.shtml b/doc/html/faq.shtml index 07386e9d61c7ecec146ddd2de52fcb552eadb7e0..056ea8293e849c1c5d80df6fa2a5ceedbcea6adc 100644 --- a/doc/html/faq.shtml +++ b/doc/html/faq.shtml @@ -40,6 +40,8 @@ (e.g. place it into a <i>hold</i> state)?</a></li> <li><a href="#mem_limit">Why are jobs not getting the appropriate memory limit?</a></li> +<li><a href="#mailing_list">Is an archive available of messages posted to +the <i>slurm-dev</i> mailing list?</a></li> </ol> <h2>For Administrators</h2> @@ -624,6 +626,11 @@ problem described above. Use the same solution for the AS (Address Space), RSS (Resident Set Size), or other limits as needed.</p> +<p><a name="mailing_list"><b>23. Is an archive available of messages posted to +the <i>slurm-dev</i> mailing list?</b></a><br> +Yes, it is at <a href="http://groups.google.com/group/slurm-devel"> +http://groups.google.com/group/slurm-devel</a> + <p class="footer"><a href="#top">top</a></p> @@ -1239,6 +1246,6 @@ $ squeue -tpd -h -o "scontrol update jobid=%i priority=1000" >my.script <p class="footer"><a href="#top">top</a></p> -<p style="text-align:center;">Last modified 11 September 2009</p> +<p style="text-align:center;">Last modified 5 January 2010</p> <!--#include virtual="footer.txt"--> diff --git a/doc/html/news.shtml b/doc/html/news.shtml index c89c5ad903dd2e6e8025f6249c72ed3047c67c6d..47f40e7c244ede954b25dda8e7a54d79f3399ec7 100644 --- a/doc/html/news.shtml +++ b/doc/html/news.shtml @@ -69,12 +69,12 @@ is now available.</li> <p>SLURM Version 2.1 was released in January 2010. Major enhancements include: <ul> +<li>Optimized resource allocation based upon network topology (e.g. +hierarchical switches).</li> <li>Support for job preemption based upon job Quality of Service (QOS) in addition to queue priority.</li> <li>Support for time limits on individual job steps (in addition to the job time limit).</li> -<li>Fully implement the PgSQL accounting plugin.</li> -<li>Provide a web-based SLURM administration tool.</li> <li>Improve fault-tolerance in recognizing compute node reboots.</li> <li>Add sinfo and squeue information about specific cores allocated.</li> <li>Support for Solaris (OpenSolaris build 119).</li> @@ -86,13 +86,13 @@ not been finalized. Anyone desiring to perform SLURM development should notify <a href="mailto:slurm-dev@lists.llnl.gov">slurm-dev@lists.llnl.gov</a> to coordinate activities. Future development plans includes: <ul> -<li>Optimized resource allocation based upon network topology (e.g. -hierarchical switches).</li> <li>Modify more SLURM commands to operate between clusters.</li> <li>Support for BlueGene/Q systems.</li> <li>Permit resource allocations (jobs) to change size.</li> <li>Add Kerberos credential support including credential forwarding and refresh.</li> +<li>Fully implement the PgSQL accounting plugin.</li> +<li>Provide a web-based SLURM administration tool.</li> </ul> <p style="text-align:center;">Last modified 5 January 2010</p> diff --git a/src/common/plugrack.c b/src/common/plugrack.c index b7543ce04b9f32c1da704f26398feaee19d38ca0..d2b63cab80bf5d075a822519fd3f917ac2610ed1 100644 --- a/src/common/plugrack.c +++ b/src/common/plugrack.c @@ -1,7 +1,8 @@ /*****************************************************************************\ * plugrack.c - an intelligent container for plugins ***************************************************************************** - * Copyright (C) 2002 The Regents of the University of California. + * Copyright (C) 2002-2007 The Regents of the University of California. + * Copyright (C) 2008-2009 Lawrence Livermore National Security. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Jay Windley <jwindley@lnxi.com>. * CODE-OCEC-09-009. All rights reserved. @@ -104,10 +105,10 @@ char *strchr(), *strrchr(); * If this is zero, the rack code may decide to unload the plugin. */ typedef struct _plugrack_entry { - const char *full_type; - const char *fq_path; - plugin_handle_t plug; - int refcount; + const char *full_type; + const char *fq_path; + plugin_handle_t plug; + int refcount; } plugrack_entry_t; /* @@ -124,13 +125,13 @@ typedef struct _plugrack_entry { * loading it. */ struct _plugrack { - List entries; - const char *major_type; - uid_t uid; - uint8_t paranoia; + List entries; + const char *major_type; + uid_t uid; + uint8_t paranoia; }; -#define PLUGRACK_UID_NOBODY 99 /* RedHat's, anyway. */ +#define PLUGRACK_UID_NOBODY 99 /* RedHat's, anyway. */ static bool _match_major ( const char *path_name, const char *major_type ); static int _plugrack_read_single_dir( plugrack_t rack, char *dir ); @@ -143,21 +144,22 @@ static bool _so_file( char *pathname ); static void plugrack_entry_destructor( void *v ) { - plugrack_entry_t *victim = v; - - if ( victim == NULL ) return; - - /* - * Free memory and unload the plugin if necessary. The assert - * is to make sure we were actually called from the List destructor - * which should only be callable from plugrack_destroy(). - */ - xassert( victim->refcount == 0 ); - xfree( victim->full_type ); - xfree( victim->fq_path ); - if ( victim->plug != PLUGIN_INVALID_HANDLE ) + plugrack_entry_t *victim = v; + + if ( victim == NULL ) + return; + + /* + * Free memory and unload the plugin if necessary. The assert + * is to make sure we were actually called from the List destructor + * which should only be callable from plugrack_destroy(). + */ + xassert( victim->refcount == 0 ); + xfree( victim->full_type ); + xfree( victim->fq_path ); + if ( victim->plug != PLUGIN_INVALID_HANDLE ) plugin_unload( victim->plug ); - xfree( victim ); + xfree( victim ); } /* @@ -172,88 +174,88 @@ plugrack_entry_destructor( void *v ) */ static int accept_path_paranoia( plugrack_t rack, - const char *fq_path, - int check_own, - int check_write ) + const char *fq_path, + int check_own, + int check_write ) { - struct stat st; + struct stat st; - /* Internal function, so assert rather than fail gracefully. */ - xassert( rack ); - xassert( fq_path ); + /* Internal function, so assert rather than fail gracefully. */ + xassert( rack ); + xassert( fq_path ); - if ( stat( fq_path, &st ) < 0 ) { + if ( stat( fq_path, &st ) < 0 ) { debug3( "accept_path_paranoia: stat(%s) failed", fq_path ); - return 0; - } + return 0; + } - /* Is path owned by authorized user? */ - if ( check_own ) { - if ( st.st_uid != rack->uid ) { + /* Is path owned by authorized user? */ + if ( check_own ) { + if ( st.st_uid != rack->uid ) { debug3( "accept_path_paranoia: %s not owned by " "proper user", fq_path ); return 0; } - } + } - /* Is path writable by others? */ - if ( check_write ) { - if ( ( st.st_mode & S_IWGRP ) - || ( st.st_mode & S_IWOTH ) ) { + /* Is path writable by others? */ + if ( check_write ) { + if ( ( st.st_mode & S_IWGRP ) || ( st.st_mode & S_IWOTH ) ) { debug3( "accept_path_paranoia: %s writable by others", fq_path ); return 0; } - } + } - return 1; + return 1; } plugrack_t plugrack_create( void ) { - plugrack_t rack = (plugrack_t) xmalloc( sizeof( struct _plugrack ) ); - - rack->paranoia = PLUGRACK_PARANOIA_NONE; - rack->major_type = NULL; - rack->uid = PLUGRACK_UID_NOBODY; - rack->entries = list_create( plugrack_entry_destructor ); - if ( rack->entries == NULL ) { - xfree( rack ); - return NULL; - } - return rack; + plugrack_t rack = (plugrack_t) xmalloc( sizeof( struct _plugrack ) ); + + rack->paranoia = PLUGRACK_PARANOIA_NONE; + rack->major_type = NULL; + rack->uid = PLUGRACK_UID_NOBODY; + rack->entries = list_create( plugrack_entry_destructor ); + if ( rack->entries == NULL ) { + xfree( rack ); + return NULL; + } + return rack; } int plugrack_destroy( plugrack_t rack ) { - ListIterator it; - plugrack_entry_t *e; - - if ( ! rack ) return SLURM_ERROR; - - /* - * See if there are any plugins still being used. If we unload them, - * the program might crash because cached virtual mapped addresses - * will suddenly be outside our virtual address space. - */ - it = list_iterator_create( rack->entries ); - while ( ( e = list_next( it ) ) != NULL ) { - if ( e->refcount > 0 ) { + ListIterator it; + plugrack_entry_t *e; + + if ( ! rack ) + return SLURM_ERROR; + + /* + * See if there are any plugins still being used. If we unload them, + * the program might crash because cached virtual mapped addresses + * will suddenly be outside our virtual address space. + */ + it = list_iterator_create( rack->entries ); + while ( ( e = list_next( it ) ) != NULL ) { + if ( e->refcount > 0 ) { debug2( "plugrack_destroy: attempt to destroy " "plugin rack that is still in use" ); - list_iterator_destroy( it ); - return SLURM_ERROR; /* plugins still in use. */ - } - } - list_iterator_destroy( it ); + list_iterator_destroy( it ); + return SLURM_ERROR; /* plugins still in use. */ + } + } + list_iterator_destroy( it ); - list_destroy( rack->entries ); + list_destroy( rack->entries ); xfree( rack->major_type ); - xfree( rack ); - return SLURM_SUCCESS; + xfree( rack ); + return SLURM_SUCCESS; } @@ -268,34 +270,34 @@ plugrack_set_major_type( plugrack_t rack, const char *type ) /* Free any pre-existing type. */ xfree( rack->major_type ); - /* Install a new one. */ - if ( type != NULL ) { - rack->major_type = xstrdup( type ); - if ( rack->major_type == NULL ) { - debug3( "plugrack_set_major_type: unable to set type" ); + /* Install a new one. */ + if ( type != NULL ) { + rack->major_type = xstrdup( type ); + if ( rack->major_type == NULL ) { + debug3( "plugrack_set_major_type: unable to set type"); return SLURM_ERROR; } - } + } - return SLURM_SUCCESS; + return SLURM_SUCCESS; } int plugrack_set_paranoia( plugrack_t rack, - const uint32_t flags, - const uid_t uid ) + const uint32_t flags, + const uid_t uid ) { if ( ! rack ) return SLURM_ERROR; - rack->paranoia = flags; - if ( flags ) { - rack->uid = uid; - } + rack->paranoia = flags; + if ( flags ) { + rack->uid = uid; + } - return SLURM_SUCCESS; + return SLURM_SUCCESS; } static int @@ -303,20 +305,20 @@ plugrack_add_plugin_path( plugrack_t rack, const char *full_type, const char *fq_path ) { - plugrack_entry_t *e; + plugrack_entry_t *e; - if ( ! rack ) return SLURM_ERROR; - if ( ! fq_path ) return SLURM_ERROR; + if ( ( ! rack ) || ( ! fq_path ) ) + return SLURM_ERROR; - e = (plugrack_entry_t *) xmalloc( sizeof( plugrack_entry_t ) ); + e = (plugrack_entry_t *) xmalloc( sizeof( plugrack_entry_t ) ); - e->full_type = xstrdup( full_type ); - e->fq_path = xstrdup( fq_path ); - e->plug = PLUGIN_INVALID_HANDLE; - e->refcount = 0; + e->full_type = xstrdup( full_type ); + e->fq_path = xstrdup( fq_path ); + e->plug = PLUGIN_INVALID_HANDLE; + e->refcount = 0; list_append( rack->entries, e ); - return SLURM_SUCCESS; + return SLURM_SUCCESS; } @@ -327,7 +329,7 @@ plugrack_read_dir( plugrack_t rack, const char *dir ) char *head, *dir_array; int i, rc = SLURM_SUCCESS; - if ( ( ! rack ) || (! dir ) ) + if ( ( ! rack ) || ( ! dir ) ) return SLURM_ERROR; dir_array = xstrdup(dir); @@ -354,70 +356,70 @@ plugrack_read_dir( plugrack_t rack, const char *dir ) static int _plugrack_read_single_dir( plugrack_t rack, char *dir ) { - char *fq_path; - char *tail; - DIR *dirp; - struct dirent *e; - struct stat st; + char *fq_path; + char *tail; + DIR *dirp; + struct dirent *e; + struct stat st; static const size_t type_len = 64; char plugin_type[ type_len ]; static int max_path_len = 0; - /* Allocate a buffer for fully-qualified path names. */ + /* Allocate a buffer for fully-qualified path names. */ if (max_path_len == 0) { max_path_len = pathconf("/", _PC_NAME_MAX); if (max_path_len <= 0) max_path_len = 256; } - fq_path = xmalloc( strlen( dir ) + max_path_len + 1 ); - xassert( fq_path ); - - /* - * Write the directory name in it, then a separator, then - * keep track of where we want to write the individual file - * names. - */ - strcpy( fq_path, dir ); - tail = &fq_path[ strlen( dir ) ]; - *tail = '/'; - ++tail; - - /* Check whether we should be paranoid about this directory. */ - if ( ! accept_path_paranoia( rack, - dir, - rack->paranoia & + fq_path = xmalloc( strlen( dir ) + max_path_len + 1 ); + xassert( fq_path ); + + /* + * Write the directory name in it, then a separator, then + * keep track of where we want to write the individual file + * names. + */ + strcpy( fq_path, dir ); + tail = &fq_path[ strlen( dir ) ]; + *tail = '/'; + ++tail; + + /* Check whether we should be paranoid about this directory. */ + if ( ! accept_path_paranoia( rack, + dir, + rack->paranoia & PLUGRACK_PARANOIA_DIR_OWN, - rack->paranoia & + rack->paranoia & PLUGRACK_PARANOIA_DIR_WRITABLE ) ) { xfree( fq_path ); - return SLURM_ERROR; - } + return SLURM_ERROR; + } - /* Open the directory. */ - dirp = opendir( dir ); - if ( dirp == NULL ) { + /* Open the directory. */ + dirp = opendir( dir ); + if ( dirp == NULL ) { error( "cannot open plugin directory %s", dir ); xfree( fq_path ); return SLURM_ERROR; } - while ( 1 ) { - e = readdir( dirp ); - if ( e == NULL ) + while ( 1 ) { + e = readdir( dirp ); + if ( e == NULL ) break; - /* - * Compose file name. Where NAME_MAX is defined it represents + /* + * Compose file name. Where NAME_MAX is defined it represents * the largest file name given in a dirent. This macro is used * in the allocation of "tail" above, so this unbounded copy * should work. - */ - strcpy( tail, e->d_name ); + */ + strcpy( tail, e->d_name ); - /* Check only regular files. */ - if ( (strncmp(e->d_name, ".", 1) == 0) - || (stat( fq_path, &st ) < 0) - || (! S_ISREG(st.st_mode)) ) + /* Check only regular files. */ + if ( (strncmp(e->d_name, ".", 1) == 0) || + (stat( fq_path, &st ) < 0) || + (! S_ISREG(st.st_mode)) ) continue; /* Check only shared object files */ @@ -432,19 +434,19 @@ _plugrack_read_single_dir( plugrack_t rack, char *dir ) (!_match_major(e->d_name, rack->major_type))) continue; - /* See if we should be paranoid about this file. */ - if (!accept_path_paranoia( rack, - fq_path, - rack->paranoia & - PLUGRACK_PARANOIA_FILE_OWN, - rack->paranoia & - PLUGRACK_PARANOIA_FILE_WRITABLE )) { + /* See if we should be paranoid about this file. */ + if (!accept_path_paranoia( rack, + fq_path, + rack->paranoia & + PLUGRACK_PARANOIA_FILE_OWN, + rack->paranoia & + PLUGRACK_PARANOIA_FILE_WRITABLE )) { debug3( "plugin_read_dir: skipping %s for security " "reasons", fq_path ); - continue; - } + continue; + } - /* Test the type. */ + /* Test the type. */ if ( plugin_peek( fq_path, plugin_type, type_len, @@ -452,21 +454,21 @@ _plugrack_read_single_dir( plugrack_t rack, char *dir ) continue; } - if ( rack->major_type - && ( strncmp( rack->major_type, - plugin_type, - strlen( rack->major_type ) ) != 0 ) ) { + if ( rack->major_type && + ( strncmp( rack->major_type, + plugin_type, + strlen( rack->major_type ) ) != 0 ) ) { continue; } - /* Add it to the list. */ - (void) plugrack_add_plugin_path( rack, plugin_type, fq_path ); - } + /* Add it to the list. */ + (void) plugrack_add_plugin_path( rack, plugin_type, fq_path ); + } closedir( dirp ); xfree( fq_path ); - return SLURM_SUCCESS; + return SLURM_SUCCESS; } /* Return TRUE if the specified pathname is recognized as that of a shared @@ -507,75 +509,75 @@ _match_major ( const char *path_name, const char *major_type ) int plugrack_read_cache( plugrack_t rack, - const char *cache_file ) + const char *cache_file ) { - /* Don't care for now. */ + /* Don't care for now. */ - return SLURM_ERROR; + return SLURM_ERROR; } int plugrack_purge_idle( plugrack_t rack ) { - ListIterator it; - plugrack_entry_t *e; + ListIterator it; + plugrack_entry_t *e; - if ( ! rack ) return SLURM_ERROR; + if ( ! rack ) + return SLURM_ERROR; - it = list_iterator_create( rack->entries ); - while ( ( e = list_next( it ) ) != NULL ) { - if ( ( e->plug != PLUGIN_INVALID_HANDLE ) && + it = list_iterator_create( rack->entries ); + while ( ( e = list_next( it ) ) != NULL ) { + if ( ( e->plug != PLUGIN_INVALID_HANDLE ) && ( e->refcount == 0 ) ){ - plugin_unload( e->plug ); - e->plug = PLUGIN_INVALID_HANDLE; - } - } + plugin_unload( e->plug ); + e->plug = PLUGIN_INVALID_HANDLE; + } + } - list_iterator_destroy( it ); - return SLURM_SUCCESS; + list_iterator_destroy( it ); + return SLURM_SUCCESS; } int plugrack_load_all( plugrack_t rack ) { - ListIterator it; - plugrack_entry_t *e; + ListIterator it; + plugrack_entry_t *e; - if ( ! rack ) return SLURM_ERROR; + if ( ! rack ) + return SLURM_ERROR; - it = list_iterator_create( rack->entries ); - while ( ( e = list_next( it ) ) != NULL ) { - if ( e->plug == PLUGIN_INVALID_HANDLE ) { - plugin_load_from_file(&e->plug, e->fq_path); - } - } + it = list_iterator_create( rack->entries ); + while ( ( e = list_next( it ) ) != NULL ) { + if ( e->plug == PLUGIN_INVALID_HANDLE ) { + plugin_load_from_file(&e->plug, e->fq_path); + } + } - list_iterator_destroy( it ); - return SLURM_SUCCESS; + list_iterator_destroy( it ); + return SLURM_SUCCESS; } int plugrack_write_cache( plugrack_t rack, - const char *cache ) + const char *cache ) { - /* Not implemented. */ + /* Not implemented. */ - return SLURM_SUCCESS; + return SLURM_SUCCESS; } plugin_handle_t plugrack_use_by_type( plugrack_t rack, - const char *full_type ) + const char *full_type ) { ListIterator it; plugrack_entry_t *e; - if (!rack) - return PLUGIN_INVALID_HANDLE; - if (!full_type) + if ( (!rack) || (!full_type) ) return PLUGIN_INVALID_HANDLE; it = list_iterator_create(rack->entries); @@ -611,39 +613,43 @@ plugrack_use_by_type( plugrack_t rack, int plugrack_finished_with_plugin( plugrack_t rack, plugin_handle_t plug ) { - ListIterator it; - plugrack_entry_t *e; + ListIterator it; + plugrack_entry_t *e; - if ( ! rack ) return SLURM_ERROR; + if ( ! rack ) + return SLURM_ERROR; - it = list_iterator_create( rack->entries ); - while ( ( e = list_next( it ) ) != NULL ) { - if ( e->plug == plug ) { - e->refcount--; - if ( e->refcount < 0 ) e->refcount = 0; + it = list_iterator_create( rack->entries ); + while ( ( e = list_next( it ) ) != NULL ) { + if ( e->plug == plug ) { + e->refcount--; + if ( e->refcount < 0 ) + e->refcount = 0; - /* Do something here with purge policy. */ + /* Do something here with purge policy. */ - list_iterator_destroy( it ); - return SLURM_SUCCESS; - } - } + list_iterator_destroy( it ); + return SLURM_SUCCESS; + } + } - /* Plugin not in this rack. */ - list_iterator_destroy( it ); - return SLURM_ERROR; + /* Plugin not in this rack. */ + list_iterator_destroy( it ); + return SLURM_ERROR; } int plugrack_print_all_plugin(plugrack_t rack) { ListIterator itr; - plugrack_entry_t *e = NULL; + plugrack_entry_t *e = NULL; + itr = list_iterator_create(rack->entries); info("MPI types are..."); while ((e = list_next(itr)) != NULL ) { info("%s",e->full_type); } list_iterator_destroy(itr); + return SLURM_SUCCESS; } diff --git a/src/common/read_config.c b/src/common/read_config.c index a0e43fe290044d8cf2b10705b21e03120d6d19d8..e618744ca652b9e5244ddfc712722a96e2d0e7d4 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1803,6 +1803,16 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) conf->batch_start_timeout = DEFAULT_BATCH_START_TIMEOUT; s_p_get_string(&conf->cluster_name, "ClusterName", hashtbl); + /* Some databases are case sensitive so we have to make sure + the cluster name is lower case since sacctmgr makes sure + this is the case as well. + */ + if(conf->cluster_name) { + int i; + for (i = 0; conf->cluster_name[i] != '\0'; i++) + conf->cluster_name[i] = + (char)tolower(conf->cluster_name[i]); + } if (!s_p_get_uint16(&conf->complete_wait, "CompleteWait", hashtbl)) conf->complete_wait = DEFAULT_COMPLETE_WAIT; diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 7002f1596b8e4b10ec7aad33ad9d31a2df45c19a..a91c226642f4165b6ebb737712b6bdba7407b8c9 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -1010,6 +1010,7 @@ void slurm_free_job_step_info_response_msg( job_step_info_response_msg_t * msg); void slurm_free_node_info_msg(node_info_msg_t * msg); void slurm_free_partition_info_msg(partition_info_msg_t * msg); +void slurm_free_reservation_info_msg(reserve_info_msg_t * msg); void slurm_free_get_kvs_msg(kvs_get_msg_t *msg); void slurm_free_will_run_response_msg(will_run_response_msg_t *msg); void inline slurm_free_file_bcast_msg(file_bcast_msg_t *msg); diff --git a/src/sacct/options.c b/src/sacct/options.c index b7437028dbd638b37f4d9c8cccb4c82fb02442cc..c5959b72926c9323d193f5059394b305fbcee2ba 100644 --- a/src/sacct/options.c +++ b/src/sacct/options.c @@ -867,9 +867,8 @@ void parse_command_line(int argc, char **argv) job_cond->without_steps = params.opt_allocs; if(!job_cond->usage_start) { - if(job_cond->state_list) - job_cond->usage_start = time(NULL); - else { + job_cond->usage_start = time(NULL); + if(!job_cond->state_list) { struct tm start_tm; if(!localtime_r(&job_cond->usage_start, &start_tm)) { diff --git a/src/sacctmgr/account_functions.c b/src/sacctmgr/account_functions.c index 7647b21d7a39d4d69f6383fa4fd3cc4a75e3c1f0..1bdac830313c7a7785cf02c00c27a398e85fa944 100644 --- a/src/sacctmgr/account_functions.c +++ b/src/sacctmgr/account_functions.c @@ -282,8 +282,12 @@ static int _set_cond(int *start, int argc, char *argv[], if(addto_qos_char_list(assoc_cond->qos_list, g_qos_list, argv[i]+end, option)) a_set = 1; - else + else { exit_code = 1; + fprintf(stderr, + " Bad QosLevel value: %s\n", + argv[i]+end); + } } else { exit_code=1; fprintf(stderr, " Unknown condition: %s\n" @@ -489,8 +493,12 @@ static int _set_rec(int *start, int argc, char *argv[], if(addto_qos_char_list(assoc->qos_list, g_qos_list, argv[i]+end, option)) a_set = 1; - else + else { exit_code = 1; + fprintf(stderr, + " Bad QosLevel value: %s\n", + argv[i]+end); + } } else { exit_code=1; fprintf(stderr, " Unknown option: %s\n" diff --git a/src/sacctmgr/user_functions.c b/src/sacctmgr/user_functions.c index 996ebaca0841cb8e8de1f23e32cd2134a9e02ed2..49ddb553876b6c6dc2d638db94b003b96f7f86e7 100644 --- a/src/sacctmgr/user_functions.c +++ b/src/sacctmgr/user_functions.c @@ -859,8 +859,12 @@ extern int sacctmgr_add_user(int argc, char *argv[]) if(addto_qos_char_list(start_assoc.qos_list, g_qos_list, argv[i]+end, option)) limit_set = 1; - else + else { exit_code = 1; + fprintf(stderr, + " Bad QosLevel value: %s\n", + argv[i]+end); + } } else if (!strncasecmp (argv[i], "WCKeys", MAX(command_len, 1))) { slurm_addto_char_list(wckey_cond->name_list, diff --git a/src/squeue/print.c b/src/squeue/print.c index b7dd85456035c87ea9cf79a40922cff70168ae19..7b5465bebe7045bbfb8b2d4b9270acae69f78136 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -590,20 +590,16 @@ int _print_job_nodes(job_info_t * job, int width, bool right, char* suffix) int _print_job_reason_list(job_info_t * job, int width, bool right, char* suffix) { - uint16_t base_state = 0; - - if (job) - base_state = job->job_state & JOB_STATE_BASE; - if (job == NULL) { /* Print the Header instead */ #ifdef HAVE_BG _print_str("BP_LIST(REASON)", width, right, false); #else _print_str("NODELIST(REASON)", width, right, false); #endif - } else if ((base_state == JOB_PENDING) || - (base_state == JOB_TIMEOUT) || - (base_state == JOB_FAILED)) { + } else if (!IS_JOB_COMPLETING(job) + && (IS_JOB_PENDING(job) + || IS_JOB_TIMEOUT(job) + || IS_JOB_FAILED(job))) { char id[FORMAT_STRING_SIZE], *reason; if (job->state_desc) reason = job->state_desc; @@ -1338,11 +1334,10 @@ static int _filter_job(job_info_t * job) if (filter == 1) return 3; } else { - uint16_t base_state = job->job_state & JOB_STATE_BASE; - if ((base_state != JOB_PENDING) && - (base_state != JOB_RUNNING) && - (base_state != JOB_SUSPENDED) && - (!(job->job_state & JOB_COMPLETING))) + if (!IS_JOB_PENDING(job) && + !IS_JOB_RUNNING(job) && + !IS_JOB_SUSPENDED(job) && + !IS_JOB_COMPLETING(job)) return 4; } diff --git a/src/sview/part_info.c b/src/sview/part_info.c index b86e70e998cf7069b992e2f60c89e6b1fba94e75..5833191d2d50f1f7a038f17f4351e1706c5839e8 100644 --- a/src/sview/part_info.c +++ b/src/sview/part_info.c @@ -2034,8 +2034,32 @@ display_it: hostset_destroy(hostset); break; case PART_PAGE: + switch(spec_info->search_info->search_type) { + case SEARCH_PARTITION_NAME: + if(!spec_info->search_info->gchar_data) + continue; + + if(strcmp(part_ptr->name, + spec_info->search_info->gchar_data)) + continue; + break; + case SEARCH_PARTITION_STATE: + if(spec_info->search_info->int_data == NO_VAL) + continue; + if(part_ptr->state_up != + spec_info->search_info->int_data) + continue; + break; + default: + continue; + break; + } + break; case BLOCK_PAGE: case JOB_PAGE: + if(!spec_info->search_info->gchar_data) + continue; + if(strcmp(part_ptr->name, spec_info->search_info->gchar_data)) continue; diff --git a/testsuite/expect/test21.10 b/testsuite/expect/test21.10 index 0ccdd1bd8f87d9de1042713f4ad9cf662d8d4c5a..f5a21aee6fe8a83feb96232537495c19d638ae53 100755 --- a/testsuite/expect/test21.10 +++ b/testsuite/expect/test21.10 @@ -287,7 +287,7 @@ if {$aamatches != 1} { # # Use sacctmgr to list the test associations # -set as_list_pid [spawn $sacctmgr list $acc $wa $nam=$nm1 format=$nams,$fs,$gm,$gc,$gj,$gs,$gn,$gw,$mm,$mc,$mj,$ms,$mn,$mw] +set as_list_pid [spawn $sacctmgr list $acc $wa $nam=$nm1 format=$nam,$fs,$gm,$gc,$gj,$gs,$gn,$gw,$mm,$mc,$mj,$ms,$mn,$mw] expect { -re "$nm1,$fs1,$gm1,$gc1,$gj1,$gs1,$gn1,$gw1,$mm1,$mc1,$mj1,$ms1,$mn1,$mw1" { exp_continue