Questions tagged [mpi]

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

Filter by
Sorted by
Tagged with
18
votes
1answer
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 ...
5
votes
1answer
223 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 (...
1
vote
1answer
73 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
3answers
7k 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
2answers
101 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
2answers
58 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
1answer
44 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
3answers
403 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
2answers
106 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
4answers
1k 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
1answer
92 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
1answer
155 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
3answers
3k 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
5answers
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
0answers
79 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
1answer
52 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
1answer
61 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
2answers
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 ...
1
vote
1answer
69 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
0answers
42 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
1answer
1k 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
1answer
313 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
2answers
169 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
2answers
81 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
1answer
319 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
2answers
196 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
3answers
190 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
2answers
351 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
4answers
11k 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
2answers
239 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
3answers
605 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 ...
1
vote
2answers
831 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
1answer
586 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
0answers
147 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
0answers
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
1answer
590 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
1answer
308 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
1answer
432 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
2answers
478 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
1answer
1k 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
4answers
7k 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
2answers
6k 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 ...
2
votes
5answers
2k views

c++ Libraries for large linear system of equations

I am looking for libraries for solving large scale linear system (10e5) of equations using parallelization and shared memory. 1. Sparse, complex symmetric, SPD. 2. Suitable for higher order FEM ,...
1
vote
0answers
157 views

MPI_Finalize() only some processors

I want to develop a distributed algorithm with MPI which have load balancing capability. But there is a situation that I'm not very clear about, which is, when the number of tasks is less than the ...
2
votes
2answers
463 views

Direct Solver and domain decomposition

In 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, unlike ...
2
votes
3answers
522 views

MPI in C, all processor run outside of the MPI envir created

I am new to MPI and am trying to figure out the subtleties in it, and for that reason I am just playing around with an easy example. The question I have is that when I run the code below with 2 ...
1
vote
0answers
210 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 ...
0
votes
1answer
170 views

checksum of a distributed variable

Let say I have N computers and 2 N-by-N matrices distributed across them called A and B. Matrix A is row distributed while B is column distributed. Therefore, processor i knows ...
2
votes
3answers
476 views

State of the art in parallel data structures [closed]

I'm currently evaluating how I could implement several algorithms on a parallel computer with a large number of nodes, each also equipped with a powerful GPU. It turns out that for many algorithms, it ...
2
votes
0answers
69 views

Under what circumstances does Elemental's distributed SVD not work? [closed]

I am playing around with Elemental's distributed singular value decomposition and am running into two particular issues. Building the test at tests/lapack_like/SVD.cpp, and running with ...