1
1
openmpi/opal/mca/crs/blcr/crs_blcr.h
Josh Hursey 5406fdfb80 Add support for sending SIGSTOP the MPI job after the checkpoint is taken (uses a BLCR feature for the option).
This commit looks larger than it really is since it includes a fair amount of code cleanup.

The SIGSTOP/SIGCONT+checkpointing work uses some of the functionality in r20391. Basic use case below (note that the checkpoint generated is useable as usual if the stopped application is terminated).
{{{
shell 1) mpirun -np 2 -am ft-enable-cr my-app
... running ...

shell 2) ompi-checkpoint --stop -v MPIRUN_PID
[localhost:001300] [  0.00 /   0.20]                 Requested - ...
[localhost:001300] [  0.00 /   0.20]                   Pending - ...
[localhost:001300] [  0.01 /   0.21]                   Running - ...
[localhost:001300] [  1.01 /   1.22]                   Stopped - ompi_global_snapshot_1234.ckpt
Snapshot Ref.: 0 ompi_global_snapshot_1234.ckpt

shell 2) killall -CONT mpirun

... Application Continues execution in shell 1 ...
}}}

Other items in this commit are mostly cleanup that has been sitting off-trunk for too long:
 * Add a new {{{opal_crs_base_ckpt_options_t}}} type that encapsulates the various options that could be passed to the CRS. Currently only TERM and STOP, but this makes adding others ''much'' easier.
 * Eliminate ORTE_SNAPC_CKPT_STATE_PENDING_TERM, since it served a redundant purpose with the new options type.
 * Lay some basic ground work for some future features.

This commit was SVN r21995.

The following SVN revision numbers were found above:
  r20391 --> open-mpi/ompi@0704b98668
2009-09-22 18:26:12 +00:00

85 строки
2.3 KiB
C

/*
* Copyright (c) 2004-2009 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
*
* BLCR CRS component
*
*/
#ifndef MCA_CRS_BLCR_EXPORT_H
#define MCA_CRS_BLCR_EXPORT_H
#include "opal_config.h"
#include "opal/mca/mca.h"
#include "opal/mca/crs/crs.h"
#include "opal/mca/base/base.h"
#include <libcr.h>
BEGIN_C_DECLS
/*
* Local Component structures
*/
struct opal_crs_blcr_component_t {
/** Base CRS component */
opal_crs_base_component_t super;
};
typedef struct opal_crs_blcr_component_t opal_crs_blcr_component_t;
OPAL_MODULE_DECLSPEC extern opal_crs_blcr_component_t mca_crs_blcr_component;
int opal_crs_blcr_component_query(mca_base_module_t **module, int *priority);
extern bool opal_crs_blcr_dev_null;
/*
* Module functions
*/
int opal_crs_blcr_module_init(void);
int opal_crs_blcr_module_finalize(void);
/*
* Actual funcationality
*/
int opal_crs_blcr_checkpoint( pid_t pid,
opal_crs_base_snapshot_t *snapshot,
opal_crs_base_ckpt_options_t *options,
opal_crs_state_type_t *state);
int opal_crs_blcr_restart( opal_crs_base_snapshot_t *snapshot,
bool spawn_child,
pid_t *child_pid);
int opal_crs_blcr_disable_checkpoint(void);
int opal_crs_blcr_enable_checkpoint(void);
int opal_crs_blcr_prelaunch(int32_t rank,
char *base_snapshot_dir,
char **app,
char **cwd,
char ***argv,
char ***env);
int opal_crs_blcr_reg_thread(void);
END_C_DECLS
#endif /* MCA_CRS_BLCR_EXPORT_H */