fwi: avoid input generation

The ModelGenerator is now included in the fwi-params, so that the input
can be generated at runtime.
This commit is contained in:
Rodrigo Arias 2021-04-12 17:43:30 +02:00
parent b0af9b8608
commit 419e7f95cc
3 changed files with 9 additions and 7 deletions

View File

@ -5,7 +5,7 @@
, mcxx ? null
, cc
, gitBranch ? "garlic/tampi+send+oss+task"
, fwiInput
, fwiParams
}:
with stdenv.lib;
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
make depend
cp ${fwiInput}/generated_model_params.h src/
cp ${fwiParams}/generated_model_params.h src/
'';
# We compile the ModelGenerator using gcc *only*, as otherwise it will

View File

@ -9,7 +9,7 @@ with stdenv.lib;
with builtins;
stdenv.mkDerivation rec {
name = "fwi-input";
name = "fwi-params";
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/garlic/apps/fwi.git";
@ -41,13 +41,15 @@ stdenv.mkDerivation rec {
# Also, we need to compile it with the builder platform as target, as is going
# to be executed during the build to generate the src/generated_model_params.h
# header.
makeFlags = [ "COMPILER=GNU" "params" "input" ];
makeFlags = [ "COMPILER=GNU" "params" ];
installPhase = ''
mkdir -p $out/
cp src/generated_model_params.h $out/
cp SetupParams/fwi_params.txt $out/
cp SetupParams/fwi_frequencies.txt $out/
cp -r InputModels $out/
mkdir -p $out/bin
cp ModelGenerator $out/bin/
'';
}

View File

@ -54,9 +54,9 @@
hpccg = callPackage ./hpccg/default.nix { };
fwi = rec {
input = callPackage ./fwi/input.nix { };
params = callPackage ./fwi/params.nix { };
solver = callPackage ./fwi/default.nix {
fwiInput = input;
fwiParams = params;
};
};
}