playbooks/roles/ood-applications/files/bc_ansys_workbench/template/script.sh.erb (35 lines of code) (raw):

#!/usr/bin/env bash <%- gpu = context.target.include?("3d") -%> # Clean the environment module purge # Set working directory to home directory cd "${HOME}" # # Launch Xfce Window Manager and Panel # source "<%= session.staged_root.join("xfce_kiosk.sh") %>" # # Start ANSYS Workbench # # Another ANSYS job with the same job name (file) is already running in this # directory or the file.lock file has not been deleted from an abnormally # terminated ANSYS run. To disable this check, set the ANSYS_LOCK environment # variable to OFF. export ANSYS_LOCK="OFF" # For debugging purpose #export WBTracing=true #export ANSYS_FRAMEWORK_DEVELOPMENT=1 <%- unless gpu -%> # Disable hardware rendering mode export CUE_GRAPHICS="mesa" <%- end -%> ANSYS_HOME_DIR="<%= context.ansys_home %>" ANSYS_VERSION="<%= context.version %>" # Launch ANSYS Workbench <%- if gpu -%> set -x vglrun $ANSYS_HOME_DIR/$ANSYS_VERSION/Framework/bin/Linux64/runwb2 <%- else -%> set -x $ANSYS_HOME_DIR/$ANSYS_VERSION/Framework/bin/Linux64/runwb2 <%- end -%>