[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] _CONDOR_SCRATCH_DIR in submit file?

I've been able to set "MCR_CACHE_ROOT=." in the PreEnvironment directive along with "should_transfer_files=yes" and have it work as expected - the .mcrCache directory got created in scratch space instead of the /tmp path. Might have been a different version, though.

An earlier attempt involved adding "export MCR_CACHE_ROOT=$TMPDIR" to the mcc wrapper script, which also did the trick, since TMPDIR is set to the scratch dir within the job's environment, but that was too brittle for my tastes.

	-Michael Pelletier.

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of Dimitri Maziuk
Sent: Tuesday, October 25, 2016 11:16 AM
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] _CONDOR_SCRATCH_DIR in submit file?

On 2016-10-25 08:24, Michael Pelletier wrote:
> The _CONDOR_SCRATCH_DIR is not set in the submitter's environment,
which is where the $ENV() macro gets its data. It is only set when the job is matched to a resource and the starter fires up.

Right... maybe I did use a wrapper script after all...

All those other solutions are great if you have a single matlab job running on the node. If not, you're looking at multiple jobs writing over the same /tmp/.mcrCache.X.Y.Z -- it may or may not bite you, who knows. The canonical answer use /tmp/$random_blah but then you need a wrapper to rm -rf it afterwards (and hope it gets that far).

Job's "./" is an excellent place for it, but matlab wants an absolute path. So let me restate the question: is there a way to pass absolute path to ./ in the "environment"? Something like $Fp(.) maybe?