Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Pkg #9

Merged
merged 3 commits into from
Dec 8, 2019
Merged
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
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CustomUnitRanges = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand Down
29 changes: 29 additions & 0 deletions conf/ompi_rootenv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Allow override environment variables to work. This is required for running as root inside a docker container (e.g. Gitlab CI)

Upstream: https://github.com/open-mpi/ompi/pull/6895

--- a/orte/tools/orterun/orterun.c
+++ b/orte/tools/orterun/orterun.c
@@ -143,6 +143,14 @@ int orterun(int argc, char *argv[])
* exit with a giant warning flag
*/
if (0 == geteuid() && !orte_cmd_options.run_as_root) {
+ char *r1, *r2;
+ if (NULL != (r1 = getenv("OMPI_ALLOW_RUN_AS_ROOT")) &&
+ NULL != (r2 = getenv("OMPI_ALLOW_RUN_AS_ROOT_CONFIRM"))) {
+ if (0 == strcmp(r1, "1") && 0 == strcmp(r2, "1")) {
+ goto moveon;
+ }
+ }
+
fprintf(stderr, "--------------------------------------------------------------------------\n");
if (NULL != orte_cmd_options.help) {
fprintf(stderr, "%s cannot provide the help message when run as root.\n", orte_basename);
@@ -160,6 +168,7 @@ int orterun(int argc, char *argv[])
exit(1);
}

+ moveon:
/* setup to listen for commands sent specifically to me, even though I would probably
* be the one sending them! Unfortunately, since I am a participating daemon,
* there are times I need to send a command to "all daemons", and that means *I* have
89 changes: 89 additions & 0 deletions conf/travis-install-mpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/sh
# This configuration file was taken originally from the mpi4py project
# <http://mpi4py.scipy.org/>, and then modified for Julia

set -e
set -x

MPI_IMPL="$1"
os=`uname`
OMPIVER=openmpi-3.0.0
MPICHVER=mpich-3.2.1
IMPIVER=2019.4.243
case "$os" in
Darwin)
brew update
brew upgrade cmake
case "$MPI_IMPL" in
mpich|mpich3)
brew install mpich
;;
openmpi)
brew install openmpi
;;
*)
echo "Unknown MPI implementation: $MPI_IMPL"
exit 1
;;
esac
;;

Linux)
sudo apt-get update -q
case "$MPI_IMPL" in
mpich1)
sudo apt-get install -y gfortran mpich-shmem-bin libmpich-shmem1.0-dev
;;
mpich2)
sudo apt-get install -y gfortran mpich2 libmpich2-3 libmpich2-dev
;;
mpich|mpich3)
sudo apt-get install -y gfortran hwloc ccache
sudo /usr/sbin/update-ccache-symlinks
export PATH="/usr/lib/ccache:$PATH"
wget http://www.mpich.org/static/downloads/3.2.1/$MPICHVER.tar.gz
tar -zxf $MPICHVER.tar.gz
cd $MPICHVER
sh ./configure --prefix=$HOME/mpich --enable-shared > /dev/null
make -j > /dev/null
sudo make install > /dev/null
;;
openmpi)
sudo apt-get install -y gfortran ccache
sudo /usr/sbin/update-ccache-symlinks
export PATH="/usr/lib/ccache:$PATH"
wget --no-check-certificate https://www.open-mpi.org/software/ompi/v3.0/downloads/$OMPIVER.tar.gz
tar -zxf $OMPIVER.tar.gz
cd $OMPIVER
sh ./configure --prefix=$HOME/openmpi > /dev/null
make -j > /dev/null
sudo make install > /dev/null
;;
intelmpi)
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15553/l_mpi_$IMPIVER.tgz
tar -xzf l_mpi_$IMPIVER.tgz
cd l_mpi_$IMPIVER
cat << EOF > intel.conf
ACCEPT_EULA=accept
CONTINUE_WITH_OPTIONAL_ERROR=yes
PSET_INSTALL_DIR=${HOME}/intel
CONTINUE_WITH_INSTALLDIR_OVERWRITE=no
PSET_MODE=install
ARCH_SELECTED=ALL
COMPONENTS=;intel-conda-index-tool__x86_64;intel-comp-l-all-vars__noarch;intel-comp-nomcu-vars__noarch;intel-imb__x86_64;intel-mpi-rt__x86_64;intel-mpi-sdk__x86_64;intel-mpi-doc__x86_64;intel-mpi-samples__x86_64;intel-mpi-installer-license__x86_64;intel-conda-impi_rt-linux-64-shadow-package__x86_64;intel-conda-impi-devel-linux-64-shadow-package__x86_64;intel-mpi-psxe__x86_64;intel-psxe-common__noarch;intel-psxe-common-doc__noarch;intel-compxe-pset
EOF
./install.sh --silent intel.conf
;;

*)
echo "Unknown MPI implementation: $MPI_IMPL"
exit 1
;;
esac
;;

*)
echo "Unknown operating system: $os"
exit 1
;;
esac