Swap out Deno harness for gnu parallel harness as we were not running to completion
This commit is contained in:
parent
c33a2a207f
commit
3f6a8f0282
@ -141,6 +141,7 @@ void DLASystem::updateClusterRadius(double pos[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (killCircle + 2 >= gridSize / 2) {
|
if (killCircle + 2 >= gridSize / 2) {
|
||||||
|
std::cerr << "Early Exit" << endl;
|
||||||
this->running = false;
|
this->running = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -221,6 +222,8 @@ DLASystem::~DLASystem() {
|
|||||||
delete[] grid[i];
|
delete[] grid[i];
|
||||||
delete[] grid;
|
delete[] grid;
|
||||||
|
|
||||||
|
csv_out.flush();
|
||||||
|
|
||||||
if (csv_out.is_open()) {
|
if (csv_out.is_open()) {
|
||||||
csv_out.close();
|
csv_out.close();
|
||||||
}
|
}
|
||||||
|
|||||||
3
harness.bash
Normal file
3
harness.bash
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
parallel "../run {1} {2} {3}" ::: {0..10} ::: {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} ::: 1000
|
||||||
25
harness.ts
25
harness.ts
@ -1,25 +0,0 @@
|
|||||||
#!/usr/bin/env -S deno run --allow-env --allow-run
|
|
||||||
|
|
||||||
const execPath = Deno.args[0];
|
|
||||||
|
|
||||||
function* range(min, max, incr = 1): Generator<number> {
|
|
||||||
let i = min;
|
|
||||||
do {
|
|
||||||
yield i
|
|
||||||
i += incr;
|
|
||||||
} while (i < max)
|
|
||||||
}
|
|
||||||
|
|
||||||
let ps = []
|
|
||||||
|
|
||||||
for (let seed of range(0, 10)) {
|
|
||||||
for (let prob of (range(0, 1, 0.05))) {
|
|
||||||
const p = Deno.run({
|
|
||||||
cmd: [execPath, seed, prob, 1000],
|
|
||||||
});
|
|
||||||
|
|
||||||
ps.push(p)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await Promise.all(ps);
|
|
||||||
@ -29,6 +29,8 @@ Config::Config(int argc, char **argv) {
|
|||||||
str << "./out-" << seed << '-' << stickProbability << "-" << maxParticles << ".csv";
|
str << "./out-" << seed << '-' << stickProbability << "-" << maxParticles << ".csv";
|
||||||
std::ofstream csv_out(str.str());
|
std::ofstream csv_out(str.str());
|
||||||
this->csv = std::move(csv_out);
|
this->csv = std::move(csv_out);
|
||||||
|
|
||||||
|
this->csv << "frame" << "," << "x" << "," << "y" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,5 +49,7 @@ int main(int argc, char **argv) {
|
|||||||
sys->Update();
|
sys->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << "hey" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user