fwi: add gitTable
This commit is contained in:
parent
20e99f122f
commit
9377adf787
@ -5,65 +5,70 @@
|
||||
, mcxx ? null
|
||||
, cc
|
||||
, gitBranch ? "garlic/tampi+send+oss+task"
|
||||
, gitCommit ? null
|
||||
, fwiParams
|
||||
, garlicTools
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert !(tampi != null && mcxx == null);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit gitBranch;
|
||||
name = "fwi";
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm03.bsc.es/garlic/apps/fwi.git";
|
||||
ref = "${gitBranch}";
|
||||
let
|
||||
gitSource = garlicTools.fetchGarlicApp {
|
||||
appName = "fwi";
|
||||
inherit gitCommit gitBranch;
|
||||
gitTable = import ./git-table.nix;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fwi";
|
||||
|
||||
enableParallelBuilding = false;
|
||||
inherit (gitSource) src gitBranch gitCommit;
|
||||
|
||||
buildInputs = [
|
||||
cc
|
||||
]
|
||||
++ optional (mpi != null) mpi
|
||||
++ optional (tampi != null) tampi
|
||||
++ optional (mcxx != null) mcxx;
|
||||
enableParallelBuilding = false;
|
||||
|
||||
# FIXME: Correct this on the Makefile so we can just type "make fwi"
|
||||
# FIXME: Allow multiple MPI implementations
|
||||
postPatch = ''
|
||||
sed -i 's/= OPENMPI$/= INTEL/g' Makefile
|
||||
sed -i 's/USE_O_DIRECT ?= NO/USE_O_DIRECT ?= YES/g' Makefile || true
|
||||
'';
|
||||
buildInputs = [
|
||||
cc
|
||||
]
|
||||
++ optional (mpi != null) mpi
|
||||
++ optional (tampi != null) tampi
|
||||
++ optional (mcxx != null) 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.
|
||||
preConfigure = ''
|
||||
export DEFINES=-D_GNU_SOURCE
|
||||
# FIXME: Correct this on the Makefile so we can just type "make fwi"
|
||||
# FIXME: Allow multiple MPI implementations
|
||||
postPatch = ''
|
||||
sed -i 's/= OPENMPI$/= INTEL/g' Makefile
|
||||
sed -i 's/USE_O_DIRECT ?= NO/USE_O_DIRECT ?= YES/g' Makefile || true
|
||||
'';
|
||||
|
||||
make depend
|
||||
# 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.
|
||||
preConfigure = ''
|
||||
export DEFINES=-D_GNU_SOURCE
|
||||
|
||||
cp ${fwiParams}/generated_model_params.h src/
|
||||
'';
|
||||
|
||||
# We compile the ModelGenerator using gcc *only*, as otherwise it will
|
||||
# be compiled with nanos6, which requires access to /sys to determine
|
||||
# hardware capabilities. So it will fail in the nix-build environment,
|
||||
# as there is no /sys mounted.
|
||||
makeFlags = [
|
||||
#"COMPILER=GNU"
|
||||
#"CC=${cc.cc.CC}"
|
||||
"fwi"
|
||||
];
|
||||
make depend
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp fwi $out/bin
|
||||
'';
|
||||
cp ${fwiParams}/generated_model_params.h src/
|
||||
'';
|
||||
|
||||
programPath = "/bin/fwi";
|
||||
}
|
||||
# We compile the ModelGenerator using gcc *only*, as otherwise it will
|
||||
# be compiled with nanos6, which requires access to /sys to determine
|
||||
# hardware capabilities. So it will fail in the nix-build environment,
|
||||
# as there is no /sys mounted.
|
||||
makeFlags = [
|
||||
#"COMPILER=GNU"
|
||||
#"CC=${cc.cc.CC}"
|
||||
"fwi"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp fwi $out/bin
|
||||
'';
|
||||
|
||||
programPath = "/bin/fwi";
|
||||
}
|
||||
|
15
garlic/apps/fwi/git-table.nix
Normal file
15
garlic/apps/fwi/git-table.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
# Auto-generated with garlic-git-table on 2021-04-19 for repo:
|
||||
# ssh://git@bscpm03.bsc.es/garlic/apps/fwi.git
|
||||
|
||||
"garlic/mpi+send+omp+fork" = "ea1ed53f20858dc082f9cbbe0e7e8fb28a6fe58a";
|
||||
"garlic/mpi+send+omp+task" = "aa8881056fb3fa98832d203899beacfb8fa702f6";
|
||||
"garlic/mpi+send+oss+task" = "c184484af8498fd939761575b34bb46ba3be0dde";
|
||||
"garlic/mpi+send+oss+task+NOREUSE" = "0062093ef744c694d69673d1881719958bbed353";
|
||||
"garlic/mpi+send+seq" = "cc184ad77f143481e2506933d0cdc038c349f071";
|
||||
"garlic/omp+task" = "1fe23690d74ae89ace5383ab165a6ce6346c2afd";
|
||||
"garlic/oss+task" = "68e6e8f17ee03addb460745acea2a38241ca89ee";
|
||||
"garlic/seq" = "aa6b6c5857125796c65fbf23018d557e4693f1ae";
|
||||
"garlic/tampi+isend+oss+task" = "7c98194e13786c4e8ecfa8a144587e5a95e09205";
|
||||
"garlic/tampi+send+oss+task" = "e08d66f7453c4034a363bb2d22c5248fe86ed740";
|
||||
}
|
Loading…
Reference in New Issue
Block a user