~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/plugins/checkpoint/aix/checkpoint_aix.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************\
2
2
 *  checkpoint_aix.c - AIX slurm checkpoint plugin.
3
 
 *  $Id: checkpoint_aix.c 13672 2008-03-19 23:10:58Z jette $
 
3
 *  $Id: checkpoint_aix.c 18075 2009-07-07 23:39:17Z jette $
4
4
 *****************************************************************************
5
 
 *  Copyright (C) 2004 The Regents of the University of California.
 
5
 *  Copyright (C) 2004-2007 The Regents of the University of California.
 
6
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
6
7
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
8
 *  Written by Morris Jette <jette1@llnl.gov>
8
 
 *  LLNL-CODE-402394.
 
9
 *  CODE-OCEC-09-009. All rights reserved.
9
10
 *  
10
11
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
12
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
13
 *  Please also read the included file: DISCLAIMER.
12
14
 *  
13
15
 *  SLURM is free software; you can redistribute it and/or modify it under
14
16
 *  the terms of the GNU General Public License as published by the Free
56
58
#include <slurm/slurm.h>
57
59
#include <slurm/slurm_errno.h>
58
60
 
 
61
#include "src/common/slurm_xlator.h"
59
62
#include "src/common/list.h"
60
63
#include "src/common/log.h"
61
64
#include "src/common/pack.h"
65
68
#include "src/slurmctld/agent.h"
66
69
#include "src/slurmctld/slurmctld.h"
67
70
 
 
71
/* These are defined here so when we link with something other than
 
72
 * the slurmctld we will have these symbols defined.  They will get
 
73
 * overwritten when linking with the slurmctld. 
 
74
 */
 
75
struct node_record *node_record_table_ptr = NULL;
 
76
int node_record_count = 0;
 
77
 
68
78
struct check_job_info {
69
79
        uint16_t disabled;      /* counter, checkpointable only if zero */
70
80
        uint16_t node_cnt;
131
141
 */
132
142
const char plugin_name[]        = "Checkpoint AIX plugin";
133
143
const char plugin_type[]        = "checkpoint/aix";
134
 
const uint32_t plugin_version   = 90;
 
144
const uint32_t plugin_version   = 100;
135
145
 
136
146
/*
137
147
 * init() is called when the plugin is loaded, before any other functions
176
186
 * The remainder of this file implements the standard SLURM checkpoint API.
177
187
 */
178
188
 
179
 
extern int slurm_ckpt_op ( uint16_t op, uint16_t data,
180
 
                struct step_record * step_ptr, time_t * event_time, 
181
 
                uint32_t *error_code, char **error_msg )
 
189
extern int slurm_ckpt_op (uint32_t job_id, uint32_t step_id, 
 
190
                          struct step_record *step_ptr, uint16_t op,
 
191
                          uint16_t data, char *image_dir, time_t * event_time, 
 
192
                          uint32_t *error_code, char **error_msg )
182
193
{
183
194
        int rc = SLURM_SUCCESS;
184
195
        struct check_job_info *check_ptr;
185
196
 
186
 
        xassert(step_ptr);
 
197
        if (!step_ptr)
 
198
                return ESLURM_INVALID_JOB_ID;
187
199
        check_ptr = (struct check_job_info *) step_ptr->check_job;
188
200
        xassert(check_ptr);
189
201
 
495
507
                goto fini;
496
508
        iter = list_iterator_create(ckpt_timeout_list);
497
509
        while ((rec = list_next(iter))) {
498
 
                if ((rec->job_id != job_id) || (rec->step_id != step_id)
499
 
                ||  (start_time && (rec->start_time != start_time)))
 
510
                if ((rec->job_id != job_id) || (rec->step_id != step_id) ||
 
511
                    (start_time && (rec->start_time != start_time)))
500
512
                        continue;
501
513
                /* debug("dequeue %u.%u", job_id, step_id); */
502
514
                list_delete_item(iter);
507
519
        slurm_mutex_unlock(&ckpt_agent_mutex);
508
520
}
509
521
 
510
 
extern int slurm_ckpt_task_comp ( struct step_record * step_ptr, uint32_t task_id,
511
 
                                  time_t event_time, uint32_t error_code, char *error_msg )
512
 
{
513
 
        return SLURM_SUCCESS;
 
522
extern int slurm_ckpt_task_comp ( struct step_record * step_ptr, 
 
523
                                  uint32_t task_id, time_t event_time,
 
524
                                  uint32_t error_code, char *error_msg )
 
525
{
 
526
        return SLURM_SUCCESS;
 
527
}
 
528
 
 
529
extern int slurm_ckpt_stepd_prefork(void *slurmd_job)
 
530
{
 
531
        return SLURM_SUCCESS;
 
532
}
 
533
 
 
534
extern int slurm_ckpt_signal_tasks(void *slurmd_job)
 
535
{
 
536
        return ESLURM_NOT_SUPPORTED;
 
537
}
 
538
 
 
539
extern int slurm_ckpt_restart_task(void *slurmd_job, char *image_dir, int gtid)
 
540
{
 
541
        return ESLURM_NOT_SUPPORTED;
514
542
}