send and recieve / MPITB for octave

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

send and recieve / MPITB for octave

Matthias
Hi,

I'm quite new to parallel programming and I'm working with PelicanHPC and MPITB for octave.
I have a cluster with three nodes and I'm trying to send two different matrices to my compute-nodes.
Node 1 should recieve matrix A, node 2 should recieve matrix B. How can I do this?
I tried the following:


%send_test.m

%MPI_Send(buf, dest, tag, comm);
%MPI_Recv(buf, src, tag, comm);

nodes=2;

LAM_Init(nodes);

global TAG1 TAG2 NEWORLD;

[info, size] = MPI_Comm_size(NEWORLD);
[info, rank] = MPI_Comm_rank(NEWORLD);

A = ones(500,500);
B = ones(1000,1000);

MPI_Send(A, 1, TAG1, NEWORLD);
MPI_Send(B, 2, TAG2, NEWORLD);

cmd = '[info, rank] = MPI_Comm_rank(NEWORLD); if (rank == 1); MPI_Recv(A, 0, TAG1, NEWORLD); A = A * 2; MPI_Send(A, 0, TAG1, NEWORLD); endif; if (rank == 2); MPI_Recv(B, 0, TAG2, NEWORLD); B = B * 2; MPI_Send(B, 0, TAG2, NEWORLD); endif;';

NumCmds_Send({'cmd'},{cmd});
       
A = zeros(500,500);
MPI_Recv(A, 1, TAG1, NEWORLD);
B = zeros(1000,1000);
MPI_Recv(B, 2, TAG2, NEWORLD);


LAM_Finalize;


But it doesn't work. What am I doing wrong?

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: send and recieve / MPITB for octave

Michael Creel
Administrator
MPITB was replaced on PelicanHPC by openmpi_ext quite a while ago, because MPITB would not work with newer versions of Octave. I'm sorry, but I have forgotten about how to use MPITB for the most part. I guess you're using a fairly old version of PelicanHPC if it has MPITB on it. I advise working with a newer version, then I could answer questions.

MPITB had some very nice features for interactive work, I liked it a lot. It would be nice to see it updated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: send and recieve / MPITB for octave

Allan5
Hi,
am a newbie to parallel programming, just liked to start with parallel knoppix v2.9, however on bootin my cd, it doesnot give me the options to see the listed parttitons for creating my working directoryon my usb pendrive attached to the master node. it just only shows me the available ethernet ports etho and eth1.
then when i select eth0, am able to boot up the compute nodes later. but without creating a  working directory. so i cant proceed to even mount the directory to the slave nodes.
how to go about this
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: send and recieve / MPITB for octave

Michael
Sorry, I don't remember how PK worked. If I recall correctly, your /home was shared, but it resides in RAM. There were methods for using permanent storage, but I really don't remember what they were. For basic learning, there's nothing wrong with having /home in RAM. Another option is to use virtualization for the frontend node, and take a snapshot of the virtual machine. That will cause the state to be saved. Once you are familiar with how MPI works, you can switch to PelicanHPC or something else.
Loading...