[OMPI users] MPI_Unpublish_name and MPI_Close_port

2012-03-30 Thread Mateus Augusto
Hello,

Is there a correct order to call both functions MPI_Unplish_name and 
MPI_Close_port?

May we have

MPI_Unplish_name
MPI_Close_port

or

MPI_Close_port
MPI_Unplish_name

thank you

[OMPI users] How to join intercommunicators?

2012-02-03 Thread Mateus Augusto
Hello,
 
I have a process that creates other processes at different times (using 
MPI_Comm_spawn). After, the initial process (creator of other processes) must 
receive mesagens of created processes. However, there are one intercommunicator 
for each created process. 
The question is: how to unite all the intercommunicator in a single  
communicator and receive the mesagens from this single comunicator?
 
Thanks

Re: [OMPI users] Are the Messages delivered in order in the MPI?

2012-01-24 Thread Mateus Augusto
After a read: http://blogs.cisco.com/performance/more_traffic/ 

I understood that if a large message is sent and then a short message is sent, 
then the short message can reach before. But what if the messages have the same 
size, and are small enough so that no fragmentation occurs, the ordering in 
delivery will be guaranteed?




[OMPI users] Are the Messages delivered in order in the MPI?

2012-01-24 Thread Mateus Augusto
I would like to know if the MPI is a FIFO (first in first out) channel, ie, if 
the A message is sent before of the B message, then, MPI garantees that A will 
be received before B in the recipient.
Does the MPI guarantee that A always will be received first?
Or may B be received first sometimes?
Assume that A and B are sent in different calls to send messages (for example 
MPI_Send).

[OMPI users] Does MPI_Finalize() behaves like MPI_Barrier() ?

2011-08-31 Thread Mateus Augusto
Hello,


Traduzir do: português
Digite um texto ou 
endereço de um site ou traduza um 
documento.
Cancelar
Tradução do português 
para inglês
I have three processes that communicate with each other. The first process 
creates the other two processes (using MPI_Comm_spaw (...)).
When one of the processes performs MPI_Finalize (), it continues in execution, 
stoppedin MPI_Finalize function () (in busy waiting, ie, using CPU) and just 
executes the next instruction only 
when the other two processes run MPI_Finalize (). It seems that MPI_Finalize () 
behaves like MPI_Barrier (). This behavior only occurs when processes 
communicate with each other (when, for example, use MPI_Send,  MPI_Isend, 
MPI_Bsend. or MPI_Ssend).
I would like to know if we can avoid this behavior of MPI_Finalize when 
processes communicate with each other.

Here there are the codes:

Process Master:

#include 
#include 
#include 
#include 

int main(int argc, char** argv) {
    int i;
    char other[200];
    getcwd(other, 199);
    strcat(other, "/otherProcess");
    MPI_Init(, );
    MPI_Comm com;
    MPI_Status s;    
    MPI_Comm_spawn(other, MPI_ARGV_NULL, 2, MPI_INFO_NULL, 0,
 MPI_COMM_WORLD, , MPI_ERRCODES_IGNORE);
    MPI_Recv(, 1, MPI_INT, 0, 0, com, );
    sleep(15); // Make the otherProcess wait the Master process in 
MPI_Finalize().
    MPI_Finalize();
    return 0; 
}

Other Process (process Master calls otherProcess):

#include 
#include 
#include 

int main(int argc, char * argv[]) {
    int dest;
    MPI_Comm parent;
    MPI_Init(, );
    MPI_Comm_get_parent();
    MPI_Send(, 1, MPI_INT, 0, 0, parent); // If this line is removed, the 
process doesn't stop in MPI_Finalize.
    printf("Before MPI_Finalize\n");
    MPI_Finalize();  // The process stay here waiting all process execute
 MPI_Finalize.
    printf("After MPI_Finalize\n");
    return 0;
}

I've tried several things but nothing worked. I don't want that otherProcess 
stay waiting in MPI_Finalize().
Could someone help-me?

Thanks.