
D2.1.4 IST-033576
• Others - this list is not exhaustive. If you have questions about specific
resources, see the section "For more information" for contact information.
B.4.2 Making an application checkpointable
To be checkpointed successfully with BLCR, an application must contain some
library code that BLCR provides. There are several ways of ensuring this:
1. Start your executable via the with the cr_run command:
% c r _ r u n y o u r _ e x e c u t a b l e [ a r g u men t s ]
cr_run loads the BLCR library into your application at startup time. You
do not need to modify an application to have it work with cr_run. How-
ever, cr_run is limited to dynamically linked executables; statically linked
executables will need to use one of the approaches listed below.
2. Link your application with BLCR’s libcr. For instance, you could make a
simple ’hello world’ C program checkpointable via:
% gcc −o h e l l o h e l l o . c −LPREFIX / l i b −l c r
where PREFIX is the root of your BLCR install. Your application will now
look for the BLCR library whenever it starts up, but note that this does
not mean it will automatically be found: you will also need to set your
LD_LIBRARY_PATH environment variable to PREFIX/lib if libcr is not
installed into a standard system library directory (or read the ld man page
for information on -rpath).
3. Link your application with some library which uses BLCR. For instance,
if your MPI library has been made BLCR-aware, it will cause libcr to be
loaded, and so simply linking with the MPI library is enough to make your
application checkpointable.
4. Use run-time loading to dynamically link libcr (see the dlopen man page).
This mechanism can be used for building applications or libraries that must
work both with and without BLCR present on a system.
5. Force the libcr.so dynamic library to do loaded at startup by adding it’s
full pathname to the LD_PRELOAD environment variable (or just the file-
name if the directory is listed in LD_LIBRARY_PATH). In most cases, the
pthread library will also be required. We do not recommend setting this in
your environment in general (via export or setenv), since certain programs
may interact poorly with the BLCR library logic. Instead, we recommend
that you use a command like:
43/49 XtreemOS–Integrated Project
Commenti su questo manuale