Example #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,
        )
Example #2
0
 def launch_command(
         self,
         cmd,
         dry=False,
         mount_points=None,
         verbose=True,
 ):
     full_cmd = self.create_slurm_command(cmd, mount_points=mount_points)
     # full_cmd = self.create_singularity_cmd(cmd, mount_points=mount_points)
     utils.add_to_script(
         full_cmd,
         path=self.TMP_FILE,
         verbose=True,
         overwrite=self._overwrite_script,
     )