

def _inner_run_loop(self, results):
    'Performs the inner loop of the run execution'
    start_run_idx = self._current_idx
    expanded_by_postproc = False
    self._storage_service = self._traj.v_storage_service
    self._multiproc_wrapper = None
    if self._resumable:
        self._trigger_resume_snapshot()
    self._logger.info(('\n************************************************************\nSTARTING runs of trajectory\n`%s`.\n************************************************************\n' % self._traj.v_name))
    while True:
        if self._multiproc:
            expanded_by_postproc = self._execute_multiprocessing(start_run_idx, results)
        else:
            iterator = self._make_iterator(start_run_idx)
            n = start_run_idx
            total_runs = len(self._traj)
            self._show_progress((n - 1), total_runs)
            for task in iterator:
                result = _sigint_handling_single_run(task)
                n = self._check_result_and_store_references(result, results, n, total_runs)
        repeat = False
        if (self._postproc is not None):
            self._logger.info('Performing POSTPROCESSING')
            (repeat, start_run_idx, new_runs) = self._execute_postproc(results)
        if (not repeat):
            break
        else:
            expanded_by_postproc = True
            self._logger.info(('POSTPROCESSING expanded the trajectory and added %d new runs' % new_runs))
    self._traj._finalize(store_meta_data=True)
    self._logger.info(('\n************************************************************\nFINISHED all runs of trajectory\n`%s`.\n************************************************************\n' % self._traj.v_name))
    if (self._resumable and self._delete_resume):
        shutil.rmtree(self._resume_path)
    if expanded_by_postproc:
        config_name = ('environment.%s.postproc_expand' % self.name)
        if (not self._traj.f_contains(('config.' + config_name))):
            self._traj.f_add_config(Parameter, config_name, True, comment='Added if trajectory was expanded by postprocessing.')

dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py Environment._inner_run_loop/original