Changes between Initial Version and Version 1 of mccpfe


Ignore:
Timestamp:
02/03/20 14:57:17 (5 years ago)
Author:
Mathieu Morlighem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • mccpfe

    v1 v1  
     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)
     2
     3== Precompile your MATLAB code ==
     4
     5{{{#!matlab
     6%Get dependencies
     7files = matlab.codetools.requiredFilesAndProducts(filename);
     8
     9%Creaste long string
     10deps = [];
     11for i=1:numel(files)
     12   deps = [deps ' ' files{i}];
     13end
     14
     15%Create command
     16command = ['mcc -m ' filename deps ' -o testMCC']
     17
     18%Create executable
     19system(command);
     20}}}
     21
     22Potential 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?
     25
     26== Submit a job ==
     27
     28Make sure to change ....
     29{{{#!sh
     30#PBS -S /bin/bash
     31#PBS -l select=1:ncpus=28:model=bro
     32#PBS -l walltime=100
     33#PBS -q devel
     34#PBS -W group_list=s1690
     35#PBS -m e
     36#PBS -o /home1/mmorligh/issm/trunk-jpl/test/NightlyRun/run.outlog
     37#PBS -e /home1/mmorligh/issm/trunk-jpl/test/NightlyRun/run.errlog
     38
     39. /usr/share/modules/init/bash
     40
     41#load modules
     42module load comp-intel/2016.2.181
     43module load mpi-sgi/mpt
     44module load matlab
     45
     46#Export some variables
     47export PATH="$PATH:."
     48export MPI_LAUNCH_TIMEOUT=520
     49export MPI_GROUP_MAX=64
     50
     51#ISSM stuff
     52export ISSM_DIR="/u/mmorligh/issm/trunk-jpl/"
     53source $ISSM_DIR/etc/environment.sh
     54
     55#move and start simulation
     56cd /home1/mmorligh/issm/trunk-jpl/test/NightlyRun
     57
     58##OPTION 1
     59#/u/scicon/tools/bin/check_licenses -m
     60#matlab -r "addpath $ISSM_DIR/src/m/dev; temp; devpath; exit" > TEMP
     61
     62#OPTION2
     63./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
     64}}}