diff --git a/doc/manual/source/the-configuration-file.rst b/doc/manual/source/the-configuration-file.rst index 05ade49cb..3d2383c50 100644 --- a/doc/manual/source/the-configuration-file.rst +++ b/doc/manual/source/the-configuration-file.rst @@ -270,7 +270,9 @@ lines starting with a hashtag (#). .. option:: MatlabOctavePath = PATH_AND_FILE The path to the MATLAB or Octave executable. The default value - is ``matlab``. + is ``matlab`` as MATLAB's executable is typically in the %PATH% environment + variable. When using full paths on Windows, you may need to enclose the path + in quoted strings, e.g. ``MatlabOctavePath="C:\Program Files\MATLAB\R2023a\bin\matlab.exe"`` .. option:: NumberOfThreadsPerJob = INTEGER @@ -323,7 +325,9 @@ Windows Step-by-Step Guide ========================== This section outlines the steps necessary on most Windows systems to -set up Dynare for parallel execution. +set up Dynare for parallel execution. Note that the steps 3 to 6 are +required unless parallel execution is confined to a local pool +with the ``parallel_use_psexec=false`` option. 1. Write a configuration file containing the options you want. A mimimum working example setting up a cluster consisting of two diff --git a/matlab/parallel/masterParallel.m b/matlab/parallel/masterParallel.m index 1455c08cd..e9a7f8070 100644 --- a/matlab/parallel/masterParallel.m +++ b/matlab/parallel/masterParallel.m @@ -362,7 +362,7 @@ if parallel_recover ==0 itmp = bitset(itmp,cpus(icpu)); end hex_affinity = dec2hex(itmp); - token1 = ['start /B /D "',DyMo, '" /affinity ',hex_affinity,' /LOW ']; + token1 = ['start "" /B /D "',DyMo, '" /affinity ',hex_affinity,' /LOW ']; end if regexpi([Parallel(indPC).MatlabOctavePath], 'octave') command1=[token1,Parallel(indPC).MatlabOctavePath,' -f --eval "default_save_options(''-v7''); addpath(''',Parallel(indPC).DynarePath,'''), dynareroot = dynare_config(); fParallel(',int2str(offset+1),',',int2str(sum(nBlockPerCPU(1:j))),',',int2str(j),',',int2str(indPC),',''',fname,''')"']; @@ -378,7 +378,7 @@ if parallel_recover ==0 if (~ispc || strcmpi('unix',Parallel(indPC).OperatingSystem)) % Hybrid computing Windows <-> Unix! if ispc - token='start /B '; + token='start "" /B '; else token = ''; end @@ -444,7 +444,7 @@ if parallel_recover ==0 itmp = bitset(itmp,cpus(icpu)); end hex_affinity = dec2hex(itmp); - token1 = ['start /B /D "',DyMo, '" /affinity ',hex_affinity,' /LOW ']; + token1 = ['start "" /B /D "',DyMo, '" /affinity ',hex_affinity,' /LOW ']; end if regexpi([Parallel(indPC).MatlabOctavePath], 'octave') command1=[token1,Parallel(indPC).MatlabOctavePath,' -f --eval "default_save_options(''-v7'');addpath(''',Parallel(indPC).DynarePath,'''), dynareroot = dynare_config(); slaveParallel(',int2str(j),',',int2str(indPC),')"']; @@ -464,7 +464,7 @@ if parallel_recover ==0 dynareParallelSendFiles(['slaveParallel_input',int2str(j),'.mat'],PRCDir,Parallel(indPC)) if (~ispc || strcmpi('unix',Parallel(indPC).OperatingSystem)) % Hybrid computing Windows <-> Unix! if ispc - token='start /B '; + token='start "" /B '; else token = ''; end