Groq

Getting started with Groq.

Login and Groq Cards Available

Start by logging into ExCL's login node.

ssh login.excl.ornl.gov

From the login node, you can then login to a node with a Groq card, for example

ssh milan1

Here is a table of the Groq cards available:

HostnameGroq Cards

milan1

1

milan2

1

Groq card and Slurm

The recommended way to access the Groq card is to reserve it through the Slurm resource manager. Groq cards are available on machines in the groq partition. To reserve a node with a groq card for interactive use use the command.

srun -J groq_interactive -p groq --exclusive --gres="groq:card:1" --pty bash

Where: -J, --job-name=<jobname> specifies the job name. -p, --partition=<partition names> specifies the partition name. --exclusive specifies you want exclusive access to the node. --gres="groq:card:1" specifies that you want to use 1 groq card.

Non-interactive batch jobs can similarly be launched.

sbatch -J groq_batch -p groq --exclusive --gres="groq:card:1" run.sh

Where: -J, --job-name=<jobname> specifies the job name. -p, --partition=<partition names> specifies the partition name. --exclusive specifies you want exclusive access to the node. --gres="groq:card:1" specifies that you want to use 1 groq card.

or specified in the script:

#SBATCH --job-name=groq_batch
#SBATCH --partition=groq
#SBATCH --exclusive
#SBATCH --gres="groq:card:1"
...

Using the Groq Card

In order to use the Groq API you need to make sure you are using python 3.8 and that you add the Groq python libraries to your path. For python 3.8 you can either use the installed system python3.8 or use conda to install python3.8.

System python3.8

You need to fully quantify the path to python since Ubuntu 22.04 defaults to python3.10. This means you need to use

/usr/bin/python3.8

Then to install jupyter notebook in your home directory, you would need to do

/usr/bin/python3.8 -m pip install --user jupyter

Conda

First install miniconda by following Conda Installation Guide. Then create a groq environment with

conda create -n groqflow python=3.8.13
conda activate groqflow

See the GroqFlow Installation for more details for setting up the Conda environment.

Graphical Access to Groq Systems

See ThinLinc Quickstart.

Jupyter Notebooks

See Jupyter Notebook Quickstart for more information on setting up Jupyter Notebooks within ExCL.

Getting started Resources

Useful Groq Commands

  • Run regression tests to verify card functionality: /opt/groq/runtime/site-packages/bin/tsp-regression run

  • Get Groq device status: /opt/groq/runtime/site-packages/bin/tsp-ctl status

  • Monitor temperature and power: /opt/groq/runtime/site-packages/bin/tsp-ctl monitor

Last updated