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:
parent
b0af9b8608
commit
419e7f95cc
@ -5,7 +5,7 @@
|
|||||||
, mcxx ? null
|
, mcxx ? null
|
||||||
, cc
|
, cc
|
||||||
, gitBranch ? "garlic/tampi+send+oss+task"
|
, gitBranch ? "garlic/tampi+send+oss+task"
|
||||||
, fwiInput
|
, fwiParams
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
make depend
|
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
|
# We compile the ModelGenerator using gcc *only*, as otherwise it will
|
||||||
|
@ -9,7 +9,7 @@ with stdenv.lib;
|
|||||||
with builtins;
|
with builtins;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fwi-input";
|
name = "fwi-params";
|
||||||
|
|
||||||
src = builtins.fetchGit {
|
src = builtins.fetchGit {
|
||||||
url = "ssh://git@bscpm03.bsc.es/garlic/apps/fwi.git";
|
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
|
# 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
|
# to be executed during the build to generate the src/generated_model_params.h
|
||||||
# header.
|
# header.
|
||||||
makeFlags = [ "COMPILER=GNU" "params" "input" ];
|
makeFlags = [ "COMPILER=GNU" "params" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
cp src/generated_model_params.h $out/
|
cp src/generated_model_params.h $out/
|
||||||
cp SetupParams/fwi_params.txt $out/
|
cp SetupParams/fwi_params.txt $out/
|
||||||
cp SetupParams/fwi_frequencies.txt $out/
|
cp SetupParams/fwi_frequencies.txt $out/
|
||||||
cp -r InputModels $out/
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ModelGenerator $out/bin/
|
||||||
'';
|
'';
|
||||||
}
|
}
|
@ -54,9 +54,9 @@
|
|||||||
hpccg = callPackage ./hpccg/default.nix { };
|
hpccg = callPackage ./hpccg/default.nix { };
|
||||||
|
|
||||||
fwi = rec {
|
fwi = rec {
|
||||||
input = callPackage ./fwi/input.nix { };
|
params = callPackage ./fwi/params.nix { };
|
||||||
solver = callPackage ./fwi/default.nix {
|
solver = callPackage ./fwi/default.nix {
|
||||||
fwiInput = input;
|
fwiParams = params;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user