[MPICH] Lock / Unlock on MPICH2 with Fortran 77

Rajeev Thakur thakur at mcs.anl.gov
Wed Jun 13 16:18:30 CDT 2007


If you are only using MPICH2, you need not use MPI_Alloc_mem with
lock/unlock. To use MPI_Alloc_mem with Fortran, you need to use pointers of
some sort. Some Fortran 77 compilers support pointers. See the bottom of
http://www.mpi-forum.org/docs/mpi-20-html/node54.htm for an example.
 
Rajeev
 


  _____  

From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Codner, Clay
Sent: Wednesday, June 13, 2007 2:43 PM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] Lock / Unlock on MPICH2 with Fortran 77



I have a problem and I need some guidance.  I have a program written in
Fortran 77 and MPI-2.  For various reasons, I have to use the lock / unlock
mechanisms to make the program work. As near as I can tell, I must also use
the MPI_ALLOC_MEM routine with the locks in order for the program to run. 

 

The problem is that I need to pass a pointer to the memory routine.  I have
already proposed updating the code to run in a more modern language, but for
now I just need it to function properly. Can somebody give me guidance on
what I should do? Am I wrong in any of my assertions?  I have looked into
creating a pointer in C and compiling the program as a mix of C and Fortran,
but if there is a better way, I'm open to suggestions.

 

The data to be passed is in an array. I pass either a row or a member,
depending on which element we are talking about.

 

Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20070613/980eea23/attachment.htm>


More information about the mpich-discuss mailing list