forked from mpickpt/mana
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure-mana
More file actions
executable file
·58 lines (51 loc) · 2.62 KB
/
configure-mana
File metadata and controls
executable file
·58 lines (51 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
# These optional autoconf variables will be configured
# via contrib/mpi-proxy-split/Makefile_config.in
# Do not add spaces to the next two lines.
# If MPI will be used on a different computer than where you configure,
# then maybe replace this with the result of 'ip addr' on the compute nodes.
MPI_ETHERNET_INTERFACE=\
`PATH=$PATH:/usr/sbin ip addr |grep -B1 link/ether | head -1 |sed -e 's%[^ ]*: \([^ ]*\): .*%\1%'`
# Note: modify this path according to your environment.
if [[ -z "${MPI__INSTALL_DIR}" ]]; then
MPI_INSTALL_DIR=/usr/local
fi
# This works on our local test computer (CentOS 7).
# But also read the note right after this command.
./configure --enable-debug \
CFLAGS=-fno-stack-protector \
CXXFLAGS=-fno-stack-protector \
MPI_BIN=$MPI_INSTALL_DIR/bin \
MPI_INCLUDE=$MPI_INSTALL_DIR/include \
MPI_LIB=$MPI_INSTALL_DIR/lib \
MPICC='${MPI_BIN}/mpicc' \
MPICXX='${MPI_BIN}/mpic++' \
MPIFORTRAN='${MPI_BIN}/mpifort' \
MPIRUN='${MPI_BIN}/mpirun -iface '${MPI_ETHERNET_INTERFACE} \
MPI_LD_FLAG=-lmpich \
MPI_CFLAGS= \
MPI_CXXFLAGS= \
MPI_LDFLAGS= \
MANA_USE_LH_FIXED_ADDRESS=1
# NOTE: To make it work, two changes were needed:
# ===============================================================
# 1. MANA requires 'mpicc -static' for linking under MPICH. We saw multiple
# problems in this. Hence, it is recommended to build your own MPICH.
# We found that 'mpicc -static' fails to link with MPICH, unless you
# configure MPICH with: ./configure --disable-xml2 --disable-libxml2 ...
# See the contrib/mpi-proxy-split/INSTALL file for details.
# ===============================================================
# 2. Recent versions of gcc ran into problems with the stack protector.
# This happens in the DMTCP call to arch_prctl(ARCH_SET_FS, ...).
# (Actually, this is called through syscall.) So, stack protection
# must be turned off in the files interposing on syscall(). For convenience,
# we have turned it off everywhere, by setting CFLAGS and CXXFLAGS
# in the 'configure' command, above.
# ===============================================================
# THEN IT COMPILES TO BUILD lh_proxy.
# Note: also, compiling coordinator_mana.cpp in the plugin requires
# '#include <mpi.h>' in order to compile the data structure rank_state_t .
# Because of this, we need to use 'mpicxx' to build the coordinator code.
# That works.
# (BUT IS THERE SOMETHING CLEANER? Perhaps modifying the result of
# 'mpicc -show' can help.)