Commit 1f0442ca authored by incardon's avatar incardon

Fixing pdata install

parent d98af959
......@@ -187,6 +187,22 @@ fi
AX_BOOST([1.52],[],[echo "boost not found"
exit 202])
### Unfortunately a lot of linux distros install a pretty old MPI in the system wide folder,
### override such MPI with the installed one is extremely difficult and tricky, because we want
### to include "some" system library but exclude mpi. One possibility is to give specifically
### the wanted libmpi.so directly to the linker. But this is not possible because this lib is
### given by mpic++ in the form -L/path/to/mpi -lmpi, the other is completely eliminate every
### -L with a system default library
###
# eliminate any /usr/lib and and /usr/include from $BOOST_LIB and $BOOST_INCLUDE
BOOST_LDFLAGS=$(echo "$BOOST_LDFLAGS" | sed -e 's/-L\/usr\/lib//g')
BOOST_CPPFLAGS=$(echo "$BOOST_CPPFLAGS" | sed -e 's/-I\/usr\/include//g')
AC_SUBST(BOOST_LDFLAGS)
AC_SUBST(BOOST_CPPFLAGS)
####### Checking for GPU support
AX_CUDA
......
......@@ -9,13 +9,13 @@ OBJ = main.o
%.o: %.cpp
$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
vector: $(OBJ)
vect: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
all: vector
all: vect
.PHONY: clean all
clean:
rm -f *.o *~ core vector
rm -f *.o *~ core vect
......@@ -127,8 +127,14 @@ conf_err=1
## MPI
command -v mpic++ >/dev/null 2>&1
if [ $? -eq 0 ]; then
if [ x"$MPI_installation_required" == x"yes" ]; then
./script/install_MPI.sh $i_dir $compiler_opt
export PATH="$i_dir/MPI/bin:$PATH"
configure_options="$configure_options CXX=mpic++ "
MPI_installed=1
else
command -v mpic++ >/dev/null 2>&1
if [ $? -eq 0 ]; then
options="CXX=mpic++"
fi
......@@ -228,7 +234,7 @@ if [ $MPI_installed -eq 1 ]; then
echo -e " MPI has been installed into: \033[1m $i_dir/MPI \033[0m"
echo ""
if [ x"$platform" = x"linux" ]; then
echo -e "\033[1m export PATH=\"\$PATH:$i_dir/MPI/bin \" \033[0m "
echo -e "\033[1m export PATH=\"\$PATH:$i_dir/MPI/bin\" \033[0m "
echo -e "\033[1m export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:$i_dir/MPI/lib\" \033[0m "
else
echo -e "\033[1m export PATH=\"\$PATH:$i_dir/MPI/bin \" \033[0m "
......
......@@ -168,14 +168,17 @@ else
echo -e "mpirun $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $major -lt 1 ]; then
echo -e "mpirun $major.$middle.$minor \033[91;5;1m FAILED \033[0m is too old, 1.8.1 at least required"
MPI_installation_required=yes
elif [ $middle -gt 8 ]; then
echo -e "mpirun $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $middle -lt 8 ]; then
echo -e "mpirun $major.$middle.$minor \033[91;5;1m FAILED \033[0m is too old, 1.8.1 at least required"
MPI_installation_required=yes
elif [ $minor -gt 0 ]; then
echo -e "mpirun $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
else
echo -e "mpirun $major.$middle.$minor \033[91;5;1m FAILED \033[0m is too old, 1.8.1 at least required"
MPI_installation_required=yes
fi
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment