(function() {
    'use strict';
    const GofL = require('../gofl_parallel.js');
    const barriers = require('../barriers.js');
    const spawn = require('child_process').spawn;

    let start_time = Date.now();

    var grid = new GofL.Grid(4000, 4000);
    grid.setPoint(1, 2, 1)
        .setPoint(3, 1, 1)
        .setPoint(3, 2, 1)
        .setPoint(3, 3, 1)
        .setPoint(2, 3, 1);
    grid.go(1000);

    let time_elapsed = (Date.now() - start_time) / 1000;

    console.log(`<===== Elapsed time serial simulation: ${time_elapsed} =====>`)

    let simulations = []

    for (let num=0; num != 2; ++num)
    {
        simulations[num] = {};
        simulations[num].proc = spawn("node", ["./sim.js",  "1000", "1000", "4", "4", "1000", "./initial_params.json", "--no-files"], { detached: true, cwd: "../"});
        simulations[num].proc.stdout.on('data', (data) => {
            if (data.indexOf("Elapsed time") !== -1)
                simulations[num].elapsed_time = data;
        });
        simulations[num].proc.on('close', (code) => {
            console.log(`<===== Simulation ${num} ened =====>\n${simulations[num].elapsed_time}`);
        });
    }

})();
@@ -137,16 +137,20 @@
 st spawn
+Sync
  = requi
@@ -174,16 +174,20 @@
 ').spawn
+Sync
 ;%0A%0A    l
@@ -193,509 +193,553 @@
 let 
-start_time = Date.now();%0A%0A    var grid = new GofL.Grid(
+result = spawnSync(%22node%22, %5B%22./sim.js%22,  %22
 4000
+%22
 , 
+%22
 4000
-);%0A    grid.setPoint(1, 2, 1)%0A        .setPoint(3, 1, 1)%0A        .setPoint(3, 2, 1)%0A        .setPoint(3, 3, 1)%0A        .setPoint(2, 3, 1);%0A    grid.go(1000);%0A%0A    let time_elapsed = (Date.now() - start_time) / 1000;%0A%0A    console.log(%60%3C===== Elapsed time serial simulation: $%7Btime_elapsed%7D =====%3E%60)%0A%0A    let simulations = %5B%5D%0A%0A    for (let num=0; num != 2; ++num)%0A    %7B%0A        simulations%5Bnum%5D = %7B%7D;%0A        simulations%5Bnum%5D.proc
+%22, %221%22, %221%22, %22100%22, %22./initial_params.json%22, %22--no-files%22%5D, %7Bcwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())%0A%0A    result = spawnSync(%22node%22, %5B%22./sim.js%22,  %222000%22, %222000%22, %222%22, %222%22, %22100%22, %22./initial_params.json%22, %22--no-files%22%5D, %7Bcwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())%0A%0A    result = spawnSync(%22node%22, %5B%22./sim.js%22,  %221000%22, %221000%22, %224%22, %224%22, %22100%22, %22./initial_params.json%22, %22--no-files%22%5D, %7Bcwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())%0A%0A    result
  = spawn
 (%22no
@@ -734,16 +734,20 @@
  = spawn
+Sync
 (%22node%22,
@@ -766,38 +766,35 @@
 ,  %22
-10
+8
 00%22, %22
-10
+8
 00%22, %22
-4
+5
 %22, %22
-4
+5
 %22, %22100
-0
 %22, %22
@@ -837,388 +837,416 @@
 %5D, %7B
- detached: true, cwd: %22../%22%7D);%0A        simulations%5Bnum%5D.proc.stdout.on('data', (data) =%3E %7B%0A            if (data.indexOf(%22Elapsed time%22) !== -1)%0A                simulations%5Bnum%5D.elapsed_time = data;%0A        %7D);%0A        simulations%5Bnum%5D.proc.on('close', (code) =%3E %7B%0A            console.log(%60%3C===== Simulation $%7Bnum%7D ened =====%3E%5Cn$%7Bsimulations%5Bnum%5D.elapsed_time%7D%60);%0A        %7D);%0A    %7D
+cwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())%0A%0A    result = spawnSync(%22node%22, %5B%22./sim.js%22,  %22500%22, %22500%22, %228%22, %228%22, %22100%22, %22./initial_params.json%22, %22--no-files%22%5D, %7Bcwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())%0A%0A    result = spawnSync(%22node%22, %5B%22./sim.js%22,  %22400%22, %22400%22, %2210%22, %2210%22, %22100%22, %22./initial_params.json%22, %22--no-files%22%5D, %7Bcwd: %22../%22%7D);%0A%0A    console.log(result.stdout.toString())
 %0A%0A%7D)

Fix repeted tests