Would the following work in this scenario?
In your jobs script, replace something like this:
srun [args] ./a.out ...
with something like this:
srun [args] sh -c 'umask 0; ./a.out ...'
Of course if you have sources and the ability to recompile you a.out, a
umask() call in the executable itself seems the most robust solution.
-Paul
On Thu, Mar 5, 2015 at 2:38 PM, Slurm User <[email protected]> wrote:
> Hi Uwe
>
> The problem is that the "a.out" executable is generating the files at
> runtime, so your suggestion will not work. (Assume that the filenames are
> not known in advance)
>
> On Thu, Mar 5, 2015 at 1:43 PM, Uwe Sauter <[email protected]>
> wrote:
>
>>
>> If you know the name of your output file you could probably do somethinig
>> like this:
>>
>>
>> touch <output>
>> chmod 0666 <output>
>> chown user:group <output>
>> srun a.out
>>
>>
>>
>> Am 05.03.2015 um 22:11 schrieb Slurm User:
>> > Hi
>> >
>> > I have a bash script which makes a call to "srun"
>> >
>> > The "srun" command calls a simple "a.out" which creates a simple
>> "output.txt" file.
>> >
>> > This "output.txt" file is owned by a user "slurm".
>> >
>> > Does SLURM have a way to set the umask directly? I tried putting "umask
>> 0" at the beginning of my bash script, but the
>> > "output.txt" file is still not "rw" for "others"
>> >
>> > (I am not using "root" to run slurmd at the moment and am unable to use
>> this solution)
>> >
>> > THANKS!
>>
>
>
--
Paul H. Hargrove [email protected]
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900