[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Are there other ways to use standalone checkpointing except condor_compile?

Zhao Shiyang,

> I installed the Condor  6.8.6 on one Linux Redhat 9 computer, and wrote
> one C test program using the ckpt() function of the Condor checkpoint
> library. I compiled it with condor_compile command and it worked.
> Now I have a large project with a Makefile needing the Condor's checkpoint
> library support. What should I do? Replace "CC = gcc; CPP = g++" with "CC =
> condor_compile gcc; CPP = condor_compile g++" in the Makefile? or other way?
> Another question: If I want to use the ckpt() function in my C code, is
> there any other way except condor_compile, e.g including some header files
> in the code?

condor_compile doesn't do anything other than add some libraries when
the executable is linked.  Many times all I do is compile the program
normally, copy the line from when the executable is linked (hopefully
your make command will echo this to your terminal), and then run that
single command by hand with condor_compile added at the beginning and
a different output name specified.

For example:

$ make
g++ ... foo.o ... bar.o ... -o foo ...

So I run:

condor_compile g++ ... foo.o ... bar.o ... -o foo_condor ...

Hopefully this will work for you.

As for your second question, it's basically the same answer.  You only
need to use condor_compile when you link your executable, it really
doesn't affect anything when you compile object files.  You might add
"extern void ckpt();" to your source code to make the compiler happy.

Then you run it like normal:

$ ./foo_condor
Condor: Notice: Will checkpoint to ./foo_condor.ckpt
Condor: Notice: Remote system calls disabled.

And restart from a checkpoint like this:

$ ./foo_condor -_condor_restart foo_condor.ckpt
Condor: Notice: Will restart from foo_condor.ckpt

Daniel K. Forrest	Laboratory for Molecular and
forrest@xxxxxxxxxxxxx	Computational Genomics
(608) 262 - 9479	University of Wisconsin, Madison