[MPICH] Problem with MPI_TYPE_CREATE_RESIZED

Pavan Balaji balaji at mcs.anl.gov
Mon Feb 11 02:42:10 CST 2008


Can you try the attached patch and see if the problem still exists? The 
patch is against mpich2-1.0.6p1:

  $ cd mpich2-1.0.6p1 && patch -p0 < dataloop.patch

Thanks.

  -- Pavan

On 02/10/2008 11:28 AM, Rajeev Thakur wrote:
> I can reproduce the problem with Intel 9.1 compilers but not with gcc (3.4).
> We will look into it.
> 
> Rajeev
> 
>> -----Original Message-----
>> From: Trach-Minh Tran [mailto:trach-minh.tran at epfl.ch] 
>> Sent: Sunday, February 10, 2008 11:10 AM
>> To: Rajeev Thakur
>> Cc: 'MPICH Discuss'
>> Subject: Re: [MPICH] Problem with MPI_TYPE_CREATE_RESIZED
>>
>> I have rebuild mpich2-1.0.6 with gfortran/gcc/g++ (GCC-4.1.2) 
>> and ... the error is gone! However with the C version of my 
>> example, the same error reappears!
>>
>> #include "mpi.h"
>> #include <stdio.h>
>> MPI_Datatype LINE_TYPE,  LINES_TYPE;
>> MPI_Aint lb, extent;
>>
>> int main(int argc,char *argv[])
>> {
>>   MPI_Init(&argc,&argv);
>>
>>   MPI_Type_vector(10, 1, 10, MPI_INT, &LINE_TYPE);
>>   MPI_Type_commit(&LINE_TYPE);
>>   MPI_Type_get_extent(LINE_TYPE, &lb, &extent);
>>   printf("LINE_TYPE: lb = %d, extent = %d\n", lb, extent);
>>
>>   MPI_Type_get_extent(MPI_INT, &lb, &extent);
>>   MPI_Type_create_resized(LINE_TYPE, lb, extent, &LINES_TYPE);
>>   MPI_Type_commit(&LINES_TYPE);
>>   MPI_Type_get_extent(LINES_TYPE, &lb, &extent);
>>   printf("LINES_TYPE: lb = %d, extent = %d\n", lb, extent);
>>
>>   MPI_Finalize();
>>   return 0;
>> }
>>
>> $ mpiexec -n 1 ./a.out
>> LINE_TYPE: lb = 0, extent = 364
>> Assertion failed in file dataloop.c at line 554: old_loop_sz > 0
>> [cli_0]: aborting job:
>> internal ABORT - process 0
>> rank 0 in job 5  gimel3_45420   caused collective abort of all ranks
>>   exit status of rank 0: return code 1
>>
>>
>> Best regards,   -Minh.
>>
>>
>> On 02/10/2008 03:28 PM, Rajeev Thakur wrote:
>>> I can't reproduce the error. What compiler are you using? 
>> Also, it may 
>>> not matter but it should be integer(kind=MPI_ADDRESS_KIND).
>>>
>>> Rajeev
>>>
>>>> -----Original Message-----
>>>> From: owner-mpich-discuss at mcs.anl.gov 
>>>> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of 
>> Trach-Minh Tran
>>>> Sent: Sunday, February 10, 2008 2:16 AM
>>>> To: MPICH Discuss
>>>> Subject: [MPICH] Problem with MPI_TYPE_CREATE_RESIZED
>>>>
>>>> Hello,
>>>>
>>>> Using mpich2-1.0.6p1, MPI_TYPE_CREATE_RESIZED produces an error. 
>>>> Running the following fortran program aborts with the error:
>>>>
>>>> Assertion failed in file dataloop.c at line 554: old_loop_sz > 0
>>>>
>>>> With versions prior to 1.0.5, this programs runs without any error.
>>>>
>>>> Regards,   -Minh.
>>>>
>>>> PROGRAM main
>>>>   USE mpi
>>>>   IMPLICIT NONE
>>>>   INTEGER :: ierr, LINE_TYPE, LINES_TYPE
>>>>   INTEGER(MPI_ADDRESS_KIND) :: extent, lb !
>>>>   CALL MPI_INIT(ierr)
>>>> !
>>>>   CALL MPI_TYPE_VECTOR(10, 1, 10, MPI_INTEGER, LINE_TYPE, ierr)
>>>>   CALL MPI_TYPE_COMMIT(LINE_TYPE, ierr) !
>>>>   CALL MPI_TYPE_GET_EXTENT(MPI_INTEGER, lb, extent, ierr)
>>>>   CALL MPI_TYPE_CREATE_RESIZED(LINE_TYPE, lb, extent, LINES_TYPE, 
>>>> ierr)
>>>>   CALL MPI_TYPE_COMMIT(LINES_TYPE, ierr) !
>>>>   CALL MPI_TYPE_GET_EXTENT(LINES_TYPE, lb, extent, ierr)
>>>>   PRINT*, 'LINES_TYPE: lb, extent', lb, extent !
>>>>   CALL MPI_FINALIZE(ierr)
>>>> END PROGRAM main
>>>>
>>>>
>> -- 
>> Dr. Trach-Minh Tran
>> CRPP/SB/EPFL http://crppwww.epfl.ch
>> Swiss Federal Institute of Technology
>> CH-1015 Lausanne
>> Office: http://plan.epfl.ch/?room=PPB111
>> Tel: +41 21 693 4569
>> Fax: +41 21 693 5176
>>
>>
> 

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dataloop.patch
Type: text/x-patch
Size: 613 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080211/fa715706/attachment.bin>


More information about the mpich-discuss mailing list