Skip to content
Snippets Groups Projects
Forked from rc / bc_uab_matlab
25 commits behind the upstream repository.
script.sh.erb 772 B
#!/usr/bin/env bash

# Set working directory to home directory
cd "${HOME}"

#
# Launch Xfce Window Manager and Panel
#

(
  export SEND_256_COLORS_TO_REMOTE=1
  export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>"
  export XDG_DATA_HOME="<%= session.staged_root.join("share") %>"
  export XDG_CACHE_HOME="$(mktemp -d)"
  module reset
  set -x
  xfwm4 --compositor=off --daemon --sm-client-disable
  xsetroot -solid "#D3D3D3"
  xfsettingsd --sm-client-disable
  xfce4-panel --sm-client-disable
) &

#
# Start MATLAB
#

<%- if context.bc_partition == "pascalnodes" -%>
# Load CUDA toolkit
module load <%= context.cuda_toolkit %>
<%- end -%>
# Load the required environment
module load <%= context.version %>
# Launch MATLAB
module list
set -x
matlab -desktop