In the process of writing a Perl-script to submit PBS-jobs, I noticed that the output-files are only usable by the owner (rw-------). After some research, I found that you can put #PBS -W umask=002
in the job-script to make it accessible for others.
Perl:
my $client = PBS::Client->new();
my $wd = $dir_temp;
my $name = "demultiplex";
my $queue = "default";
my $wallt = "72:00:00";
my $job_demultiplex = PBS::Client::Job -> new(
wd => $wd,
queue => $queue,
name => $name,
wallt => $wallt,
cmd => "perl ".$script_directory."demultiplex.pl ".$dir_in." 2>"."demultiplex_error.log 1>"."demultiplex_output.log"
);
This Perlscript creates the following job:
#!/bin/sh
#PBS -N demultiplex
#PBS -d /store/www/labresults_QC/small_rna_sequence_analyser/data/data_temp/BGI_pilot
#PBS -q default
#PBS -l nodes=1
#PBS -l walltime=72:00:00
#PBS -W umask=002 <---
perl /store/www/labresults_QC/small_rna_sequence_analyser/scripts/demultiplex.pl /store/www/labresults_QC/small_rna_sequence_analyser/data/data_input/BGI_pilot 2>demultiplex_error.log 1>demultiplex_output.log
Is there a possibility to pass the indicated line (<---
) to the job from the Perlscript?
Given the current codebase, no. You'd have to open a bug report to the PBS::Client module and request the feature. Accompany it with a patch - that might help.