Date: Mon, 16 Nov 1998 13:27:22 -0600 From: Rajeev Thakur To: gropp@XXXXXXXXXXX Cc: kaf@XXXXXXX,romio-maint@XXXXXXXXXXX,kaf@XXXXXXX,salo@XXXXXXX,In-Reply-To: <4.0.2.19981113142349.00b591d0@XXXXXXXXX> Gropp on Fri, 13 Nov 1998 14:50:44 -0600) Subject: Re: MPI-2 thread safety and collectives X-UIDL: 5ccf5a52c852f666579e6df914712f7a > Thanks for the example.  I need to think carefully about this.  > My immediate reaction  is that the MPI standard requires that > collective operations (any collective operation) on the same communicator > must be executed in a specific sequence, and if two threads are executing > any collective routine on the same communicator in such a way that either > routine could be executed "first", the program is erroneous My interpretation is the same. I think the following program is erroneous if the operations are on the same communicator. Process 0 Process 1 Thread A: MPI_File_open Thread C: MPI_Allreduce Thread B: MPI_Allreduce Thread D: MPI_File_open or for that matter Process 0 Process 1 Thread A: MPI_File_read_all Thread C: MPI_File_write_all Thread B: MPI_File_write_all Thread D: MPI_File_read_all > In any event, ROMIO should do MPI_Comm_dup to get a private > communicator. 
ROMIO does create a private communicator. However, the case Karl sites is in the parameter checks done early on in MPI_File_open, where I directly use the communicator passed (I wasn't thinking about threads at the time). A duplicate communicator is created later on in the open, saved in the file handle, and used in subsequent I/O operations.; Rajeev