Open MPI logo

Hardware Locality Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Users mailing list

Subject: Re: [hwloc-users] Getting the cache hierarchy
From: Olivier Cessenat (cessenat_at_[hidden])
Date: 2010-06-06 15:22:50


My system is "normal" to me : i686 native gcc compiler, but gfortran
<<
$ gfortran -dumpversion
GNU Fortran (GCC) 4.3.0 20071030 (experimental) [trunk revision 129762]
Copyright (C) 2007 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
$ gcc -dumpversion
4.3.0
>>

Configure full output with gfortran in the path:
<<
[root_at_valerie hwloc-1.0.1]# ./configure --enable-debug && make && make
install

###
### Configuring hwloc distribution tarball
### Startup tests
###
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for hwloc version... 1.0.1
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes

###
### Configuring hwloc core
###
checking hwloc building mode... standalone
configure: hwloc builddir: /tmp/hwloc-1.0.1
configure: hwloc srcdir: /tmp/hwloc-1.0.1
checking if want hwloc maintainer support... enabled
checking for hwloc directory prefix... (none)
checking for hwloc symbol prefix... hwloc_
checking for gcc option to accept ISO C99... -std=gnu99
checking size of void *... 0
checking which OS support to include... Linux
checking which CPU support to include... unknown -- assuming x86_64
checking whether diff accepts -u... -u
checking size of unsigned long... 0
checking size of unsigned int... 0
checking for __attribute__... yes
checking for __attribute__(aligned)... yes
checking for __attribute__(always_inline)... yes
checking for __attribute__(cold)... yes
checking for __attribute__(const)... yes
checking for __attribute__(deprecated)... yes
checking for __attribute__(format)... no
checking for __attribute__(hot)... yes
checking for __attribute__(malloc)... yes
checking for __attribute__(may_alias)... yes
checking for __attribute__(no_instrument_function)... yes
checking for __attribute__(nonnull)... no
checking for __attribute__(noreturn)... yes
checking for __attribute__(packed)... yes
checking for __attribute__(pure)... yes
checking for __attribute__(sentinel)... no
checking for __attribute__(unused)... yes
checking for __attribute__(warn_unused_result)... yes
checking for __attribute__(weak_alias)... yes
checking if gcc supports -fvisibility... yes
checking enable symbol visibility... yes
configure: WARNING: " -fvisibility=hidden" has been added to hwloc's
CFLAGS
checking for inline compatibility keyword... __inline__
checking for strncasecmp... yes
checking whether function strncasecmp is declared... yes
checking for stdint.h... (cached) yes
checking for wchar_t... yes
checking for putwc... yes
checking locale.h usability... no
checking locale.h presence... yes
configure: WARNING: locale.h: present but cannot be compiled
configure: WARNING: locale.h: check for missing prerequisite
headers?
configure: WARNING: locale.h: see the Autoconf documentation
configure: WARNING: locale.h: section "Present But Cannot Be
Compiled"
configure: WARNING: locale.h: proceeding with the compiler's result
configure: WARNING: ##
------------------------------------------------------ ##
configure: WARNING: ## Report this to
http://www.open-mpi.org/community/help/ ##
configure: WARNING: ##
------------------------------------------------------ ##
checking for locale.h... no
checking langinfo.h usability... no
checking langinfo.h presence... yes
configure: WARNING: langinfo.h: present but cannot be compiled
configure: WARNING: langinfo.h: check for missing prerequisite
headers?
configure: WARNING: langinfo.h: see the Autoconf documentation
configure: WARNING: langinfo.h: section "Present But Cannot Be
Compiled"
configure: WARNING: langinfo.h: proceeding with the compiler's result
configure: WARNING: ##
------------------------------------------------------ ##
configure: WARNING: ## Report this to
http://www.open-mpi.org/community/help/ ##
configure: WARNING: ##
------------------------------------------------------ ##
checking for langinfo.h... no
checking curses.h usability... no
checking curses.h presence... yes
configure: WARNING: curses.h: present but cannot be compiled
configure: WARNING: curses.h: check for missing prerequisite
headers?
configure: WARNING: curses.h: see the Autoconf documentation
configure: WARNING: curses.h: section "Present But Cannot Be
Compiled"
configure: WARNING: curses.h: proceeding with the compiler's result
configure: WARNING: ##
------------------------------------------------------ ##
configure: WARNING: ## Report this to
http://www.open-mpi.org/community/help/ ##
configure: WARNING: ##
------------------------------------------------------ ##
checking for curses.h... no
checking for KAFFINITY... no
checking for PROCESSOR_CACHE_TYPE... no
checking for CACHE_DESCRIPTOR... no
checking for LOGICAL_PROCESSOR_RELATIONSHIP... no
checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION... no
checking for GROUP_AFFINITY... no
checking for PROCESSOR_RELATIONSHIP... no
checking for NUMA_NODE_RELATIONSHIP... no
checking for CACHE_RELATIONSHIP... no
checking for PROCESSOR_GROUP_INFO... no
checking for GROUP_RELATIONSHIP... no
checking for SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX... no
checking for main in -lgdi32... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking sys/lgrp_user.h usability... no
checking sys/lgrp_user.h presence... no
checking for sys/lgrp_user.h... no
checking kstat.h usability... no
checking kstat.h presence... no
checking for kstat.h... no
checking infiniband/verbs.h usability... no
checking infiniband/verbs.h presence... no
checking for infiniband/verbs.h... no
checking whether _SC_NPROCESSORS_ONLN is declared... yes
checking whether _SC_NPROCESSORS_CONF is declared... yes
checking whether _SC_NPROC_ONLN is declared... no
checking whether _SC_NPROC_CONF is declared... no
checking whether _SC_LARGE_PAGESIZE is declared... no
checking mach/mach_host.h usability... no
checking mach/mach_host.h presence... no
checking for mach/mach_host.h... no
checking mach/mach_init.h usability... no
checking mach/mach_init.h presence... no
checking for mach/mach_init.h... no
checking sys/param.h usability... no
checking sys/param.h presence... yes
configure: WARNING: sys/param.h: present but cannot be compiled
configure: WARNING: sys/param.h: check for missing prerequisite
headers?
configure: WARNING: sys/param.h: see the Autoconf documentation
configure: WARNING: sys/param.h: section "Present But Cannot Be
Compiled"
configure: WARNING: sys/param.h: proceeding with the compiler's result
configure: WARNING: ##
------------------------------------------------------ ##
configure: WARNING: ## Report this to
http://www.open-mpi.org/community/help/ ##
configure: WARNING: ##
------------------------------------------------------ ##
checking for sys/param.h... no
checking for sys/sysctl.h... no
checking for sysctl... yes
checking for sysctlbyname... no
checking for pthread_t... yes
checking whether function sched_setaffinity is declared... yes
checking for old prototype of sched_setaffinity... no
checking for working CPU_SET... yes
checking for working CPU_SET_S... no
checking for KERRIGHED... no
checking for lib... no
checking for bash... /bin/sh
checking for ffs... yes
checking whether function ffs is declared... yes
checking for ffsl... yes
checking whether function ffsl is declared... yes
checking for fls... no
checking for flsl... no
checking for clz... no
checking for clzl... no
checking for openat... no
checking whether numa_bitmask_alloc is declared... no
checking pthread_np.h usability... no
checking pthread_np.h presence... no
checking for pthread_np.h... no
checking whether pthread_setaffinity_np is declared... no
checking whether pthread_getaffinity_np is declared... no
checking for sched_setaffinity... yes
checking for sys/cpuset.h... no
checking for cpuid... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include

###
### Configuring hwloc documentation
###
checking if this is a developer build... no (doxygen generation is
optional)
checking for doxygen... no
checking for pdflatex... /usr/bin/pdflatex
checking for makeindex... /usr/bin/makeindex
checking for fig2dev... /usr/X11R6/bin/fig2dev
checking if can build doxygen docs... no
checking for w3m... no
checking for lynx... /usr/bin/lynx
checking if can build top-level README... yes
checking if will build doxygen docs... no
checking if will install doxygen docs... yes
checking whether to enable "picky" compiler mode... no (default)

###
### Configuring hwloc command line utilities
###
checking for CAIRO... no
checking for XML... yes
checking for xmlNewDoc... yes
checking for final XML support... yes
checking for xmllint... xmllint

###
### Configuring hwloc tests
###
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen-config.cfg
config.status: creating utils/Makefile
config.status: creating hwloc.pc
config.status: creating tests/Makefile
config.status: creating tests/linux/Makefile
config.status: creating tests/xml/Makefile
config.status: creating tests/ports/Makefile
config.status: creating tests/linux/gather-topology.sh
config.status: creating tests/linux/test-topology.sh
config.status: creating tests/xml/test-topology.sh
config.status: creating utils/test-hwloc-distrib.sh
config.status: creating include/private/config.h
config.status: creating include/hwloc/config.h
config.status: linking src/topology.c to tests/ports/topology.c
config.status: linking src/traversal.c to tests/ports/traversal.c
config.status: linking src/topology-synthetic.c to
tests/ports/topology-synthetic.c
config.status: linking src/topology-solaris.c to
tests/ports/topology-solaris.c
config.status: linking src/topology-aix.c to tests/ports/topology-aix.c
config.status: linking src/topology-osf.c to tests/ports/topology-osf.c
config.status: linking src/topology-windows.c to
tests/ports/topology-windows.c
config.status: linking src/topology-darwin.c to
tests/ports/topology-darwin.c
config.status: linking src/topology-freebsd.c to
tests/ports/topology-freebsd.c
config.status: linking src/topology-hpux.c to
tests/ports/topology-hpux.c
config.status: executing depfiles commands
config.status: executing chmoding-scripts commands
config.status: executing libtool commands
Making all in src
make[1]: Entering directory `/tmp/hwloc-1.0.1/src'
  CC topology.lo
In file included from topology.c:17:
/opt/gfortran/irun/bin/../lib/gcc/i386-pc-linux-gnu/4.3.0/include-fixed/sys/stat.h:345: error: expecte
d ',' or ';' before '__wur'
In file included from /tmp/hwloc-1.0.1/include/hwloc.h:17,
                 from topology.c:21:
/tmp/hwloc-1.0.1/include/hwloc/config.h:115:2: error: #error "unknown
size for unsigned long."
/tmp/hwloc-1.0.1/include/hwloc/config.h:119:2: error: #error "unknown
size for unsigned int."
topology.c: In function 'hwloc_get_sysctl':
topology.c:66: warning: implicit declaration of function 'sysctl'
make[1]: *** [topology.lo] Erreur 1
make[1]: Leaving directory `/tmp/hwloc-1.0.1/src'
make: *** [all-recursive] Erreur 1
>>

Cheers,

Olivier.

Le dimanche 06 juin 2010 à 20:13 +0200, Samuel Thibault a écrit :
> Olivier Cessenat, le Sun 06 Jun 2010 19:02:21 +0200, a écrit :
> > Le dimanche 06 juin 2010 à 18:39 +0200, Samuel Thibault a écrit :
> > > Olivier Cessenat, le Sun 06 Jun 2010 18:14:35 +0200, a écrit :
> > > > In file included from topology.c:17:
> > > > /opt/gfortran/irun/bin/../lib/gcc/i386-pc-linux-gnu/4.3.0/include-fixed/sys/stat.h:345: error: expected ',' or ';' before '__wur'
> > >
> > > Wow, how odd. Could you send us the file? I really wonder what they
> > > put there that errors out like this.
> > ==>
> > Yes, joined. I do not know why this header is used instead of the
> > standard one... I do not see the connection with gfortran !
>
> I don't see it either, and I don't see how hwloc could make that line
> fail. It properly includes <sys/types.h> before including <sys/stat.h>,
> so at least it respects the standard rules. Your stat.h comes from /opt,
> maybe you should post the complete output of ./configure to check which
> mixture of compilers you are using, and maybe try to get odd compilers
> out from PATH.
>
> > > > In file included from /tmp/hwloc-1.0.1/include/hwloc.h:17,
> > > > from topology.c:21:
> > > > /tmp/hwloc-1.0.1/include/hwloc/config.h:115:2: error: #error "unknown
> > > > size for unsigned long."
> > > > /tmp/hwloc-1.0.1/include/hwloc/config.h:119:2: error: #error "unknown
> > > > size for unsigned int."
> > >
> > > Could you tell us how much HWLOC_SIZEOF_UNSIGNED_LONG is defined to?
> > > This looks like autoconf wasn't able to properly determine it actually.
> > ==>
> > What should I do exactly ? I do not see HWLOC_SIZEOF_UNSIGNED_LONG from
> > configure ouput.
> > Here is what find gives:
> > $ find . -name \*.h -exec grep HWLOC_SIZEOF_UNSIGNED_LONG {} /dev/null
> > \;
> > ./include/hwloc/config.h:#define HWLOC_SIZEOF_UNSIGNED_LONG 4
> > ./include/hwloc/config.h:#define HWLOC_BITS_PER_LONG
> > (HWLOC_SIZEOF_UNSIGNED_LONG * 8)
> > ./include/private/config.h:#define HWLOC_SIZEOF_UNSIGNED_LONG 4
>
> So it's 4. I fail to see how your compiler could not see that 4*8 is
> equal to 32..
>
> > Oh, by the way, there are some messages provided by configure:
> > <<
> > checking locale.h presence... yes
> > configure: WARNING: locale.h: present but cannot be compiled
> > configure: WARNING: locale.h: check for missing prerequisite
> > headers?
>
> This looks like your compiler is a cross-compiler or some odd thing like
> that which autoconf doesn't always correctly handle concerning headers.
>
> Samuel
> _______________________________________________
> hwloc-users mailing list
> hwloc-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users