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

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



Hi,

We usually run matlab jobs using Docker also we set two enviroments variables for the container. Those are MCR_CACHE_ROOT=/tmp/emptydir and MATLAB_PREFDIR=/tmp/emptydir. (those dirs doesn't exists)

universeÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ = docker
docker_imageÂÂÂÂÂÂÂÂÂÂÂ = viplatform/matlab-compiler-runtime
executableÂÂÂÂÂÂÂÂÂÂÂÂÂ = ./run_matrix.sh
argumentsÂÂÂÂÂÂÂÂÂÂÂÂÂÂ = /opt/mcr/v901
should_transfer_filesÂÂ = YES
transfer_input_filesÂÂÂ = run_matrix.sh, matrix.m
when_to_transfer_output = ON_EXIT
outputÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ = out.\$(Process)
errorÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ = err.\$(Process)
logÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ = log.\$(Process)
environmentÂÂÂÂÂÂÂÂÂÂÂÂ = MCR_CACHE_ROOT=/tmp/emptydir;MATLAB_PREFDIR=/tmp/emptydir

I don't know if the _CONDOR_SCRATCH_DIR is useful to accomplish your needs but maybe the /tmp dir could work.

2016-10-24 18:27 GMT-05:00 Dimitri Maziuk <dmaziuk@xxxxxxxxxxxxx>:
Hi all,

can I use _CONDOR_SCRATCH_DIR is a submit file?

I could swear I had it working without a wrapper script at one point but
now I can't remember how (if) I did it.

This is a (compiled) matlab job that hits the usual
"Could not access the MATLAB Runtime component cache."

With the submit file specifying:
environment = "MCR_CACHE_VERBOSE=1
MCR_CACHE_ROOT=$ENV(_CONDOR_SCRATCH_DIR) ...

The output is

> Creating MATLAB Runtime Cache at location: UNDEFINED/.mcrCache9.0.1
> ...
> File open failed for /var/lib/condor/execute/dir_1400101/UNDEFINED/.mcrCache9.0.1/.mcr_cache_index
> ...
> Checking whether index file /var/lib/condor/execute/dir_1400101/UNDEFINED/.mcrCache9.0.1/.mcr_cache_index needs to be written...
> Write is needed.
> Writing cache index file: /var/lib/condor/execute/dir_1400101/UNDEFINED/.mcrCache9.0.1/.mcr_cache_index
> ...
> Unable to start MATLAB. Relative path for preferences directory ('UNDEFINED/.mcrCache9.0.1/main_F0/.matlab') is not supported

Two questions: is it supposed to be "UNDEFINED" and how can I get the
absolute path? -- it seems matlab writes to UNDEFINED just fine and only
cares about relative path.

TIA
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@cs.wisc.edu with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/