File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ MANPAGES=dmtcp.1.gz dmtcp_coordinator.1.gz dmtcp_command.1.gz \
5757# Version header.
5858include Makefile.versions
5959
60- VERSION_HEADER := include /mana-version.h
61- GITID_FILE := .gitid
62- GITID := $(shell if [ -d ".git" ]; then git describe --always; fi)
60+ VERSION_HEADER := contrib/mpi-proxy-split /mana-version.h
61+ GITID_FILE := .gitid
62+ GITID := $(shell if [ -d ".git" ]; then git describe --always; fi)
6363
6464# Git repository wasn't inited in MANA folder
6565ifeq ($(GITID ) ,)
@@ -313,8 +313,8 @@ clean: tidy
313313 - cd contrib && $(MAKE ) clean
314314 - cd test && $(MAKE ) clean
315315 - cd manpages && ${MAKE} clean
316- - rm .gitid
317- - rm include/mana-version.h
316+ - rm -f .gitid
317+ - rm -f include/mana-version.h
318318 - if test -z " $$ DMTCP_TMPDIR" ; then \
319319 if test -z " $$ TMPDIR" ; then \
320320 DMTCP_TMPDIR=/tmp/dmtcp-$$ USER@` /bin/hostname` ; \
Original file line number Diff line number Diff line change @@ -107,13 +107,14 @@ ${DMTCP_ROOT}/bin/mana_p2p_update_logs: ${WRAPPERS_SRCDIR}/mana_p2p_update_logs.
107107# which is a prerequisite for ${DMTCP_ROOT}/lib/dmtcp/libmana.so
108108# Always do 'make default' or 'make install' -- not 'make libmana.so'
109109# MANA_COORD_OBJS needed for 'make mana' at top level.
110- install : ${MANA_COORD_OBJS}
110+ install : ${MANA_COORD_OBJS} ./mana-version.h
111111 make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a
112112 make ${DMTCP_ROOT} /lib/dmtcp/libmana.so
113113 make ${DMTCP_ROOT} /lib/dmtcp/libmpidummy.so
114114 make ${DMTCP_ROOT} /bin/lh_proxy
115115 make ${DMTCP_ROOT} /bin/gethostbyname_proxy
116116 make ${DMTCP_ROOT} /bin/mana_p2p_update_logs
117+ cp -f ./mana-version.h ${DMTCP_ROOT} /include
117118
118119tidy :
119120 rm -f * ~ .* .swp dmtcp_restart_script* .sh ckpt_* .dmtcp
@@ -123,6 +124,7 @@ clean: tidy
123124 rm -f ${LIBOBJS} ${MANA_COORD_OBJS}
124125 rm -f libmana.so
125126 rm -f ${DMTCP_ROOT} /lib/dmtcp/libmana.so
127+ rm -f ./mana-version.h
126128 @cd ${LOWER_HALF_SRCDIR} && make clean
127129 @cd ${WRAPPERS_SRCDIR} && make clean
128130
Original file line number Diff line number Diff line change @@ -13,11 +13,14 @@ dir=`dirname $0`
1313options=" "
1414verbose=0
1515help=0
16+ version=0
1617while [ -n " $1 " ]; do
1718 if [ " $1 " == --verbose ]; then
1819 verbose=1
1920 elif [ " $1 " == --help ]; then
2021 help=1
22+ elif [ " $1 " == --version ]; then
23+ version=1
2124 else
2225 options=" $options $1 "
2326 fi
@@ -29,6 +32,13 @@ if [ "$help" -eq 1 ]; then
2932 exit 0
3033fi
3134
35+ if [ " $version " -eq 1 ]; then
36+ MANA_VERSION_FILE=$dir /../include/mana-version.h
37+ MANA_VERSION=` awk ' /MANA_VERSION / {print $4}' $MANA_VERSION_FILE `
38+ echo " ` basename $0 ` (MANA) ${MANA_VERSION} "
39+ exit 0
40+ fi
41+
3242SITE=unknown
3343if [ " $NERSC_HOST " = " cori" ]; then
3444 SITE=nersc
Original file line number Diff line number Diff line change @@ -31,11 +31,14 @@ options=""
3131help=0
3232verbose=0
3333srun_sbatch_found=0
34+ version=0
3435while [ -n " $1 " ]; do
3536 if [ " $1 " == --verbose ]; then
3637 verbose=1
3738 elif [ " $1 " == --help ]; then
3839 help=1
40+ elif [ " $1 " == --version ]; then
41+ version=1
3942 elif [ " $1 " == srun ] || [ " $1 " == sbatch ]; then
4043 srun_sbatch_found=1
4144 elif [ " $1 " == --ckptdir ]; then
@@ -55,6 +58,13 @@ if [ "$help" -eq 1 ]; then
5558 exit 0
5659fi
5760
61+ if [ " $version " -eq 1 ]; then
62+ MANA_VERSION_FILE=$dir /../include/mana-version.h
63+ MANA_VERSION=` awk ' /MANA_VERSION / {print $4}' $MANA_VERSION_FILE `
64+ echo " ` basename $0 ` (MANA) ${MANA_VERSION} "
65+ exit 0
66+ fi
67+
5868SITE=unknown
5969if [ " $NERSC_HOST " = " cori" ]; then
6070 SITE=nersc
Original file line number Diff line number Diff line change @@ -34,11 +34,14 @@ options=""
3434restartdir=" "
3535verbose=0
3636help=0
37+ version=0
3738while [ -n " $1 " ]; do
3839 if [ " $1 " == --verbose ]; then
3940 verbose=1
4041 elif [ " $1 " == --help ]; then
4142 help=1
43+ elif [ " $1 " == --version ]; then
44+ version=1
4245 elif [ " $1 " == --restartdir ]; then
4346 restartdir=" $2 "
4447 if [ ! -d " $restartdir " ]; then
@@ -57,6 +60,13 @@ if [ "$help" -eq 1 ]; then
5760 exit 0
5861fi
5962
63+ if [ " $version " -eq 1 ]; then
64+ MANA_VERSION_FILE=$dir /../include/mana-version.h
65+ MANA_VERSION=` awk ' /MANA_VERSION / {print $4}' $MANA_VERSION_FILE `
66+ echo " ` basename $0 ` (MANA) ${MANA_VERSION} "
67+ exit 0
68+ fi
69+
6070SITE=unknown
6171if [ " $NERSC_HOST " = " cori" ]; then
6272 SITE=nersc
Original file line number Diff line number Diff line change @@ -20,11 +20,14 @@ submissionPort=`grep Port: $HOME/.mana | sed -e 's%Port: %%'|sed -e 's% .*$%%'`
2020options=" "
2121verbose=0
2222help=0
23+ version=0
2324while [ -n " $1 " ]; do
2425 if [ " $1 " == --verbose ]; then
2526 verbose=1
2627 elif [ " $1 " == --help ]; then
2728 help=1
29+ elif [ " $1 " == --version ]; then
30+ version=1
2831 else
2932 options=" $options $1 "
3033 fi
@@ -36,6 +39,13 @@ if [ "$help" -eq 1 ]; then
3639 exit 0
3740fi
3841
42+ if [ " $version " -eq 1 ]; then
43+ MANA_VERSION_FILE=$dir /../include/mana-version.h
44+ MANA_VERSION=` awk ' /MANA_VERSION / {print $4}' $MANA_VERSION_FILE `
45+ echo " ` basename $0 ` (MANA) ${MANA_VERSION} "
46+ exit 0
47+ fi
48+
3949coordinator_found=0
4050$dir /dmtcp_command -s -h $submissionHost -p $submissionPort 1> /dev/null \
4151 && coordinator_found=1
You can’t perform that action at this time.
0 commit comments