# OpenMPI not work in Open OnDemand

**URL:** <https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783>\
**Category:** Get Help\
**Created:** [June 29, 2023, 1:34am UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783 "2023-06-29T01:34:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimmy888-333](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jimmy888-333/32/1540_2.png) [@Jimmy888-333](https://discourse.openondemand.org/u/Jimmy888-333)\
**Post date:** [June 29, 2023, 1:34am UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/1 "2023-06-29T01:34:59Z")

</div>

Hi Support

I have submitted a slurm job via the “job composer”, it doesn’t work with the following error,

An ORTE daemon has unexpectedly failed after launch and before  
communicating back to mpirun. This could be caused by a number  
of factors, including an inability to create a connection back  
to mpirun due to a lack of common network interfaces and/or no  
route found between them. Please check network connectivity  
(including firewalls and network routing requirements).

The content of the slurm job script as shown below:-

_#!/bin/bash_

_#SBATCH --partition=jobqueue_  
_#SBATCH --time=1:00:00_  
_#SBATCH --nodes=4_  
_#SBATCH --ntasks=4_  
_#SBATCH --cpus-per-task=1_  
_#SBATCH --mem-per-cpu=4096M_  
_#SBATCH -J “python-example”_

_module load Anaconda3/2023.03-1_  
_source activate jn-2303_  
_module load gnu12/12.2.0 openmpi4/4.1.4_

_mpirun -np 4 python3 pythonmpi.py \> result.txt_

_source deactivate_  
_module unload Anaconda3/2023.03-1 gnu12/12.2.0 openmpi4/4.1.4_

However, from terminal/command line on Open OnDemand server, the sbatch job script works as expected.

Then, I found the workaround (Add “ **export SLURM\_EXPORT\_ENV=ALL** ” to the job script) referring to the post “[Job composer and star-ccm+](https://discourse.openondemand.org/t/job-composer-and-star-ccm/2238)”. And, it works eventually.

I would like to know if Open OnDemand can enable SLURM\_EXPORT\_ENV=ALL by default so that I don’t need to add the statement “export SLURM\_EXPORT\_ENV=ALL” for each job script every time. The Open OnDemand version is 3.0.1.

Thanks

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [June 29, 2023, 4:40pm UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/2 "2023-06-29T16:40:21Z")

</div>

You could set this globally in the `submit.yml.erb` instead if you want to have this take effect for each job.

Here’s an example of what we do at OSC:

> <https://github.com/OSC/osc-ood-config/blob/0812a7f7af7b1921848dcb6575d84d565c736aa6/ondemand.osc.edu/apps/bc_desktop/submit/slurm.yml.erb#L69-L70>

---

<div class="post-metadata">

**Author:** ![Jimmy888-333](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jimmy888-333/32/1540_2.png) [@Jimmy888-333](https://discourse.openondemand.org/u/Jimmy888-333)\
**Post date:** [June 30, 2023, 2:15am UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/3 "2023-06-30T02:15:01Z")

</div>

Hi Support,

As I have encountered the problem in “Job composer” instead of interactive app, for “Job composer”, it seems doesn’t has file “submit.yml.erb”. Do you know where to apply the setting globally for “Job composer”? Thanks

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [June 30, 2023, 4:25pm UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/4 "2023-06-30T16:25:07Z")

</div>

Sorry about that. I think for the Job Composer your original approach of doing the `export` in the `script` will have to be the way to handle this.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 5, 2023, 4:17pm UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/5 "2023-07-05T16:17:00Z")

</div>

The job composer was updated to accommodate this. There’s now a checkbox for `copy environment`. This should be set when you’re updating the job options.

Alternatively, you can set these options globally for the entire cluster. Though note that this will affect not only the job composer but all batch connect applications as well.

[https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/submit.html#setting-batch-connect-options-globally](https://osc.github.io/ood-documentation/latest/how-tos/app-development/interactive/submit.html#setting-batch-connect-options-globally)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [January 1, 2024, 4:17pm UTC](https://discourse.openondemand.org/t/openmpi-not-work-in-open-ondemand/2783/6 "2024-01-01T16:17:14Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
