@@ -824,21 +824,14 @@ def type_text(self, enable_count=False):
824824 def argument (self ):
825825 return f'(MPI_Op *) (NULL != { self .name } ? &{ self .tmpname } : NULL)'
826826
827- @Type .add_type ('RANK' )
828- class TypeRank (Type ):
829-
830- def type_text (self , enable_count = False ):
831- return 'int'
832-
833-
834827@Type .add_type ('TAG' , abi_type = ['ompi' ])
835- class TypeRank (Type ):
828+ class TypeTag (Type ):
836829
837830 def type_text (self , enable_count = False ):
838831 return 'int'
839832
840833@Type .add_type ('TAG' , abi_type = ['standard' ])
841- class TypeRankStandard (StandardABIType ):
834+ class TypeTagStandard (StandardABIType ):
842835
843836 @property
844837 def init_code (self ):
@@ -847,6 +840,26 @@ def init_code(self):
847840 def type_text (self , enable_count = False ):
848841 return 'int'
849842
843+ @Type .add_type ('TAG_OUT' , abi_type = ['ompi' ])
844+ class TypeTagOut (Type ):
845+
846+ def type_text (self , enable_count = False ):
847+ return 'int *'
848+
849+ @Type .add_type ('TAG_OUT' , abi_type = ['standard' ])
850+ class TypeTagOutStandard (StandardABIType ):
851+
852+ @property
853+ def final_code (self ):
854+ return [f'if (NULL != { self .name } ) *{ self .name } = { ConvertOMPIToStandard .TAG } (*{ self .name } );' ]
855+
856+ def type_text (self , enable_count = False ):
857+ return f'int *'
858+
859+ @property
860+ def argument (self ):
861+ return f'(int *) { self .name } '
862+
850863@Type .add_type ('ROOT' , abi_type = ['ompi' ])
851864class TypeRoot (Type ):
852865
@@ -1310,8 +1323,8 @@ def init_code(self):
13101323 mangle_type = self .mangle_name ('MPI_Status' )
13111324 code = [f'MPI_Status *{ self .status_argument } = NULL;' ]
13121325 code .append (f'MPI_Status { self .tmpname } ;' )
1313- code .append (f'{ ConvertFuncs .STATUS } (&{ self .tmpname } , ({ mangle_type } *){ self .name } );' )
13141326 code .append (self .if_should_set_status ())
1327+ code .append (f'{ ConvertFuncs .STATUS } (&{ self .tmpname } , ({ mangle_type } *){ self .name } );' )
13151328 code .append (f'{ self .status_argument } = &{ self .tmpname } ;' )
13161329 code .append ('} else {' )
13171330 code .append (f'{ self .status_argument } = MPI_STATUS_IGNORE;' )
0 commit comments