> For the complete documentation index, see [llms.txt](https://usdrcg.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://usdrcg.gitbook.io/docs/lawrence-hpc/programming-environment.md).

# Programming Environment

## Compilers

The Lawrence HPC programming environment has the choice of two compilers: Intel and Gnu 4.8.5 (gcc).

## OpenMP

Two options in Lawrence are available for OpenMP: OpenMP Intel and Gnu.

To choose a version of OpenMP, add the version number and "/intel" or "/gcc" to the module command.

```
# For the OpenMPI module with Gnu:
[user.name@usd.local@login ~]$ module load openmpi-1.6/gcc

############## or ################

#For the OpenMPI module with OpenMP Intel:
[user.name@usd.local@login ~]$ module load openmpi-1.6/intel

```

## MPI

MPI's available with Lawrence: open MPI, mpich (ethernet), and mvapich (infinaband), intel impi

| **MPI Platform** | Module Name      | Module Name        |
| ---------------- | ---------------- | ------------------ |
| Open MPI         | openmpi-1.6/gcc  | openmpi-1.6/intel  |
|                  | openmpi-1.8/gcc  | openmpi-1.8/intel  |
|                  | openmpi-2.0/gcc  | openmpi-2.0/intel  |
| mpich            | mpich/gcc        | mpich/intel        |
| mvapich          | mvapich2-2.2/gcc | mvapich2-2.2/intel |

```
[user.name@usd.local@login ~]$ module avail
------------------------------------------- /usr/share/Modules/modulefiles --------------------------------------------
dot         module-git  module-info modules     null        use.own

-------------------------------------------------- /act/modulefiles ---------------------------------------------------
cuda-9.1           intel              mvapich2-2.2/gcc   openmpi-1.6/intel  openmpi-2.0/gcc
gaussian/16        mpich/gcc          mvapich2-2.2/intel openmpi-1.8/gcc    openmpi-2.0/intel
impi               mpich/intel        openmpi-1.6/gcc    openmpi-1.8/intel

```

#### To load/unload an MPI module:

```
############## Load ################
[user.name@usd.local@login ~]$ module load openmpi-2.0/gcc

############# Unload ###############
[user.name@usd.local@login ~]$ module unload openmpi-2.0/gcc
```

#### To view the version of MPI in use:

```
[user.name@usd.local@login ~]$ mpirun --version
[user.name@usd.local@login ~]$ mpirun --version
mpirun (Open MPI) 2.0.1

Report bugs to http://www.open-mpi.org/community/help/
```


---

# 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://usdrcg.gitbook.io/docs/lawrence-hpc/programming-environment.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.
