Skip to content
Snippets Groups Projects
Commit aa142ff6 authored by Jeremy Nicklas's avatar Jeremy Nicklas
Browse files

update app

Fixes #3
Fixes #6
parent d11f17db
No related branches found
No related tags found
No related merge requests found
## Unreleased
## 0.1.0 (2017-06-14)
Features:
- refactored for the new Batch Connect app
# Changelog
All notable changes to this project will be documented in this file.
## 0.0.4 (2017-05-15)
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
Features:
- remove FVWM and added Fluxbox as the window manager
## Unreleased
### Added
- Added hardware rendering support.
[#3](https://github.com/OSC/bc_osc_matlab/issues/3)
## 0.0.3 (2017-04-24)
### Changed
- Modified the `CHANGELOG.md` formatting.
- Refactored to use new Dashboard ERB templating.
[#6](https://github.com/OSC/bc_osc_matlab/issues/6)
- Updated date in `LICENSE.txt`.
Features:
## [0.1.0] - 2017-06-14
### Changed
- Refactored for the new Batch Connect app.
- version assets removing need for `bin/setup`
## [0.0.4] - 2017-05-15
### Changed
- Remove FVWM and added Fluxbox as the window manager.
## 0.0.2 (2017-04-21)
## [0.0.3] - 2017-04-24
### Changed
- Version the assets.
Features:
### Removed
- Remove `bin/setup` as not necessary anymore.
- added `bin/setup` script for easier deployment
## [0.0.2] - 2017-04-21
### Added
- Added `bin/setup` script for easier deployment.
## 0.0.1 (2017-04-04)
Initial release!
### Added
- Initial release!
[Unreleased]: https://github.com/OSC/bc_osc_matlab/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/OSC/bc_osc_matlab/compare/v0.0.4...v0.1.0
[0.0.4]: https://github.com/OSC/bc_osc_matlab/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/OSC/bc_osc_matlab/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/OSC/bc_osc_matlab/compare/v0.0.1...v0.0.2
Copyright (c) 2016-2017 Ohio Supercomputer Center
Copyright (c) 2016-2018 Ohio Supercomputer Center
MIT License
......
# Batch Connect - OSC MATLAB
![GitHub Release](https://img.shields.io/github/release/osc/bc_osc_matlab.svg)
![GitHub License](https://img.shields.io/github/license/osc/bc_osc_matlab.svg)
[![GitHub License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
A Batch Connect app designed for OSC OnDemand that launches MATLAB within an
Owens batch job.
## Prerequisites
This app requires the following software be installed on the nodes that the
batch job is intended to run on:
This Batch Connect app requires the following software be installed on the
**compute nodes** that the batch job is intended to run on (**NOT** the
OnDemand node):
- [MATLAB](https://www.mathworks.com/) R2016b+
- [Lmod](https://www.tacc.utexas.edu/research-development/tacc-projects/lmod) 6.0.1+
- [Fluxbox](http://fluxbox.org/) 1.1.1+
- [MATLAB] R2016b+
- [Fluxbox] 1.1.1+
For VNC server support:
- [TurboVNC](http://www.turbovnc.org/) 2.1+
- [websockify](https://github.com/novnc/websockify) 0.8.0+
- [TurboVNC] 2.1+
- [websockify] 0.8.0+
For hardware rendering support:
- [X server]
- [VirtualGL] 2.3+
**Optional** software:
- [Lmod] 6.0.1+ or any other `module restore` and `module load <modules>` based
CLI used to load appropriate environments within the batch job
[MATLAB]: https://www.mathworks.com/
[Fluxbox]: http://fluxbox.org/
[TurboVNC]: http://www.turbovnc.org/
[websockify]: https://github.com/novnc/websockify
[X server]: https://www.x.org/
[VirtualGL]: http://www.virtualgl.org/
[Lmod]: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
## Install
......@@ -45,16 +63,6 @@ scl enable git19 -- git checkout <tag/branch>
Again, you do not need to restart the app as it isn't a Passenger app.
## Template Specification
### MATLAB_MODULE
This environment variable describes the specific MATLAB version to load. This
also assumes module support through the
[Lmod](https://www.tacc.utexas.edu/research-development/tacc-projects/lmod)
package manager is installed on the running compute node as well as the
requested module in `$MATLAB_MODULE`.
## Contributing
1. Fork it ( https://github.com/OSC/bc_osc_matlab/fork )
......
---
title: "MATLAB"
cluster: "owens"
description: |
This app will launch a MATLAB GUI on one or more Owens nodes. You will be
able to interact with MATLAB through a VNC session.
form:
- bc_account
- bc_num_hours
- bc_num_slots
- node_type
- bc_vnc_resolution
- bc_email_on_started
attributes:
bc_num_slots: "1"
bc_vnc_resolution:
required: true
bc_account:
label: "Project"
help: "You can leave this blank if **not** in multiple projects."
node_type:
widget: select
label: "Node type"
help: |
- **any** - (*28 cores*) Chooses anyone of the available Owens nodes.
This reduces the wait time as you have no requirements.
- **hugemem** - (*48 cores*) This Owens node has 1.5TB of available RAM
as well as 48 cores. There are 16 of these nodes on Owens.
- **any** - (*28 cores*) Use any available Owens node. This reduces the
wait time as there are no node requirements.
- **hugemem** - (*48 cores*) Use an Owens node that has 1.5TB of
available RAM as well as 48 cores. There are 16 of these nodes on
Owens.
- **vis** - (*28 cores*) Use an Owens node that has an [NVIDIA Tesla P100
GPU](http://www.nvidia.com/object/tesla-p100.html) with an X server
running in the background. This utilizes the GPU for hardware
accelerated 3D visualization. There are 160 of these nodes on Owens.
options:
- ["any", ":ppn=28"]
- ["hugemem", ":ppn=48:hugemem"]
form:
- bc_num_hours
- bc_num_slots
- node_type
- bc_account
- bc_vnc_resolution
- bc_email_on_started
- [ "any", ":ppn=28" ]
- [ "hugemem", ":ppn=48:hugemem" ]
- [ "vis", ":ppn=28:vis:gpus=1" ]
......@@ -4,6 +4,8 @@ category: Interactive Apps
subcategory: GUIs
role: batch_connect
description: |
This app will launch a [MATLAB](https://www.mathworks.com/products/matlab.html) GUI on one
or more [Owens nodes](https://www.osc.edu/resources/technical_support/supercomputers/owens).
You will be able to interact with MATLAB through a VNC session.
This app will launch a [MATLAB] R2016b GUI on the [Owens cluster]. You will
be able to interact with the MATLAB GUI through a VNC session.
[MATLAB]: https://www.mathworks.com/products/matlab.html
[Owens cluster]: https://www.osc.edu/resources/technical_support/supercomputers/owens
# Export the module function if it exists
[[ $(type -t module) == "function" ]] && export -f module
session.configVersion: 13
session.screen0.toolbar.widthPercent: 60
session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock
session.menuFile: <%= session.staged_root.join("fluxbox", "menu") %>
session.keyFile: <%= session.staged_root.join("fluxbox", "keys") %>
session.styleOverlay: <%= session.staged_root.join("fluxbox", "overlay") %>
#!/bin/bash -l
# Get current working directory
export OUTPUT_ROOT="${PWD}"
# Get source directory of this script
export STAGED_ROOT="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
# Set working directory to home directory
cd "${HOME}"
#
# Launch Fluxbox
#
FLUXBOX_RC_FILE="${OUTPUT_ROOT}/fluxbox.rc"
FLUXBOX_ASSETS_ROOT="${STAGED_ROOT}/fluxbox"
# Create Fluxbox root or it will override the below init file
(
umask 077
mkdir -p "${HOME}/.fluxbox"
)
# Build Fluxbox init file
cat > "${FLUXBOX_RC_FILE}" << EOT
session.configVersion: 13
session.screen0.toolbar.widthPercent: 60
session.screen0.toolbar.tools: prevworkspace, workspacename, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock
session.menuFile: $FLUXBOX_ASSETS_ROOT/menu
session.keyFile: $FLUXBOX_ASSETS_ROOT/keys
session.styleOverlay: $FLUXBOX_ASSETS_ROOT/overlay
EOT
# Export the module function for the terminal
[[ $(type -t module) == "function" ]] && export -f module
# Start the Fluxbox window manager (it likes to crash on occassion, make it
# persistent)
(
export FLUXBOX_ASSETS_ROOT="${FLUXBOX_ASSETS_ROOT}"
until fluxbox -display "${DISPLAY}.0" -rc "${FLUXBOX_RC_FILE}"; do
echo "Fluxbox crashed with exit code $?. Respawning..." >&2
sleep 1
done
) &
#
# Start MATLAB
#
# Restore the module environment to avoid conflicts
module restore
# Load the MATLAB module
module load ${MATLAB_MODULE}
# Launch MATLAB
matlab -desktop
#!/usr/bin/env bash
<%- gpu = context.node_type.include?("vis") -%>
# Clean the environment
module purge
# Set working directory to home directory
cd "${HOME}"
#
# Launch Fluxbox
#
# Create Fluxbox root or it will override the below init file
(
umask 077
mkdir -p "${HOME}/.fluxbox"
)
# Start the Fluxbox window manager (it likes to crash on occassion, make it
# persistent)
(
until fluxbox -display "${DISPLAY}.0" -rc "<%= session.staged_root.join("fluxbox.rc") %>"; do
echo "Fluxbox crashed with exit code $?. Respawning..." >&2
sleep 1
done
) &
#
# Start MATLAB
#
# Load the required environment
OLD_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
module load matlab/r2016b
LD_LIBRARY_PATH="${OLD_LD_LIBRARY_PATH}"
# Launch MATLAB
<%- if gpu -%>
module load intel/16.0.3 virtualgl
vglrun matlab -desktop -nosoftwareopengl
<%- else -%>
matlab -desktop
<%- end -%>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment