Matlab Production Server / Matlab Compiler

1 view (last 30 days)
Hi all,
I am currently running the MPS under Linux and have been successfully compiling m-files using the deploy tool running under windows. Recently, I compiled some more complex m-files and ran into compatibility issues because of the need to compile under the same environment as that under which the MPS is running. Thus I switched to compiling under Linux. However, the resultant ctf files are not recognized by the MPS. Even when I compile a very simple m-file and attempt to access the resultant ctf files placed in the auto_deploy folder (via a java client) I get the error.
I have noticed the that the ctf files compiled under Linux are much smaller than the files compiled under windows. For example, the following m-file
function imageBytes = test1
% simple test accessing same data files from deployed matlab and matlab
% running on university cluster.
% folder date str that specifies the current working parent folder
% there is no simple way of getting around hard coding this here
folderDateString = '20160910';
% platform specific file separator
fs = filesep;
if isdeployed
drStr = [ 'matlab' fs folderDateString fs 'data' fs ];
else
drStr = [ 'data' fs ];
end
% import an image
files = dir( [ drStr 'images' fs 'input' fs '*.png' ] );
im = imread( [ drStr 'images' fs 'input' fs files( 1 ).name ] );
% do something to image
imProc = im;
imProc( :, :, 1 ) = 0;
% display image
fh = figure;
subplot( 1, 2, 1 );
imagesc( im );
subplot( 1, 2, 2 );
imagesc( imProc );
% save figure
print( [ drStr 'images' fs 'output' fs 'imProc.png' ],'-dpng','-r0')
% import image to recover image bytes
fid = fopen( [ drStr 'images' fs 'output' fs 'imProc.png' ] );
imageBytes = fread( fid, 'int8' ); % int8 to ensure match to java byte
% clean up
fclose( fid );
close( fh );
compiles down to a ctf of 1.4MB under windows but only 24KB under Linux. This makes me think that something is going wrong with the compilation and this is not necessarily an issue with the MPS. However, all of the packaging logs imply a successful compilation but I am not sure how to investigate this further.
Just to confirm the MPS and Matlab are running under the same Linux version
Operating System: Linux 2.6.32-431.40.2.el6.nsc1.x86_64 #1 SMP Sun Dec 21 15:34:34 CET 2014 x86_64
And the version of the MCR on the MPS is 2015b and the version of Matlab used to compile is 2015b
I am happy to supply ctf files, however, I can't upload them here.
Best wishes,
John

Answers (0)

Categories

Find more on Deployable Archive Creation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!