Skip to content

fasrc/ood-matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open OnDemand Matlab

FASRC users

Matlab is an pen OnDemand app that launches Matlab as an interactive session on a compute node. Matlab is a computing platform that is used for engineering and scientific applications like data analysis, signal and image processing, control systems, wireless communications, and robotics.

FASRC documentation:

Sandbox app

For how to create a Sandbox app, see the Developing your own app using Open OnDemand documentation.

Appverse overview

Note

This section is intended for sys-admins, developers, and power users.

Matlab is an Open OnDemand Batch Connect app that launches Matlab as an interactive desktop session on HPC clusters. It is designed for researchers who need data Matlab is a computing platform that is used for engineering and scientific applications like data analysis, signal and image processing, control systems, wireless communications, and robotics.

This app uses the Batch Connect turbovnc template with Slurm and software OpenGL rendering.

  • Upstream project: MATLAB
  • Batch Connect template: turbovnc
  • Scheduler: Slurm

Screenshots

A Matlab 3D plot example

Matlab 3D plot example

Features

  • Launches MATLAB desktop GUI in a TurboVNC session with Xfce window manager
  • Multiple MATLAB versions (R2021a, R2022b, R2024b, R2025b) via matlab/ module
  • Supports CPU and GPU execution
  • Configurable memory, CPU cores, GPU count, and wall time
  • Lmod module-based
  • Software OpenGL rendering (-softwareopengl flag)
  • Optional extra modules loading (comma-separated list)
  • Optional additional Slurm options pass-through (long format)
  • Optional reservation support for priority scheduling
  • Optional email notification on job start
  • OOM score management to prevent proxy errors on out-of-memory conditions

Requirements

Compute Node Software

  • Matlab Lmod module and Matlab license
  • Xfce Desktop 4+
  • Slurm job scheduler
  • Lmod 6.0.1+ or any other module purge and module load <modules> based CLI used to load appropriate environments within the batch job

For VNC server support

Open OnDemand

  • Open OnDemand v3.0+
  • Slurm job scheduler
  • Lmod 6.0.1+ or any other module purge and module load <modules> based CLI used to load appropriate environments within the batch job

App Installation

Please see the References section below for instructions on how to install the software that is launched by this App.

1. Clone the repository

# Batch Connect apps:
cd /var/www/ood/apps/sys

git clone https://github.com/fasrc/ood-matlab.git
cd ood-matlab

# Pin to a release (recommended)
git checkout v1.0.0

2. Configure for your site

form.yml attributes

Edit form.yml and update these values for your cluster:

Attribute Description FASRC settings Change to
cluster Target cluster ID odyssey Your cluster name
desktop xfce Your desktop implementation
bc_vnc_resolution Screen resolution user-defined; default 1024x768 Your preferred resolution
bc_num_slots Number of nodes or processors (depending on the type of scheduler) Null, FASRC uses custom_num_cores instead
bc_queue Default scheduler partition user-defined; default shared Your preferred partition
custom_memory_per_node Memory per job (GB) user-defined; default: 8 Your preferred memory allocation
custom_num_cores Number of cores user-defined; default 2 Your preferred default number of cores
custom_num_gpus Number of GPUs user-defined; default 0 Your preferred default number of GPUs
custom_time Maximum wall time (HH:MM:SS) user-defined; default 04:00:00 Your preferred default time
matlab_version Matlab module to load on compute node Multiple versions; e.g. matlab/R2025b-fasrc01 Your matlab module
modules Optional Extra Lmod modules to load on the compute node before starting Matlab user-defined
custom_reservation Optional Slurm reservation --reservation user-defined
extra_slurm Optional Extra slurm option (long-format) user-defined
bc_account Optional Slurm account -A, --account user-defined
custom_email_address Optional email address for status notificationl used along with bc_email_on_started user-defined
bc_email_on_started Optional sends email to custom_email_address when job starts user-defined

submit.yml.erb attributes

submit.yml.erb uses slurm-specific variables. If you use a different scheduler, edit these accordingly:

Slurm variable forml.yml attribute
mem custom_memory_per_node
time custom_time
cpus-per-task custom_num_cores
gres=gpu: custom_num_gpus

manifest.yml attributes

Edit manifest.yml and update these values for your organization:

Attribute Change to
description Your cluster and your documentation

3. Verify

No OOD restart is needed (Batch Connect apps are detected automatically). Visit your OOD dashboard and look for Matlab under Interactive Apps > Desktop Apps.

Troubleshooting

Job starts but app doesn't appear (Batch Connect)

  1. Check the job's output.log in ~/ondemand/data/sys/YOUR-APP/
  2. Verify the module loads correctly: module load software/1.0
  3. For VNC apps, verify the window manager is installed: which xfwm4

"Module not found" error

The module name in form.yml doesn't match your system. Run module spider software to find the correct name and update the modules attribute.

Connection timeout

The app may need more time to start. Increase the connection timeout or check that the compute node can open the required port.

Testing

Site Operating System* OOD Version Scheduler Status
FASRC Rocky 8.10 3.1 Slurm 25.11 Tested
FASRC Rocky 8.10 4.0 Slurm 25.11 Tested

Note

*Operating system of compute nodes

To verify your installation:

  1. Launch the app from the OOD dashboard with default settings
  2. Confirm the application loads in the browser

Known Limitations

  • Multi-node jobs are not supported
  • Only tested on Centos 7 and Rocky 8; may not work on Ubuntu.

Contributing

Contributions are welcome. To contribute:

  1. Fork this repository.
  2. Create a feature branch (git checkout -b feature/my-improvement).
  3. Submit a pull request with a description of your changes.

For bugs or feature requests, open an issue.

This app is part of the OOD Appverse. Join the Appverse Affinity Group to connect with other contributors.

References

  • MATLAB — the application launched by this OOD app.
  • Open OnDemand — the HPC portal framework.

Software Installation

License

MIT License.

Acknowledgments

This work is supported by FASRC at Harvard Univesity.

About

OnDemand App to deploy Matlab GUI as interactive instance on compute nodes on the FASRC clusters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors