[MPICH] Problem with MPI_TYPE_CREATE_RESIZED

Trach-Minh Tran trach-minh.tran at epfl.ch
Sun Feb 10 11:09:37 CST 2008


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




More information about the mpich-discuss mailing list