/usr/lib/petscdir/3.7.7/x86_64-linux-gnu-complex/share/petsc/matlab/launch.m is in libpetsc-complex-3.7.7-dev 3.7.7+dfsg1-2build5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | function result = launch(program,np,opt)
%
% launch(program,np)
% Starts up PETSc program
%
% Unfortunately does not emit an error code if the launch fails and one cannot see the output
% including error messages from the PETSc code.
%
% To debug problems we recommend commenting out the launch script from the Matlab script and
% in a separate terminal starting the PETSc program manually, for example petscmpiexec -n 1 ./ex1 -info other options
% The Matlab script will block on the PetscOpenSocket() until the PETSc executable is started.
% see also @sreader/sreader() and PetscBinaryRead()
%
if nargin < 2
np = 1;
else if nargin < 3
opt = ''
end
end
%
% to run parallel jobs make sure petscmpiexec is in your path
% with the particular PETSC_ARCH environmental varable set
%command = ['petscmpiexec -np ' int2str(np) ' ' program opt ' &'];
command = [ program opt ' &'];
fprintf(1,['Executing: ' command])
result = system(command)
|