NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hello,I'm trying to compile NetCDF v4.0.1 to run the ROMS model (http://www.myroms.org) in a parallel configuration.
What I've done so far is to install MPICH2 with the configuration ./configure --enable-f90 --with-mpe --with-romio --prefix=/usr/local and HDF5 (v1.8.3) with the options:CC=mpicc LIBS="-lm -lz" CPPFLAGS="-DpgiFortran" ./configure --enable-parallel --enable-fortran --prefix=/usr/local
(I believe the "LIBS" options are not necessary here but they don't hurt). A 'make check' works nicely here.
I have the intel fortran compiler installed (v11.0). When I compile netcdf v4.0.1 with:
CC=mpicc CPPFLAGS="-DpgiFortran" LIBS="-lm -lz -lhdf5" ./configure --enable-netcdf-4 --prefix=/usr/local
using 'make check', the the build fails with the output I've pasted below. It looks like the HDF5 libraries were compiled without the necessary MPI support, but my understanding is that the '--enable-parallel' flag should do this. Am I missing something?
Best Regards, Carloslibtool: link: ifort -I../fortran -I../libsrc4 -I../f90 -g -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o fortlib.o ../libsrc4/.libs/libnetcdf.a -lhdf5_hl -lm -lz -lhdf5
../libsrc4/.libs/libnetcdf.a(nc4file.o): In function `nc_check_for_hdf5':/home/cmoffat/Sandbox/netcdf-4.0.1/libsrc4/nc4file.c:141: undefined reference to `MPI_File_open' /home/cmoffat/Sandbox/netcdf-4.0.1/libsrc4/nc4file.c:144: undefined reference to `MPI_File_read' /home/cmoffat/Sandbox/netcdf-4.0.1/libsrc4/nc4file.c:147: undefined reference to `MPI_File_close'
/usr/local/lib/libhdf5.a(H5AC.o): In function `H5AC_flush': H5AC.c:(.text+0x1e32): undefined reference to `MPI_Barrier' H5AC.c:(.text+0x1e54): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5AC.o): In function `H5AC_broadcast_clean_list': H5AC.c:(.text+0x6dde): undefined reference to `MPI_Bcast' H5AC.c:(.text+0x6e00): undefined reference to `MPI_Error_string' H5AC.c:(.text+0x729f): undefined reference to `MPI_Bcast' H5AC.c:(.text+0x72c1): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5AC.o): In function `H5AC_propagate_flushed_and_still_clean_entries_list':
H5AC.c:(.text+0x9103): undefined reference to `MPI_Barrier' H5AC.c:(.text+0x9125): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5AC.o): In function `H5AC_receive_and_apply_clean_list':
H5AC.c:(.text+0x9588): undefined reference to `MPI_Bcast' H5AC.c:(.text+0x95aa): undefined reference to `MPI_Error_string' H5AC.c:(.text+0x981a): undefined reference to `MPI_Bcast' H5AC.c:(.text+0x983c): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dmpio.o): In function `H5D_mpio_opt_possible': H5Dmpio.c:(.text+0x6a4): undefined reference to `MPI_Allreduce' H5Dmpio.c:(.text+0x6c6): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dmpio.o): In function `H5D_mpio_get_min_chunk': H5Dmpio.c:(.text+0xc44): undefined reference to `MPI_Allreduce' H5Dmpio.c:(.text+0xc66): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dmpio.o): In function `H5D_mpio_get_sum_chunk': H5Dmpio.c:(.text+0xda4): undefined reference to `MPI_Allreduce' H5Dmpio.c:(.text+0xdc6): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dmpio.o): In function `H5D_inter_collective_io': H5Dmpio.c:(.text+0x32dd): undefined reference to `MPI_Type_free' H5Dmpio.c:(.text+0x32ff): undefined reference to `MPI_Error_string' H5Dmpio.c:(.text+0x33e1): undefined reference to `MPI_Type_free' H5Dmpio.c:(.text+0x3403): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dmpio.o): In function `H5D_obtain_mpio_mode': H5Dmpio.c:(.text+0x3bcf): undefined reference to `MPI_Gather' H5Dmpio.c:(.text+0x3bfa): undefined reference to `MPI_Error_string' H5Dmpio.c:(.text+0x3ff7): undefined reference to `MPI_Bcast' H5Dmpio.c:(.text+0x4022): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Eint.o): In function `H5E_walk1_cb': H5Eint.c:(.text+0x25a): undefined reference to `MPI_Initialized' H5Eint.c:(.text+0x277): undefined reference to `MPI_Comm_rank' /usr/local/lib/libhdf5.a(H5Eint.o): In function `H5E_walk2_cb': H5Eint.c:(.text+0x5b1): undefined reference to `MPI_Initialized' H5Eint.c:(.text+0x5ce): undefined reference to `MPI_Comm_rank' /usr/local/lib/libhdf5.a(H5FDmpi.o): In function `H5FD_mpi_comm_info_dup': H5FDmpi.c:(.text+0x433): undefined reference to `MPI_Comm_dup' H5FDmpi.c:(.text+0x455): undefined reference to `MPI_Error_string' H5FDmpi.c:(.text+0x53f): undefined reference to `MPI_Info_dup' H5FDmpi.c:(.text+0x561): undefined reference to `MPI_Error_string' H5FDmpi.c:(.text+0x666): undefined reference to `MPI_Comm_free' H5FDmpi.c:(.text+0x67b): undefined reference to `MPI_Info_free' /usr/local/lib/libhdf5.a(H5FDmpi.o): In function `H5FD_mpi_comm_info_free': H5FDmpi.c:(.text+0x754): undefined reference to `MPI_Comm_free' H5FDmpi.c:(.text+0x76c): undefined reference to `MPI_Info_free' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5Pget_fapl_mpio': H5FDmpio.c:(.text+0x886): undefined reference to `MPI_Comm_dup' H5FDmpio.c:(.text+0x8a8): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x9a7): undefined reference to `MPI_Info_dup' H5FDmpio.c:(.text+0x9c9): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0xace): undefined reference to `MPI_Comm_free' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_open': H5FDmpio.c:(.text+0x2aaf): undefined reference to `MPI_File_open' H5FDmpio.c:(.text+0x2ada): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x2bc8): undefined reference to `MPI_Comm_rank' H5FDmpio.c:(.text+0x2bf3): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x2cd6): undefined reference to `MPI_Comm_size' H5FDmpio.c:(.text+0x2d01): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x2f08): undefined reference to `MPI_File_get_size' H5FDmpio.c:(.text+0x2f33): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x3028): undefined reference to `MPI_Bcast' H5FDmpio.c:(.text+0x3053): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x3154): undefined reference to `MPI_File_set_size' H5FDmpio.c:(.text+0x317f): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x325a): undefined reference to `MPI_Barrier' H5FDmpio.c:(.text+0x3285): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x33a5): undefined reference to `MPI_File_close' H5FDmpio.c:(.text+0x33c0): undefined reference to `MPI_Comm_free' H5FDmpio.c:(.text+0x33db): undefined reference to `MPI_Info_free' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_close': H5FDmpio.c:(.text+0x34ea): undefined reference to `MPI_File_close' H5FDmpio.c:(.text+0x350c): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_read': H5FDmpio.c:(.text+0x40a5): undefined reference to `MPI_File_set_view' H5FDmpio.c:(.text+0x40d0): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x421f): undefined reference to `MPI_File_read_at_all' H5FDmpio.c:(.text+0x424a): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x4358): undefined reference to `MPI_File_read_at' H5FDmpio.c:(.text+0x4383): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x4488): undefined reference to `MPI_File_set_view' H5FDmpio.c:(.text+0x44b3): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x45c1): undefined reference to `MPI_File_read_at' H5FDmpio.c:(.text+0x45ec): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x46d4): undefined reference to `MPI_Get_elements' H5FDmpio.c:(.text+0x46ff): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x47e4): undefined reference to `MPI_Type_size' H5FDmpio.c:(.text+0x480f): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_write': H5FDmpio.c:(.text+0x4f1f): undefined reference to `MPI_File_set_view' H5FDmpio.c:(.text+0x4f4a): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x50ba): undefined reference to `MPI_File_write_at_all' H5FDmpio.c:(.text+0x50e5): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x51f3): undefined reference to `MPI_File_write_at' H5FDmpio.c:(.text+0x521e): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x5323): undefined reference to `MPI_File_set_view' H5FDmpio.c:(.text+0x534e): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x545c): undefined reference to `MPI_File_write_at' H5FDmpio.c:(.text+0x5487): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x556f): undefined reference to `MPI_Get_elements' H5FDmpio.c:(.text+0x559a): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x567f): undefined reference to `MPI_Type_size' H5FDmpio.c:(.text+0x56aa): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_flush': H5FDmpio.c:(.text+0x5951): undefined reference to `MPI_File_sync' H5FDmpio.c:(.text+0x5973): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5FDmpio.o): In function `H5FD_mpio_truncate': H5FDmpio.c:(.text+0x5c02): undefined reference to `MPI_File_set_size' H5FDmpio.c:(.text+0x5c24): undefined reference to `MPI_Error_string' H5FDmpio.c:(.text+0x5cff): undefined reference to `MPI_Barrier' H5FDmpio.c:(.text+0x5d21): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5Pget_fapl_mpiposix':
H5FDmpiposix.c:(.text+0x7ed): undefined reference to `MPI_Comm_dup' H5FDmpiposix.c:(.text+0x80f): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_fapl_get':
H5FDmpiposix.c:(.text+0xa9f): undefined reference to `MPI_Comm_dup' H5FDmpiposix.c:(.text+0xac1): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_fapl_copy':
H5FDmpiposix.c:(.text+0xd70): undefined reference to `MPI_Comm_dup' H5FDmpiposix.c:(.text+0xd92): undefined reference to `MPI_Error_string'/usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_fapl_free':
H5FDmpiposix.c:(.text+0xf80): undefined reference to `MPI_Comm_free' /usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_open': H5FDmpiposix.c:(.text+0x13e0): undefined reference to `MPI_Comm_dup' H5FDmpiposix.c:(.text+0x140b): undefined reference to `MPI_Error_string' H5FDmpiposix.c:(.text+0x14f1): undefined reference to `MPI_Comm_rank' H5FDmpiposix.c:(.text+0x151c): undefined reference to `MPI_Error_string' H5FDmpiposix.c:(.text+0x1602): undefined reference to `MPI_Comm_size' H5FDmpiposix.c:(.text+0x162d): undefined reference to `MPI_Error_string' H5FDmpiposix.c:(.text+0x17c4): undefined reference to `MPI_Bcast' H5FDmpiposix.c:(.text+0x17ef): undefined reference to `MPI_Error_string' H5FDmpiposix.c:(.text+0x1b1a): undefined reference to `MPI_Bcast' H5FDmpiposix.c:(.text+0x1b45): undefined reference to `MPI_Error_string' H5FDmpiposix.c:(.text+0x1dde): undefined reference to `MPI_Comm_free' /usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_close': H5FDmpiposix.c:(.text+0x1f7a): undefined reference to `MPI_Barrier' H5FDmpiposix.c:(.text+0x1f88): undefined reference to `MPI_Comm_free'/usr/local/lib/libhdf5.a(H5FDmpiposix.o): In function `H5FD_mpiposix_truncate':
H5FDmpiposix.c:(.text+0x34ac): undefined reference to `MPI_Barrier' H5FDmpiposix.c:(.text+0x34ce): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Smpio.o): In function `H5S_mpio_hyper_type': H5Smpio.c:(.text+0x8d1): undefined reference to `MPI_Type_contiguous' H5Smpio.c:(.text+0x8fc): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0xa8d): undefined reference to `MPI_Type_vector' H5Smpio.c:(.text+0xaa1): undefined reference to `MPI_Type_free' H5Smpio.c:(.text+0xac5): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0xc1f): undefined reference to `MPI_Type_extent' H5Smpio.c:(.text+0xc4a): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0xdc2): undefined reference to `MPI_Type_struct' H5Smpio.c:(.text+0xdd6): undefined reference to `MPI_Type_free' H5Smpio.c:(.text+0xdfa): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0xf07): undefined reference to `MPI_Type_commit' H5Smpio.c:(.text+0xf32): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Smpio.o): In function `H5S_mpio_span_hyper_type': H5Smpio.c:(.text+0x1281): undefined reference to `MPI_Type_commit' H5Smpio.c:(.text+0x12a3): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Smpio.o): In function `H5S_obtain_datatype': H5Smpio.c:(.text+0x151a): undefined reference to `MPI_Type_contiguous' H5Smpio.c:(.text+0x1545): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1623): undefined reference to `MPI_Type_commit' H5Smpio.c:(.text+0x164e): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x17b4): undefined reference to `MPI_Type_hindexed' H5Smpio.c:(.text+0x17df): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1a76): undefined reference to `MPI_Type_commit' H5Smpio.c:(.text+0x1aa1): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1bc0): undefined reference to `MPI_Type_hvector' H5Smpio.c:(.text+0x1beb): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1cc9): undefined reference to `MPI_Type_commit' H5Smpio.c:(.text+0x1cf4): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1dd2): undefined reference to `MPI_Type_free' H5Smpio.c:(.text+0x1dfd): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x1f3d): undefined reference to `MPI_Type_struct' H5Smpio.c:(.text+0x1f68): undefined reference to `MPI_Error_string' H5Smpio.c:(.text+0x2084): undefined reference to `MPI_Type_free' H5Smpio.c:(.text+0x20af): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dchunk.o): In function `H5D_chunk_allocate': H5Dchunk.c:(.text+0xa926): undefined reference to `MPI_Barrier' H5Dchunk.c:(.text+0xa951): undefined reference to `MPI_Error_string' /usr/local/lib/libhdf5.a(H5Dcontig.o): In function `H5D_contig_fill': H5Dcontig.c:(.text+0xd1b): undefined reference to `MPI_Barrier' H5Dcontig.c:(.text+0xd46): undefined reference to `MPI_Error_string' make[2]: *** [nf_test] Error 1 make[2]: Leaving directory `/home/cmoffat/Sandbox/netcdf-4.0.1/nf_test' make[1]: *** [check-am] Error 2 make[1]: Leaving directory `/home/cmoffat/Sandbox/netcdf-4.0.1/nf_test' make: *** [check-recursive] Error 1
netcdfgroup
archives: