From: jpprost@XXXXXXXXXX X-Lotus-FromDomain: IBMUS To: Hubert Ritzdorf cc: mpi-core@XXXXXXXXXXX Date: Tue, 2 Feb 1999 10:59:34 -0500 Subject: Re: Question to MPI/IO Sender: owner-mpi-core@XXXXXXXXXXX Hubert, Version (i) is the version intended by the standard, which says: "The function must begin copying at the location in userbuf specified by position into the (tiled) datatype." Note that your note was confusing, because the descriptions of the two alternatives before the code and within the code are opposite. The right description is the one given within the code. Instead of saying "the user must find...", I would rather say "the user defined conversion routine must determine..." Jean-Pierre ################################################### Jean-Pierre Prost IBM T.J. Watson Research Center PO Box 218 Yorktown Heights, NY 10598 USA Phone: (914) 945 3225 Fax: (914) 945 2141 Internet: jpprost@XXXXXXXXXX Lotus Notes: Jean-Pierre Prost/Watson/IBM @ IBMUS VM: IBMUSM11(JPPROST) Home page: http://www.research.ibm.com/people/p/prost/ ################################################### Hubert Ritzdorf on 02/02/99 05:52:05 To: mpi-core@XXXXXXXXXXX cc: (bcc: Jean-Pierre Prost/Watson/IBM) Subject: Question to MPI/IO Hi, I am implementing MPI for NEC SX computers and I have a question to Datarep Conversion functions (chapter 9.5.3 of the MPI-2 document) (*) If MPI cannot allocate a (file) buffer large enough to hold all the the data to be converted, the standard says: For the first call, MPI will call the (conversion) function with ``position'' set to zero. ... Then in subsequent calls to the conversion function, MPI will increment the value in ``position'' by the ``count'' of items converted in the previous call. My question is: Is the user buffer ``buf'' incremented correspondingly in the second call (and further calls) of the conversion function (cf. Version i below) or must the user find the correct position in the user buffer ``buf'' within the conversion function (cf. Version ii below)? i.e. /* first call */ position = 0; write_fn (buf, datatype, count, filebuf, position, extra_state); /* write filebuf to the file */ write (.., filebuf, count*datarep_size); /* (Version i) second call, the user must find the correct position in buf */ position = count; write_fn (buf, datatype, count, filebuf, position, extra_state); or /* (Version ii) second call, MPI transfers the new user buffer location */ position = count; next_buf = (char *) buf + count * native_size; write_fn (next_buf, datatype, count, filebuf, position, extra_state); /* write filebuf to the file */ write (.., filebuf, count*datarep_size); Best regards Hubert ___________________________________________________________________________ ___ Hubert Ritzdorf NEC Europe Ltd. C&C Research Laboratories Rathausallee 10 D-53757 Sankt Augustin Tel.: +49 (0) 2241 / 92 52 65 Fax : +49 (0) 2241 / 92 52 99 e-mail : ritzdorf@ccrl-nece.technopark.gmd.de InPerson: ritzdorf@XXXXXXXXXXXXXX or ritzdorf@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX WWW : http://www.ccrl-nece.technopark.gmd.de/~ritzdorf ___________________________________________________________________________ ___