[mpich-discuss] Overwriting mpi_waitany_

Matthieu Dorier matthieu.dorier at irisa.fr
Wed Mar 5 13:42:42 CST 2014


Hi, 

I'm trying to overwrite the weak symbol mpi_waitany_ (fortran symbol), but I get an error (the function doesn't seem to work since it returns an index of 0). 
Here is my code, any idea why it doesn't work? 



void mpi_waitany_(MPI_Fint* count, MPI_Fint* array_of_requests, 
MPI_Fint* index, MPI_Fint* status, MPI_Fint* err) 
{ 
MPI_Status cstatus; 
MPI_Status_f2c(status, &cstatus); 
MPI_Request* c_req = (MPI_Request*)malloc(sizeof(MPI_Request)*(*count)); 
int i; 
for(i=0;i<*count;i++) { 
c_req[i] = MPI_Request_f2c(array_of_requests[i]); 
} 
*err = PMPI_Waitany(*count,c_req,index,&cstatus); 
MPI_Status_c2f(&cstatus, status); 
for(i=0;i<*count;i++) { 
array_of_requests[i] = MPI_Request_c2f(c_req[i]); 
} 
free(c_req); 
} 




Thanks! 

Matthieu Dorier 
PhD student at ENS Rennes 
http://people.irisa.fr/Matthieu.Dorier 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140305/28abce0c/attachment.html>


More information about the discuss mailing list