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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ local/
include/config.h
include/dmtcp.h
include/stamp-h1
dmtcp/manpages/*.gz
dmtcp/src/dmtcp_checkpoint
dmtcp/src/dmtcp_launch
dmtcp/src/dmtcp_command
Expand Down Expand Up @@ -63,3 +64,5 @@ build/

mpi-proxy-split/mpi-wrappers/p2p-deterministic.h
mpi-proxy-split/mpi-wrappers/mana_p2p_update_logs

manpages/*.gz
7 changes: 4 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ default: display-build-env add-git-hooks mana_prereqs
all: default

mana: dmtcp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why we are doing a make install here. Shouldn't that go under the install target?

Also, should we just remove this target altogether.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karya0 , I'm not sure I understand your point here. We want to capture the default target for 'make'. The conventional name for that would be default and not install. Under that target, it's possible to call make install if desired. Something like that seems to be happening here.

cd mpi-proxy-split && $(MAKE) install && $(MAKE) -j tests
cd mpi-proxy-split && $(MAKE) $(INSTALL_FLAGS) && $(MAKE) -j tests

dmtcp:
cd dmtcp && $(MAKE)
Expand All @@ -63,8 +63,9 @@ create-dirs:

install: all create-dirs
cd dmtcp && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
cd mpi-proxy-split && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
cd manpages && make DESTDIR=$(DESTDIR) $(INSTALL_FLAGS)
cd mpi-proxy-split && make DESTDIR=$(prefix) $(INSTALL_FLAGS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't set DESTDIR to prefix. These are two separate variables and typically the final location is $(DESTDIR)$prefix

cd manpages && make DESTDIR=$(prefix) $(INSTALL_FLAGS)
$(INSTALL) bin/mana* $(bindir)

uninstall:
cd dmtcp && make DESTDIR=$(DESTDIR) $(UNINSTALL_FLAGS)
Expand Down
5 changes: 3 additions & 2 deletions manpages/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mandir=@mandir@
PANDOC=@PANDOC@
INSTALL_DATA = @INSTALL_DATA@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@

MANPAGES = mana.1.gz

Expand All @@ -14,7 +15,7 @@ default: ${MANPAGES}
fi

%.1.gz: %.1
gzip --force --keep $<
gzip --force < $< > $<.gz

install: ${MANPAGES}
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
Expand Down
25 changes: 13 additions & 12 deletions mpi-proxy-split/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ endif
ifndef DMTCP_ROOT
DMTCP_ROOT=${MANA_ROOT}/dmtcp
endif

ifeq ($(DESTDIR),)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not touch DESTDIR at all -- this is something that's supplied as part of the make command itself.

DESTDIR=${shell readlink -f ${MANA_ROOT}}
endif

DMTCP_INCLUDE=${DMTCP_ROOT}/include
JALIB_INCLUDE=${DMTCP_ROOT}/jalib

Expand All @@ -56,11 +61,9 @@ override CXXFLAGS += -fPIC -I${DMTCP_INCLUDE} -I${JALIB_INCLUDE} \
# ${WRAPPERS_SRCDIR}/libmpiwrappers.a ia a prerequisite for libmana.so
# Always do 'make default' or 'make install' -- not 'make libmana.so'
default: ${MANA_COORD_OBJS}
make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a
@make -C ${WRAPPERS_SRCDIR}
@make -C ${LOWER_HALF_SRCDIR}
@make libmana.so
@make -C ${LOWER_HALF_SRCDIR} lh_proxy
@make -C ${LOWER_HALF_SRCDIR} lh_proxy_default_address
@make -C ${WRAPPERS_SRCDIR} libmpistub.so

# ${WRAPPERS_SRCDIR}/libmpiwrappers.a made in install/default before libmana.so
libmana.so: ${LIBOBJS} ${WRAPPERS_SRCDIR}/libmpiwrappers.a
Expand Down Expand Up @@ -113,13 +116,11 @@ ${MANA_ROOT}/bin/mana_p2p_update_logs: ${WRAPPERS_SRCDIR}/mana_p2p_update_logs.c
# which is a prerequisite for ${MANA_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}
make -C ${WRAPPERS_SRCDIR} libmpiwrappers.a
make ${MANA_ROOT}/lib/dmtcp/libmana.so
make ${MANA_ROOT}/lib/dmtcp/libmpistub.so
make ${MANA_ROOT}/bin/lh_proxy
make ${MANA_ROOT}/bin/gethostbyname_proxy
make ${MANA_ROOT}/bin/mana_p2p_update_logs

install: default
$(INSTALL) libmana.so $(DESTDIR)/lib/dmtcp/
make -C ${WRAPPERS_SRCDIR} DESTDIR=$(DESTDIR) install
make -C ${LOWER_HALF_SRCDIR} DESTDIR=$(DESTDIR) install

tidy:
rm -f *~ .*.swp dmtcp_restart_script*.sh ckpt_*.dmtcp
Expand All @@ -128,7 +129,7 @@ tidy:
clean: tidy
rm -f ${LIBOBJS} ${MANA_COORD_OBJS}
rm -f libmana.so
rm -f ${MANA_ROOT}/lib/dmtcp/libmana.so
rm -f ${DESTDIR}/lib/dmtcp/libmana.so
@cd ${LOWER_HALF_SRCDIR} && make clean
@cd ${WRAPPERS_SRCDIR} && make clean

Expand Down
1 change: 1 addition & 0 deletions mpi-proxy-split/Makefile_config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MANA_USE_LH_FIXED_ADDRESS = @MANA_USE_LH_FIXED_ADDRESS@

CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
INSTALL = @INSTALL@

ifeq ($(findstring cori,$(PLATFORM)),cori)
IS_CORI = 1
Expand Down
32 changes: 18 additions & 14 deletions mpi-proxy-split/lower-half/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ ifndef PLUGIN_ROOT
PLUGIN_ROOT=..
endif

ifeq ($(DESTDIR),)
DESTDIR=${shell readlink -f ${MANA_ROOT}}
endif

DMTCP_INCLUDE=${DMTCP_ROOT}/include
JALIB_INCLUDE=${DMTCP_ROOT}/jalib
PLUGIN_INCLUDE=${PLUGIN_ROOT}
Expand All @@ -34,20 +38,20 @@ PROXY_LD_FLAGS=-static -Wl,--wrap -Wl,__munmap -Wl,--wrap -Wl,shmat -Wl,--wrap -

TEXTSEG_ADDR_FLAG=-Wl,-Ttext-segment=E000000

default: ${PROXY_BIN} ${PROXY_BIN_DEFADDR} ${STATIC_GETHOSTBYNAME}
default: ${STATIC_GETHOSTBYNAME} ${PROXY_BIN} ${PROXY_BIN_DEFADDR}

# We should remove the special case for Cori, once we know this works on Cori.
ifeq ($(findstring cori,$(PLATFORM)),cori)
STATIC_GETHOSTBYNAME=
GETHOSTBYNAME_PROXY=
else ifeq ($(findstring gert,$(PLATFORM)),gert)
STATIC_GETHOSTBYNAME=
GETHOSTBYNAME_PROXY=
else
STATIC_GETHOSTBYNAME=gethostbyname-static/gethostbyname_static.o
${STATIC_GETHOSTBYNAME}: gethostbyname-static/gethostbyname_static.c \
gethostbyname-static/gethostbyname_proxy.c
cd gethostbyname-static && make gethostbyname_static.o
cd gethostbyname-static && make gethostbyname_proxy
cp -f gethostbyname-static/gethostbyname_proxy ${MANA_ROOT}/bin/
GETHOSTBYNAME_PROXY=gethostbyname-static/gethostbyname_proxy
${STATIC_GETHOSTBYNAME}:
@make -C gethostbyname-static gethostbyname_static.o install
endif

.c.o:
Expand Down Expand Up @@ -79,12 +83,12 @@ ${PROXY_BIN}: ${PROXY_OBJS} ${LIBPROXY}.a ${STATIC_GETHOSTBYNAME}

${PROXY_BIN_DEFADDR}: ${PROXY_OBJS} ${LIBPROXY}.a ${STATIC_GETHOSTBYNAME}
if ${MPICC} -v 2>&1 | grep -q 'MPICH version'; then \
rm -f tmp.sh; \
rm -f tmp1.sh; \
${MPICC} -show ${PROXY_LD_FLAGS} -o $@ -Wl,-start-group \
$^ ${MPI_LD_FLAG} -lrt -lpthread -lc -Wl,-end-group | \
sed -e 's^-lunwind ^ ^'> tmp.sh; \
sh tmp.sh; \
rm -f tmp.sh; \
sed -e 's^-lunwind ^ ^'> tmp1.sh; \
sh tmp1.sh; \
rm -f tmp1.sh; \
else \
${MPICC} ${PROXY_LD_FLAGS} -o $@ -Wl,-start-group \
$^ ${MPI_LD_FLAG} -lrt -lpthread -lc -Wl,-end-group; \
Expand All @@ -93,17 +97,17 @@ ${PROXY_BIN_DEFADDR}: ${PROXY_OBJS} ${LIBPROXY}.a ${STATIC_GETHOSTBYNAME}
${LIBPROXY}.a: ${LIBPROXY_OBJS}
ar cr $@ $^

install: ${PROXY_BIN} ${PROXY_BIN_DEFADDR} ${STATIC_GETHOSTBYNAME}
cp -f $^ ${MANA_ROOT}/bin/
install: ${PROXY_BIN} ${PROXY_BIN_DEFADDR} ${GETHOSTBYNAME_PROXY}
$(INSTALL) $^ $(DESTDIR)/bin

tidy:
rm -f *~ .*.swp dmtcp_restart_script*.sh ckpt_*.dmtcp
rm -rf ckpt_rank_*

clean: tidy
rm -f ${PROXY_BIN} ${PROXY_BIN_DEFADDR} ${LIBPROXY}.a ${PROXY_OBJS} ${LIBPROXY_OBJS}
rm -f ${MANA_ROOT}/bin/${PROXY_BIN}
rm -f ${MANA_ROOT}/bin/${PROXY_BIN_DEFADDR}
rm -f ${DESTDIR}/bin/${PROXY_BIN}
rm -f ${DESTDIR}/bin/${PROXY_BIN_DEFADDR}
if test -d gethostbyname-static; then \
cd gethostbyname-static && make clean; \
fi
Expand Down
21 changes: 17 additions & 4 deletions mpi-proxy-split/lower-half/gethostbyname-static/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
include ../../Makefile_config
CFLAGS=-g3 -O0

# Modify if your MANA_ROOT is located elsewhere.
ifndef MANA_ROOT
MANA_ROOT=../../..
endif
# Modify if your DMTCP_ROOT is located elsewhere.
ifndef DMTCP_ROOT
DMTCP_ROOT=${MANA_ROOT}/dmtcp
endif

ifeq ($(DESTDIR),)
DESTDIR=${MANA_ROOT}
endif

# getaddrinfo ntp-wwv.nist.gov time: sin_port: 9472; sin_addr: 132.163.97.5
test: a.out
./a.out localhost
Expand All @@ -19,13 +33,12 @@ gethostbyname_proxy: gethostbyname_proxy.c

clean:
rm -f a.out *.o gethostbyname_proxy
rm -f ${MANA_ROOT}/bin/gethostbyname_proxy
rm -f ${DESTDIR}/bin/gethostbyname_proxy

dist: clean
dir=`basename $$PWD` && cd .. && tar zcvf ./$$dir.tar.gz ./$$dir
dir=`basename $$PWD` && ls -l ../$$dir.tar.gz

install:
make gethostbyname_proxy
cp -f gethostbyname_proxy ../../../bin/
install: gethostbyname_proxy
$(INSTALL) $< $(DESTDIR)/bin

19 changes: 12 additions & 7 deletions mpi-proxy-split/mpi-wrappers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ endif
ifndef DMTCP_ROOT
DMTCP_ROOT=${MANA_ROOT}/dmtcp
endif

ifeq ($(DESTDIR),)
DESTDIR=${MANA_ROOT}
endif

DMTCP_INCLUDE=${DMTCP_ROOT}/include
JALIB_INCLUDE=${DMTCP_ROOT}/jalib

Expand Down Expand Up @@ -136,30 +141,30 @@ tidy:
rm -f *~ .*.swp dmtcp_restart_script*.sh ckpt_*.dmtcp
rm -rf ckpt_rank_*

install: libmpistub.so mana_p2p_update_logs
cp -f libmpistub.so ${MANA_ROOT}/lib/dmtcp/
cd ${MANA_ROOT}/lib/dmtcp && \
install: default
$(INSTALL) libmpistub.so $(DESTDIR)/lib/dmtcp
cd $(DESTDIR)/lib/dmtcp && \
ln -sf libmpistub.so libmpich_intel.so.3.0.1 && \
ln -sf libmpich_intel.so.3.0.1 libmpich_intel.so.3 && \
ln -sf libmpistub.so libmpich_gnu_82.so.3.0.1 && \
ln -sf libmpich_gnu_82.so.3.0.1 libmpich_gnu_82.so.3
cd ${MANA_ROOT}/lib/dmtcp && \
cd $(DESTDIR)/lib/dmtcp && \
ln -sf libmpistub.so libpmi.so.0.5.0 && \
ln -sf libpmi.so.0.5.0 libpmi.so.0
cp -f mana_p2p_update_logs ${MANA_ROOT}/bin/
$(INSTALL) mana_p2p_update_logs $(DESTDIR)/bin

clean: tidy
rm -f ${LIBWRAPPER_OBJS}
rm -f ${LIBNAME}.a libmpistub.so
rm -f ${MANA_ROOT}/lib/dmtcp/libmpistub.so
rm -f ${DESTDIR}/lib/dmtcp/libmpistub.so
rm -f mpi_stub_wrappers.c
rm -f p2p-deterministic.h
rm -f mpi_unimplemented_wrappers.cpp
rm -f mpi_fortran_wrappers.cpp
rm -f libmpich_intel.so.3.0.1 libmpich_intel.so.3
rm -f libmpich_gnu_82.so.3.0.1 libmpich_gnu_82.so.3
rm -f libpmi.so.3.0.1 libpmi.so.0
cd ${MANA_ROOT}/lib/dmtcp && rm -f libmpich_gnu_82.so.* \
cd ${DESTDIR}/lib/dmtcp && rm -f libmpich_gnu_82.so.* \
libmpich_intel.so.* libpmi.so.*

distclean: clean
Expand Down