Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
applic-delayed-ckpt
applic-initiated-ckpt
example-db
example
sleep1
sleep2
Makefile.in
README

README

The plugins in these subdirectories are intended as simple examples.
To try PLUGIN, do:  cd PLUGIN; make check
After killing process, try:  ./dmtcp_restart_script.sh
For an organized way to explore the plugins, we recommend following the
"SELF-GUIDED TOUR".  (See below.)

RESTRICTIONS:
    GNU glibc uses libc-low-level-lock to manage thread safety, since multiple
threads could call printf(), malloc(), etc., at the same time.  If the
target program is being checkpointed when glibc holds this lock in the
middle of printing or allocating, and if dmtcp_process_event() tries to
call printf(), malloc(), etc., then deadlock will ensue.  A similar issue
can affect the C++ runtime library.
    If this issue affects you, then:
a. implement your own calls to read()/write() and your own memory allocator; or
b. ensure with other logic that your plugin and target application do not
   simultaneously attempt to print, allocate memory, etc.

DEMONSTRATION PLUGINS:
example: how to react to special events (init, ckpt, resume, restart, ...)
sleep1:  wrapper around sleep() in program ../../test/dmtcp1
         (displays seconds and microseconds, before and after sleep())
sleep2:  second wrapper around sleep() in program ../../test/dmtcp1
	 'make check' invokes the sleep1 and sleep2 wrappers simultaneously.
example-db:  uses the database service of DMTCP.  At checkpoint or
	 restart time, each process can install a key-value pair, and then
	 optionally query a value for a given key.
applic-initiated-ckpt:  demonstrates how an application can initiate
         a checkpoint of itself.

SELF-GUIDED TOUR:
For a self-guided tour of plugins, try the commands below.  Be sure to stop
during the tour and read some of the .c files.  We believe you will be
impressed by how few lines of code can express so much flexibility
for checkpointing:

    cd sleep1
    make clean
    ls
    make -n
    make 
    ls
    make -n check
    make check

    cd ../sleep2
    make clean
    make -n check
    make check

    cd ../applic-initiated-ckpt
    make
    ./applic      # Notice that there is no DMTCP when running in this mode.
    ../../../bin/dmtcp_launch ./applic
    ../../../bin/dmtcp_restart ckpt_applic_*.dmtcp