> For the complete documentation index, see [llms.txt](https://wiki.solids.group/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.solids.group/alamo/gpu-compilation-on-nova.md).

# GPU Compilation on Nova

## Steps

1. Load the following modules:

   ```bash
   module load git openmpi cuda
   ```
2. Check out the Alamo repository:

   ```bash
   git clone https://github.com/solidsgroup/alamo.git
   ```

   For this workflow, check out the `gpu` branch:

   ```bash
   git checkout gpu
   ```
3. In the Alamo directory, configure with:

   ```bash
   ./configure --get-eigen --cuda
   ```

   The Nova `eigen` module will not work for this workflow.
4. Compile the currently working example:

   ```bash
   make bin/heat
   ```

   Optionally start an interactive compilation session to speed up the build:

   ```bash
   srun --partition=interactive --pty bash
   ```

   The modules must be reloaded inside the interactive session.

   You may need to run `make` more than once; the old wiki noted odd issues when compiling in parallel.
5. With Alamo compiled, start a new interactive session:

   ```bash
   srun --partition=interactive --gres=gpu:a100:1 --pty bash
   ```

   Load CUDA:

   ```bash
   module load cuda
   ```
6. Run:

   ```bash
   ./bin/heat-3d-cuda80-g++ tests/HeatConduction/input
   ```

   The old wiki reported that this did not work because `libcuda.so.1` could not be found. Symlinking to the `/stub` library was attempted, but the stub library could not be used.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.solids.group/alamo/gpu-compilation-on-nova.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
