Questions tagged [mpi]

MPI is the Message Passing Interface, a library for distributed memory parallel programming and the de facto standard method for using distributed memory clusters for high-performance technical computing. Questions about using MPI for parallel programming go under this tag; questions on, eg, installation problems with MPI implementations are best tagged with the appropriate implementation-specific tag, eg MPICH or OpenMPI.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
18 views

MPI Logistic Regression wrong weights

I am adapting the logistic regression offered by Spark (https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala) in a personal ...
Tutu ツ's user avatar
1 vote
1 answer
18 views

How to build h5py with MPI support (against Parallel HDF5) on Linux, 2023

I'm reproducing a deep-learning model on a linux server, which uses h5py to process data. However, following error occurs: Traceback (most recent call last): File "...", line ..., in ... ...
JamesNULLiu's user avatar
0 votes
0 answers
14 views

Recommended way of passing instructions to processes in MPI?

Suppose I want to use MPI for simulating vector clocks. I initially wanted to make a file that specificied the behavior of the system: 4 # number of processes 10 # number of actions # ...
Pedro Vinícius's user avatar
-1 votes
0 answers
26 views

MPI failing to run in HPC with unknown BTL MTL error

I am trying to run a simply python code using mpi4py. I am using openmpi version 4.1.2 and mpi4py version 3.1.4. However, I am facing the following issue. The sample code that I am trying to run using ...
Vinayak Huggannavar's user avatar
-1 votes
1 answer
45 views

Why my MPI program doesn't wait for input?

I wrote a solution code for the following simple task via MPI. Here it's statement: In processes of even rank (including the main one) enter an integer number. In processes of odd rank enter an ...
Oleg's user avatar
  • 33
0 votes
1 answer
17 views

find_package(MPI REQUIRED) is not locating the right mpi

I have find_package(MPI REQUIRED) in my CMakeLists.txt. And there are two versions of mpi installed. /opt/hpcx/ompi/lib; /usr/local/mpi/lib; Everytime I run CMake, it choose /opt/hpcx/ompi/lib. -- ...
flexwang's user avatar
  • 625
0 votes
1 answer
33 views

SLURM: Run two MPI jobs with different settings on same set of nodes

I have a slurm batch script, and I'm running Intel MPI. I want to run two different MPI codes on the same set of nodes with different process placement configurations. I'm running two MPI codes, one ...
dk619's user avatar
  • 11
0 votes
0 answers
47 views

Segmentation Fault When Sending Arrays Over a Certain Size with Open MPI

I am writing a program to run with an ifiniband and intel-based cluster using openmpi, pmix, and SLURM scheduling. When I run my program on the cluster with an input matrix over 38x38 on each node, I ...
Another Shrubbery's user avatar
0 votes
1 answer
78 views

nested parallelism by using only MPI

program main implicit none include "mpif.h" integer nproc,rank,ierr,a(4),ll,i,j call MPI_INIT(ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD,nproc,ierr) call MPI_COMM_RANK(...
quantax's user avatar
  • 11
0 votes
0 answers
33 views

What's the most efficient way to use MPI RDMA in read-only?

I'm currently dealing with a situation which should be really fast to handle with MPI one-sided communications, but I'm struggling to find similar examples and I'm not sure to have made the optimal ...
Antoine Motte's user avatar
0 votes
0 answers
22 views

How to replace MPI_Bcast with GPU-to-GPU broadcasting using NCCL

I would like to optimize MPI broadcast call for GPU-to-GPU communication. All I want to do is to replace the MPI_Bcast call with ncclBcast, but I need to create a NCCL communicator that uses ...
Y N's user avatar
  • 811
0 votes
0 answers
22 views

Slurm not launching multiple tasks within multiple nodes

I have to run several tasks across multiple nodes using slurm. Example: I have 120 tasks, to run in 3 nodes, each capable of running 32 tasks at a time. I created a list with the input files. I would ...
Dr. No's user avatar
  • 156
0 votes
0 answers
26 views

MPI-IO writing to disk with MPI_File_write_at_all or MPI_File_write_all misunderstandings?

I am trying to write data to disk from a buffer in C++ using MPI-IO. For concretness and MWE, each rank holds 2 ints in its buffer. I want that rank 0 writes its 2 elements in the file first occupying ...
velenos14's user avatar
  • 534
0 votes
0 answers
33 views

MPI in C++ datatypes misunderstandings

I developed a C++ code which uses MPI. I compile with C++17. I am trying to use MPI-IO to save the data to disk at the end of the program. I realized that I am not using MPI-IO correctly, as the data ...
velenos14's user avatar
  • 534
-2 votes
0 answers
12 views

MPI receive is getting messages not meant for it

On process 1 I am calling request = self.comm.isend(message, dest=2) status = MPI.Status() message_ready = self.comm.Iprobe(source=MPI.ANY_SOURCE, status=status) if message_ready: message = self....
joethemow's user avatar
  • 1,641
0 votes
0 answers
35 views

Simple MPI program hangs

I'm trying to use mpi to calculate every number that fulfilles some certain requirement by brute force trying. It runs fine when I only run one process, but when I try and run multiple processes, it ...
kinggoid games's user avatar
0 votes
0 answers
46 views

Why are my SLURM tasks allocated to two nodes at the same time?

I have 4 independent tasks that require 16 cores each (because each task calls mpirun -n 16), and each of my nodes has 32 cores. I would like to run the 4 tasks in parallel with the same sbatch ...
Pablo's user avatar
  • 1
0 votes
1 answer
66 views

ld cannot find -lmpi when building Valgrind from source

I'm trying to build Valgrind 3.21.0 from source, I downloaded the archive here and followed the instructions in the README : Run ./configure Run "make" Run "make install", ...
Antoine Motte's user avatar
0 votes
0 answers
28 views

Srun only launching one process

I am trying to run a job using slurm, but the srun is only launching 1 process, the job script I am using is below #!/bin/bash #SBATCH -N 1 #SBATCH -p RM #SBATCH -t 00:01:00 #SBATCH --ntasks-per-node=...
Sap BH's user avatar
  • 81
0 votes
1 answer
33 views

MPI_Put seg fault with multiple processes

I am working on a program to learn MPI one-sided communication. In the program, each process receives a local array with N key,value pairs. The local N can vary, so each process can have a different ...
coffeeanddonuts's user avatar
-1 votes
1 answer
66 views

How to calculate sum of all averages in the root process, local averages received from other processes in MPI programming?

The problem statement given is to Write a MPI program (using C) to read an integer value M and NXM elements into an 1D array in the root process, where N is the number of processes. Root process sends ...
dev0419's user avatar
  • 49
0 votes
1 answer
20 views

Find the exact size of the MPI envelope

In the MPI Forum it says The message envelope would normally be encoded by a fixed-length message header. However, the actual encoding is implementation dependent. How can I find the size of the ...
David's user avatar
  • 55
0 votes
1 answer
19 views

MPI ring_c not working on Singularity Container

I installed openmpi 4.1.2 and mpich 4.1.2 on a Ubuntu Bionic Singularity container. They install fine, and I compile the ring_c from the test scripts and at first glance things work. I tested that I ...
Astro.Bacon's user avatar
0 votes
2 answers
104 views

MPI scatterv crashing for large N occasionally

I have my simple MPI fortran code as below. The code crashes with error forrtl: severe (174): SIGSEGV, segmentation fault occurred. I am not sure where the mistake is. The weird thing I notice here is ...
researcher_sp's user avatar
1 vote
0 answers
20 views

mpirun is causing data leaks in my python process manager. I have bricked 2 supercomputer nodes

This is my first post on here, so bear with me. I am running Quantum Espresso (pw.x in this case) on my university cluster on only 1 node in this case, with setup conditions given at the bottom. I am ...
Don_Augusto's user avatar
0 votes
0 answers
83 views

MPI comunication between C++ and Fortran

I have a simple question: do I need a special method for communicating between a C program and a Fortran program via MPI? To be specific, the C program is the parent, and the Fortran program is the ...
San Kim's user avatar
  • 177
0 votes
1 answer
15 views

which mode is better when optimize matrix mul vector with mpi? size>6000

normally when dealing with matrix a[size][size] mul vector b[size], nump = the number of processors. which way below is better? case 1: Divide matrix A into "nump" parts, each with "...
lazyyy's user avatar
  • 1
0 votes
0 answers
17 views

How to use mpirun without any process listening 0.0.0.0

I have to disable the behavior of listening to 0.0.0.0 when I use OpenMPI to run python code parallel in paralell. How should I set the param of mpirun command? I have tried btl_tcp_if_exclude and ...
sihaixianyu's user avatar
0 votes
0 answers
46 views

C - MPI: how to transpose a pseudo-2D array, already scattered across processes?

I reached a point in my code-development at which a vector called arr of length (N_r * N_theta * N_phi) which "represents" a 3D tensor called ten of shape (N_rs, N_thetas, N_phis) is split ...
velenos14's user avatar
  • 534
0 votes
2 answers
64 views

MPI_Bcast returns EXIT CODE: 139 on large char arrays

I would appreciate, if you could help me troubleshoot the following situation. I broadcast (on localhost) a char array in 2 consecutive steps: MPI_Bcast the size of the array MPI_Bcast the array ...
user1221647's user avatar
0 votes
1 answer
59 views

VScode configuration for MPI arguments

I am trying to set up my VScode debugger on Linux for C++ programs using mpi. While compilation and running works fine, I struggle to make the debugger add the command line arguments in the case of ...
reloh100's user avatar
0 votes
0 answers
22 views

call a function so that it runs in the context of the main function in mpi?

I want to call a function when using MPI, usually, the function would run on each process independently, so I have to split the data in the main function. But what if I want the code in the called ...
Jack's user avatar
  • 1,114
0 votes
0 answers
40 views

Julia: Write HDF5 in MPI mode for both distributed (MPI) and non-distributed data

I'm an experienced user of both HDF5 and MPI and I'm relatively new to Julia. In other languages, I would open a file sequentially, 1 processor at a time, and append a hyperslab where each proc's data ...
TheWhitestOfFangs's user avatar
0 votes
0 answers
35 views

project.exe ended prematurely and may have crashed. exit code 0xc0000005

I have the TSP (Traveling Salesman Problem) which I am trying to solve in parallel using MPI (Message Passing Interface). I am attempting to apply the Work-Stealing algorithm to it. This is the Part ...
Batoul Alhaik's user avatar
0 votes
0 answers
88 views

ERROR: Failed building wheel for mpi4py, Could not build wheels for mpi4py which use PEP 517 and cannot be installed directly

I am trying to install packages for a project in conda environment. I have issues in building wheel for mdp4py package. The package is installed but couldnt build a wheel for it. The error code is too ...
HARSH DEVMURARI's user avatar
0 votes
0 answers
42 views

python subprocess.call() can not run on multiple nodes in pbs system?

My aim was to use the pbs qsub command to run a python script. I allocated 2 nodes in the pbs script "#PBS -l nodes=cu25:ppn=32+cu26:ppn=32", and hopes the "subprocess.call(command)&...
zihao jiao's user avatar
0 votes
1 answer
48 views

How to Debug an MPI Algorithm in Fortran

I am testing this algorithm (Gridpoint Statistical Interpolation, which has ended its support) and have been following its online tutorial, specifically case 9. As a sort of summary for the algorithm, ...
magus_e's user avatar
  • 31
0 votes
1 answer
55 views

Julia + MPI: running a function (such as println) one processor at a time, one by one

Here is a function I made with the intent to run a function func with arguments inputs across all processors, one by one. This is mostly geared towards println by order, but not limited to. Edit: I ...
TheWhitestOfFangs's user avatar
0 votes
0 answers
83 views

NCCL WARN Cuda failure 'invalid device function' and 'invalid device ordinal'

Environment: Framework: TensorFlow Framework version: 2.4.0 Horovod version: 0.25.0 MPI version: 4.0.0 CUDA version: 11.0 NCCL version: 2.8.3 Python version: 3.6 OS and version: Ubuntu 18.04 GCC ...
Jiangling Yu's user avatar
0 votes
1 answer
26 views

Julia: using workers(), procs(), etc. inside a module

I stumbled across something strage: the various ClusterManagers functions and operations, such as workers(), nworkers(), procs(), nprocs(), etc. work fine when run a code, unless it's inside a module. ...
TheWhitestOfFangs's user avatar
0 votes
0 answers
82 views

Using MPI4PY on multiple nodes

As the title states I am trying to run a python program on multiple nodes. I have started by trying to run a hello world script. from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() ...
Jacob Trejo's user avatar
1 vote
0 answers
41 views

mpi does not work without internet connection

I am using MacBook Air (M2,2022) to run the codes with Rmpi and doMPI in R. However, without wifi connection, I got Error in mpi.comm.spawn(slave = rscript, slavearg = args, nslaves = count, :...
yrq's user avatar
  • 11
0 votes
0 answers
44 views

Can I use MPI_FILE_WRITE_ALL when some processors do not write any data?

I am modifying a colleague's subroutine to write a subset of 3D Cartesian data to a single binary file. The data comes from high fidelity fluid simulations that span multiple processors written in ...
StillUsesFORTRAN's user avatar
0 votes
1 answer
18 views

MPI behavior when building MPI_Group/MPI_Comm with ranks=[0,0]?

I'm trying to understand what would be the behavior of an MPI implementation (mine is OpenMPI 4.1.0) dictated by the MPI standard of this code : #include <iostream> #include <mpi.h> int ...
Thibault Cimic's user avatar
0 votes
0 answers
31 views

mpi “for UD mlx5 connect on mlx5_0 failed: No such device”

mpi error is below [1689646357.071467] [05af046533e9:124545:0] ib_device.c:1466 UCX ERROR ibv_create_ah(dlid=49152 sl=0 port=1 src_path_bits=0 dgid=fe80::1270:fdff:fe44:5170 sgid_index=0 ...
sofkrl2022's user avatar
0 votes
1 answer
35 views

Use of MPI::MPI_C alias

I am building ScaLAPACK (commit 7e4e07070a489686287c36ab473d21cf29a54bdd) using CMake (version 3.20.1). The find_package utility is used in CMakeLists.txt to define the libraries, inclusion ...
gkaf's user avatar
  • 82
0 votes
0 answers
36 views

mpi4py - Reading lines of a file in loop

This question complements another question that I have posted earlier: mpi4py - Slow file read-write in parallel For context, I am trying to read the contents of a file in parallel by scattering the ...
nish-ant's user avatar
  • 119
0 votes
0 answers
15 views

hybrid MPI-OpenMP job directive with LSF

I am running the WRF-ARW code that seems to have the best performances when compiled and run in hybrid MPI-OpenMP execution. I am working on a Lenovo cluster with 36 cores per node, managed by the LSF ...
Francesco Maicu's user avatar
0 votes
0 answers
83 views

Undefined behavior for sending a std::vector<object of user-defined class> in MPI

Following tutorials over registering a new type of MPI, I've registered my simple class of having two members using MPI_Type_create_struct. The problem is that if the size of std::vector grows to ...
MA19's user avatar
  • 510
0 votes
0 answers
21 views

MPI: send a vector differently populated in each rank to all other ranks

I want to communicate data living in a process to all processes, for each process in the MPI pool. Schematically, in pseudocode: int main() { MPI_Init(); vector = new empty vector of length ...
velenos14's user avatar
  • 534

1
2 3 4 5
140