LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2009, 12:03 AM   #1
ajitup
Member
 
Registered: Oct 2004
Location: Indore,India
Distribution: SuSe Linux 10.1 64 bit
Posts: 32

Rep: Reputation: 15
MPI Programming: Problem with sending different sized array to other nodes


Hi!

I am developing a parallel C++ code under suse linux 11.0 using MPICH2.

In this code, each node generates a dynamic array of different size which has to be shared to all other nodes (including the root node).

e.g.
node 0 generates an array with 8 elements
node 1 generates an array with 24 elements
node 2 generates an array with 15 elements
node 3 generates an array with 17 elements

before MPI_Finalize, every nodes should pass-on its dynamic array to all other nodes for putting all the elements received in a single dynamic array (for performing certain calculations).

I have looked at all the MPI_Functions (http://mpi.deino.net/mpi_functions/index.htm) but am not able to find out any function which can handle different array size for a "gather" type operation.

I tried MPI_Gather but the array size must be same on all nodes. MPI_AllGather has another problem, If I run it from all nodes, all nodes try to run this at the same time and so there is a race-around situation and program hangs.

Can anybody help?

thanks and regards,
ajitup
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
parallell programming w/ MPI flyingman Programming 3 09-05-2008 11:27 PM
problem in sending array of structures in client/server program soumya_b Programming 5 01-21-2007 03:53 AM
N-sized array mtndew Programming 16 11-15-2006 02:39 PM
Question about MPI programming ArthurHuang Programming 8 01-29-2006 09:14 PM
Raid 5 Array with Different Sized Disks Dewar Linux - Hardware 1 11-19-2004 10:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration