Hi Nausca,

Apparently, there is a flag "--no-coordinator" for dmtcp_launch that you
can use to work without a coordinator. You can then use the DMTCP plugin
API to trigger a checkpoint from within the application. There are some
examples in test/plugin directory for application-initiated checkpoints.
Ideally, you shouldn't need to modify the DMTCP source code to achieve what
you are looking for. If there is a bug, please let us know and we would
very much like to fix it ASAP.

As far as the memory maps go, DMTCP uses LD_PRELOAD environment variable to
"inject" DMTCP libraries into the process during exec. The libraries take
control of the process before the main() is called and use this to setup
the checkpoint-thread, coordinator, etc.

Best,
Kapil

On Mon, Oct 5, 2015 at 9:43 PM, Nausca Hsu <nau...@cadence.com> wrote:

> Hi Kapil,
> Because the source code do a execvp after pthread_create, this is unusual
> mix of execvp and multi-thread process.
> According to linux system call document, execvp will reset all the memory
> space to the new process.
> So libmtcp.so should be wiped out also. But I can’t observe this behavior
> at dmtcp_launch.
>
> For checkpoint’s purpose, we need libmtcp.so to be at memory for sure,
> I just don’t know the mechanism works.
>
> I need to change to behavior of dmtcp to be triggered by a function call,
> and eliminate the need of coordinator,
> I am planing to modify the dmtcpworkor class, and add a member function to
> trigger checkpoint. Before I modify it,
> I need to understand how it works.
>
> Thanks.
> Nausca.
>
>
>
> From: Kapil Arya <kapil.arya...@gmail.com>
> Date: 2015年10月6日 星期二 05:03
> To: Nausca <nau...@cadence.com>
> Cc: "Sourceforge. Net Dmtcp-Forum@Lists." <
> dmtcp-forum@lists.sourceforge.net>
> Subject: Re: [Dmtcp-forum] how dmtcp_launch is working?
>
> Hi Nausca,
>
> Apparently, DMTCP libraries are always part of the process memory map.
> That was true for MTCP/DMTCP-1.1.8 as well. Is there a particular case that
> requires those files to be not present in memory?
>
> Best,
> Kapil
>
> On Mon, Oct 5, 2015 at 7:41 AM, Nausca Hsu <nau...@cadence.com> wrote:
>
>> Hi,
>> I recently download the 2.4.1 version to trace the source code,
>> And I found the latest version is some kind of hack in _ini
>> And _fini in the libmtcp.so before execvp a process’s main function.
>>
>> My question is,
>> The source code use a pthread_create in dmtcpworker’s constructor,
>> After the execvp, why the libmtcp.so is still at the memory,
>> And did not get wiped out?
>>
>> I use dmtcp_launch cat /proc/self/maps
>> And I can see the cat process still contains libmtcp.so in its memory
>> space.
>>
>> I check the publication list.
>> Did not found any hint.
>>
>> I am a 1.1.8 old user.
>> Anybody can help me to understand the latest source code?
>>
>> Thanks.
>> Nausca.
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Dmtcp-forum mailing list
>> Dmtcp-forum@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/dmtcp-forum
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_dmtcp-2Dforum&d=BQMFaQ&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ-_haXqY&r=yTrYtXirB43TLybS8rmjdSEHLuNfd5w_za3LlC3F5ag&m=XGUosmCrqndbLry0X0DygUIYvmRAWnlcvWCAqENU5Rw&s=IYnv1txI01RXpYQbSl79YnUsD2JVkjluh9pmIq4PRRk&e=>
>>
>>
>
------------------------------------------------------------------------------
_______________________________________________
Dmtcp-forum mailing list
Dmtcp-forum@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dmtcp-forum

Reply via email to