I have a big patch pending, that will map all ompi types, and therefore all OP directly into OPAL ddt. The OMPI DDT part is completed, but I have some troubles with the ops. At this point I'm looking into the .m4 files for some help with the mapping between Fortran types directly into the POSIX types (int8_t and friends) instead of C types.
I tried a different approach, where I add things in the ompi_datatype_t. Unfortunately, this will break all backward compatibility because of the use of the ompi_predefined_datatype_t fixed size structure. The problem is that adding things into the ompi_datatype_t, make this structure larger than 512 bytes, and therefore force us to modify the size of the ompi_predefined_datatype_t. Anyway, back to your question. The MPI and OPAL datatypes uses the same indexes, for all the OPAL predefined types. Several MPI types map to the same underlying OPAL type: such as MPI_INT, MPI_INTEGER, MPI_INT32_T. All MPI types not supported at OPAL level, will get their indexes contiguously after the OPAL_DATATYPE_MAX_PREDEFINED upper bound (up to OMPI_DATATYPE_MPI_MAX_PREDEFINED). Moreover, the OPAL layer has been modified to support up to OPAL_DATATYPE_MAX_SUPPORTED datatypes, and this value should be modified based on the upper level requirements (today it is set to 46 as this is the total number of MPI supported datatypes, including the Fortran ones). bdt_used is currently defined as an uint32_t, so obviously there is not enough place to hold all possible MPI datatypes. Solution 1: We can change the bdt_used to uint64_t. This requires some work, and I will prefer to have some time to see exactly all the implications. Solution 2: Quick and dirty, but not the fastest one. Instead of walking the bdt_used you can walk the btypes array. If the count is not zero, then the MPI datatype corresponding to the index in the array is used. george. On Dec 21, 2010, at 12:02 , Barrett, Brian W wrote: > All - > > I'm trying to follow up on James Dinan's one-sided datatype errors e-mail and > running into some datatype issues from when the datatype engine was moved to > OPAL (sigh). Accumulate needs to get at the underlying datatypes for a > user-created dataype. Before the ddt move, one just walked bdt_used and > found the underlying type. Now it appears that bdt_used refers to the opal > types, not the ompi types. And since there's not a one-to-one mapping > between the two, I'm at a loss as to how one could find a MPI pre-defined > datatype from the user-defined datatype. Can someone point me in the right > direction? > > Brian > > -- > Brian W. Barrett > Dept. 1423: Scalable System Software > Sandia National Laboratories > > > > _______________________________________________ > devel mailing list > de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/devel