Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experiment.run just hangs if commissioning fails #2304

Open
Bridenbecker opened this issue Jun 20, 2024 · 1 comment
Open

experiment.run just hangs if commissioning fails #2304

Bridenbecker opened this issue Jun 20, 2024 · 1 comment

Comments

@Bridenbecker
Copy link

From David Kafatan at NYU

  • experiment.run just hangs if commissioning fails
    • in this case, sbatch was not part of the path. That caused an error that somehow didn’t get caught by experiment.run
@ZDu-IDM
Copy link
Collaborator

ZDu-IDM commented Jun 20, 2024

Seems like we need to add try/except for subprocess.run call:

FILE: idmtools_platform_slurm/idmtools_platform_slurm/slurm_operations/local_operations.py

    def submit_job(self, item: Union[Experiment, Simulation], **kwargs) -> None:
        """
        Submit a Slurm job.
        Args:
            item: idmtools Experiment or Simulation
            kwargs: keyword arguments used to expand functionality
        Returns:
            None
        """
        if isinstance(item, Experiment):
            working_directory = self.get_directory(item)
            subprocess.run(['bash', 'batch.sh'], stdout=subprocess.PIPE, cwd=str(working_directory))
        elif isinstance(item, Simulation):
            pass
        else:
            raise NotImplementedError(f"Submit job is not implemented on SlurmPlatform.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants