Changes between Version 3 and Version 4 of mccpfe


Ignore:
Timestamp:
02/03/20 16:13:28 (5 years ago)
Author:
tpelle
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mccpfe

    v3 v4  
    1 Pleiades only has about 15 MATLAB licenses on the cluster and does not allow to run MATLAB on batch jobs (submitted through qsub). The alternative is to compile your MATLAB functions for deployment using mcc (https://www.mathworks.com/help/compiler/mcc.html)
     1Pleiades only has about 15 MATLAB licenses on the cluster and does not allow to run MATLAB on batch jobs (submitted through qsub). The alternative is to compile your MATLAB functions for deployment using mcc (https://www.mathworks.com/help/compiler/mcc.html). To do so, you must first precompile your MATLAb code into an executable (*.sh) file, and then submit this as a Pleiades job script.
    22
    3 == Precompile your MATLAB code ==
     3== Precompile your MATLAB code  ==
     4The following Matlab script (testMCC.m) will create an executable out of a Matlab script that can be submitted to Pleiades:
     5{{{#!matlab
     6%file to be turned into an executable
     7filename = 'XXX.m'
    48
    5 {{{#!matlab
    69%Get dependencies
    710files = matlab.codetools.requiredFilesAndProducts(filename);
     
    1922system(command);
    2023}}}
    21 
    22 Potential Problems:
    23  * mcc needs to see all the m files and will not be able to interpret a new m file created on the fly (like we do with `parameterize`)
    24  * other issues?
     24Run this script in Matlab the two following files will be generated: run_testMCC.sh and testMCC. Note the following potential problems:
     25 * mcc needs to see all the m files and will not be able to interpret a new *.m file created on the fly (like we do with `parameterize`).
     26 * It will be helpful to remove dependencies that rely on special MATLAB licenses, as Pleiades only has a limited amount. For instance, one can remove 'normfit_issm.m' and 'dakota_moments.m' from the list of dependencies (if your code will not use them) so that we do not require Matlab's statistical toolbox license.
    2527
    2628== Submit a job ==
    27 
    28 Make sure to change ....
     29Make sure to change paths and the group-id in the file below to match that of your system:
    2930{{{#!sh
    3031#PBS -S /bin/bash
     
    4243module load comp-intel/2016.2.181
    4344module load mpi-sgi/mpt
    44 module load matlab
     45module load matlab/2017b
     46module load netcdf/4.4.1.1_mpt
    4547
    4648#Export some variables
     
    5759
    5860#Run the precompiled code
    59 ./run_testMCC.sh $ISSM_DIR/lib:$ISSM_DIR/externalpackages/gsl/install/lib:$ISSM_DIR/externalpackages/petsc/install/lib:/nasa/intel/Compiler/2016.2.181/mkl/lib/intel64/:/nasa/intel/Compiler/2016.2.181/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64/:/nasa/sgi/mpt/2.15r20/lib:/nasa/matlab/2017b
     61./run_testMCC.sh $ISSM_DIR/lib:$ISSM_DIR/externalpackages/gsl/install/lib:$ISSM_DIR/externalpackages/petsc/install/lib:/nasa/intel/Compiler/2016.2.181/mkl/lib/intel64/:/nasa/intel/Compiler/2016.2.181/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64/:/nasa/sgi/mpt/2.15r20/lib:/nasa/netcdf/4.4.1.1_mpt/lib:/nasa/matlab/2017b
    6062}}}
    61 
    62 If you have undefined symbols, you may need to add a path to the `./run_testMCC.sh` command.
     63Potential Problems:
     64* If you have undefined symbols, you may need to add a path to the `./run_testMCC.sh` command.
     65* If you get an error that the path to your ISSM trunk is incorrect once your code is deployed, you may have to hardcode this path into `src/m/os/issmdir.m`. This may also be caused by calls to `addpath` in your code, which should be removed before compiling.