running parallel hdf5

i have one question with compiling hdf5 file. i can compile the non-parallel
hdf5 file with
module load hdf5-gcc/3.4.6

module load mpich-intel
h5cc simple.c >> work fine for normal hdf5 file(non-parallel)
if i include MPI-related code ,it failed.

Error:
'MPI_Comm' undeclared (first use in this function)

//////////////////simple.c /////////////////////
#include "hdf5.h"
#ifndef MPI_FILE_NULL
#include <mpio.h>
#endif
#define H5FILE_NAME "SDS_row.h5"
int main(int argc,char **argv)
{
   hid_t file_id;
   hid_t plist_id;
   herr_t status;
   int mpi_size,mpi_rank;
   MPI_Comm comm = MPI_COMM_WORLD;
   MPI_Info info = MPI_INFO_NULL;

}

thanks
winthan

I think you have to include mpi.h, since pHDF5 presumes it will
operate in an MPI environment.

Also, is your h5cc invoking the mpi compiler? I don't use h5cc very
often so I don't know how clever it is.

It looks like your first 'module load' brought in serial hdf5 and your
second 'modlule load' brought in mpich, but where's the 'module load'
that brings in parallel HDF5?

==rob

···

On Mon, Aug 10, 2009 at 01:09:32PM -0400, winthan wrote:

i have one question with compiling hdf5 file. i can compile the non-parallel
hdf5 file with
module load hdf5-gcc/3.4.6

module load mpich-intel
h5cc simple.c >> work fine for normal hdf5 file(non-parallel)
if i include MPI-related code ,it failed.

Error:
'MPI_Comm' undeclared (first use in this function)

--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

Hello Winthan,

Parallel HDF5 is an optional feature of HDF5. Check with your
system administrator or whoever installed HDF5 to see if
Parallel HDF5 was installed. Then find out the module name
for Parallel HDF5. Once you have the Parallel HDF5 module
loaded, use h5pcc (not h5cc), to compile your parallel HDF5
application.

Make sure that you use the mpi module that was used to build
Parallel HDF5. Below it appears that the HDF5 module was
built with gcc, but you are loading an mpich-intel module. This
may or may not work. Your system administrator should be able
to help with this.

-Barbara
bljones@hdfgroup.org

···

i have one question with compiling hdf5 file. i can compile the non-parallel
hdf5 file with
module load hdf5-gcc/3.4.6

module load mpich-intel
h5cc simple.c >> work fine for normal hdf5 file(non-parallel)
if i include MPI-related code ,it failed.

Error:
'MPI_Comm' undeclared (first use in this function)

//////////////////simple.c /////////////////////
#include "hdf5.h"
#ifndef MPI_FILE_NULL
#include <mpio.h>
#endif
#define H5FILE_NAME "SDS_row.h5"
int main(int argc,char **argv)
{
  hid_t file_id;
  hid_t plist_id;
  herr_t status;
  int mpi_size,mpi_rank;
  MPI_Comm comm = MPI_COMM_WORLD;
  MPI_Info info = MPI_INFO_NULL;

}

thanks
winthan

--

thanks rob for replying back.
" is your h5cc invoking the mpi compiler? " : :frowning: unfortunately , it
doesn't. i read up the post somewhere on the web and it says "mpi.h" is
included as part of hdf.h and h5cc will invoke mpi compiler but it doesnt'
work for our steele machine. i'll look up the module to load parallel hdf
file. before this mail, i didn't know there are separate compiler for
parallel hdf .
thanks again.
winthan

···

On Wed, Aug 12, 2009 at 11:28 AM, Rob Latham <robl@mcs.anl.gov> wrote:

On Mon, Aug 10, 2009 at 01:09:32PM -0400, winthan wrote:
> i have one question with compiling hdf5 file. i can compile the
non-parallel
> hdf5 file with
> module load hdf5-gcc/3.4.6
>
>
> module load mpich-intel
> h5cc simple.c >> work fine for normal hdf5 file(non-parallel)
> if i include MPI-related code ,it failed.
>
> Error:
> 'MPI_Comm' undeclared (first use in this function)

I think you have to include mpi.h, since pHDF5 presumes it will
operate in an MPI environment.

Also, is your h5cc invoking the mpi compiler? I don't use h5cc very
often so I don't know how clever it is.

It looks like your first 'module load' brought in serial hdf5 and your
second 'modlule load' brought in mpich, but where's the 'module load'
that brings in parallel HDF5?

==rob

--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org