code: function(tagTask) {
      var emitter = new events.EventEmitter();
      console.log("SGE job Listing");
      // run squeue command
      var exec_cmd = childProcess.exec;
      exec_cmd(queueBinary + ' -f', function (err, stdout, stderr) {
          if (err) {
              emitter.emit('listError', err);
              return;
          }
          console.log(stdout);
          // list of slurmIDs of the jobs to kill
          var toKill = new Array();
  
          // squeue results
          var squeueIDs = ('' + stdout).replace(/\"/g, '');
          // regex
          var reg_NslurmID = new RegExp ('^' + tagTask + 'Task_[\\S]{8}-[\\S]{4}-[\\S]{4}-[\\S]{4}-[\\S]{12}_{0,1}[\\S]*');
          var reg_slurmID = new RegExp ('[0-9]+$');
          //console.log(squeueIDs);
  
          // for each job in the squeue
          squeueIDs.split('\n').forEach (function (line) {
              // use the regex
              if (reg_NslurmID.test(line) && reg_slurmID.test(line)) {
                  var NslurmID = reg_NslurmID.exec(line);
                  var slurmID = reg_slurmID.exec(line);
                  // in case we found NslurmID in the jobs of our process
                  if (jobsArray.hasOwnProperty(NslurmID)) {
                      console.log('Job ' + slurmID + ' must be killed');
                      toKill.push(slurmID[0]);
                  }
              }
          });
          if (toKill.length === 0) emitter.emit('finished');
          else emitter.emit('jobLeft', toKill);
      });
      return emitter;
  }
docs: A REECRIRE jobsArray does not exist in this space.
  List all the job ids of slurm that are both in this process and in the squeue command.
  Only used in the stop function.
  Warning : the ids or not listed in order.