Skip to content
Snippets Groups Projects
Commit ec80a15c authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing installer and removing garbage

parent f29c1546
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,10 @@
if [ x"$3" == x"1" ]; then
echo "Installing MPI with GPU support"
./configure --with-cuda --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7
./configure --with-cuda --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7
else
echo "Installing MPI without GPU support"
./configure --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7
echo "Installing MPI without GPU support"
./configure --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7
fi
make -j $2
make install
......
......@@ -8,13 +8,11 @@ function pre_req()
{
source script/discover_package_manager
source script/discover_os
source script/solve_autoconf
source script/solve_gpp
source script/solve_gfortran
source script/solve_cmake
source script/solve_git
source script/solve_wget
source script/solve_automake
source script/solve_brew
source script/solve_gsed
source script/solve_libtool
......@@ -142,80 +140,6 @@ else
exit 1
fi
fi
## autoconf
if haveProg autoconf; then
echo -e "autoconf\033[92;1m SUCCESS \033[0m"
else
echo >&2
echo -e "autoconf\033[91;5;1m FAILED \033[0m"
echo "OpenFPM require autoconf but it's not installed, searching a solution..."
solve_autoconf $platform
if haveProg autoconf; then
echo -e "autoconf\033[92;1m SUCCESS \033[0m"
else
echo -e "autoconf\033[91;5;1m FAILED \033[0m"
exit 1
fi
fi
## autoheader
if haveProg autoheader; then
echo -e "autoheader\033[92;1m SUCCESS \033[0m"
else
echo >&2
echo -e "autoheader\033[91;5;1m FAILED \033[0m"
echo "OpenFPM require autoheader but it's not installed, searching a solution..."
solve_autoconf $platform
if haveProg autoheader; then
echo -e "autoheader\033[92;1m SUCCESS \033[0m"
else
echo -e "autoheader\033[91;5;1m FAILED \033[0m"
exit 1
fi
fi
## automake
if haveProg automake; then
echo -e "automake\033[92;1m SUCCESS \033[0m"
else
echo >&2
echo -e "automake\033[91;5;1m FAILED \033[0m"
echo "OpenFPM require automake but it's not installed, searching a solution..."
solve_automake $platform
if haveProg automake; then
echo -e "automake\033[92;1m SUCCESS \033[0m"
else
echo "automake\033[91;5;1m FAILED \033[0m"
exit 1
fi
fi
## libtoolize or glibtoolize
opt1=1
opt2=1
if haveProg libtoolize; then
opt1=0
fi
if haveProg glibtoolize; then
opt2=0
fi
if [ $opt1 -ne 0 -a $opt2 -ne 0 ]; then
echo >&2
echo -e "libtool\033[91;5;1m FAILED \033[0m"
echo "OpenFPM require libtool but it's not installed, searching a solution..."
solve_libtool $platform
if haveProg libtoolize; then
opt1=0
fi
if haveProg glibtoolize; then
opt2=0
fi
if [ $opt1 -ne 0 -a $opt2 -ne 0 ]; then
echo -e "libtool\033[91;5;1m FAILED \033[0m"
exit 1
else
echo -e "libtool\033[92;1m SUCCESS \033[0m"
fi
else
echo -e "libtool\033[92;1m SUCCESS \033[0m"
fi
#### Detecting g++
detect_compiler
if [ $dgc_ret -eq 0 ]; then
......@@ -281,6 +205,8 @@ if haveProg mpirun; then
elif [ x"$possible_solutions_ret" == x"1" ]; then
./script/install_MPI.sh $i_dir $ncore $gpu_support $CC $CXX $F77 $FC
fi
else
echo "OpenMPI is CUDA aware"
fi
fi
......
......@@ -34,6 +34,50 @@ function get_openmpi_compilation_options()
function test_working_mpi_options()
{
script/download_MPI.sh
cd openmpi-3.1.3
openmpi_working_options=()
for opt in ${openmpi_compilation_options[@]}; do
# prefix and --with-cuda must be avoided
if [[ $opt == --with-cuda* ]]; then
continue;
fi
if [[ $opt == --prefix* ]]; then
continue;
fi
if [[ $opt == --enable-mpi-fortran* ]]; then
continue;
fi
if [[ $opt == CC* ]]; then
continue;
fi
if [[ $opt == CXX* ]]; then
continue;
fi
if [[ $opt == FC* ]]; then
continue;
fi
if [[ $opt == F77* ]]; then
continue;
fi
echo "Testing ./configure --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $openmpi_working_options"
./configure --prefix=$1/MPI --enable-mpi-fortran=yes CC=$4 CXX=$5 F77=$6 FC=$7 $openmpi_working_options $opt
if [ $? -eq 0 ]; then
openmpi_working_options="$openmpi_working_options $opt"
fi
done
echo "OpenMPI working options: $openmpi_working_options"
cd ..
}
#! /bin/bash
function solve_autoconf() {
source script/show_solutions
source script/discover_package_manager
discover_package_manager $1
pcman=$discover_package_manager_ret
if [ x"$pcman" = x"" ]; then
exit 1
fi
if [ x"$1" = x"osx" ]; then
commands[0]="$pcman install autoconf"
possible_solutions "${commands[@]}"
elif [ x"$1" = x"linux" ]; then
pc_install_command "$pcman"
commands[0]="su -c \"$pc_install_command_ret autoconf\""
commands[1]="sudo $pc_install_command_ret autoconf"
possible_solutions "${commands[@]}"
fi
}
#! /bin/bash
function solve_automake() {
source script/show_solutions
source script/discover_package_manager
discover_package_manager $1
pcman=$discover_package_manager_ret
if [ x"$pcman" = x"" ]; then
exit 1
fi
if [ x"$1" = x"osx" ]; then
commands[0]="$pcman install automake"
possible_solutions "${commands[@]}"
elif [ x"$1" = x"linux" ]; then
pc_install_command "$pcman"
commands[0]="su -c \"$pc_install_command_ret automake\""
commands[1]="sudo $pc_install_command_ret automake"
possible_solutions "${commands[@]}"
fi
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment