IF (npoints .NE. 24) write(*,*)"error occured, number of elements not correct"
 
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!   Copyright by The HDF Group.                                               *
!   Copyright by the Board of Trustees of the University of Illinois.         *
!   All rights reserved.                                                      *
!                                                                             *
!   This file is part of HDF5.  The full HDF5 copyright notice, including     *
!   terms governing use, modification, and redistribution, is contained in    *
!   the files COPYING and Copyright.html.  COPYING can be found at the root   *
!   of the source code distribution tree; Copyright.html can be found at the  *
!   root level of an installed copy of the electronic HDF5 document set and   *
!   is linked from the top-level documents page.  It can also be found at     *
!   http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
!   access to either file, you may request a copy from help@hdfgroup.org.     *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!    Testing Dataspace Interface functionality.
!   The following subroutine tests the following functionalities:
!   h5screate_f, h5scopy_f, h5screate_simple_f, h5sis_simple_f,
!   h5sget_simple_extent_dims_f,h5sget_simple_extent_ndims_f
!   h5sget_simple_extent_npoints_f, h5sget_simple_extent_type_f,
!   h5sextent_copy_f, h5sset_extent_simple_f, h5sset_extent_none_f
        SUBROUTINE dataspace_basic_test(cleanup, total_error)
        USE HDF5 ! This module contains all necessary modules
          IMPLICIT NONE
          LOGICAL, INTENT(IN)  :: cleanup
          INTEGER, INTENT(OUT) :: total_error
          CHARACTER(LEN=10), PARAMETER :: filename1 = "basicspace" ! File1 name
          CHARACTER(LEN=9), PARAMETER :: filename2 = "copyspace"  ! File2 name
          CHARACTER(LEN=80) :: fix_filename1
          CHARACTER(LEN=80) :: fix_filename2
          CHARACTER(LEN=9), PARAMETER :: dsetname = "basicdset"       ! Dataset name
          INTEGER(HID_T) :: file1_id, file2_id     ! File identifiers
          INTEGER(HID_T) :: dset1_id, dset2_id     ! Dataset identifiers
          INTEGER(HID_T) :: space1_id, space2_id   ! Dataspace identifiers
          INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/4,6/) ! Dataset dimensions
          INTEGER(HSIZE_T), DIMENSION(2) :: maxdims1 = (/4,6/) ! maximum dimensions
          INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/6,6/) ! Dataset dimensions
          INTEGER(HSIZE_T), DIMENSION(2) :: maxdims2 = (/6,6/) ! maximum dimensions
          INTEGER(HSIZE_T), DIMENSION(2) :: dimsout, maxdimsout ! dimensions
          INTEGER(HSIZE_T)   ::   npoints  !number of elements in the dataspace