X-Mailer: exmh version 2.0.2 2/24/98 To: mpi-core@XXXXXXXXXXX Subject: Question to MPI/IO Date: Tue, 02 Feb 1999 11:52:05 +0100 From: Hubert Ritzdorf Sender: owner-mpi-core@XXXXXXXXXXX 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 ______________________________________________________________________________