fwi: add problem size parameters
This commit is contained in:
parent
fa0e9f591f
commit
485b9150e5
@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
|
, nz ? 200
|
||||||
|
, nx ? 200
|
||||||
|
, ny ? 500
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
with builtins;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fwi-input";
|
name = "fwi-input";
|
||||||
@ -14,6 +18,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
|
# Set the input size with the weird order (nz,nx,ny).
|
||||||
|
postPatch = ''
|
||||||
|
sed -i 1c${toString nz} SetupParams/fwi_params.txt
|
||||||
|
sed -i 2c${toString nx} SetupParams/fwi_params.txt
|
||||||
|
sed -i 3c${toString ny} SetupParams/fwi_params.txt
|
||||||
|
'';
|
||||||
|
|
||||||
# FIXME: This is an ugly hack.
|
# FIXME: This is an ugly hack.
|
||||||
# When using _GNU_SOURCE or any other definition used in features.h, we need
|
# 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
|
# to define them before mcc includes nanos6.h from the command line. So the
|
||||||
|
Loading…
Reference in New Issue
Block a user