mpi

Test MPI_Barrier C++

Dear all, How can I be sure that MPI_Barrier act correctly? What's the method of test for that? Thank you ...

Is there a standard library implementation of MPI inverse matrix calculation problem?

Is MPI implementation of matrix inversion a standard library routine or good MPI implementation critically depends on your setup(software/hardware) so have to be coded by yourself. ...

From OpenMP to MPI

Hi, I just wonder how to convert the following openMP program to a MPI program #include <omp.h> #define CHUNKSIZE 100 #define N 1000 int main (int argc, char *argv[]) { int i, chunk; float a[N], b[N], c[N]; /* Some initializations */ for (i=0; i < N; i++) a[i] = b[i] = i * 1.0; chunk = CHUNKSIZE; #prag...

How to speed up this problem by MPI

Hi, (1). I am wondering how I can speed up the time-consuming computation in the loop of my code below using MPI? int main(int argc, char ** argv) { // some operations f(size); // some operations return 0; } void f(int size) { // some operations int i; d...

How to debug MPI application under Windows?

I have MPI program which I want to debug. I use mpich 2 under Windows, so does anybody know tools that can help me? Is it even possible? ...

Passing variable-length structures between MPI processes

I need to MPI_Gatherv() a number of int/string pairs. Let's say each pair looks like this: struct Pair { int x; unsigned s_len; char s[1]; // variable-length string of s_len chars }; How to define an appropriate MPI datatype for Pair? ...

MPI Fortran Code Problem

I'm trying to run this MPI Fortran code. There are several problems: 1) when I run this code I expect the program to write 'Enter the number of intervals: (0 quits) ' to screen then ask me n. Instead it asks me n first!!! why? 2) if I don't comment out the line 'goto 10', the program keeps asking me n for ever and does not show me anyt...

What is the best tutorial for learning MPI for C++?

Hi, I plan to use MPI for my C++ code. I have installed MPICH2 on my computers. But I do not know much about MPI and hope to find some materials to read. I hope you experts can recommend some good materails to me. Any advice will be appreciated. ...

Running MPI code in my laptop

Hello everybody, I am new to parallel computing world. Can you tell me is it possible to run a c++ code uses MPI routines in my laptop with dual core or is there any simulator/emulator for doing that? Thank you. SRec ...

Comparison of performance between Scala etc. and C/C++/Fortran?

Hi all, I wonder if there is any reliable comparison of performance between "modern" multithreading-specialized languages like e.g. scala and "classic" "lower-level" languages like C, C++, Fortran using parallel libs like MPI, Posix or even Open-MP. Any links and suggestions welcome. ...

MPI implementation: Can MPI_Recv receive messages from many MPI_Send?

Now I am trying to use MPI_Sendand MPI_Recv to pass best found solutions among several processes. The best solutions found in each process are supposed to pass to the control process what stores all best solutions and send to other processes when required. My question is how to implement it? For example, once process 1 find a new best, i...

Message Passing Arbitrary Object Graphs?

I'm looking to parallelize some code across a Beowulf cluster, such that the CPUs involved don't share address space. I want to parallelize a function call in the outer loop. The function calls do not have any "important" side effects (though they do use a random number generator, allocate memory, etc.). I've looked at libs like MPI...

c++ variable initialization in a class to send it using mpi

Hello Everybody, I got stuck in a programming task. I want the elements of my stl vector to be placed in a contiguous memory to send it with MPI_Send() routine. here is an example: class Tem { //... private: vector<double> lenghtVector (4500);//this gives a compilation error but I need to have a fixed sized vector }; how can ...

Corresponding Receive Routine of MPI_Bcast

Hello Guys, What would be the corresponding MPI receive routine of the broadcast routine, MPI_Bcast. Namely, one processor broadcasts a message to a group, let's say all world, how I can have the message in these processes? Thank you. Regards SRec ...

Is there an issue in C with malloc and MPI?

Hi all, Sorry I cannot post any source code... I have a code running a master/slave red-black algorithm for a G.S. solver. In the simple case, the matrix is split into 4 evenly sized computational pieces. The images 1-3 perform their part of the computation, and send back buffers with the results to image 0. The problem is this: I hav...

How-to map process to an Hypercube using MPI_CART

Hi, I am trying to implement bitonic sorting using MPI for 2^n processors. I would like to use an n-dimensional hypercube to do so for convenience. Using MPI_Cart_Create I can create self-organising dimensions. Doing so will maximize efficiency of my process and also reduce the number of LOC I have to spit to get it done.. Googling AND...

What is the MPI code to extract a 2D sub-matrix from a larger 2D matrix?

Hello all. I am looking for the best way of extracting a 2D sub-matrix from a larger 2-D submatrix. That is. If I have a matrix with 1 ghost point on each edge, I want to extract the interior matrix. So if the matrix is defined as matrix[NX+2][NY+2] how do I extract out the submatrix starting at matrix[1][1] going to matrix[NX+1][NY+1] ...

MPI_Send and MPI_Recv question.

So I am trying to figure out the communication overhead of sending and receiving information between processors using MPI in C code. I need to pass a buffer in both the send and receive, but all I want to do is to time how long it takes to do n communications between two processors. Here is the my entire code: main(int argc, char** ar...

For distributed applications, which to use, ASIO vs. MPI?

I am a bit confused about this. If you're building a distributed application, which in some cases may perform parallel operations (although not necessarily mathematical), should you use ASIO or something like MPI? I take it MPI is a higher level than ASIO, but it's not clear where in the stack one would begin. ...

MPICH vs OpenMPI

Can someone elaborate the differences between the OpenMPI and MPICH implementations of MPI ? Which of the two is a better implementation ? ...