Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [mpi]

Message Passing Interface - a standard and highly portable parallel programming interface for distributed memory systems.

Filter by
Sorted by
Tagged with
1 vote
1 answer
61 views

Segmentation fault when broadcasting FFTW wisdom with MPI

I tried to use the wisdom gather / broadcast feature of FFTW with MPI, but can't get it to work. The following program is a combination of the MPI example from Section 6.3 of the FFTW manual and the ...
2 votes
1 answer
55 views

Passing a `MPI_Request*` to the send/recv functions

Below are two ways of writing what is seemingly (to me at least) exactly the same thing: ...
2 votes
0 answers
62 views

Losing memory on each call to scalapack solve function

I am solving a large system of equations using scalapack. Some systems that should run with no problem failed, apparently due to lack of memory in an mpi call. After investigating with ...
0 votes
2 answers
99 views

How to define a global index from local index and rank in parallel computing

Suppose I have 4 processes and each process has $n_i, i=0,1,2,3$ elements. In particular, with rank $0$, we have loc indices list $[0,1,\ldots, n_{0}-1]$ and $1$, we have loc indices list $[0,1,\ldots,...
1 vote
1 answer
253 views

How does a blocking MPI all to all synchronization work?

I was trying to understand more in detail how a blocking MPI all to all really work. Of course, the actual all to all traffic is pretty straightforward, what I can't understand is how it is able to &...
2 votes
1 answer
338 views

All eigenpairs of large sparse symmetric matrix

In advance I am sorry for my noobish question. I am a physics PHD student and basically I use python for my math/physics problems. But now I have a problem which requires more computing capacity and ...
3 votes
1 answer
2k views

Recommended CPU for CFD running parallel, FDS (Fire Dynamics Simulator)

I am purchasing a new workstation to run FDS (Fire Dynamics Simulator) simulations, a CFD code for thermally driven fluid flow. Currently, I am using an Ubuntu Linux build with a Xeon E5-2630 v3 @ 2....
5 votes
2 answers
651 views

Direct solvers and domain decomposition for FEM

In the finite element method, in order to use MPI, we need to decompose the domain into sub-domains first. Then my question is whether we can solve each sub-domain using a direct solver? Of course, ...
18 votes
1 answer
2k views

How to Run MPI-3.0 in shared memory mode like OpenMP

I am parallelizing code to numerically solve a 5 Dimensional population balance model. Currently I have a very good MPICH2 parallelized code in FORTRAN but as we increase parameter values the arrays ...
6 votes
1 answer
774 views

Causes for different results for different number of nodes in MPI

I am trying to develop what might be called legacy Fortran code from my group. Upon testing, I found that the program (which takes about a day to run on 20 processes) works when run on a single node (...
2 votes
1 answer
114 views

MPI vs OPENMP usage for boundary element method

I have an implementation question with MPI and OPENMP. I have a large three-dimensional surface mesh divided into elements. I want to loop over each element (outer loop) and compute an integral over ...
8 votes
3 answers
8k views

Should I pass command line arguments to MPI_Init or not?

When writing MPI 3.0 code, should I pass argc and argv to the MPI_Init call or not, and why? ...
1 vote
2 answers
296 views

Affecting parts of an array outside MPI process efficiently

This was originally asked on Stackoverflow but instead of migrating it was suggested I repost here and delete that one. I've tried to clarify based on comments there. I'm new to MPI, but I am trying ...
0 votes
2 answers
467 views

Passing in user inputs with mpirun

I am building a quantum circuit simulator using mpi4py. The simulator takes user inputs to build the initial system and quantum gates the system passes through. I can get the code to work if I do not ...
0 votes
1 answer
207 views

MPI_Test not progressing MPI_Isend/MPI_Irecv requests

I am running a CFD simulation with a 200,000-vertex mesh. I've decomposed the mesh into 2 load-balanced sub-domains to test my parallel implementation. In the specific function that I am time-...
0 votes
3 answers
649 views

Parallel output in ASCII-format with MPI

After some parallel computations, I need to write the results in a file and for plotting reasons, I want them in ASCII format. Because of performance issues, I want to avoid to ...
2 votes
2 answers
131 views

Petsc Mat object in class

[Relatively new to Petsc] I am writing an object oriented project and my idea is to have parallel objects when the user constructs the object with MPI arguments. So have member data Mat and fill/...
4 votes
4 answers
2k views

CPU usage when a MPI rank waits during a blocking communication

A typical way of dealing with I/O in MPI parallel programs is to either read all data to a single node and dispatch to the other nodes accordingly, or send all data to a single node and write from ...
2 votes
1 answer
122 views

FFTW on subarray with MPI

With the guru interfaces of FFTW, I can apply transforms only to parts of a multidimensional array by modifying the fftw_iodim ...
1 vote
1 answer
165 views

C++ - Starting paraller instances of an executable from a C++ code

Can I start parallel run of LAMMPS from inside a C++ code. Is it possible to compile my code and then do mpirun with my compiled code. I also have one system command inside the code, which starts ...
14 votes
3 answers
5k views

Why would you need frameworks like MPI when you can multi-task using threads?

MPI is an interface which enables us to create multiple processes to be run on a single machine or on a cluster of machines, and enables message passing or in short sorts of communication between ...
30 votes
5 answers
2k views

What features do users need from an MPI C++ interface?

The 3.0 version of the MPI standard formally deleted the C++ interface (it was previously deprecated). While implementations may still support it, features that are new in MPI-3 do not have a C++ ...
0 votes
0 answers
150 views

Petsc matrix with DM objects takes too much memory

I have been learning petsc recently and made a simple solver for stokes equation on 3D staggered grid. My code is running on server with 200GB ram, but if I run a solver on 256^3 grid, memory used by ...
1 vote
1 answer
111 views

How to compute the mean 2D slice of a 3D set of data in MPI

I have a 3D set of data v(i,j,k), and I want to compute the mean 2D slice vmean(i,j) summing up the ...
0 votes
1 answer
189 views

Why PETSc/MPI uses only 1 processor a number of times, rather than using several as prescribed by mpiexec [closed]

I am a beginner to PETSc and MPI, so after installing PETSc I was compiling some basic tutorial. But whenever I give the number of processors i.e mpiexec -n 4 ./ex1 ...
16 votes
2 answers
2k views

Boost::mpi or C MPI for high performance scientific applications?

The thing I dislike most about MPI is dealing with datatypes (i.e. data maps/masks) because they don't fit that nicely with object oriented C++. boost::mpi only ...
2 votes
1 answer
141 views

Send Petsc sequential matrix to another MPI rank

I am doing specific tests on matrices, so forgive me if this question doesn't seem related to Petsc typical use. I have a SEQAIJ matrix on one process and I need ...
2 votes
0 answers
46 views

Best way of porting code from the GPU to MPI-nodes

I have a program, structured in two parts, $A$ and $B$. Both parts are capable of running as standalone units, and written in C++. $A$ is written for cluster systems, running entirely on CPU-nodes, ...
2 votes
1 answer
3k views

Why my parallel code using MPI is much slower than the serial one?

I know that is not the first time someone asks this question but I'm really confused.I'm new to MPI, and I tried to implement the Jacobi solver for a linear system $Ax=b$. I want to compare the time ...
3 votes
1 answer
380 views

MPI support for discrete Fourier transform (DFT) in Python

I am looking for a discrete Fourier transform (DFT) library that can be run with MPI on Python. Usually, in other languages (C, Fortran) FFTW is used. There's a Python wrapper for FFTW called pyFFTW, ...
1 vote
2 answers
219 views

MPI data broadcast or not in C

I have two slightly different but getting the same results MPI code. The first one is from an open-source package having several data exchange steps in between: ...
1 vote
2 answers
88 views

Guaranteed equality between binary results with increasing MPI processes

Testing on an MPI scientific code for compressible flow dynamics I noticed that the results may depend on the number of processors used for the calculation. In fact, comparing the binary files they ...
1 vote
1 answer
345 views

Is there an implementation of MPI_AllReduce which handles sparse data better?

I need to synchronize intermediate solutions of an optimization problem solved distributively over a number of worker processors. The solution vector is known to be sparse. I have noticed that if I ...
0 votes
2 answers
268 views

Halo Region Communication in Unstructured Mesh Problems

I'm currently using ParMETIS and it is required to determine the halo region of the local elements in a parallel unstructured mesh. Assume that the mesh is large and cannot be stored on a single ...
3 votes
3 answers
194 views

Writing a parallel version of an algorithm. Only which someparts are worth distributing

Say if I wanted to parallelise an algorithm. Only certain parts of this algorithm can be parallelised. The other parts are trivial and not worth distributing. Do I do all of these trivial calculations ...
0 votes
2 answers
677 views

How do I interpret the results from MPI_Wtime()?

Say, I have this code double start = MPI_Wtime(); ParallelMatrixVectorProductRotuine(...); double end = MPI_Wtime(); How do I interpret the numbers I am getting. ...
3 votes
4 answers
13k views

When is MPI_Wait necessary for non-blocking calls?

I hope this is not too off-topic here -- I've asked it on SO but I'm hoping I'll get better answers here! I'm a little bit confused about when I should call MPI_Wait (or other variants such as: ...
1 vote
2 answers
289 views

MapReduce with MPI question

I am doing an exercise using MPI to count frequencies of words distributed in several different files following similar steps in this instruction. But I met a problem with step 2. In my ...
7 votes
3 answers
700 views

C - OpenMP, MPI, Serial Program

I'm part of a Computational Science course and come from a non-programming background, so please forgive me my ignorance. I'm working on a set of code in C to numerically solve the Navier Stokes ...
2 votes
2 answers
1k views

How does MPI differentiate between two computers?

I am starting to dabble in MPI. I am fairly new to this area and I am currently reading the MPI standard. I would like to write my first MPI program, a simple hello world program, on a cluster that ...
2 votes
1 answer
762 views

Distributed (MPI) matrix matrix multiplication

I perform matrix matrix multiplications (between rank-3 and rank-2 arrays) in fortran using following subroutine, ...
4 votes
0 answers
222 views

Can I MPI_Test for an Ibarrier

In this code, all processes post a barrier, sleep a while for good measure, then first Test and then Wait for the barrier. The <...
3 votes
0 answers
1k views

total memory usage of MPI shared memory

I am trying to use the MPI share memory feature. I have several SMP nodes, and each of them has four cores. I need an array of size N for each node that should be accessed by all four cores in each ...
0 votes
1 answer
668 views

FFT parallel processing in MPI

I am working now in Beowulf Cluster and parallel processing, I want code for Fast Fourier transfer functions written in any language, e.g., C/C++. Without using FFTW library based on message passing ...
0 votes
1 answer
371 views

setting COMM_WORLD size from petsc4py without mpiexec command line

I would like to create a parallel solver using petsc4py as one component of a larger application. I can easily get PETSc.COMM_WORLD.getSize() to be 4 by calling mpiexec -n 4 python my_prog.py ...
0 votes
1 answer
464 views

Debugging in parallel mode using Netbeans

I want to debug a c++ code with Netbeans. I can use the debugger in sequential mode but I dont know how to debug it when I want to run it in parallel. I would be grateful if anyone help me on this ...
0 votes
2 answers
513 views

efficient MPI collective non-blocking communication

I am facing a problem with MPI (Fortran). I have a really big matrix at each node and they differ at different nodes. At some point of my calculations, each node needs the matrix from all other nodes, ...
1 vote
1 answer
2k views

General understanding of Intel MKL, threads and MPI

Preface I seem to lack a fundamental understanding of best practise recommendations given by Intels MKL user guides for using MKL in threaded applications. So let's clarify it together. Wording and ...
8 votes
4 answers
8k views

What is an efficient way of notifying MPI processes of receiving messages?

In MPI, is there any built-in mechanism to notify a group of processes that they need to receive messages from other processes? In my application every process ...
11 votes
2 answers
7k views

How does the computational cost of an mpi_allgather operation compare with a gather/scatter operation?

I'm working on a problem that can be parallelized by using a single mpi_allgather operation or one mpi_scatter and one mpi_gather operation. These operations are called within a while loop, so they ...