2007-03-17 02:11:45 +03:00
|
|
|
/*
|
2010-03-13 02:57:50 +03:00
|
|
|
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
2007-03-17 02:11:45 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
2007-03-17 02:11:45 +03:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2008-08-08 16:37:26 +04:00
|
|
|
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
2007-03-17 02:11:45 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2007-03-17 02:11:45 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Checkpoint functionality for Open MPI
|
|
|
|
*/
|
|
|
|
|
2009-03-04 18:35:54 +03:00
|
|
|
#include "opal_config.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "opal/mca/crs/crs.h"
|
Update libevent to the 2.0 series, currently at 2.0.7rc. We will update to their final release when it becomes available. Currently known errors exist in unused portions of the libevent code. This revision passes the IBM test suite on a Linux machine and on a standalone Mac.
This is a fairly intrusive change, but outside of the moving of opal/event to opal/mca/event, the only changes involved (a) changing all calls to opal_event functions to reflect the new framework instead, and (b) ensuring that all opal_event_t objects are properly constructed since they are now true opal_objects.
Note: Shiqing has just returned from vacation and has not yet had a chance to complete the Windows integration. Thus, this commit almost certainly breaks Windows support on the trunk. However, I want this to have a chance to soak for as long as possible before I become less available a week from today (going to be at a class for 5 days, and thus will only be sparingly available) so we can find and fix any problems.
Biggest change is moving the libevent code from opal/event to a new opal/mca/event framework. This was done to make it much easier to update libevent in the future. New versions can be inserted as a new component and tested in parallel with the current version until validated, then we can remove the earlier version if we so choose. This is a statically built framework ala installdirs, so only one component will build at a time. There is no selection logic - the sole compiled component simply loads its function pointers into the opal_event struct.
I have gone thru the code base and converted all the libevent calls I could find. However, I cannot compile nor test every environment. It is therefore quite likely that errors remain in the system. Please keep an eye open for two things:
1. compile-time errors: these will be obvious as calls to the old functions (e.g., opal_evtimer_new) must be replaced by the new framework APIs (e.g., opal_event.evtimer_new)
2. run-time errors: these will likely show up as segfaults due to missing constructors on opal_event_t objects. It appears that it became a typical practice for people to "init" an opal_event_t by simply using memset to zero it out. This will no longer work - you must either OBJ_NEW or OBJ_CONSTRUCT an opal_event_t. I tried to catch these cases, but may have missed some. Believe me, you'll know when you hit it.
There is also the issue of the new libevent "no recursion" behavior. As I described on a recent email, we will have to discuss this and figure out what, if anything, we need to do.
This commit was SVN r23925.
2010-10-24 22:35:54 +04:00
|
|
|
#include "opal/mca/event/event.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "opal/util/output.h"
|
2007-03-20 15:38:06 +03:00
|
|
|
#include "opal/prefetch.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
#ifndef OPAL_CR_H
|
|
|
|
#define OPAL_CR_H
|
|
|
|
|
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
BEGIN_C_DECLS
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Some defines shared with opal-[checkpoint|restart] commands
|
|
|
|
*/
|
|
|
|
#define OPAL_CR_DONE ((char) 0)
|
|
|
|
#define OPAL_CR_ACK ((char) 1)
|
|
|
|
#define OPAL_CR_CHECKPOINT ((char) 2)
|
2007-04-03 01:12:16 +04:00
|
|
|
#define OPAL_CR_NAMED_PROG_R ("opal_cr_prog_read")
|
|
|
|
#define OPAL_CR_NAMED_PROG_W ("opal_cr_prog_write")
|
|
|
|
#define OPAL_CR_BASE_ENV_NAME ("opal_cr_restart-env")
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Possible responses to a checkpoint request from opal-checkpoint
|
|
|
|
*/
|
|
|
|
enum opal_cr_ckpt_cmd_state_t {
|
|
|
|
OPAL_CHECKPOINT_CMD_START, /* Checkpoint is starting on this request */
|
|
|
|
OPAL_CHECKPOINT_CMD_IN_PROGRESS, /* Checkpoint is currently running */
|
|
|
|
OPAL_CHECKPOINT_CMD_NULL, /* Checkpoint cannot be started because it is not supported */
|
2007-10-09 00:53:02 +04:00
|
|
|
OPAL_CHECKPOINT_CMD_ERROR, /* An error occurred such that the checkpoint cannot be completed */
|
|
|
|
/* State of the checkpoint operation */
|
|
|
|
OPAL_CR_STATUS_NONE, /* No checkpoint in progress */
|
|
|
|
OPAL_CR_STATUS_REQUESTED, /* Checkpoint has been requested */
|
|
|
|
OPAL_CR_STATUS_RUNNING, /* Checkpoint is currently running */
|
2008-05-08 22:47:47 +04:00
|
|
|
OPAL_CR_STATUS_TERM, /* Checkpoint is running and will terminate process upon completion */
|
|
|
|
/* State of the continue operation */
|
|
|
|
OPAL_CR_STATUS_CONTINUE,
|
|
|
|
/* State of the restart operation */
|
|
|
|
OPAL_CR_STATUS_RESTART_PRE,
|
|
|
|
OPAL_CR_STATUS_RESTART_POST
|
2007-03-17 02:11:45 +03:00
|
|
|
};
|
|
|
|
typedef enum opal_cr_ckpt_cmd_state_t opal_cr_ckpt_cmd_state_t;
|
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
/* An output handle to be used by the cr runtime
|
2008-05-08 22:47:47 +04:00
|
|
|
* functionality as an argument to opal_output() */
|
|
|
|
OPAL_DECLSPEC extern int opal_cr_output;
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/* Directory containing the named pipes for communication
|
|
|
|
* with the opal-checkpoint tool */
|
|
|
|
OPAL_DECLSPEC extern char * opal_cr_pipe_dir;
|
2008-05-08 22:47:47 +04:00
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
/* Signal that opal-checkpoint uses to contact the
|
2007-03-17 02:11:45 +03:00
|
|
|
* application process */
|
2007-10-09 00:53:02 +04:00
|
|
|
OPAL_DECLSPEC extern int opal_cr_entry_point_signal;
|
2008-05-08 22:47:47 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/* If Checkpointing is enabled in this application */
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_is_enabled;
|
2008-05-08 22:47:47 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/* If the application running is a tool
|
|
|
|
* (e.g., opal-checkpoint, orted, ...) */
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_is_tool;
|
2008-05-08 22:47:47 +04:00
|
|
|
|
2007-10-09 00:53:02 +04:00
|
|
|
/* If a checkpoint has been requested */
|
|
|
|
OPAL_DECLSPEC extern int opal_cr_checkpoint_request;
|
2008-05-08 22:47:47 +04:00
|
|
|
|
2007-10-09 00:53:02 +04:00
|
|
|
/* The current state of a checkpoint operation */
|
2008-05-08 22:47:47 +04:00
|
|
|
OPAL_DECLSPEC extern int opal_cr_checkpointing_state;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2014-12-22 23:36:51 +03:00
|
|
|
/*
|
|
|
|
* If one of the BTLs that shutdown require a full, clean rebuild of the
|
|
|
|
* point-to-point stack on 'continue' as well as 'restart'.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_continue_like_restart;
|
|
|
|
|
A number of C/R enhancements per RFC below:
http://www.open-mpi.org/community/lists/devel/2010/07/8240.php
Documentation:
http://osl.iu.edu/research/ft/
Major Changes:
--------------
* Added C/R-enabled Debugging support.
Enabled with the --enable-crdebug flag. See the following website for more information:
http://osl.iu.edu/research/ft/crdebug/
* Added Stable Storage (SStore) framework for checkpoint storage
* 'central' component does a direct to central storage save
* 'stage' component stages checkpoints to central storage while the application continues execution.
* 'stage' supports offline compression of checkpoints before moving (sstore_stage_compress)
* 'stage' supports local caching of checkpoints to improve automatic recovery (sstore_stage_caching)
* Added Compression (compress) framework to support
* Add two new ErrMgr recovery policies
* {{{crmig}}} C/R Process Migration
* {{{autor}}} C/R Automatic Recovery
* Added the {{{ompi-migrate}}} command line tool to support the {{{crmig}}} ErrMgr component
* Added CR MPI Ext functions (enable them with {{{--enable-mpi-ext=cr}}} configure option)
* {{{OMPI_CR_Checkpoint}}} (Fixes trac:2342)
* {{{OMPI_CR_Restart}}}
* {{{OMPI_CR_Migrate}}} (may need some more work for mapping rules)
* {{{OMPI_CR_INC_register_callback}}} (Fixes trac:2192)
* {{{OMPI_CR_Quiesce_start}}}
* {{{OMPI_CR_Quiesce_checkpoint}}}
* {{{OMPI_CR_Quiesce_end}}}
* {{{OMPI_CR_self_register_checkpoint_callback}}}
* {{{OMPI_CR_self_register_restart_callback}}}
* {{{OMPI_CR_self_register_continue_callback}}}
* The ErrMgr predicted_fault() interface has been changed to take an opal_list_t of ErrMgr defined types. This will allow us to better support a wider range of fault prediction services in the future.
* Add a progress meter to:
* FileM rsh (filem_rsh_process_meter)
* SnapC full (snapc_full_progress_meter)
* SStore stage (sstore_stage_progress_meter)
* Added 2 new command line options to ompi-restart
* --showme : Display the full command line that would have been exec'ed.
* --mpirun_opts : Command line options to pass directly to mpirun. (Fixes trac:2413)
* Deprecated some MCA params:
* crs_base_snapshot_dir deprecated, use sstore_stage_local_snapshot_dir
* snapc_base_global_snapshot_dir deprecated, use sstore_base_global_snapshot_dir
* snapc_base_global_shared deprecated, use sstore_stage_global_is_shared
* snapc_base_store_in_place deprecated, replaced with different components of SStore
* snapc_base_global_snapshot_ref deprecated, use sstore_base_global_snapshot_ref
* snapc_base_establish_global_snapshot_dir deprecated, never well supported
* snapc_full_skip_filem deprecated, use sstore_stage_skip_filem
Minor Changes:
--------------
* Fixes trac:1924 : {{{ompi-restart}}} now recognizes path prefixed checkpoint handles and does the right thing.
* Fixes trac:2097 : {{{ompi-info}}} should now report all available CRS components
* Fixes trac:2161 : Manual checkpoint movement. A user can 'mv' a checkpoint directory from the original location to another and still restart from it.
* Fixes trac:2208 : Honor various TMPDIR varaibles instead of forcing {{{/tmp}}}
* Move {{{ompi_cr_continue_like_restart}}} to {{{orte_cr_continue_like_restart}}} to be more flexible in where this should be set.
* opal_crs_base_metadata_write* functions have been moved to SStore to support a wider range of metadata handling functionality.
* Cleanup the CRS framework and components to work with the SStore framework.
* Cleanup the SnapC framework and components to work with the SStore framework (cleans up these code paths considerably).
* Add 'quiesce' hook to CRCP for a future enhancement.
* We now require a BLCR version that supports {{{cr_request_file()}}} or {{{cr_request_checkpoint()}}} in order to make the code more maintainable. Note that {{{cr_request_file}}} has been deprecated since 0.7.0, so we prefer to use {{{cr_request_checkpoint()}}}.
* Add optional application level INC callbacks (registered through the CR MPI Ext interface).
* Increase the {{{opal_cr_thread_sleep_wait}}} parameter to 1000 microseconds to make the C/R thread less aggressive.
* {{{opal-restart}}} now looks for cache directories before falling back on stable storage when asked.
* {{{opal-restart}}} also support local decompression before restarting
* {{{orte-checkpoint}}} now uses the SStore framework to work with the metadata
* {{{orte-restart}}} now uses the SStore framework to work with the metadata
* Remove the {{{orte-restart}}} preload option. This was removed since the user only needs to select the 'stage' component in order to support this functionality.
* Since the '-am' parameter is saved in the metadata, {{{ompi-restart}}} no longer hard codes {{{-am ft-enable-cr}}}.
* Fix {{{hnp}}} ErrMgr so that if a previous component in the stack has 'fixed' the problem, then it should be skipped.
* Make sure to decrement the number of 'num_local_procs' in the orted when one goes away.
* odls now checks the SStore framework to see if it needs to load any checkpoint files before launching (to support 'stage'). This separates the SStore logic from the --preload-[binary|files] options.
* Add unique IDs to the named pipes established between the orted and the app in SnapC. This is to better support migration and automatic recovery activities.
* Improve the checks for 'already checkpointing' error path.
* A a recovery output timer, to show how long it takes to restart a job
* Do a better job of cleaning up the old session directory on restart.
* Add a local module to the autor and crmig ErrMgr components. These small modules prevent the 'orted' component from attempting a local recovery (Which does not work for MPI apps at the moment)
* Add a fix for bounding the checkpointable region between MPI_Init and MPI_Finalize.
This commit was SVN r23587.
The following Trac tickets were found above:
Ticket 1924 --> https://svn.open-mpi.org/trac/ompi/ticket/1924
Ticket 2097 --> https://svn.open-mpi.org/trac/ompi/ticket/2097
Ticket 2161 --> https://svn.open-mpi.org/trac/ompi/ticket/2161
Ticket 2192 --> https://svn.open-mpi.org/trac/ompi/ticket/2192
Ticket 2208 --> https://svn.open-mpi.org/trac/ompi/ticket/2208
Ticket 2342 --> https://svn.open-mpi.org/trac/ompi/ticket/2342
Ticket 2413 --> https://svn.open-mpi.org/trac/ompi/ticket/2413
2010-08-11 00:51:11 +04:00
|
|
|
#if OPAL_ENABLE_CRDEBUG == 1
|
|
|
|
/* Whether or not C/R Debugging is enabled for this process */
|
|
|
|
OPAL_DECLSPEC extern int MPIR_debug_with_checkpoint;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set/clear the current thread id for the checkpointing thread
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_debug_set_current_ckpt_thread_self(void);
|
|
|
|
OPAL_DECLSPEC int opal_cr_debug_clear_current_ckpt_thread(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This MPI Debugger function needs to be accessed here and have a specific
|
|
|
|
* name. Thus we are breaking the traditional naming conventions to provide this functionality.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int MPIR_checkpoint_debugger_detach(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A tight loop to wait for debugger to release this process from the
|
|
|
|
* breakpoint.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC void *MPIR_checkpoint_debugger_breakpoint(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A function for the debugger or CRS to force all threads into
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC void *MPIR_checkpoint_debugger_waitpoint(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A signal handler to force all threads to wait when debugger detaches
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC void MPIR_checkpoint_debugger_signal_handler(int signo);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Refresh environment variables after a restart
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_refresh_environ(int prev_pid);
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/*
|
|
|
|
* If this is an application that doesn't want to have
|
|
|
|
* a notification callback installed, set this to false.
|
|
|
|
* To see the effect, this must be called before opal_cr_init().
|
|
|
|
* Default: Enabled
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_set_enabled(bool);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the notification and coordination
|
|
|
|
* elements.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_init(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Finalize the notification and coordination
|
|
|
|
* elements.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_finalize(void);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/*************************************************
|
|
|
|
* Check to see if a checkpoint has been requested
|
|
|
|
*
|
|
|
|
* When the checkpoint thread is disabled:
|
|
|
|
* This will be checked whenever the MPI Library
|
|
|
|
* is entered by the application. It will stop
|
|
|
|
* the application for the duration of the entire
|
|
|
|
* checkpoint.
|
|
|
|
* When the checkpoint thread is enabled:
|
|
|
|
* The request is handled in the thread parallel
|
|
|
|
* with the execution of the program regardless
|
|
|
|
* of where the program is in exection.
|
|
|
|
* The problem with this method is that it
|
|
|
|
* requires the support of progress threads
|
|
|
|
* which is currently not working properly :/
|
|
|
|
*
|
|
|
|
*************************************************/
|
|
|
|
OPAL_DECLSPEC void opal_cr_test_if_checkpoint_ready(void);
|
|
|
|
|
|
|
|
/* If the checkpoint operation should be stalled to
|
2015-06-24 06:59:57 +03:00
|
|
|
* wait for another sevice to complete before
|
2007-03-17 02:11:45 +03:00
|
|
|
* continuing with the checkpoint */
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_stall_check;
|
2007-10-09 00:53:02 +04:00
|
|
|
OPAL_DECLSPEC extern bool opal_cr_currently_stalled;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2008-02-20 01:15:52 +03:00
|
|
|
#if OPAL_ENABLE_FT_THREAD == 1
|
|
|
|
/* Some thread functions */
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_init_library(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_finalize_library(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_abort_library(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_enter_library(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_exit_library(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_thread_noop_progress(void);
|
|
|
|
#endif /* OPAL_ENABLE_FT_THREAD == 1 */
|
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
/*
|
2008-02-20 01:15:52 +03:00
|
|
|
* If not using FT then make the #defines noops
|
|
|
|
*/
|
2010-03-13 02:57:50 +03:00
|
|
|
#if OPAL_ENABLE_FT == 0 || OPAL_ENABLE_FT_CR == 0
|
2008-02-20 01:15:52 +03:00
|
|
|
#define OPAL_CR_TEST_CHECKPOINT_READY() ;
|
|
|
|
#define OPAL_CR_TEST_CHECKPOINT_READY_STALL() ;
|
|
|
|
#define OPAL_CR_INIT_LIBRARY() ;
|
|
|
|
#define OPAL_CR_FINALIZE_LIBRARY() ;
|
|
|
|
#define OPAL_CR_ABORT_LIBRARY() ;
|
|
|
|
#define OPAL_CR_ENTER_LIBRARY() ;
|
|
|
|
#define OPAL_CR_EXIT_LIBRARY() ;
|
|
|
|
#define OPAL_CR_NOOP_PROGRESS() ;
|
2010-03-13 02:57:50 +03:00
|
|
|
#endif /* #if OPAL_ENABLE_FT == 0 || OPAL_ENABLE_FT_CR == 0 */
|
2008-02-20 01:15:52 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If using FT
|
|
|
|
*/
|
2010-03-13 02:57:50 +03:00
|
|
|
#if OPAL_ENABLE_FT_CR == 1
|
2007-03-17 02:11:45 +03:00
|
|
|
#define OPAL_CR_TEST_CHECKPOINT_READY() \
|
|
|
|
{ \
|
|
|
|
if(OPAL_UNLIKELY(opal_cr_is_enabled) ) { \
|
|
|
|
opal_cr_test_if_checkpoint_ready(); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OPAL_CR_TEST_CHECKPOINT_READY_STALL() \
|
|
|
|
{ \
|
|
|
|
if(OPAL_UNLIKELY(opal_cr_is_enabled && !opal_cr_stall_check)) { \
|
|
|
|
opal_cr_test_if_checkpoint_ready(); \
|
|
|
|
} \
|
|
|
|
}
|
2008-02-20 01:15:52 +03:00
|
|
|
|
|
|
|
/* If *not* using FT thread */
|
|
|
|
#if OPAL_ENABLE_FT_THREAD == 0
|
|
|
|
#define OPAL_CR_INIT_LIBRARY() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#define OPAL_CR_FINALIZE_LIBRARY() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#define OPAL_CR_ABORT_LIBRARY() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#define OPAL_CR_ENTER_LIBRARY() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#define OPAL_CR_EXIT_LIBRARY() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#define OPAL_CR_NOOP_PROGRESS() OPAL_CR_TEST_CHECKPOINT_READY();
|
|
|
|
#endif /* OPAL_ENABLE_FT_THREAD == 0 */
|
|
|
|
|
|
|
|
/* If using FT thread */
|
|
|
|
#if OPAL_ENABLE_FT_THREAD == 1
|
|
|
|
#define OPAL_CR_INIT_LIBRARY() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_init_library(); \
|
|
|
|
}
|
|
|
|
#define OPAL_CR_FINALIZE_LIBRARY() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_finalize_library(); \
|
|
|
|
}
|
|
|
|
#define OPAL_CR_ABORT_LIBRARY() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_abort_library(); \
|
|
|
|
}
|
|
|
|
#define OPAL_CR_ENTER_LIBRARY() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_enter_library(); \
|
|
|
|
}
|
|
|
|
#define OPAL_CR_EXIT_LIBRARY() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_exit_library(); \
|
|
|
|
}
|
|
|
|
#define OPAL_CR_NOOP_PROGRESS() \
|
|
|
|
{ \
|
|
|
|
opal_cr_thread_noop_progress(); \
|
|
|
|
}
|
|
|
|
#endif /* OPAL_ENABLE_FT_THREAD == 1 */
|
|
|
|
|
2010-03-13 02:57:50 +03:00
|
|
|
#endif /* OPAL_ENABLE_FT_CR == 1 */
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
/*******************************
|
|
|
|
* Notification Routines
|
|
|
|
*******************************/
|
2007-10-09 00:53:02 +04:00
|
|
|
/*******************************
|
|
|
|
* Notification Routines
|
|
|
|
*******************************/
|
2007-03-17 02:11:45 +03:00
|
|
|
/**
|
2007-10-09 00:53:02 +04:00
|
|
|
* A function to respond to the async checkpoint request
|
|
|
|
* this is useful when figuring out who should respond
|
|
|
|
* when stalling.
|
2007-03-17 02:11:45 +03:00
|
|
|
*/
|
2007-10-09 00:53:02 +04:00
|
|
|
typedef int (*opal_cr_notify_callback_fn_t) (opal_cr_ckpt_cmd_state_t);
|
|
|
|
|
|
|
|
OPAL_DECLSPEC int opal_cr_reg_notify_callback
|
|
|
|
(opal_cr_notify_callback_fn_t new_func,
|
|
|
|
opal_cr_notify_callback_fn_t *prev_func);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function to go through the INC
|
|
|
|
* - Call Registered INC_Coord(CHECKPOINT)
|
|
|
|
* - Call the CRS.checkpoint()
|
|
|
|
* - Call Registered INC_Coord(state)
|
|
|
|
*/
|
2015-06-24 06:59:57 +03:00
|
|
|
OPAL_DECLSPEC int opal_cr_inc_core(pid_t pid,
|
2009-09-22 22:26:12 +04:00
|
|
|
opal_crs_base_snapshot_t *snapshot,
|
|
|
|
opal_crs_base_ckpt_options_t *options,
|
|
|
|
int *state);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2009-05-09 00:51:13 +04:00
|
|
|
OPAL_DECLSPEC int opal_cr_inc_core_prep(void);
|
2009-09-22 22:26:12 +04:00
|
|
|
OPAL_DECLSPEC int opal_cr_inc_core_ckpt(pid_t pid,
|
|
|
|
opal_crs_base_snapshot_t *snapshot,
|
|
|
|
opal_crs_base_ckpt_options_t *options,
|
|
|
|
int *state);
|
2009-05-09 00:51:13 +04:00
|
|
|
OPAL_DECLSPEC int opal_cr_inc_core_recover(int state);
|
|
|
|
|
A number of C/R enhancements per RFC below:
http://www.open-mpi.org/community/lists/devel/2010/07/8240.php
Documentation:
http://osl.iu.edu/research/ft/
Major Changes:
--------------
* Added C/R-enabled Debugging support.
Enabled with the --enable-crdebug flag. See the following website for more information:
http://osl.iu.edu/research/ft/crdebug/
* Added Stable Storage (SStore) framework for checkpoint storage
* 'central' component does a direct to central storage save
* 'stage' component stages checkpoints to central storage while the application continues execution.
* 'stage' supports offline compression of checkpoints before moving (sstore_stage_compress)
* 'stage' supports local caching of checkpoints to improve automatic recovery (sstore_stage_caching)
* Added Compression (compress) framework to support
* Add two new ErrMgr recovery policies
* {{{crmig}}} C/R Process Migration
* {{{autor}}} C/R Automatic Recovery
* Added the {{{ompi-migrate}}} command line tool to support the {{{crmig}}} ErrMgr component
* Added CR MPI Ext functions (enable them with {{{--enable-mpi-ext=cr}}} configure option)
* {{{OMPI_CR_Checkpoint}}} (Fixes trac:2342)
* {{{OMPI_CR_Restart}}}
* {{{OMPI_CR_Migrate}}} (may need some more work for mapping rules)
* {{{OMPI_CR_INC_register_callback}}} (Fixes trac:2192)
* {{{OMPI_CR_Quiesce_start}}}
* {{{OMPI_CR_Quiesce_checkpoint}}}
* {{{OMPI_CR_Quiesce_end}}}
* {{{OMPI_CR_self_register_checkpoint_callback}}}
* {{{OMPI_CR_self_register_restart_callback}}}
* {{{OMPI_CR_self_register_continue_callback}}}
* The ErrMgr predicted_fault() interface has been changed to take an opal_list_t of ErrMgr defined types. This will allow us to better support a wider range of fault prediction services in the future.
* Add a progress meter to:
* FileM rsh (filem_rsh_process_meter)
* SnapC full (snapc_full_progress_meter)
* SStore stage (sstore_stage_progress_meter)
* Added 2 new command line options to ompi-restart
* --showme : Display the full command line that would have been exec'ed.
* --mpirun_opts : Command line options to pass directly to mpirun. (Fixes trac:2413)
* Deprecated some MCA params:
* crs_base_snapshot_dir deprecated, use sstore_stage_local_snapshot_dir
* snapc_base_global_snapshot_dir deprecated, use sstore_base_global_snapshot_dir
* snapc_base_global_shared deprecated, use sstore_stage_global_is_shared
* snapc_base_store_in_place deprecated, replaced with different components of SStore
* snapc_base_global_snapshot_ref deprecated, use sstore_base_global_snapshot_ref
* snapc_base_establish_global_snapshot_dir deprecated, never well supported
* snapc_full_skip_filem deprecated, use sstore_stage_skip_filem
Minor Changes:
--------------
* Fixes trac:1924 : {{{ompi-restart}}} now recognizes path prefixed checkpoint handles and does the right thing.
* Fixes trac:2097 : {{{ompi-info}}} should now report all available CRS components
* Fixes trac:2161 : Manual checkpoint movement. A user can 'mv' a checkpoint directory from the original location to another and still restart from it.
* Fixes trac:2208 : Honor various TMPDIR varaibles instead of forcing {{{/tmp}}}
* Move {{{ompi_cr_continue_like_restart}}} to {{{orte_cr_continue_like_restart}}} to be more flexible in where this should be set.
* opal_crs_base_metadata_write* functions have been moved to SStore to support a wider range of metadata handling functionality.
* Cleanup the CRS framework and components to work with the SStore framework.
* Cleanup the SnapC framework and components to work with the SStore framework (cleans up these code paths considerably).
* Add 'quiesce' hook to CRCP for a future enhancement.
* We now require a BLCR version that supports {{{cr_request_file()}}} or {{{cr_request_checkpoint()}}} in order to make the code more maintainable. Note that {{{cr_request_file}}} has been deprecated since 0.7.0, so we prefer to use {{{cr_request_checkpoint()}}}.
* Add optional application level INC callbacks (registered through the CR MPI Ext interface).
* Increase the {{{opal_cr_thread_sleep_wait}}} parameter to 1000 microseconds to make the C/R thread less aggressive.
* {{{opal-restart}}} now looks for cache directories before falling back on stable storage when asked.
* {{{opal-restart}}} also support local decompression before restarting
* {{{orte-checkpoint}}} now uses the SStore framework to work with the metadata
* {{{orte-restart}}} now uses the SStore framework to work with the metadata
* Remove the {{{orte-restart}}} preload option. This was removed since the user only needs to select the 'stage' component in order to support this functionality.
* Since the '-am' parameter is saved in the metadata, {{{ompi-restart}}} no longer hard codes {{{-am ft-enable-cr}}}.
* Fix {{{hnp}}} ErrMgr so that if a previous component in the stack has 'fixed' the problem, then it should be skipped.
* Make sure to decrement the number of 'num_local_procs' in the orted when one goes away.
* odls now checks the SStore framework to see if it needs to load any checkpoint files before launching (to support 'stage'). This separates the SStore logic from the --preload-[binary|files] options.
* Add unique IDs to the named pipes established between the orted and the app in SnapC. This is to better support migration and automatic recovery activities.
* Improve the checks for 'already checkpointing' error path.
* A a recovery output timer, to show how long it takes to restart a job
* Do a better job of cleaning up the old session directory on restart.
* Add a local module to the autor and crmig ErrMgr components. These small modules prevent the 'orted' component from attempting a local recovery (Which does not work for MPI apps at the moment)
* Add a fix for bounding the checkpointable region between MPI_Init and MPI_Finalize.
This commit was SVN r23587.
The following Trac tickets were found above:
Ticket 1924 --> https://svn.open-mpi.org/trac/ompi/ticket/1924
Ticket 2097 --> https://svn.open-mpi.org/trac/ompi/ticket/2097
Ticket 2161 --> https://svn.open-mpi.org/trac/ompi/ticket/2161
Ticket 2192 --> https://svn.open-mpi.org/trac/ompi/ticket/2192
Ticket 2208 --> https://svn.open-mpi.org/trac/ompi/ticket/2208
Ticket 2342 --> https://svn.open-mpi.org/trac/ompi/ticket/2342
Ticket 2413 --> https://svn.open-mpi.org/trac/ompi/ticket/2413
2010-08-11 00:51:11 +04:00
|
|
|
|
|
|
|
/*******************************
|
|
|
|
* User Coordination Routines
|
|
|
|
*******************************/
|
|
|
|
typedef enum {
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
OPAL_CR_INC_PRE_CRS_PRE_MPI = 0,
|
|
|
|
OPAL_CR_INC_PRE_CRS_POST_MPI = 1,
|
|
|
|
OPAL_CR_INC_CRS_PRE_CKPT = 2,
|
|
|
|
OPAL_CR_INC_CRS_POST_CKPT = 3,
|
|
|
|
OPAL_CR_INC_POST_CRS_PRE_MPI = 4,
|
|
|
|
OPAL_CR_INC_POST_CRS_POST_MPI = 5,
|
|
|
|
OPAL_CR_INC_MAX = 6
|
A number of C/R enhancements per RFC below:
http://www.open-mpi.org/community/lists/devel/2010/07/8240.php
Documentation:
http://osl.iu.edu/research/ft/
Major Changes:
--------------
* Added C/R-enabled Debugging support.
Enabled with the --enable-crdebug flag. See the following website for more information:
http://osl.iu.edu/research/ft/crdebug/
* Added Stable Storage (SStore) framework for checkpoint storage
* 'central' component does a direct to central storage save
* 'stage' component stages checkpoints to central storage while the application continues execution.
* 'stage' supports offline compression of checkpoints before moving (sstore_stage_compress)
* 'stage' supports local caching of checkpoints to improve automatic recovery (sstore_stage_caching)
* Added Compression (compress) framework to support
* Add two new ErrMgr recovery policies
* {{{crmig}}} C/R Process Migration
* {{{autor}}} C/R Automatic Recovery
* Added the {{{ompi-migrate}}} command line tool to support the {{{crmig}}} ErrMgr component
* Added CR MPI Ext functions (enable them with {{{--enable-mpi-ext=cr}}} configure option)
* {{{OMPI_CR_Checkpoint}}} (Fixes trac:2342)
* {{{OMPI_CR_Restart}}}
* {{{OMPI_CR_Migrate}}} (may need some more work for mapping rules)
* {{{OMPI_CR_INC_register_callback}}} (Fixes trac:2192)
* {{{OMPI_CR_Quiesce_start}}}
* {{{OMPI_CR_Quiesce_checkpoint}}}
* {{{OMPI_CR_Quiesce_end}}}
* {{{OMPI_CR_self_register_checkpoint_callback}}}
* {{{OMPI_CR_self_register_restart_callback}}}
* {{{OMPI_CR_self_register_continue_callback}}}
* The ErrMgr predicted_fault() interface has been changed to take an opal_list_t of ErrMgr defined types. This will allow us to better support a wider range of fault prediction services in the future.
* Add a progress meter to:
* FileM rsh (filem_rsh_process_meter)
* SnapC full (snapc_full_progress_meter)
* SStore stage (sstore_stage_progress_meter)
* Added 2 new command line options to ompi-restart
* --showme : Display the full command line that would have been exec'ed.
* --mpirun_opts : Command line options to pass directly to mpirun. (Fixes trac:2413)
* Deprecated some MCA params:
* crs_base_snapshot_dir deprecated, use sstore_stage_local_snapshot_dir
* snapc_base_global_snapshot_dir deprecated, use sstore_base_global_snapshot_dir
* snapc_base_global_shared deprecated, use sstore_stage_global_is_shared
* snapc_base_store_in_place deprecated, replaced with different components of SStore
* snapc_base_global_snapshot_ref deprecated, use sstore_base_global_snapshot_ref
* snapc_base_establish_global_snapshot_dir deprecated, never well supported
* snapc_full_skip_filem deprecated, use sstore_stage_skip_filem
Minor Changes:
--------------
* Fixes trac:1924 : {{{ompi-restart}}} now recognizes path prefixed checkpoint handles and does the right thing.
* Fixes trac:2097 : {{{ompi-info}}} should now report all available CRS components
* Fixes trac:2161 : Manual checkpoint movement. A user can 'mv' a checkpoint directory from the original location to another and still restart from it.
* Fixes trac:2208 : Honor various TMPDIR varaibles instead of forcing {{{/tmp}}}
* Move {{{ompi_cr_continue_like_restart}}} to {{{orte_cr_continue_like_restart}}} to be more flexible in where this should be set.
* opal_crs_base_metadata_write* functions have been moved to SStore to support a wider range of metadata handling functionality.
* Cleanup the CRS framework and components to work with the SStore framework.
* Cleanup the SnapC framework and components to work with the SStore framework (cleans up these code paths considerably).
* Add 'quiesce' hook to CRCP for a future enhancement.
* We now require a BLCR version that supports {{{cr_request_file()}}} or {{{cr_request_checkpoint()}}} in order to make the code more maintainable. Note that {{{cr_request_file}}} has been deprecated since 0.7.0, so we prefer to use {{{cr_request_checkpoint()}}}.
* Add optional application level INC callbacks (registered through the CR MPI Ext interface).
* Increase the {{{opal_cr_thread_sleep_wait}}} parameter to 1000 microseconds to make the C/R thread less aggressive.
* {{{opal-restart}}} now looks for cache directories before falling back on stable storage when asked.
* {{{opal-restart}}} also support local decompression before restarting
* {{{orte-checkpoint}}} now uses the SStore framework to work with the metadata
* {{{orte-restart}}} now uses the SStore framework to work with the metadata
* Remove the {{{orte-restart}}} preload option. This was removed since the user only needs to select the 'stage' component in order to support this functionality.
* Since the '-am' parameter is saved in the metadata, {{{ompi-restart}}} no longer hard codes {{{-am ft-enable-cr}}}.
* Fix {{{hnp}}} ErrMgr so that if a previous component in the stack has 'fixed' the problem, then it should be skipped.
* Make sure to decrement the number of 'num_local_procs' in the orted when one goes away.
* odls now checks the SStore framework to see if it needs to load any checkpoint files before launching (to support 'stage'). This separates the SStore logic from the --preload-[binary|files] options.
* Add unique IDs to the named pipes established between the orted and the app in SnapC. This is to better support migration and automatic recovery activities.
* Improve the checks for 'already checkpointing' error path.
* A a recovery output timer, to show how long it takes to restart a job
* Do a better job of cleaning up the old session directory on restart.
* Add a local module to the autor and crmig ErrMgr components. These small modules prevent the 'orted' component from attempting a local recovery (Which does not work for MPI apps at the moment)
* Add a fix for bounding the checkpointable region between MPI_Init and MPI_Finalize.
This commit was SVN r23587.
The following Trac tickets were found above:
Ticket 1924 --> https://svn.open-mpi.org/trac/ompi/ticket/1924
Ticket 2097 --> https://svn.open-mpi.org/trac/ompi/ticket/2097
Ticket 2161 --> https://svn.open-mpi.org/trac/ompi/ticket/2161
Ticket 2192 --> https://svn.open-mpi.org/trac/ompi/ticket/2192
Ticket 2208 --> https://svn.open-mpi.org/trac/ompi/ticket/2208
Ticket 2342 --> https://svn.open-mpi.org/trac/ompi/ticket/2342
Ticket 2413 --> https://svn.open-mpi.org/trac/ompi/ticket/2413
2010-08-11 00:51:11 +04:00
|
|
|
} opal_cr_user_inc_callback_event_t;
|
|
|
|
|
|
|
|
typedef enum {
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
OPAL_CR_INC_STATE_PREPARE = 0,
|
|
|
|
OPAL_CR_INC_STATE_CONTINUE = 1,
|
|
|
|
OPAL_CR_INC_STATE_RESTART = 2,
|
|
|
|
OPAL_CR_INC_STATE_ERROR = 3
|
A number of C/R enhancements per RFC below:
http://www.open-mpi.org/community/lists/devel/2010/07/8240.php
Documentation:
http://osl.iu.edu/research/ft/
Major Changes:
--------------
* Added C/R-enabled Debugging support.
Enabled with the --enable-crdebug flag. See the following website for more information:
http://osl.iu.edu/research/ft/crdebug/
* Added Stable Storage (SStore) framework for checkpoint storage
* 'central' component does a direct to central storage save
* 'stage' component stages checkpoints to central storage while the application continues execution.
* 'stage' supports offline compression of checkpoints before moving (sstore_stage_compress)
* 'stage' supports local caching of checkpoints to improve automatic recovery (sstore_stage_caching)
* Added Compression (compress) framework to support
* Add two new ErrMgr recovery policies
* {{{crmig}}} C/R Process Migration
* {{{autor}}} C/R Automatic Recovery
* Added the {{{ompi-migrate}}} command line tool to support the {{{crmig}}} ErrMgr component
* Added CR MPI Ext functions (enable them with {{{--enable-mpi-ext=cr}}} configure option)
* {{{OMPI_CR_Checkpoint}}} (Fixes trac:2342)
* {{{OMPI_CR_Restart}}}
* {{{OMPI_CR_Migrate}}} (may need some more work for mapping rules)
* {{{OMPI_CR_INC_register_callback}}} (Fixes trac:2192)
* {{{OMPI_CR_Quiesce_start}}}
* {{{OMPI_CR_Quiesce_checkpoint}}}
* {{{OMPI_CR_Quiesce_end}}}
* {{{OMPI_CR_self_register_checkpoint_callback}}}
* {{{OMPI_CR_self_register_restart_callback}}}
* {{{OMPI_CR_self_register_continue_callback}}}
* The ErrMgr predicted_fault() interface has been changed to take an opal_list_t of ErrMgr defined types. This will allow us to better support a wider range of fault prediction services in the future.
* Add a progress meter to:
* FileM rsh (filem_rsh_process_meter)
* SnapC full (snapc_full_progress_meter)
* SStore stage (sstore_stage_progress_meter)
* Added 2 new command line options to ompi-restart
* --showme : Display the full command line that would have been exec'ed.
* --mpirun_opts : Command line options to pass directly to mpirun. (Fixes trac:2413)
* Deprecated some MCA params:
* crs_base_snapshot_dir deprecated, use sstore_stage_local_snapshot_dir
* snapc_base_global_snapshot_dir deprecated, use sstore_base_global_snapshot_dir
* snapc_base_global_shared deprecated, use sstore_stage_global_is_shared
* snapc_base_store_in_place deprecated, replaced with different components of SStore
* snapc_base_global_snapshot_ref deprecated, use sstore_base_global_snapshot_ref
* snapc_base_establish_global_snapshot_dir deprecated, never well supported
* snapc_full_skip_filem deprecated, use sstore_stage_skip_filem
Minor Changes:
--------------
* Fixes trac:1924 : {{{ompi-restart}}} now recognizes path prefixed checkpoint handles and does the right thing.
* Fixes trac:2097 : {{{ompi-info}}} should now report all available CRS components
* Fixes trac:2161 : Manual checkpoint movement. A user can 'mv' a checkpoint directory from the original location to another and still restart from it.
* Fixes trac:2208 : Honor various TMPDIR varaibles instead of forcing {{{/tmp}}}
* Move {{{ompi_cr_continue_like_restart}}} to {{{orte_cr_continue_like_restart}}} to be more flexible in where this should be set.
* opal_crs_base_metadata_write* functions have been moved to SStore to support a wider range of metadata handling functionality.
* Cleanup the CRS framework and components to work with the SStore framework.
* Cleanup the SnapC framework and components to work with the SStore framework (cleans up these code paths considerably).
* Add 'quiesce' hook to CRCP for a future enhancement.
* We now require a BLCR version that supports {{{cr_request_file()}}} or {{{cr_request_checkpoint()}}} in order to make the code more maintainable. Note that {{{cr_request_file}}} has been deprecated since 0.7.0, so we prefer to use {{{cr_request_checkpoint()}}}.
* Add optional application level INC callbacks (registered through the CR MPI Ext interface).
* Increase the {{{opal_cr_thread_sleep_wait}}} parameter to 1000 microseconds to make the C/R thread less aggressive.
* {{{opal-restart}}} now looks for cache directories before falling back on stable storage when asked.
* {{{opal-restart}}} also support local decompression before restarting
* {{{orte-checkpoint}}} now uses the SStore framework to work with the metadata
* {{{orte-restart}}} now uses the SStore framework to work with the metadata
* Remove the {{{orte-restart}}} preload option. This was removed since the user only needs to select the 'stage' component in order to support this functionality.
* Since the '-am' parameter is saved in the metadata, {{{ompi-restart}}} no longer hard codes {{{-am ft-enable-cr}}}.
* Fix {{{hnp}}} ErrMgr so that if a previous component in the stack has 'fixed' the problem, then it should be skipped.
* Make sure to decrement the number of 'num_local_procs' in the orted when one goes away.
* odls now checks the SStore framework to see if it needs to load any checkpoint files before launching (to support 'stage'). This separates the SStore logic from the --preload-[binary|files] options.
* Add unique IDs to the named pipes established between the orted and the app in SnapC. This is to better support migration and automatic recovery activities.
* Improve the checks for 'already checkpointing' error path.
* A a recovery output timer, to show how long it takes to restart a job
* Do a better job of cleaning up the old session directory on restart.
* Add a local module to the autor and crmig ErrMgr components. These small modules prevent the 'orted' component from attempting a local recovery (Which does not work for MPI apps at the moment)
* Add a fix for bounding the checkpointable region between MPI_Init and MPI_Finalize.
This commit was SVN r23587.
The following Trac tickets were found above:
Ticket 1924 --> https://svn.open-mpi.org/trac/ompi/ticket/1924
Ticket 2097 --> https://svn.open-mpi.org/trac/ompi/ticket/2097
Ticket 2161 --> https://svn.open-mpi.org/trac/ompi/ticket/2161
Ticket 2192 --> https://svn.open-mpi.org/trac/ompi/ticket/2192
Ticket 2208 --> https://svn.open-mpi.org/trac/ompi/ticket/2208
Ticket 2342 --> https://svn.open-mpi.org/trac/ompi/ticket/2342
Ticket 2413 --> https://svn.open-mpi.org/trac/ompi/ticket/2413
2010-08-11 00:51:11 +04:00
|
|
|
} opal_cr_user_inc_callback_state_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User coordination callback routine
|
|
|
|
*/
|
|
|
|
typedef int (*opal_cr_user_inc_callback_fn_t)(opal_cr_user_inc_callback_event_t event,
|
|
|
|
opal_cr_user_inc_callback_state_t state);
|
|
|
|
|
|
|
|
OPAL_DECLSPEC int opal_cr_user_inc_register_callback
|
|
|
|
(opal_cr_user_inc_callback_event_t event,
|
|
|
|
opal_cr_user_inc_callback_fn_t function,
|
|
|
|
opal_cr_user_inc_callback_fn_t *prev_function);
|
|
|
|
|
|
|
|
OPAL_DECLSPEC int trigger_user_inc_callback(opal_cr_user_inc_callback_event_t event,
|
|
|
|
opal_cr_user_inc_callback_state_t state);
|
|
|
|
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/*******************************
|
|
|
|
* Coordination Routines
|
|
|
|
*******************************/
|
2015-06-24 06:59:57 +03:00
|
|
|
/**
|
2007-03-17 02:11:45 +03:00
|
|
|
* Coordination callback routine signature
|
|
|
|
*/
|
|
|
|
typedef int (*opal_cr_coord_callback_fn_t) (int);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register a checkpoint coodination routine
|
|
|
|
* for a higher level.
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_reg_coord_callback
|
|
|
|
(opal_cr_coord_callback_fn_t new_func,
|
|
|
|
opal_cr_coord_callback_fn_t *prev_func);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* OPAL Checkpoint Coordination Routine
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC int opal_cr_coord(int state);
|
2008-10-16 19:09:00 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checkpoint life-cycle timing
|
|
|
|
*/
|
|
|
|
OPAL_DECLSPEC void opal_cr_set_time(int idx);
|
|
|
|
OPAL_DECLSPEC void opal_cr_display_all_timers(void);
|
|
|
|
OPAL_DECLSPEC void opal_cr_clear_timers(void);
|
|
|
|
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_timing_enabled;
|
|
|
|
OPAL_DECLSPEC extern bool opal_cr_timing_barrier_enabled;
|
|
|
|
OPAL_DECLSPEC extern int opal_cr_timing_my_rank;
|
|
|
|
OPAL_DECLSPEC extern int opal_cr_timing_target_rank;
|
|
|
|
|
|
|
|
|
|
|
|
#define OPAL_CR_TIMER_ENTRY0 0
|
|
|
|
#define OPAL_CR_TIMER_ENTRY1 1
|
|
|
|
#define OPAL_CR_TIMER_ENTRY2 2
|
|
|
|
#define OPAL_CR_TIMER_CRCPBR0 3
|
|
|
|
#define OPAL_CR_TIMER_CRCP0 4
|
|
|
|
#define OPAL_CR_TIMER_CRCPBR1 5
|
|
|
|
#define OPAL_CR_TIMER_P2P0 6
|
|
|
|
#define OPAL_CR_TIMER_P2P1 7
|
|
|
|
#define OPAL_CR_TIMER_P2PBR0 8
|
|
|
|
#define OPAL_CR_TIMER_CORE0 9
|
|
|
|
#define OPAL_CR_TIMER_CORE1 10
|
|
|
|
#define OPAL_CR_TIMER_COREBR0 11
|
|
|
|
#define OPAL_CR_TIMER_P2P2 12
|
|
|
|
#define OPAL_CR_TIMER_P2PBR1 13
|
|
|
|
#define OPAL_CR_TIMER_P2P3 14
|
|
|
|
#define OPAL_CR_TIMER_P2PBR2 15
|
|
|
|
#define OPAL_CR_TIMER_CRCP1 16
|
|
|
|
#define OPAL_CR_TIMER_COREBR1 17
|
|
|
|
#define OPAL_CR_TIMER_CORE2 18
|
|
|
|
#define OPAL_CR_TIMER_ENTRY3 19
|
|
|
|
#define OPAL_CR_TIMER_ENTRY4 20
|
|
|
|
#define OPAL_CR_TIMER_MAX 21
|
|
|
|
|
|
|
|
|
|
|
|
#define OPAL_CR_CLEAR_TIMERS() \
|
|
|
|
{ \
|
|
|
|
if(OPAL_UNLIKELY(opal_cr_timing_enabled > 0)) { \
|
|
|
|
opal_cr_clear_timers(); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OPAL_CR_SET_TIMER(idx) \
|
|
|
|
{ \
|
|
|
|
if(OPAL_UNLIKELY(opal_cr_timing_enabled > 0)) { \
|
|
|
|
opal_cr_set_time(idx); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OPAL_CR_DISPLAY_ALL_TIMERS() \
|
|
|
|
{ \
|
|
|
|
if(OPAL_UNLIKELY(opal_cr_timing_enabled > 0)) { \
|
|
|
|
opal_cr_display_all_timers(); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
END_C_DECLS
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
#endif /* OPAL_CR_H */
|
|
|
|
|