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

Option to use Julia-provided MPI in machine setup #278

Merged
merged 2 commits into from
Nov 8, 2024
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
98 changes: 52 additions & 46 deletions machines/generic-pc/compile_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,68 @@ ARTIFACT_DIR=$PWD
# HDF5
######

# Get default response for whether to download/build HDF5
DEFAULT_BUILDHDF5=$(../../bin/julia --project ../shared/get_mk_preference.jl build_hdf5 "y")
SYSTEM_MPI=$(../../bin/julia --project ../shared/get_mk_preference.jl use_system_mpi)

if [[ $DEFAULT_BUILDHDF5 == "y" ]]; then
echo "Do you want to download, and compile a local version of HDF5 (if you do"
echo "not do this, you will be given the option to choose an HDF5 library to"
echo "link later)? [y]/n"
read -p "> " input
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
if [[ $SYSTEM_MPI == "y" ]]; then
# Get default response for whether to download/build HDF5
DEFAULT_BUILDHDF5=$(../../bin/julia --project ../shared/get_mk_preference.jl build_hdf5 "y")

if [[ $DEFAULT_BUILDHDF5 == "y" ]]; then
echo "Do you want to download, and compile a local version of HDF5 (if you do"
echo "not do this, you will be given the option to choose an HDF5 library to"
echo "link later)? [y]/n"
read -p "> " input
done
if [[ -z $input || $input == "y" ]]; then
BUILDHDF5="y"
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
read -p "> " input
done
if [[ -z $input || $input == "y" ]]; then
BUILDHDF5="y"
else
BUILDHDF5="n"
fi
else
BUILDHDF5="n"
fi
else
echo "Do you want to download, and compile a local version of HDF5 (if you do"
echo "not do this, you will be given the option to choose an HDF5 library to"
echo "link later)? y/[n]"
read -p "> " input
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
echo "Do you want to download, and compile a local version of HDF5 (if you do"
echo "not do this, you will be given the option to choose an HDF5 library to"
echo "link later)? y/[n]"
read -p "> " input
done
if [[ -z $input || $input == "n" ]]; then
BUILDHDF5="n"
else
BUILDHDF5="y"
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
read -p "> " input
done
if [[ -z $input || $input == "n" ]]; then
BUILDHDF5="n"
else
BUILDHDF5="y"
fi
fi
fi

# Save current response for whether to download/build HDF5 as default
../../bin/julia --project ../shared/set_mk_preference.jl build_hdf5 $BUILDHDF5
# Save current response for whether to download/build HDF5 as default
../../bin/julia --project ../shared/set_mk_preference.jl build_hdf5 $BUILDHDF5

if [[ $BUILDHDF5 == "y" && -d hdf5-build ]]; then
echo "HDF5 appears to have been downloaded, compiled and installed already."
echo "Do you want to download, compile and install again, overwriting the existing "
echo "version? y/[n]"
read -p "> " input
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
if [[ $BUILDHDF5 == "y" && -d hdf5-build ]]; then
echo "HDF5 appears to have been downloaded, compiled and installed already."
echo "Do you want to download, compile and install again, overwriting the existing "
echo "version? y/[n]"
read -p "> " input
done
if [[ -z $input || $input == "n" ]]; then
BUILDHDF5="n"
else
# Remove the install directory if it exists already
if [[ -d hdf5-build ]]; then
rm -r hdf5-build
while [[ ! -z $input && !( $input == "y" || $input == "n" ) ]]; do
echo
echo "$input is not a valid response: y/[n]"
read -p "> " input
done
if [[ -z $input || $input == "n" ]]; then
BUILDHDF5="n"
else
# Remove the install directory if it exists already
if [[ -d hdf5-build ]]; then
rm -r hdf5-build
fi
fi
fi
else
BUILD_HDF5="n"
fi

if [[ $BUILDHDF5 == "y" ]]; then
Expand Down
Loading
Loading