# \#mpi

**URL:** https://discourse.julialang.org/tag/mpi/170.md?page=1

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 2

---

## [\[ANN\] MPIHaloArrays.jl](https://discourse.julialang.org/t/ann-mpihaloarrays-jl/77385)

<div class="topic-metadata">

**Author:** [@smillerc](https://discourse.julialang.org/u/smillerc)\
**Replies:** 2\
**Last updated:** [August 15, 2024, 12:49pm UTC](https://discourse.julialang.org/t/ann-mpihaloarrays-jl/77385 "2024-08-15T12:49:58Z")

</div>

MPIHaloArrays.jl is a new package that provides the MPIHaloArray array type, which is a subtype of AbstractArray, that facilitates the exchange of halo, or ghost, cells commonly used in domain-decomposition methods high …

---

## [Using views of CuArray with CUDA-aware MPI is extremely slow](https://discourse.julialang.org/t/using-views-of-cuarray-with-cuda-aware-mpi-is-extremely-slow/117348)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 14\
**Last updated:** [August 5, 2024, 12:36pm UTC](https://discourse.julialang.org/t/using-views-of-cuarray-with-cuda-aware-mpi-is-extremely-slow/117348 "2024-08-05T12:36:56Z")

</div>

Hi everyone, I attempted a simple 2D boundary communication using MPI.jl and CUDA.jl. However, when I used views, the wall time was 100 times slower compared to not using views. I made slight modifications based on the …

---

## [\`MPI.jl\` RMA function's usage](https://discourse.julialang.org/t/mpi-jl-rma-functions-usage/115328)

<div class="topic-metadata">

**Author:** [@Devansh1106](https://discourse.julialang.org/u/Devansh1106)\
**Replies:** 11\
**Last updated:** [June 7, 2024, 2:39pm UTC](https://discourse.julialang.org/t/mpi-jl-rma-functions-usage/115328 "2024-06-07T14:39:35Z")

</div>

using MPI MPI.Init() comm = MPI.COMM\_WORLD rank = MPI.Comm\_rank(MPI.COMM\_WORLD) size = MPI.Comm\_size(MPI.COMM\_WORLD) buf = fill(0, 10) win = MPI.MPI\_Win MPI.API.MPI\_Win\_allocate(10\*sizeof(Int), sizeof(Int), MPI.INFO\_NU…

---

## [Julia Slurm Output with MPI](https://discourse.julialang.org/t/julia-slurm-output-with-mpi/111635)

<div class="topic-metadata">

**Author:** [@erny123](https://discourse.julialang.org/u/erny123)\
**Replies:** 0\
**Last updated:** [March 15, 2024, 12:32am UTC](https://discourse.julialang.org/t/julia-slurm-output-with-mpi/111635 "2024-03-15T00:32:42Z")

</div>

I have a simple script to use in slurm and I’m having trouble understanding the output: #MPItest.jl using MPI println("Testing MPI") That I run on slurm with the following sbatch script: #!/bin/bash #SBATCH -p free…

---

## [OpenMPI+Threading: Segfault in compilation?](https://discourse.julialang.org/t/openmpi-threading-segfault-in-compilation/105881)

<div class="topic-metadata">

**Author:** [@mmesiti](https://discourse.julialang.org/u/mmesiti)\
**Replies:** 7\
**Last updated:** [November 10, 2023, 1:23pm UTC](https://discourse.julialang.org/t/openmpi-threading-segfault-in-compilation/105881 "2023-11-10T13:23:13Z")

</div>

I have a package that uses multithreading (with Threads.@threads) and I am trying to parallelize it further using MPI.jl, and it segfaults when I run it on our HPC cluster (using the installation of OpenMPI 4.1.5 provide…

---

## [MPI + Multithreading with ParallelStencil.jl + ImplicitGlobalGrid.jl](https://discourse.julialang.org/t/mpi-multithreading-with-parallelstencil-jl-implicitglobalgrid-jl/105138)

<div class="topic-metadata">

**Author:** [@ali-vaziri](https://discourse.julialang.org/u/ali-vaziri)\
**Replies:** 4\
**Last updated:** [October 19, 2023, 11:13pm UTC](https://discourse.julialang.org/t/mpi-multithreading-with-parallelstencil-jl-implicitglobalgrid-jl/105138 "2023-10-19T23:13:48Z")

</div>

Hi, I tried using ParallelStencil+ImplicitGlobalGrid with MPI on CPU clusters, but I cannot get the multiprocessing to work. I attempted the acoustic2D.jl example from the ParallelStencil repo and added ImplicitGlobalGr…

---

## [Serialization error when using \`MPI.gather\`](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802)

<div class="topic-metadata">

**Author:** [@pat-alt](https://discourse.julialang.org/u/pat-alt)\
**Replies:** 5\
**Last updated:** [September 14, 2023, 5:04am UTC](https://discourse.julialang.org/t/serialization-error-when-using-mpi-gather/103802 "2023-09-14T05:04:12Z")

</div>

Hi there, I’ve recently added support for multi-threading to CounterfactualExplanations.jl. This has been my first time using MPI so there are probably many things that can be improved here (any thoughts very much welco…

---

## [How to run MPI jobs on a cluster](https://discourse.julialang.org/t/how-to-run-mpi-jobs-on-a-cluster/97191)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 1\
**Last updated:** [June 2, 2023, 6:56pm UTC](https://discourse.julialang.org/t/how-to-run-mpi-jobs-on-a-cluster/97191 "2023-06-02T18:56:00Z")

</div>

I want to run Julia MPI jobs on a cluster but not sure if I did it in the correct way. There is a large cluster with hundreds of nodes where each node has 128 cores. The resource management system on the cluster is SLUR…

---

## [MPI collectives (e.g., MPI.Allgatherv!) scaling issues](https://discourse.julialang.org/t/mpi-collectives-e-g-mpi-allgatherv-scaling-issues/97129)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 1\
**Last updated:** [May 15, 2023, 2:33am UTC](https://discourse.julialang.org/t/mpi-collectives-e-g-mpi-allgatherv-scaling-issues/97129 "2023-05-15T02:33:10Z")

</div>

I found that MPI.Allgatherv! doesn’t scale well when testing it on a cluster. The plot above summarizes the execution time of MPI.Allgatherv! against the number of processes. The scaling shows in the plot doesn’t mat…

---

## [MPIClusterManagers task split across nodes](https://discourse.julialang.org/t/mpiclustermanagers-task-split-across-nodes/97983)

<div class="topic-metadata">

**Author:** [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Replies:** 2\
**Last updated:** [April 28, 2023, 2:02am UTC](https://discourse.julialang.org/t/mpiclustermanagers-task-split-across-nodes/97983 "2023-04-28T02:02:31Z")

</div>

Hi all, I’ve been using Julia on the cluster quite successfully with MPIClusterManagers.jl and MPI.jl with the MPIClusterManagers.start\_main\_loop(MPI\_TRANSPORT\_ALL) option and using native julia constructs after that su…

---

## [Reading binary file containing mixed data types](https://discourse.julialang.org/t/reading-binary-file-containing-mixed-data-types/96886)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 5\
**Last updated:** [March 31, 2023, 2:17pm UTC](https://discourse.julialang.org/t/reading-binary-file-containing-mixed-data-types/96886 "2023-03-31T14:17:48Z")

</div>

Hi, I am trying to read a binary file generated from eigenpair computation using the SLEPc library in C. I am using the following command: PetscViewerBinaryOpen(PETSC\_COMM\_WORLD, fvalname, FILE\_MODE\_WRITE, &viewer); EPS…

---

## [Is it possible to predict the serialized size of an object, without serializing it?](https://discourse.julialang.org/t/is-it-possible-to-predict-the-serialized-size-of-an-object-without-serializing-it/94769)

<div class="topic-metadata">

**Author:** [@cadaverous](https://discourse.julialang.org/u/cadaverous)\
**Replies:** 5\
**Last updated:** [February 24, 2023, 4:48am UTC](https://discourse.julialang.org/t/is-it-possible-to-predict-the-serialized-size-of-an-object-without-serializing-it/94769 "2023-02-24T04:48:18Z")

</div>

Hello all! I am pretty much brand new to Julia, and I am trying to write an interface between Julia and a C library that uses MPI. The problem I’m having is that the library needs to be able to pack Julia objects into a…

---

## [MPI and println inside imported modules](https://discourse.julialang.org/t/mpi-and-println-inside-imported-modules/95026)

<div class="topic-metadata">

**Author:** [@mesonepigreco](https://discourse.julialang.org/u/mesonepigreco)\
**Replies:** 4\
**Last updated:** [February 22, 2023, 3:57pm UTC](https://discourse.julialang.org/t/mpi-and-println-inside-imported-modules/95026 "2023-02-22T15:57:48Z")

</div>

Dear Juliawers, I’m using optimizing a function in julia which is parallelized using MPI. Each time I have to print something, I check if the rank is zero to avoid printing the text as many times as the number of proce…

---

## [How to use FluxMPI on slurm?](https://discourse.julialang.org/t/how-to-use-fluxmpi-on-slurm/94251)

<div class="topic-metadata">

**Author:** [@Emrick\_Liu](https://discourse.julialang.org/u/Emrick_Liu)\
**Replies:** 0\
**Last updated:** [February 8, 2023, 4:16am UTC](https://discourse.julialang.org/t/how-to-use-fluxmpi-on-slurm/94251 "2023-02-08T04:16:08Z")

</div>

Hi, I tried to use FluxMPI on Slurm, couldn’t figure out the configuration. Can anyone provide a minimum example? Currently, I’m basically doing something like this: #SBATCH --ntasks=3 export JULIA\_CUDA\_MEMORY\_POOL=no…

---

## [MPI.jl memory issue in a for-loop](https://discourse.julialang.org/t/mpi-jl-memory-issue-in-a-for-loop/91721)

<div class="topic-metadata">

**Author:** [@Carol](https://discourse.julialang.org/u/Carol)\
**Replies:** 3\
**Last updated:** [January 2, 2023, 11:01am UTC](https://discourse.julialang.org/t/mpi-jl-memory-issue-in-a-for-loop/91721 "2023-01-02T11:01:37Z")

</div>

Hi, At first I want to say thank you for maintaining MPI.jl package. I am using MPI inside a for-loop (for iteration=1:5000). At each iteration, all ranks will send its data to rank0 using MPI.Gatherv!, then rank0 will…

---

## [Using LinearMap with MPI.jl](https://discourse.julialang.org/t/using-linearmap-with-mpi-jl/91464)

<div class="topic-metadata">

**Author:** [@devanshu](https://discourse.julialang.org/u/devanshu)\
**Replies:** 5\
**Last updated:** [December 11, 2022, 6:34am UTC](https://discourse.julialang.org/t/using-linearmap-with-mpi-jl/91464 "2022-12-11T06:34:24Z")

</div>

Hi, I am finding difficulty in using LinearMaps while also trying to parallelize the code using MPI.jl. Actually, I am using ArnoldiMethod.jl in order to implement shift-invert diagonalization technique. The minimal co…

---

## [MPI.API.MPI\_Reduce\_scatter ERRORS](https://discourse.julialang.org/t/mpi-api-mpi-reduce-scatter-errors/90093)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 7\
**Last updated:** [November 15, 2022, 6:09am UTC](https://discourse.julialang.org/t/mpi-api-mpi-reduce-scatter-errors/90093 "2022-11-15T06:09:09Z")

</div>

From low-level API in MPI.jl, we know MPI.API.MPI\_Reduce\_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm) When I ran the code below with mpiexecjl -n 3 julia testReduce\_scatter.jl: # testReduce\_scatter.jl usi…

---

## [How to import low-level API in MPI.jl](https://discourse.julialang.org/t/how-to-import-low-level-api-in-mpi-jl/90086)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 5\
**Last updated:** [November 11, 2022, 2:16am UTC](https://discourse.julialang.org/t/how-to-import-low-level-api-in-mpi-jl/90086 "2022-11-11T02:16:15Z")

</div>

I wanted to use one of the low-level APIs MPI.API.MPI\_Reduce\_scatter from MPI.jl. But I failed to import it using using MPI: API or using MPI MPI.API.MPI\_Reduce\_scatter(...) Does anyone know how to use it?

---

## [Error handling in Julia with MPI -- how to catch errors?](https://discourse.julialang.org/t/error-handling-in-julia-with-mpi-how-to-catch-errors/89285)

<div class="topic-metadata">

**Author:** [@mrhardman](https://discourse.julialang.org/u/mrhardman)\
**Replies:** 0\
**Last updated:** [October 26, 2022, 8:58am UTC](https://discourse.julialang.org/t/error-handling-in-julia-with-mpi-how-to-catch-errors/89285 "2022-10-26T08:58:54Z")

</div>

I am part of a team developing a MPI physics code (mabarnes/moment\_kinetics (github.com). We have integrated shared memory MPI into the code using the MPI.jl package. I have been looking for documentation for how to tra…

---

## [\[WIP\] MPISort.jl - Distributed MPI Sorting Algorithms. Suggestions welcome!](https://discourse.julialang.org/t/wip-mpisort-jl-distributed-mpi-sorting-algorithms-suggestions-welcome/88730)

<div class="topic-metadata">

**Author:** [@anicusan](https://discourse.julialang.org/u/anicusan)\
**Replies:** 2\
**Last updated:** [October 14, 2022, 2:24pm UTC](https://discourse.julialang.org/t/wip-mpisort-jl-distributed-mpi-sorting-algorithms-suggestions-welcome/88730 "2022-10-14T14:24:34Z")

</div>

Hi all, It was with great horror that I discovered how non-trivial sorting N elements across P clusters without any one cluster being able to hold all elements at once was. Or maybe I’m just thick. Anyways, I only found…

---

## [How to distribute arrays part of struct with MPI (MPI.jl)](https://discourse.julialang.org/t/how-to-distribute-arrays-part-of-struct-with-mpi-mpi-jl/87305)

<div class="topic-metadata">

**Author:** [@verseve](https://discourse.julialang.org/u/verseve)\
**Replies:** 0\
**Last updated:** [September 15, 2022, 8:30am UTC](https://discourse.julialang.org/t/how-to-distribute-arrays-part-of-struct-with-mpi-mpi-jl/87305 "2022-09-15T08:30:32Z")

</div>

I am wondering what the best approach is to distribute arrays that are part of a struct with MPI. Example of such a struct (partly): @get\_units @with\_kw struct SBM{T,N,M} Δt::T | "s" maxlayers::Int | "-" n:…

---

## [How can I pass the pointer of MPI communicator to c function?](https://discourse.julialang.org/t/how-can-i-pass-the-pointer-of-mpi-communicator-to-c-function/87070)

<div class="topic-metadata">

**Author:** [@dora\_ho](https://discourse.julialang.org/u/dora_ho)\
**Replies:** 3\
**Last updated:** [September 11, 2022, 8:55pm UTC](https://discourse.julialang.org/t/how-can-i-pass-the-pointer-of-mpi-communicator-to-c-function/87070 "2022-09-11T20:55:51Z")

</div>

I have a c function that requires me to pass a comm pointer to the function I converted the function using Clang.jl showed below function Comm(comm\_handle) ccall((:Comm, librarypath), Cint, (Ptr{Cvoid}), comm\_hand…

---

## [Finalize for modules?](https://discourse.julialang.org/t/finalize-for-modules/86934)

<div class="topic-metadata">

**Author:** [@sfuerst](https://discourse.julialang.org/u/sfuerst)\
**Replies:** 1\
**Last updated:** [September 8, 2022, 11:33am UTC](https://discourse.julialang.org/t/finalize-for-modules/86934 "2022-09-08T11:33:22Z")

</div>

I’m working on a package that is using MPI in the background, and are calling MPI.Init() in the modules init function. But I have no idea how I can detect that the module is unloaded (or the Julia session is finished) to…

---

## [How to load ScaLAPACK library from Intel MKL (library inter-dependencies)?](https://discourse.julialang.org/t/how-to-load-scalapack-library-from-intel-mkl-library-inter-dependencies/81239)

<div class="topic-metadata">

**Author:** [@Sideboard](https://discourse.julialang.org/u/Sideboard)\
**Replies:** 4\
**Last updated:** [August 22, 2022, 8:23am UTC](https://discourse.julialang.org/t/how-to-load-scalapack-library-from-intel-mkl-library-inter-dependencies/81239 "2022-08-22T08:23:42Z")

</div>

Hi, I am trying to use ScaLAPACK with @ccall to solve a linear system with QR decomposition. On my laptop it works fine with OpenMPI and directly searching for the default ScaLAPACK library: const libscalapack = Base.L…

---

## [Performance of PencilFFTs with CuArray](https://discourse.julialang.org/t/performance-of-pencilffts-with-cuarray/84569)

<div class="topic-metadata">

**Author:** [@Lightup1](https://discourse.julialang.org/u/Lightup1)\
**Replies:** 1\
**Last updated:** [July 21, 2022, 6:49am UTC](https://discourse.julialang.org/t/performance-of-pencilffts-with-cuarray/84569 "2022-07-21T06:49:54Z")

</div>

Performance issue on PencilFFTs with CuArray CuArray Performance · Issue #56 · jipolanco/PencilFFTs.jl (github.com) Post here to find more tests. Code example: CUFFT: using CUDA using FFTW using BenchmarkTools prin…

---

## [Error in bulid MPI](https://discourse.julialang.org/t/error-in-bulid-mpi/43948)

<div class="topic-metadata">

**Author:** [@Ke\_Gao](https://discourse.julialang.org/u/Ke_Gao)\
**Replies:** 4\
**Last updated:** [July 20, 2022, 6:38pm UTC](https://discourse.julialang.org/t/error-in-bulid-mpi/43948 "2022-07-20T18:38:41Z")

</div>

Hi, I had an error when I built MPI on my MacBook: (@v1.4) pkg\> build MPI Building MPI → \`~/.julia/packages/MPI/k7f4E/deps/build.log\` ┌ Error: Error building \`MPI\`: │ \[ Info: using system MPI │ ERROR: LoadError: li…

---

## [Error building MPI---ERROR: LoadError: libmpi could not be found](https://discourse.julialang.org/t/error-building-mpi-error-loaderror-libmpi-could-not-be-found/65016)

<div class="topic-metadata">

**Author:** [@QuanlingDeng](https://discourse.julialang.org/u/QuanlingDeng)\
**Replies:** 3\
**Last updated:** [July 20, 2022, 5:54pm UTC](https://discourse.julialang.org/t/error-building-mpi-error-loaderror-libmpi-could-not-be-found/65016 "2022-07-20T17:54:40Z")

</div>

I was trying to build MPI and had the following error (after several searches/tries, see below) (@v1.6) pkg\> build MPI Building MPI → ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/00488c6fcaf828685c2bc513…

---

## [Parallel HDF5 crashing on build](https://discourse.julialang.org/t/parallel-hdf5-crashing-on-build/80135)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 1\
**Last updated:** [May 2, 2022, 12:07pm UTC](https://discourse.julialang.org/t/parallel-hdf5-crashing-on-build/80135 "2022-05-02T12:07:31Z")

</div>

I am using a MPI-enabled HDF5 and suddenly calling up from the Julia package manager fails with ERROR: Error building \`HDF5\`: signal (11): Segmentation fault: 11 in expression starting at /Users/chiel/.julia/packages/…

---

## [How to use MPI.jl to scatter a matrix to a 2D processor grid?](https://discourse.julialang.org/t/how-to-use-mpi-jl-to-scatter-a-matrix-to-a-2d-processor-grid/80013)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 1\
**Last updated:** [April 25, 2022, 11:24pm UTC](https://discourse.julialang.org/t/how-to-use-mpi-jl-to-scatter-a-matrix-to-a-2d-processor-grid/80013 "2022-04-25T23:24:58Z")

</div>

For example, I have a 5 by 5 matrix A = \[1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2 ,3 ,4, 5\] and I want to scatter A to four processors like \[2,3; 4, 5\]. More precisely, I want to broadcast \[1,2…

---

## [ParallelStencil w/MPI](https://discourse.julialang.org/t/parallelstencil-w-mpi/79077)

<div class="topic-metadata">

**Author:** [@wkharold](https://discourse.julialang.org/u/wkharold)\
**Replies:** 2\
**Last updated:** [April 6, 2022, 9:41am UTC](https://discourse.julialang.org/t/parallelstencil-w-mpi/79077 "2022-04-06T09:41:47Z")

</div>

Is the CPU parallelism in the ParallelStencil.jl Concise single/multi-XPU miniapps limited to threads, or since it’s built on/with ImplicitGlobalGrid can it do MPI as well? I don’t see anything that looks like MPI suppo…

[Previous page](https://discourse.julialang.org/tag/mpi/170.md?match_all_tags=true&tags%5B%5D=mpi)

[Next page](https://discourse.julialang.org/tag/mpi/170.md?match_all_tags=true&page=2&tags%5B%5D=mpi)
