code: def execute(self, run):
          
          self.output_handler.output_before_run(run)
          benchmark = self.benchmark
  
          memlimit = benchmark.rlimits.get(MEMLIMIT)
  
          args = run.cmdline()
          logging.debug('Command line of run is %s', args)
          run_result = \
              self.run_executor.execute_run(
                  args,
                  output_filename=run.log_file,
                  output_dir=run.result_files_folder,
                  result_files_patterns=benchmark.result_files_patterns,
                  hardtimelimit=benchmark.rlimits.get(TIMELIMIT),
                  softtimelimit=benchmark.rlimits.get(SOFTTIMELIMIT),
                  walltimelimit=benchmark.rlimits.get(WALLTIMELIMIT),
                  cores=self.my_cpus,
                  memory_nodes=self.my_memory_nodes,
                  memlimit=memlimit,
                  environments=benchmark.environment(),
                  workingDir=benchmark.working_directory(),
                  maxLogfileSize=benchmark.config.maxLogfileSize,
                  files_count_limit=benchmark.config.filesCountLimit,
                  files_size_limit=benchmark.config.filesSizeLimit)
  
          if self.run_executor.PROCESS_KILLED:
              # If the run was interrupted, we ignore the result and cleanup.
              try:
                  if benchmark.config.debug:
                      os.rename(run.log_file, run.log_file + ".killed")
                  else:
                      os.remove(run.log_file)
              except OSError:
                  pass
              return 1
  
          if self.my_cpus:
              run_result['cpuCores'] = self.my_cpus
          if self.my_memory_nodes:
              run_result['memoryNodes'] = self.my_memory_nodes
  
          run.set_result(run_result)
          self.output_handler.output_after_run(run)
docs: This function executes the tool with a sourcefile with options.
          It also calls functions for output before and after the run.