Rohan,

Thanks for the response. I have successfully followed the applic-initiated-ckpt 
example with my application. This worked for me even without compiling with the 
-fPIC option.

I am now trying to follow section 4 in the plugin-tutorial.pdf document located 
in the doc folder. This is a short section, so I will paste it here:
---------------------------------------------------------
4 Application-Initiated Checkpoints
Application-initiated checkpoints are even simpler than full-featured plugins. 
In the simplest form, the
following code can be executed both **with dmtcp launch and without**.:
   #include <stdio.h>
   #include "dmtcp.h"
   int main() {
      if (dmtcpCheckpoint() == DMTCP_NOT_PRESENT) {
         printf("dmtcpcheckpoint: DMTCP not present. No checkpoint is 
taken.\n");
      }
      return 0;
   }

For this program to be aware of DMTCP, it must be compiled with -fPIC and -ldl :
gcc -fPIC -IDMTCP ROOT/dmtcp/include -o myapp myapp.c -ldl

The most useful functions are:
int dmtcpIsEnabled() — returns 1 when running with DMTCP; 0 otherwise.
int dmtcpCheckpoint() — returns DMTCP AFTER CHECKPOINT, DMTCP AFTER RESTART, or
DMTCP NOT PRESENT.
int dmtcpDelayCheckpointsLock() — DMTCP will block any checkpoint requests.
int dmtcpDelayCheckpointsUnlock() — DMTCP will execute any blocked checkpoint 
requests, and will
permit new checkpoint requests.

The last two functions follow the common pattern of returning 0 on success and 
DMTCP NOT PRESENT
if DMTCP is not present. See the subdirectories DMTCP 
ROOT/test/plugin/applic-initiated-ckpt and
DMTCP 
---------------------------------------------------------

I am now compiling the application with -fPIC and -ldl as instructed, but get 
the error message I reported when running the application without dmtcp_launch. 
The application runs fine with dmtcp_launch. I realize that this must be quite 
an old document since the function names are incorrect. 

Can I assume by your response that the ability to run with and without 
dmtcp_launch is no longer supported?

Thanks again,
Stu


----- Original Message -----
From: "Rohan Garg" <rohg...@ccs.neu.edu>
To: "Stu Whitman" <swhit...@groupw.com>
Cc: "dmtcp-forum" <dmtcp-forum@lists.sourceforge.net>
Sent: Monday, February 29, 2016 11:38:28 AM
Subject: Re: [Dmtcp-forum] Running application without dmtcp_launch

Hi Stu,

For application-initiated checkpointing you need to do two things:

  a) compile your application with -fPIC; and
  b) run your application under dmtcp_launch.

Please refer to the example in test/plugin/applic-intiated-ckpt/. Run a
`make check` to execute the example. The example code is in: applic.c
in the same directory.

Hope this helps,
Rohan

> On Feb 29, 2016, at 11:13 AM, Stu Whitman <swhit...@groupw.com> wrote:
> 
> Hello,
> 
> I am trying to run my application without dmtcp_launch and use the function 
> dmtcp_is_enabled() to test if checkpointing is available. The information on 
> the website led me to believe I needed to compile the application with the 
> -fPIC option, which I have done. I am using version 2.3.1. When I run my 
> application I get the following message:
> 
> dmtcpplugin.cpp:467 DMTCP Internal Error: Env var DMTCP_DLSYM_OFFSET not set.
> Aborting.
> 
> Is this still a supported feature, or is there something that I am not 
> understanding?
> 
> Thanks,
> -Stu
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
> Dmtcp-forum mailing list
> Dmtcp-forum@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dmtcp-forum


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Dmtcp-forum mailing list
Dmtcp-forum@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

Reply via email to