BLCR has been engineered to work with a wide range of Linux kernels:
BLCR builds and installs much like any other autotools-based distribution:
% tar zxf blcr-<VERSION>.tar.gzDepending on which kernel you are building against, and where you wish to put the BLCR libraries, there are a number of options to configure that you need to consider.
% cd blcr-<VERSION>
% mkdir builddir
% cd builddir
% ../configure [ options ]
% make
% make install
We strongly recommend that you configure and build BLCR in a directory other than the one containing the BLCR source code (use of some options to configure actually require this). In the example above the build is conducted in a subdirectory, named 'builddir', of the source directory. Any writable location is fine, but you will need to invoke configure by the correct path in place of '../configure' used in the example.
Check the FAQ if you run into issues building BLCR on your system.
/usr/local
or /usr
may require additions to
the PATH
, MANPATH
and LD_LIBRARY_PATH
environment variables of users (more details below).By default, BLCR builds against the kernel that is running on the system at configure time, and looks in a number of standard locations (/usr/src/linux, etc.) for the above files that correspond to it. If you're building for a kernel other than the kernel that is running at the time of the build (or if the source for the running kernel are in non-standard locations), you'll need to pass configure the following option:
BLCR's build logic is capable of building both 64-bit and 32-bit
libraries at the same time on most 64-bit platforms it supports.
However, because this feature is new and does not work well with
certain setups, it is disabled by default. To enable it you'll
want to pass configure the following option:
% make
check
'
make target. However, it cannot run the tests until the kernel
modules are loaded (and will tell you so if you forget). Since
the not-yet-installed kernel modules are located throughout the BLCR
build
directory, an 'insmod
' make target is provided to automate
this task. If
you are not running as root, "make insmod
" will try to use
the 'sudo
' utility to perform the insmod operations as
root. However, it is not necessary (or recommended) to run the
tests themselves as
root. So, we recommend run the following as a non-root user if 'sudo
'
is installed and configured to allow your user:% make insmod checkWhich may prompt for a password, depending on how '
sudo
'
is configured. If the 'sudo' utility is not installed (or not
configured for your user), the following steps are equivalent:% suIf the modules fail to load, then your kernel is not supported and you'll need to report this as a bug to the BLCR team, after first checking the bug database to ensure the problem isn't already known (or even fixed). Similarly, if one or more tests fail, we'll want to know that too. However, if the only failures are one or two tests that say "restart/timeout" then you should first try increasing the timeout as follows (assuming the kernel modules have already been loaded):
Password:[type root password here]
# make insmod
# exit
% make check
% make check CRUT_TIMEOUT=120The '
CRUT_TIMEOUT
' is a value in seconds, with a default
of 60 (CRUT is an acronym for Checkpoint/Restart Unit Test).Tests marked 'SKIP' are neither a 'PASS', nor a 'FAIL' - instead they indicate a test that was not actually run. So don't be alarmed if you see one or more tests marked 'SKIP'. This happens when a given test is not applicable to your system (for instance the hugetlbfs test is skipped when no writable mountpoint for hugetlbfs is found).
We do not advise continuing to
install BLCR if any tests 'FAIL' (other than timeouts correctable
by raising CRUT_TIMEOUT
sufficiently).
Use the standard 'install' make target to install the BLCR utilities and libraries, and to place the kernel modules in the standard location for your kernel:
% make installor, if you prefer stripped binaries:
% make install-strip
lib64/blcr
) branch of the installation directory. In
this example, we'll assume the
installation
prefix was the default /usr/local and that your kernel is
version 2.6.12-1.234 for an x86.
Thus, for this example the kernel modules are in the directory
/usr/local/lib/blcr/2.6.12-1.234/. There are three kernel
modules
in
this directory which must be loaded (in the correct order) for
BLCR to function.
As root, load the kernel modules in this order:
# /sbin/insmod /usr/local/lib/blcr/2.6.12-1.234/blcr_imports.ko
# /sbin/insmod /usr/local/lib/blcr/2.6.12-1.234/blcr_vmadump.ko
# /sbin/insmod /usr/local/lib/blcr/2.6.12-1.234/blcr.ko
You may wish to set up your system to load these modules by default at boot time. The exact mechanism for doing so differs between Linux distributions, and thus requires an experienced system administrator. However, a template init script is provided as etc/blcr.rc in the BLCR source directory.
It should always be safe to run the ldconfig command, even if BLCR did not install its library in a directory managed in the cache. However, if you wish to avoid this step when unneccessary, you can know that BLCR's shared library is in a cached directory if you configured with --prefix= or --libdir= options that cause BLCR's shared library (libcr.so) to be installed in:
For Bourne-style shells:
$ PATH=$PATH:PREFIX/bin
$ MANPATH=$MANPATH:PREFIX/man
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:PREFIX/lib
$ export PATH MANPATH LD_LIBRARY_PATH
For csh-style shells:
% setenv PATH ${PATH}:PREFIX/bin
% setenv MANPATH ${MANPATH}:PREFIX/man
% setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:PREFIX/lib
It is worth noting that if the BLCR libraries are installed in a directory named in /etc/ld.so.conf or /etc/ld.so.conf.d/, then you do not need to add it to LD_LIBRARY_PATH. Similarly, you may find it unnecssary to add to PATH and/or MANPATH if BLCR has been installed in a location that is already searched.
uninstall
'
make target available to remove the files copied by the 'install
'
target.% make rpmsIf successful, the new RPM packages will be in the rpm/RPMS subdirectory of the build tree. The resulting packages will be for whatever kernel you configured for.
--prefix=/usr
and to configure with --enable-multilib
on 64-bit
platforms.
Alternatively, the 'make rpms' step above will create a
source
RPM
in the rpm/SRPMS subdirectory of the build tree, valid for
the
configured kernel.
If building as root, built RPMs will be placed in a subdirectory of /usr/src/redhat/RPMS. However, if you are not root, you may need to see this page at IBM for information on configuring an output location before proceeding. Personally, we prefer not to build as root.
To build binary RPMs from the source RPM, use
% rpmbuild --rebuild blcr-X.Y.Z-N.src.rpm --target ARCHreplacing blcr-X.Y.Z-N.src.rpm with the correct filename, and ARCH with a specific target CPU. If you don't know your target, try "uname -p" to determine it. If you don't specify a --target, the default will depend on the version of rpmbuild and may be i386 (which will be rejected). See the documentation for rpmbuild for more information on building binary RPMs from source RPMs.
The RPMs should build without error. However, if not building for the running kernel, you may see a warning about this. You will see the location of the binary RPMs in the last few lines of output from rpmbuild - something like this:
Wrote: /usr/src/redhat/RPMS/i686/blcr-0.6.5-1.i686.rpmYou should note that the kernel version 2.6.12-1.234 has become 2.6.12_1.234 in the name of the blcr-modules package (a change of a hyphen to an underscore).
Wrote: /usr/src/redhat/RPMS/i686/blcr-libs-0.6.5-1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/blcr-devel-0.6.5-1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/blcr-modules_2.6.12_1.234-0.6.5-1.i686.rpm
Wrote: /usr/src/redhat/RPMS/i686/blcr-testsuite-0.6.5-1.i686.rpm
In most cases, you will want to install the blcr, blcr-libs and blcr-modules binary RPMS. The blcr-devel is only required on machines on which you will compiling/linking source code against BLCR's libraries. So, for a cluster you may want to install blcr-devel only on the front-end node(s).
The blcr-testsuite RPM is optional. You may install and run the testsuite (/usr/libexec/blcr-testsuite/RUN_ME) if you wish to verify correct operation of BLCR. You may be asked to do this if you report bugs to us.
For more information on Berkeley Lab Checkpoint/Restart for Linux,
visit the
project home
page: http://ftg.lbl.gov/checkpoint
To report bugs (or look for bug fixes prior to reporting new ones),
visit http://mantis.lbl.gov/bugzilla