Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302056 - sci-libs/netcdf-4.0.1 fails to configure with sys-cluster/openmpi and mpi USE flag
Summary: sci-libs/netcdf-4.0.1 fails to configure with sys-cluster/openmpi and mpi USE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 302621
  Show dependency tree
 
Reported: 2010-01-24 12:42 UTC by Juergen Rose
Modified: 2010-01-28 22:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/sci-libs/netcdf-4.0.1/work/netcdf-4.0.1/config.log (config.log,102.92 KB, text/plain)
2010-01-24 12:58 UTC, Juergen Rose
Details
adding cxx flag, mpi as a dependency, hdf5 must use [mpi=] (netcdf-4.0.1.diff,1.21 KB, patch)
2010-01-28 11:25 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff
fixing fortran tests when using mpi wrappers and gfortran >4.1.x (netcdf-4.0.1-fortran-tests.patch,509 bytes, patch)
2010-01-28 18:14 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff
adding cxx flag, mpi as a dependency, hdf5 must use [mpi=], + epatch (netcdf-4.0.1.diff,1.60 KB, patch)
2010-01-28 18:14 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2010-01-24 12:42:46 UTC
'emerge netcdf' fails with:
...
checking for hdf5.h... no
checking for H5Fflush in -lhdf5... yes
configure: error: Can't find the hdf5 header and/or library, or can't link a program       to it. HDF5 must be built with zlib; the location of zlib must be specified for netCDF-4 with the       --with-zlib option. If HDF5 was also built with szlib, then the location of szlib must also be       specified with the --with-slib option.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sci-libs/netcdf-4.0.1/work/netcdf-4.0.1/config.log
 * ERROR: sci-libs/netcdf-4.0.1 failed:
 *   econf failed


In config.log you can find. that mpi.h and mpio.h are not found.
openmpi installs the first file under /usr/include/openmpi and there is no mpio.h in openmpi.


Reproducible: Always




orca ~ # emerge --info =sci-libs/netcdf-4.0.1
Portage 2.1.7.16 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.11-r1, 2.6.32-gentoo-r2 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-r2-x86_64-Intel-R-_Xeon-R-_CPU_W3520_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Sun, 24 Jan 2010 10:00:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4, 3.1.1-r1
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -msse4 -mcx16 -msahf -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/x11 /var/lib/layman/zugaina /var/lib/layman/java-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X a52 aac abiword acl acpi administrator alsa amd64 ao aotuv apache2 applets archive arpack asf aspell assistent audacious audiofile automap automount bash-completion berkdb blas blast boo boost bzip2 c++ cairo cdio cdparanoia cdr cdrkit cg cli consolekit corba cracklib crypt css cuda cups curl cxx daap db dbase dbi dbm dbus designer devhelp device-mapper dga dia djvu doc dri ds2490 dvd dvi eds elf emacs emboss empathy encode epiphany evo examples exif expat extensions extra extras fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx fts3 fuse galago garmin gcj gd gdal gdbm geolocation geos gif gimp ginac git glade glib glitz gml gmp gmtsuppl gnokii gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk guile hal harness hddtemp hdf hdf5 hdri hlapi http httpd hvm iconv icq icu id3 ide imagemagick imap innodb inotify ipv6 ithreads jadetex java java5 java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm lapack latex latex3 lcms ldap lensfun libgda lm_sensors lua lzo mad mail maildir mailwrapper mapnik math matroska mkl mmx mmxext mng modules mono motif mozdevelop mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numarray numeric nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp pae pam pcre pda pdf perl plotutils plugins png podcast policykit posix postgres postscript pppd preview-latex proj projectx pstricks pulseaudio pymol python qhull quicktime readline reflection reiserfs romio rpc rrdcgi rrdtool samba sasl science sdl server session sip slang slp smbclient smp sndfile snmp soup sox speex spell spl sql sqlite sse sse2 ssl subtitles subversion suexec svg swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs theora thinkpad threads thunderbird tidy tiff tk tools truetype udev unicode v4l2 virtualbox vorbis wav webkit wxwidgets xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                evdev               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia nouveau vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sci-libs/netcdf-4.0.1 was built with the following:
USE="doc fortran (multilib) -hdf5 -mpi -szip" 


orca ~ # emerge -pqv =sci-libs/netcdf-4.0.1
[ebuild   R   ] sci-libs/netcdf-4.0.1  USE="doc fortran hdf5* mpi* szip*"
Comment 1 Juergen Rose 2010-01-24 12:58:18 UTC
Created attachment 217318 [details]
 /var/tmp/portage/sci-libs/netcdf-4.0.1/work/netcdf-4.0.1/config.log
Comment 2 Juergen Rose 2010-01-24 14:10:26 UTC
Deinstalling openmpi and doing:

for p in `equery -qC hasuse mpi` ; do emerge -v1 =$p ; done

installs also netcdf-4.0.1 with the mpi USE flag.
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-24 15:01:46 UTC
(In reply to comment #2)
> Deinstalling openmpi and doing:
> 
> for p in `equery -qC hasuse mpi` ; do emerge -v1 =$p ; done
> 
> installs also netcdf-4.0.1 with the mpi USE flag.
> 

It's not netcdf, but rather hdf5 issue. Did you compile hdf5[mpi] with openmpi?
There is no mpio.h installed because ROM-IO is defined elsewhere in openmpi.
Comment 4 Juergen Rose 2010-01-25 00:13:25 UTC
I tested once more:
1st step: erasing mpich2: 'emerge -C mpich2"
2nd step: emerging all mpi depending packages:
             for p in `equery -qC hasuse mpi` ; do emerge -v1 =$p ; done

             This emerge first openmpi, then hdf5 and then fails netcdf-4.0.1
             with the same error:

checking for H5Fflush in -lhdf5... yes
configure: error: Can't find the hdf5 header and/or library, or can't link a program       to it. HDF5 must be built with zlib; the location of zlib must be specified for netCDF-4 with the       --with-zlib option. If HDF5 was also built with szlib, then the location of szlib must also be       specified with the --with-slib option.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sci-libs/netcdf-4.0.1/work/netcdf-4.0.1/config.log
Comment 5 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-28 08:14:48 UTC
(In reply to comment #0)

> In config.log you can find. that mpi.h and mpio.h are not found.
> openmpi installs the first file under /usr/include/openmpi and there is no
> mpio.h in openmpi.

My mistake of not not reading your post thoroughly. Why do you have mpi.h in /usr/include/openmpi in the first place??

[ebuild   R   ] sys-cluster/openmpi-1.4.1  USE="cxx fortran ipv6 pbs romio -debug -heterogeneous -mpi-threads -threads -vt" 6,418 kB
Total: 1 package (1 reinstall), Size of downloads: 6,418 kB

xarth@hum:~$ equery f openmpi | grep "mpi\.h"
/usr/include/mpi.h

If you have openmpi in non standard place you'll have to use mpif90 wrapper...
Comment 6 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-28 11:25:49 UTC
Created attachment 217714 [details, diff]
adding cxx flag, mpi as a dependency, hdf5 must use [mpi=]

(In reply to comment #5)
> My mistake of not not reading your post thoroughly. Why do you have mpi.h in
> /usr/include/openmpi in the first place??
Again it was me that was outdated, mpi.h was moved to /usr/include/openmpi due to mpif90 include order issues. 
Try the following patch.
Comment 7 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-28 18:14:20 UTC
Created attachment 217755 [details, diff]
fixing fortran tests when using mpi wrappers and gfortran >4.1.x

gfortran no longer add second underscore to external functions
Comment 8 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-01-28 18:14:55 UTC
Created attachment 217756 [details, diff]
adding cxx flag, mpi as a dependency, hdf5 must use [mpi=], + epatch
Comment 9 Sébastien Fabbro (RETIRED) gentoo-dev 2010-01-28 22:21:16 UTC
Now applied in cvs, with some other fixes as well. Thanks.