{endcode} +{section: Example to run MATLAB under HTCondor on Windows} +[ copied from {link: https://lists.cs.wisc.edu/archive/htcondor-users/2013-February/msg00012.shtml this post to the htcondor-users email list} ] + +I've just got this to work with Matlab R2012a 64-bit on Windows 7 64-bit +under Condor 7.6.6. This is the .bat wrapper: + +{code} +set SCRIPT=%1 +set MATLABEXE=c:\matlab2012\bin\win64\matlab +set MATLAB=c:\matlab2012 +set TMP=%CD% +set TEMP=%CD% +set USERPROFILE=%CD% +set MATLAB_PREFDIR=%CD%\My Documents\MATLAB + +mkdir "My Documents" +mkdir "My Documents\MATLAB" + +set PATH=%WINDIR%\system32 +set PATH=c:\matlab2012\bin\win64;%PATH% + +start /wait %MATLABEXE% -noFigureWindows -nodesktop -nosplash -nojvm -r %SCRIPT% +{endcode} + +When I used the -wait option it complained about a clash with the -nojvm +option. When I got rid of -nojvm it said it didn't recognise -wait although it still seemed to work. Anyway I've stuck with start /wait to be on the safe side. Pleasingly there are no error messages or warnings returned now. {section: Additional Resources}