forked from rarias/bscpkgs
creams: use python script to generate the input
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
{
|
||||
stdenv
|
||||
, granul ? 0
|
||||
, nprocz ? 0
|
||||
, python3
|
||||
, granul ? 9
|
||||
, nprocx ? 1
|
||||
, nprocy ? 1
|
||||
, nprocz ? 1
|
||||
, nx ? 20
|
||||
, ny ? 20
|
||||
, nz ? 7000
|
||||
, gitBranch ? "garlic/mpi+send+seq"
|
||||
, gitCommit ? null
|
||||
, garlicTools
|
||||
@@ -13,26 +19,30 @@ let
|
||||
inherit gitCommit gitBranch;
|
||||
gitTable = import ./git-table.nix;
|
||||
};
|
||||
|
||||
gen = ./gen_grid.py;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "creams-input";
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
inherit (gitSource) src gitBranch gitCommit;
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs SodTubeBenchmark/gridScript.sh
|
||||
'';
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
pushd SodTubeBenchmark
|
||||
./gridScript.sh 0 0 ${toString nprocz} ${toString granul}
|
||||
popd
|
||||
|
||||
mkdir -p $out
|
||||
cp -a SodTubeBenchmark $out/
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
python3 ${gen} \
|
||||
--npx ${toString nprocx} \
|
||||
--npy ${toString nprocy} \
|
||||
--npz ${toString nprocz} \
|
||||
--grain ${toString granul} \
|
||||
--nx ${toString nx} \
|
||||
--ny ${toString ny} \
|
||||
--nz ${toString nz} \
|
||||
> $out/SodTubeBenchmark/grid.dat
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user