Author: gropp Date: 2012-12-06 11:08:59 -0600 (Thu, 06 Dec 2012) New Revision: 10709 Added: mpich2/trunk/test/mpi/f77/datatype/typename3f.f Modified: mpich2/trunk/test/mpi/f77/datatype/Makefile.am mpich2/trunk/test/mpi/f77/datatype/testlist Log: Added tests for MPI-3 predefined datatypes in Fortran Modified: mpich2/trunk/test/mpi/f77/datatype/Makefile.am =================================================================== --- mpich2/trunk/test/mpi/f77/datatype/Makefile.am 2012-11-30 22:01:01 UTC (rev 10708) +++ mpich2/trunk/test/mpi/f77/datatype/Makefile.am 2012-12-06 17:08:59 UTC (rev 10709) @@ -13,7 +13,7 @@ AM_DEFAULT_SOURCE_EXT = .f noinst_PROGRAMS = typenamef typesnamef typecntsf typesubf typem2f gaddressf \ - packef allctypesf hindex1f hindexed_blockf + packef allctypesf hindex1f hindexed_blockf typename3f ## typeaints.h will be distributed because it's listed in AC_CONFIG_FILES/AC_OUTPUT Modified: mpich2/trunk/test/mpi/f77/datatype/testlist =================================================================== --- mpich2/trunk/test/mpi/f77/datatype/testlist 2012-11-30 22:01:01 UTC (rev 10708) +++ mpich2/trunk/test/mpi/f77/datatype/testlist 2012-12-06 17:08:59 UTC (rev 10709) @@ -1,4 +1,5 @@ typenamef 1 +typename3f 1 mpiversion=3.0 typesnamef 1 typecntsf 1 typem2f 1 Added: mpich2/trunk/test/mpi/f77/datatype/typename3f.f =================================================================== --- mpich2/trunk/test/mpi/f77/datatype/typename3f.f (rev 0) +++ mpich2/trunk/test/mpi/f77/datatype/typename3f.f 2012-12-06 17:08:59 UTC (rev 10709) @@ -0,0 +1,41 @@ +C -*- Mode: Fortran; -*- +C +C +C (C) 2012 by Argonne National Laboratory. +C See COPYRIGHT in top-level directory. +C + program main + implicit none + include 'mpif.h' + character*(MPI_MAX_OBJECT_NAME) name + integer namelen + integer ierr, errs + + errs = 0 + + call mtest_init( ierr ) +C +C Check each Fortran datatype, including the size-specific ones +C See the C version (typename.c) for the relevant MPI sections + + call MPI_Type_get_name( MPI_AINT, name, namelen, ierr ) + if (name(1:namelen) .ne. "MPI_AINT") then + errs = errs + 1 + print *, "Expected MPI_AINT but got "//name(1:namelen) + endif + + call MPI_Type_get_name( MPI_OFFSET, name, namelen, ierr ) + if (name(1:namelen) .ne. "MPI_OFFSET") then + errs = errs + 1 + print *, "Expected MPI_OFFSET but got "//name(1:namelen) + endif + + call MPI_Type_get_name( MPI_COUNT, name, namelen, ierr ) + if (name(1:namelen) .ne. "MPI_COUNT") then + errs = errs + 1 + print *, "Expected MPI_COUNT but got "//name(1:namelen) + endif + + call mtest_finalize( errs ) + call MPI_Finalize( ierr ) + end