fwi: Use 4_MPI_ompss variant.
The -D_GNU_SOURCE define is required before mcc includes nanos6.h
This commit is contained in:
parent
c50158e3be
commit
60fdba40ae
@ -9,13 +9,16 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "nbody";
|
name = "nbody";
|
||||||
|
variant = "4_MPI_ompss";
|
||||||
|
|
||||||
src = builtins.fetchGit {
|
src = builtins.fetchGit {
|
||||||
url = "https://gitlab.com/srodrb/BSC-FWI.git";
|
url = "https://gitlab.com/srodrb/BSC-FWI.git";
|
||||||
ref = "ompss";
|
ref = "ompss-mpi-nocache";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = "sourceRoot=$sourceRoot/3_ompss";
|
postUnpack = "sourceRoot=$sourceRoot/${variant}";
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
nanos6
|
nanos6
|
||||||
@ -25,6 +28,22 @@ stdenv.mkDerivation rec {
|
|||||||
mcxx
|
mcxx
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# FIXME: This is an ugly hack.
|
||||||
|
# When using _GNU_SOURCE or any other definition used in features.h, we need
|
||||||
|
# to define them before mcc includes nanos6.h from the command line. So the
|
||||||
|
# only chance is by setting it at the command line with -D. Using the DEFINES
|
||||||
|
# below, reaches the command line of the preprocessing stage with gcc.
|
||||||
|
preBuild = ''
|
||||||
|
export DEFINES=-D_GNU_SOURCE
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"NZF=108"
|
||||||
|
"NXF=108"
|
||||||
|
"NYF=208"
|
||||||
|
"PRECISION=float"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp fwi.* $out/bin
|
cp fwi.* $out/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user