Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argupta
openfpm_pdata
Commits
ec80a15c
Commit
ec80a15c
authored
Jan 01, 2019
by
incardon
Browse files
Fixing installer and removing garbage
parent
f29c1546
Changes
5
Hide whitespace changes
Inline
Side-by-side
script/install_MPI.sh
View file @
ec80a15c
...
...
@@ -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
...
...
script/pre_req
View file @
ec80a15c
...
...
@@ -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
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
>
&2
echo
-e
"autoconf
\0
33[91;5;1m FAILED
\0
33[0m"
echo
"OpenFPM require autoconf but it's not installed, searching a solution..."
solve_autoconf
$platform
if
haveProg autoconf
;
then
echo
-e
"autoconf
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
-e
"autoconf
\0
33[91;5;1m FAILED
\0
33[0m"
exit
1
fi
fi
## autoheader
if
haveProg autoheader
;
then
echo
-e
"autoheader
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
>
&2
echo
-e
"autoheader
\0
33[91;5;1m FAILED
\0
33[0m"
echo
"OpenFPM require autoheader but it's not installed, searching a solution..."
solve_autoconf
$platform
if
haveProg autoheader
;
then
echo
-e
"autoheader
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
-e
"autoheader
\0
33[91;5;1m FAILED
\0
33[0m"
exit
1
fi
fi
## automake
if
haveProg automake
;
then
echo
-e
"automake
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
>
&2
echo
-e
"automake
\0
33[91;5;1m FAILED
\0
33[0m"
echo
"OpenFPM require automake but it's not installed, searching a solution..."
solve_automake
$platform
if
haveProg automake
;
then
echo
-e
"automake
\0
33[92;1m SUCCESS
\0
33[0m"
else
echo
"automake
\0
33[91;5;1m FAILED
\0
33[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
\0
33[91;5;1m FAILED
\0
33[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
\0
33[91;5;1m FAILED
\0
33[0m"
exit
1
else
echo
-e
"libtool
\0
33[92;1m SUCCESS
\0
33[0m"
fi
else
echo
-e
"libtool
\0
33[92;1m SUCCESS
\0
33[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
...
...
script/set_mpi
View file @
ec80a15c
...
...
@@ -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
..
}
script/solve_autoconf
deleted
100755 → 0
View file @
f29c1546
#! /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
}
script/solve_automake
deleted
100755 → 0
View file @
f29c1546
#! /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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment