MoorDyn Parallel computing (Matlab)

Dear all,

I am currently building a model of the NREL 5 MW offshore wind turbine on Matlab.
To reduce my long computational times I am trying to implement parallel computing.
However, MoorDyn does not seem to work.

My code runs perfectly when using standard “for” loops but when I change these to “Parfor” loops (parallel computing) the console window for MoorDyn appears empty and MoorDyn does not initialize, however, it does not report a failure to initialize.
Any help regarding this would be very much appreciated.
I will attach a similar loop below which represents the issue:

parfor i = 1:3
if libisloaded(‘MoorDyn’)
calllib(‘MoorDyn’,‘LinesClose’);
unloadlibrary MoorDyn;
end

 [notfound,warnings] = loadlibrary('MoorDyn','MoorDyn');     % load MoorDyn DLL
 mooring_status = calllib('MoorDyn','LinesInit',zeros(6,1),zeros(6,1));   % initialize MoorDyn 
 if mooring_status ~= 0
     error('MoorDyn unable to load');
 else
     disp('MoorDyn loaded successfully');
 end
 calllib('MoorDyn','LinesClose');
 unloadlibrary MoorDyn;

end