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

Re: [HTCondor-users] Help



Hi ,

Thank you for the suggestion. I tried compiling my script using mcc -m to create a standalone executable, but unfortunately it didn’t work as expected. The executable fails to run properly, even though the compilation completes without errors.

Do you happen to know if there are any additional steps or common issues I should check for when using the compiled version with Condor? I’d appreciate any pointers.

 

Best regards,

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Beaumont, Martin
Sent: 01 May 2025 15:05
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Help

 

License Manager Error -39 indicates that you are logged into your computer as a user who is not authorized to use the license.

Meaning, your Matlab license is User based, not computer based.

Condor uses it’s own user to run jobs. I think there’s a way to tell condor to use a certain user when running jobs under Windows.

 

Alternatively, if your license gives you access to the Matlab Compiler toolbox, you could compile your work and have it use the Matlab Runtime instead, which doesn’t require a license.

 

Martin

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of aravind.saligram@xxxxxx
Sent: May 1, 2025 7:27 AM
To: htcondor-users@xxxxxxxxxxx
Subject: [HTCondor-users] Help

 

Hello All !

I am trying to use HTCondor on my local windows CPU for running multiple instances of MATLAB for my simulations.

 

However, HTCondor Job Fails with MATLAB License Error (-39) Despite Valid Installation.

 

I'm submitting a MATLAB batch job using HTCondor with the following submit file:

 

universe = vanilla

executable = run_matlab.bat

arguments = script

transfer_input_files = script.m

output = job_output.txt

error = job_error.txt

log = job_log.txt

should_transfer_files = YES

when_to_transfer_output = ON_EXIT

transfer_output_files = result.mat, matlab_log.txt, runtime_dir_list.txt, bat_debug.txt, dummy_from_bat.txt

queue

 

The batch script run_matlab.bat looks like this:

 

@echo off

echo BAT script started > bat_debug.txt

echo Current directory: %CD% >> bat_debug.txt

 

set MATLABEXE="C:\Program Files\MATLAB\R2024b\bin\matlab.exe"

 

set TMP=%CD%

set TEMP=%CD%

set USERPROFILE=%CD%

set MATLAB_PREFDIR=%CD%\MyDocuments\MATLAB

 

mkdir MyDocuments

mkdir MyDocuments\MATLAB

 

echo Hello from Condor > dummy_from_bat.txt

echo About to run MATLAB >> bat_debug.txt

 

call "C:\Program Files\MATLAB\R2024b\bin\matlab.exe" -batch "run(fullfile(pwd, 'script.m'))"

 

echo MATLAB command finished >> bat_debug.txt

echo BAT script ended >> bat_debug.txt

 

However, when the job runs, MATLAB fails with the following license error:

 

License checkout failed.

License Manager Error -39

Your system administrator has not authorized you to use MATLAB.

Licensing error: -39,147.

 

MATLAB does launch and run the batch file (confirmed in the log), but can't check out a license. This suggests the job environment is not authorized for MATLAB, even though it works fine outside Condor on the same machine.

What I've tried:

  • Confirmed that MATLAB works when run manually
  • Tried setting environment variables like USERPROFILE, TMP, MATLAB_PREFDIR.
  • Verified that bat_debug.txt and other files are created, so the batch script runs as expected.

Questions:

  1. How can I make sure the HTCondor job has access to the MATLAB license?
  2. Is there a recommended way to forward or configure the license environment in HTCondor?
  3. Could HTCondor's user sandboxing (running jobs under a local user) be causing this?

Thanks in advance for any help or suggestions!

 

(log file:)

Job was held.
Transfer output files failure at execution point while sending files to access point