Hi,

I have an issue on how to debug the program after the dmtcp restart the
checkpoint. The sample program is attached. I read the Q&A link, which say
that I can set up MTCP_RESTART_PAUSE environment variable to pause the
program and then gdb can attach the process. However, I try several times
and it doesn't work.

Could you give me some help on this?

Thanks in advance.


-- 
Yu Wang, Ph.D. Candidate
School of Electrical Engineering and Computer Science
University of Ottawa
800 King Edward Ave., Ottawa
K1N 6N5 ON Canada
Email: ambitionw...@gmail.com, ywang...@uottawa.ca
Homepage: https://sites.google.com/site/immanuelyuwang/
<https://sites.google.com/site/ambitionwang277/>
#include <stdio.h>
#include <stdlib.h>

#include <dmtcp.h>

int main() {
    if ( ! dmtcp_is_enabled() ) {
      printf("\n *** dmtcp_is_enabled: executable seems to not be running"
             " under dmtcp_launch.\n\n");
    }

    int retval = dmtcp_checkpoint();
    if (retval == DMTCP_AFTER_CHECKPOINT) {
      printf("*** dmtcp_checkpoint: This program has now invoked a checkpoint.\n"
             "      It will resume its execution next.\n");
    } else if (retval == DMTCP_AFTER_RESTART) {
      printf("*** dmtcp_checkpoint: This program is now restarting.\n");
    } else if (retval == DMTCP_NOT_PRESENT) {
      printf(" *** dmtcp_checkpoint: DMTCP is not running."
             "  Skipping checkpoint.\n");
    }

    printf("\n*** Process done executing.  Successfully exiting.\n");
    if (retval == DMTCP_AFTER_CHECKPOINT) {
        printf("*** Execute ./dmtcp_restart_script.sh to restart.\n");
    }
    return 0;
}
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Dmtcp-forum mailing list
Dmtcp-forum@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

Reply via email to