-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_toolbox_MATLAB_jt2.sh
38 lines (32 loc) · 1.36 KB
/
start_toolbox_MATLAB_jt2.sh
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
31
32
33
34
35
36
37
38
#!/bin/sh
# FILENAME: start_toolbox_MATLAB.sh
#
# PURPOSE: Set up decompression filters (for RDFv10 processing) and start MATALB
# This function sets two environment variables and
# create a symbolic link
#
#
# [NOTE]
# *This script expects to be executed from the root Duetto directory.
#
# *Please put the MATLAB installation location at line 17
# or the latest version in the default location (/usr/local/MATLAB) would be used.
#
#
# Copyright 2019 General Electric Company. All rights reserved.
# Please put location where the preferred MATLAB version is installed
# or the latest MATALB version installed in /usr/local/MATLAB would be used
MATLABROOT=$(ls -d /cvmfs/restricted.computecanada.ca/easybuild/software/2017/Core/matlab/2018a* | tail -1);
DUETTOROOT=/project/6053072/duetto/;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DUETTOROOT}/io/rdf/hdf5_plugin_library/;
HDF5_PLUGIN_PATH=${DUETTOROOT}/io/rdf/hdf5_plugin_library/;
export LD_LIBRARY_PATH;
export HDF5_PLUGIN_PATH;
# Create a HDF5 symbolic link if not exists
FILE=${DUETTOROOT}/io/rdf/hdf5_plugin_library/libhdf5.so.10;
if test ! -f "$FILE"; then
echo "libhdf5.so.10 does not exist. Create a symbolic link to the MATLAB HDF5 library";
LIBFILE=$(ls ${MATLABROOT}/bin/glnxa64/libhdf5.so.8.0.1 | tail -1);
ln -sf ${LIBFILE} ${FILE};
fi
exit