Running Mathematica Trainings

Introduction

End Goal

  • Submit Mathematica trainings using the runai-bgu CLI.

Submitting a Mathematica Training Workload

To run Mathematica training you need to have a .m file. For example:

Exmaple Mathematica file:
Needs["Benchmarking`"]
Print[Benchmark]

Exporting an Existing .nb file to .m

To export your Mathematica notebook as an executable .m file follow these steps:

  1. Select all cells using Ctrl+a

  2. Transform these cells to "executable" cells using Ctrl+8 or using the Cell  Cell Properties  Intialization Cell

  3. Save as .m using Ctrl+Shift+s

Run the file

$ runai-bgu submit mathematica \ (1)
  -n mathematica-1 \ (2)
  -c 16 \ (3)
  -m 16Gi \ (4)
  -e MATHEMATICA_VERSION=14.1 \ (5)
  -- "~/my-mathematica-file.m" (6)
1 Submit a mathematica workload
2 The name for the workload
3 Number of CPU core for the workload
4 Memory limit
5 Optional select Mathematica version
6 path to your file