> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
