2022-05-03 01:09:49 -04:00
|
|
|
---
|
2023-02-18 13:12:02 -05:00
|
|
|
date: 2022-05-03 00:52:38-04:00
|
2022-05-03 01:09:49 -04:00
|
|
|
draft: false
|
|
|
|
math: false
|
2023-01-05 14:04:45 -05:00
|
|
|
medium_enabled: true
|
2023-02-18 13:12:02 -05:00
|
|
|
medium_post_id: 1c0c98b99e8a
|
|
|
|
tags:
|
|
|
|
- Fedora
|
|
|
|
title: OpenMPI on Fedora
|
2022-05-03 01:09:49 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
To use use the OpenMPI compilers (mpicc, mpic++, etc.) and mpirun
|
|
|
|
on Fedora, you'll need to install the openmpi package as well
|
|
|
|
as set up the envionrment paths correctly.
|
|
|
|
|
|
|
|
To install:
|
|
|
|
```bash
|
2023-01-18 18:46:12 -05:00
|
|
|
sudo dnf install openmpi openmpi-devel
|
2022-05-03 01:09:49 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Then to set up the environmental variables correctly
|
|
|
|
so that PATH is set. You'll need to use the
|
|
|
|
[environment modules](https://modules.readthedocs.io/en/latest/)
|
|
|
|
program installed by default on Fedora. First, you'll
|
|
|
|
need to source it:
|
|
|
|
```bash
|
|
|
|
source /etc/profile.d/modules.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
Now you can load in the OpenMPI module
|
|
|
|
```bash
|
|
|
|
module load mpi/openmpi-x86_64
|
|
|
|
```
|
|
|
|
|
|
|
|
Finally, with these changes you can use the compiler
|
|
|
|
tools and runner. Do note that you'll have to source
|
|
|
|
and load the OpenMPI module for every shell you open
|
2023-02-18 13:12:02 -05:00
|
|
|
unless you add it within `$HOME/.bashrc`.
|