2020-06-29 20:46:30 +02:00
|
|
|
{ stdenv
|
|
|
|
, requireFile
|
|
|
|
, rpmextract
|
|
|
|
, libfabric
|
2020-07-01 17:57:31 +02:00
|
|
|
, gcc
|
|
|
|
, zlib
|
|
|
|
, autoPatchelfHook
|
2020-06-29 20:46:30 +02:00
|
|
|
, enableDebug ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "intel-mpi-${version}";
|
|
|
|
version = "2019.7.217";
|
|
|
|
|
|
|
|
lib_variant = (if enableDebug then "debug" else "release");
|
|
|
|
|
|
|
|
src = requireFile {
|
|
|
|
name = "l_mpi_2019.7.217.tgz";
|
|
|
|
sha256 = "01wwmiqff5lad7cdi8i57bs3kiphpjfv52sxll1w0jpq4c03nf4h";
|
|
|
|
message = ''
|
|
|
|
The package with Intel MPI cannot be redistributed freely, so you must do it
|
|
|
|
manually. Go to:
|
|
|
|
|
|
|
|
https://software.intel.com/content/www/us/en/develop/tools/mpi-library.html
|
|
|
|
|
|
|
|
And register in order to download Intel MPI (is free of charge). Then you will
|
|
|
|
be allowed to download it. Copy the url and use:
|
|
|
|
|
|
|
|
nix-prefetch-url http://registrationcenter-download.intel.com/...../l_mpi_2019.7.217.tgz
|
|
|
|
|
|
|
|
To add it to the store. Then try again building this derivation.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-06-30 15:41:18 +02:00
|
|
|
buildInputs = [
|
|
|
|
rpmextract
|
|
|
|
libfabric
|
2020-07-01 17:57:31 +02:00
|
|
|
autoPatchelfHook
|
|
|
|
gcc.cc.lib
|
|
|
|
zlib
|
2020-06-30 15:41:18 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
pushd $sourceRoot
|
|
|
|
rpmextract rpm/intel-mpi-*.rpm
|
|
|
|
popd
|
|
|
|
'';
|
2020-06-29 20:46:30 +02:00
|
|
|
|
2020-06-30 15:41:18 +02:00
|
|
|
patches = [
|
|
|
|
./mpicc.patch
|
|
|
|
./mpicxx.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-07-20 16:05:00 +02:00
|
|
|
pushd opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/bin
|
|
|
|
for i in mpi* ; do
|
|
|
|
echo "Fixing paths in $i"
|
|
|
|
sed -i "s:I_MPI_SUBSTITUTE_INSTALLDIR:$out:g" "$i"
|
|
|
|
done
|
|
|
|
popd
|
2020-06-30 15:41:18 +02:00
|
|
|
'';
|
2020-06-29 20:46:30 +02:00
|
|
|
|
2020-06-30 15:41:18 +02:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cd opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64
|
|
|
|
mkdir -p $out
|
2020-06-29 20:46:30 +02:00
|
|
|
mv etc $out
|
|
|
|
mv bin $out
|
|
|
|
mv include $out
|
|
|
|
mkdir $out/lib
|
|
|
|
cp -a lib/lib* $out/lib
|
|
|
|
cp -a lib/${lib_variant}_mt/lib* $out/lib
|
2020-07-20 16:05:00 +02:00
|
|
|
ln -s . $out/intel64
|
2020-07-01 17:57:31 +02:00
|
|
|
rm $out/lib/libmpi.dbg
|
2020-06-29 20:46:30 +02:00
|
|
|
'';
|
|
|
|
}
|