Пример #1
0
    def launch_command(
            self,
            cmd,
            dry=False,
            mount_points=None,
            verbose=False,
    ):
        full_cmd = self.create_singularity_cmd(cmd, mount_points=mount_points)
        utils.add_to_script(
            full_cmd,
            path=self.TASK_FILE,
            verbose=True,
            overwrite=self._overwrite_task_script,
        )

        cmd_list = utils.CommandBuilder()
        cmd_list.append('module load gcc openmpi')
        cmd_list.append('ht_helper.sh -m "python/3.5" -t {}'.format(
            self._taskfile_path_on_brc))
        sbatch_cmd = slurm_util.wrap_command_with_sbatch(
            cmd_list.to_string(),
            self._slurm_config,
            self._n_tasks_total,
        )
        utils.add_to_script(
            sbatch_cmd,
            path=self.SBATCH_FILE,
            verbose=True,
            overwrite=True,
        )
Пример #2
0
 def create_slurm_command(self, cmd, mount_points=None):
     singularity_cmd = self.create_singularity_cmd(
         cmd,
         mount_points=mount_points,
     )
     full_cmd = slurm_util.wrap_command_with_sbatch(
         singularity_cmd,
         self._slurm_config,
         n_tasks=1,
     )
     return full_cmd