Why does ompi_info -c say "MPI I/O Support: yes" even though I configured using 
-disable-io-romio?  If ompi_info is going to tell me MPI I/O is supported, then 
shouldn't I expect my test program (attached) to work correctly?  (it doesn't).

I didn't disable "built-in" mpi-io, only io-romio.

  --disable-mpi-io        Disable built-in support for MPI-2 I/O, likely
                          because an externally-provided MPI I/O package will
                          be used. Default is to use the internal component
                          system and its specially modified version of ROMIO
  --disable-io-romio      Disable the ROMIO MPI-IO component

Thanks,

Ed

configure options used:
+ ./configure --prefix=/applocal/tools/mpi/intel/openmpi-1.6.4 --without-tm 
--without-sge --without-lsf --without-psm --without-portals --without-elan 
--without-slurm --without-loadleveler --with-mxm=/opt/mellanox/mxm 
--with-mxm-lib=/opt/mellanox/mxm/lib --enable-mpirun-prefix-by-default 
--enable-contrib-no-build=vt --disable-per-user-config-files --disable-io-romio 
--enable-static CXX=/applocal/intel/composer_xe_2013/bin/icpc 
CC=/applocal/intel/composer_xe_2013/bin/icc 'CFLAGS=  -O2' 'CXXFLAGS=  -O2' 
F77=/applocal/intel/composer_xe_2013/bin/ifort 'FFLAGS=-D_GNU_SOURCE -traceback 
 -O2' FC=/applocal/intel/composer_xe_2013/bin/ifort 'FCFLAGS=-D_GNU_SOURCE 
-traceback  -O2' 'LDFLAGS= -static-intel'

ompi_info -c output:
           Configured by: bloscel
           Configured on: Tue Jun 11 16:20:00 CDT 2013
          Configure host: mgmt1
                Built by: bloscel
                Built on: Tue Jun 11 16:35:12 CDT 2013
              Built host: mgmt1
              C bindings: yes
            C++ bindings: yes
      Fortran77 bindings: yes (all)
      Fortran90 bindings: yes
Fortran90 bindings size: small
              C compiler: /applocal/intel/composer_xe_2013/bin/icc
     C compiler absolute:
  C compiler family name: INTEL
      C compiler version: 1310.20130514
             C char size: 1
             C bool size: 1
            C short size: 2
              C int size: 4
             C long size: 8
            C float size: 4
           C double size: 8
          C pointer size: 8
            C char align: 1
            C bool align: 1
             C int align: 4
           C float align: 4
          C double align: 8
            C++ compiler: /applocal/intel/composer_xe_2013/bin/icpc
   C++ compiler absolute: none
      Fortran77 compiler: /applocal/intel/composer_xe_2013/bin/ifort
  Fortran77 compiler abs:
      Fortran90 compiler: /applocal/intel/composer_xe_2013/bin/ifort
  Fortran90 compiler abs:
       Fort integer size: 4
       Fort logical size: 4
Fort logical value true: -1
      Fort have integer1: yes
      Fort have integer2: yes
      Fort have integer4: yes
      Fort have integer8: yes
     Fort have integer16: no
         Fort have real4: yes
         Fort have real8: yes
        Fort have real16: no
      Fort have complex8: yes
     Fort have complex16: yes
     Fort have complex32: no
      Fort integer1 size: 1
      Fort integer2 size: 2
      Fort integer4 size: 4
      Fort integer8 size: 8
     Fort integer16 size: -1
          Fort real size: 4
         Fort real4 size: 4
         Fort real8 size: 8
        Fort real16 size: 16
      Fort dbl prec size: 8
          Fort cplx size: 8
      Fort dbl cplx size: 16
         Fort cplx8 size: 8
        Fort cplx16 size: 16
        Fort cplx32 size: 32
      Fort integer align: 1
     Fort integer1 align: 1
     Fort integer2 align: 1
     Fort integer4 align: 1
     Fort integer8 align: 1
    Fort integer16 align: -1
         Fort real align: 1
        Fort real4 align: 1
        Fort real8 align: 1
       Fort real16 align: 1
     Fort dbl prec align: 1
         Fort cplx align: 1
     Fort dbl cplx align: 1
        Fort cplx8 align: 1
       Fort cplx16 align: 1
       Fort cplx32 align: 1
             C profiling: yes
           C++ profiling: yes
     Fortran77 profiling: yes
     Fortran90 profiling: yes
          C++ exceptions: no
          Thread support: posix (MPI_THREAD_MULTIPLE: no, progress: no)
           Sparse Groups: no
            Build CFLAGS: -DNDEBUG -O2 -finline-functions -fno-strict-aliasing 
-restrict -pthread
          Build CXXFLAGS: -DNDEBUG -O2 -finline-functions -pthread
            Build FFLAGS: -D_GNU_SOURCE -traceback  -O2
           Build FCFLAGS: -D_GNU_SOURCE -traceback  -O2
           Build LDFLAGS: -export-dynamic  -static-intel
              Build LIBS: -lrt -lnsl  -lutil
    Wrapper extra CFLAGS: -pthread
  Wrapper extra CXXFLAGS: -pthread
    Wrapper extra FFLAGS:
   Wrapper extra FCFLAGS:
   Wrapper extra LDFLAGS:
      Wrapper extra LIBS: -ldl  -lm -lnuma  -Wl,--export-dynamic -lrt -lnsl 
-lutil
  Internal debug support: no
  MPI interface warnings: no
     MPI parameter check: runtime
Memory profiling support: no
Memory debugging support: no
         libltdl support: yes
   Heterogeneous support: no
mpirun default --prefix: yes
         MPI I/O support: yes
       MPI_WTIME support: gettimeofday
     Symbol vis. support: yes
   Host topology support: yes
          MPI extensions: affinity example
   FT Checkpoint support: no (checkpoint thread: no)
     VampirTrace support: no
  MPI_MAX_PROCESSOR_NAME: 256
    MPI_MAX_ERROR_STRING: 256
     MPI_MAX_OBJECT_NAME: 64
        MPI_MAX_INFO_KEY: 36
        MPI_MAX_INFO_VAL: 256
       MPI_MAX_PORT_NAME: 1024
  MPI_MAX_DATAREP_STRING: 128


/****************************************************************************
* mpifileout.c
* DESCRIPTION:  Output using MPI IO functions
*
*  This works correctly with NFS because NFS provides locking.  It may
*  not work correctly with PVFS ?
******************************************************************************/

#include "mpi.h"
#define array_size 100

static char filename[] = "output.dat";

main( int argc, char **argv )
{
    int myrank, commsize;
    MPI_File outfile;
    MPI_Status status;
    int nbytes, myarray[array_size], mode, i;

    /* initialize MPI */
    MPI_Init( &argc, &argv );
    MPI_Comm_rank( MPI_COMM_WORLD, &myrank );
    MPI_Comm_size( MPI_COMM_WORLD, &commsize );

    /* initialize array */
    for (i=0; i < array_size; i++) {
      myarray[i] = 10*myrank*array_size+i;
    }

    /* open file */
    mode = MPI_MODE_CREATE | MPI_MODE_WRONLY;

    MPI_File_open( MPI_COMM_WORLD, filename, mode, MPI_INFO_NULL, &outfile );

    /* set file view */
    MPI_File_set_view( outfile, myrank*array_size*sizeof(MPI_INT), MPI_INT, 
MPI_INT, "native", MPI_INFO_NULL );

    /*  write buffer to file */
    MPI_File_write( outfile, &myarray[0], array_size, MPI_INT, &status );

    /* print out number of bytes written */
    MPI_Get_elements( &status, MPI_CHAR, &nbytes );
    printf( "TASK %d ====== number of bytes written = %d ======\n", myrank, 
nbytes );

    /* close file */
    MPI_File_close( &outfile );

    /* finalize MPI */
    MPI_Finalize();
}

Reply via email to