Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,42 @@ MANPAGES_AUTOGEN=dmtcp_nocheckpoint.1.gz mtcp_restart.1.gz \
MANPAGES=dmtcp.1.gz dmtcp_coordinator.1.gz dmtcp_command.1.gz \
dmtcp_launch.1.gz dmtcp_restart.1.gz mana.1.gz

# Version header.
include Makefile.versions

VERSION_HEADER := contrib/mpi-proxy-split/mana-version.h
GITID_FILE := .gitid
GITID := $(shell if [ -d ".git" ]; then git describe --always; fi)

# Git repository wasn't inited in MANA folder
ifeq ($(GITID),)
GITID := 0
else
GITID_FILE_VALUE := $(shell if [ -f '$(GITID_FILE)' ]; then if [ `cat '$(GITID_FILE)'` = $(GITID) ]; then echo y; fi; fi)
ifneq ($(GITID_FILE_VALUE),y)
.PHONY: $(GITID_FILE)
endif
endif

$(GITID_FILE):
echo "$(GITID)" > $(GITID_FILE)

$(VERSION_HEADER): Makefile.versions $(GITID_FILE) .FORCE
echo "/* Autogenerated, do not edit */" > $@
echo "#ifndef __MANA_VERSION_H__" >> $@
echo "# define __MANA_VERSION_H__" >> $@
echo "# define MANA_VERSION " $(MANA_VERSION) >> $@
echo "# define MANA_VERSION_MAJOR " $(MANA_VERSION_MAJOR) >> $@
echo "# define MANA_VERSION_MINOR " $(MANA_VERSION_MINOR) >> $@
echo "# define MANA_VERSION_GITID " $(GITID) >> $@
echo "#endif /* __MANA_VERSION_H__ */" >> $@

.FORCE:

# Macros TEST and XTERM_E used on command line by check1, check2, ...:
# make TEST=readline XTERM_E="xterm -e" check-readline

default: display-build-env add-git-hooks build
default: display-build-env add-git-hooks build $(VERSION_HEADER)

mkdirs:
$(MKDIR_P) $(targetdir)/bin
Expand Down Expand Up @@ -281,6 +313,8 @@ clean: tidy
- cd contrib && $(MAKE) clean
- cd test && $(MAKE) clean
- cd manpages && ${MAKE} clean
- rm -f .gitid
- rm -f include/mana-version.h
- if test -z "$$DMTCP_TMPDIR"; then \
if test -z "$$TMPDIR"; then \
DMTCP_TMPDIR=/tmp/dmtcp-$$USER@`/bin/hostname`; \
Expand Down
7 changes: 7 additions & 0 deletions Makefile.versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# MANA version.
MANA_VERSION_MAJOR := 0
MANA_VERSION_MINOR := 1
MANA_VERSION := $(MANA_VERSION_MAJOR)$(if $(MANA_VERSION_MINOR),.$(MANA_VERSION_MINOR))

export MANA_VERSION_MAJOR MANA_VERSION_MINOR MANA_VERSION
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ MANA is an implementation of transparent checkpointing for MPI. It is
built as a plugin on top of DMTCP.

We are currently concentrating on making MANA robust (especially on Cori
and Perlmutter at NERSC). We plan to roll this ot to other platforms
and Perlmutter at NERSC). We plan to roll this out to other platforms
(CentOS 7 with MPICH, etc.), over time. If you have the technical expertise
to help in this rollout, help is appreciated. Please see the INSTALL
file, below, for further details. Note that MANA currently requires
the ability to create a statically linked MPI executable (using libmpi.a).
In a later phase, this restriction will be lifted.

As MANA is in constant development, it can be handy to keep track of its
version, as well as identify what changes may have caused potential bugs. As of
Jan 2022, version tracking has been implemented - simply refer to
`include/mana-version.h` after building MANA, or use the `--version` flag with
any of the MANA commands.

** WARNING: ** MANA currently may have large runtime overhead or loss
of accuracy on restart. This is still under development. Please test
your application on MANA first, before using MANA.
Expand All @@ -52,3 +58,4 @@ For details of installing and using MANA, please see:
- [the MANA README file](https://github.com/mpickpt/mana/blob/master/contrib/mpi-proxy-split/README)
- [the MANA INSTALL file](https://github.com/mpickpt/mana/blob/master/contrib/mpi-proxy-split/INSTALL)
- [the MANA 'man' page](https://github.com/mpickpt/mana/blob/master/manpages/mana.1) (or 'nroff -man mana.1')
- [a tutorial for installing MANA on CentOS 7 and 8 Stream](https://github.com/mpickpt/mana/blob/master/doc/mana-centos-tutorial.txt)
4 changes: 3 additions & 1 deletion contrib/mpi-proxy-split/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ ${DMTCP_ROOT}/bin/mana_p2p_update_logs: ${WRAPPERS_SRCDIR}/mana_p2p_update_logs.
# which is a prerequisite for ${DMTCP_ROOT}/lib/dmtcp/libmana.so
# Always do 'make default' or 'make install' -- not 'make libmana.so'
# MANA_COORD_OBJS needed for 'make mana' at top level.
install: ${MANA_COORD_OBJS}
install: ${MANA_COORD_OBJS} ./mana-version.h
make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a
make ${DMTCP_ROOT}/lib/dmtcp/libmana.so
make ${DMTCP_ROOT}/lib/dmtcp/libmpidummy.so
make ${DMTCP_ROOT}/bin/lh_proxy
make ${DMTCP_ROOT}/bin/gethostbyname_proxy
make ${DMTCP_ROOT}/bin/mana_p2p_update_logs
cp -f ./mana-version.h ${DMTCP_ROOT}/include

tidy:
rm -f *~ .*.swp dmtcp_restart_script*.sh ckpt_*.dmtcp
Expand All @@ -123,6 +124,7 @@ clean: tidy
rm -f ${LIBOBJS} ${MANA_COORD_OBJS}
rm -f libmana.so
rm -f ${DMTCP_ROOT}/lib/dmtcp/libmana.so
rm -f ./mana-version.h
@cd ${LOWER_HALF_SRCDIR} && make clean
@cd ${WRAPPERS_SRCDIR} && make clean

Expand Down
10 changes: 10 additions & 0 deletions src/mana_coordinator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ dir=`dirname $0`
options=""
verbose=0
help=0
version=0
while [ -n "$1" ]; do
if [ "$1" == --verbose ]; then
verbose=1
elif [ "$1" == --help ]; then
help=1
elif [ "$1" == --version ]; then
version=1
else
options="$options $1"
fi
Expand All @@ -29,6 +32,13 @@ if [ "$help" -eq 1 ]; then
exit 0
fi

if [ "$version" -eq 1 ]; then
MANA_VERSION_FILE=$dir/../include/mana-version.h
MANA_VERSION=`awk '/MANA_VERSION / {print $4}' $MANA_VERSION_FILE`
echo "`basename $0` (MANA) ${MANA_VERSION}"
exit 0
fi

SITE=unknown
if [ "$NERSC_HOST" = "cori" ]; then
SITE=nersc
Expand Down
10 changes: 10 additions & 0 deletions src/mana_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ options=""
help=0
verbose=0
srun_sbatch_found=0
version=0
while [ -n "$1" ]; do
if [ "$1" == --verbose ]; then
verbose=1
elif [ "$1" == --help ]; then
help=1
elif [ "$1" == --version ]; then
version=1
elif [ "$1" == srun ] || [ "$1" == sbatch ]; then
srun_sbatch_found=1
elif [ "$1" == --ckptdir ]; then
Expand All @@ -55,6 +58,13 @@ if [ "$help" -eq 1 ]; then
exit 0
fi

if [ "$version" -eq 1 ]; then
MANA_VERSION_FILE=$dir/../include/mana-version.h
MANA_VERSION=`awk '/MANA_VERSION / {print $4}' $MANA_VERSION_FILE`
echo "`basename $0` (MANA) ${MANA_VERSION}"
exit 0
fi

SITE=unknown
if [ "$NERSC_HOST" = "cori" ]; then
SITE=nersc
Expand Down
10 changes: 10 additions & 0 deletions src/mana_restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ options=""
restartdir=""
verbose=0
help=0
version=0
while [ -n "$1" ]; do
if [ "$1" == --verbose ]; then
verbose=1
elif [ "$1" == --help ]; then
help=1
elif [ "$1" == --version ]; then
version=1
elif [ "$1" == --restartdir ]; then
restartdir="$2"
if [ ! -d "$restartdir" ]; then
Expand All @@ -57,6 +60,13 @@ if [ "$help" -eq 1 ]; then
exit 0
fi

if [ "$version" -eq 1 ]; then
MANA_VERSION_FILE=$dir/../include/mana-version.h
MANA_VERSION=`awk '/MANA_VERSION / {print $4}' $MANA_VERSION_FILE`
echo "`basename $0` (MANA) ${MANA_VERSION}"
exit 0
fi

SITE=unknown
if [ "$NERSC_HOST" = "cori" ]; then
SITE=nersc
Expand Down
10 changes: 10 additions & 0 deletions src/mana_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ submissionPort=`grep Port: $HOME/.mana | sed -e 's%Port: %%'|sed -e 's% .*$%%'`
options=""
verbose=0
help=0
version=0
while [ -n "$1" ]; do
if [ "$1" == --verbose ]; then
verbose=1
elif [ "$1" == --help ]; then
help=1
elif [ "$1" == --version ]; then
version=1
else
options="$options $1"
fi
Expand All @@ -36,6 +39,13 @@ if [ "$help" -eq 1 ]; then
exit 0
fi

if [ "$version" -eq 1 ]; then
MANA_VERSION_FILE=$dir/../include/mana-version.h
MANA_VERSION=`awk '/MANA_VERSION / {print $4}' $MANA_VERSION_FILE`
echo "`basename $0` (MANA) ${MANA_VERSION}"
exit 0
fi

coordinator_found=0
$dir/dmtcp_command -s -h $submissionHost -p $submissionPort 1>/dev/null \
&& coordinator_found=1
Expand Down