[Dune] MPI problem with autotools
Christoph GrĂ¼ninger
christoph.grueninger at iws.uni-stuttgart.de
Thu Jun 4 08:53:53 CEST 2015
Hi Arya,
first of all, do not work as root. You call dunecontrol with leading "sudo" - drop that.
You can build the parallel tests in dune-common/dune/common/parallel/test to make sure that MPI works in general on your computer.
I think you forgott adding the MPIFLAGS in your Makefile.am. Compare to the Makefile.am from the parallel dune-common tests. If you cannot figure it out by yourself, send us your Makefile.am.
Bye
Christoph
> Am 03.06.2015 um 22:56 schrieb Arya Fallahi <arya.fallahi at gmail.com>:
>
> Hi Christoph,
>
> Sorry for sending you the problems again and again. I could figure out a command which was doing everything correctly, till it came to the installation of my application. I am using the following line:
>
> sudo CONFIGURE_FLAGS="MPICC='$HOME/extlib/openmpi-1.8/bin/mpicc' --enable-parallel --prefix='$HOME/extlib/cyrus' --with-metis='$HOME/extlib/metis-5.1' --with-alugrid='$HOME/extlib/alugrid-1.52'" ./dune-common/bin/dunecontrol --no-cmake all
>
> It installs all the required modules and detects Alugrid and open mpi. Howver, when it comes to the installation of my application, it behaves as mpi is not found. Have a look at the following lines:
>
> Now run ./configure to setup cyrus
> --- calling configure for cyrus ---
> ----- using default flags $CONFIGURE_FLAGS from environment -----
> ./configure MPICC='/afs/desy.de/user/a/afallahi/extlib/openmpi-1.8/bin/mpicc' --enable-parallel --prefix='/afs/desy.de/user/a/afallahi/extlib/cyrus' --with-metis='/afs/desy.de/user/a/afallahi/extlib/metis-5.1' --with-alugrid='/afs/desy.de/user/a/afallahi/extlib/alugrid-1.52' "--with-dune-common=/afs/desy.de/user/a/afallahi/workspace/dune-common/" "--with-dune-geometry=/afs/desy.de/user/a/afallahi/workspace/dune-geometry/" "--with-dune-grid=/afs/desy.de/user/a/afallahi/workspace/dune-grid/" ACLOCAL_AMFLAGS="-I . -I m4 -I /afs/desy.de/user/a/afallahi/workspace/dune-common/m4 -I /afs/desy.de/user/a/afallahi/workspace/dune-geometry/m4 -I /afs/desy.de/user/a/afallahi/workspace/dune-grid/m4"
> 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... no
> checking for mawk... mawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking how to create a pax tar archive... gnutar
> checking whether make supports nested variables... (cached) yes
> checking how to create a pax tar archive... (cached) gnutar
> checking for inkscape... no
> checking for doxygen... no
> checking for latex... latex
> checking for bibtex... bibtex
> checking for dvipdf... dvipdf
> checking for dvips... dvips
> checking for wml... no
> checking for dot... no
> checking for perl... perl
> checking for convert... convert
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for style of include used by make... GNU
> 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 whether gcc understands -c and -o together... yes
> checking dependency style of gcc... gcc3
> checking dependency style of gcc... (cached) gcc3
> checking how to run the C preprocessor... gcc -E
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking dependency style of g++... (cached) gcc3
> checking how to run the C++ preprocessor... g++ -E
> checking for g77... no
> checking for xlf... no
> checking for f77... no
> checking for frt... no
> checking for pgf77... no
> checking for cf77... no
> checking for fort77... no
> checking for fl32... no
> checking for af77... no
> checking for xlf90... no
> checking for f90... no
> checking for pgf90... no
> checking for pghpf... no
> checking for epcf90... no
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether gfortran accepts -g... yes
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran compiler... yes
> checking whether gfortran accepts -g... yes
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking how to print strings... printf
> checking for a sed that does not truncate output... /bin/sed
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> 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... 1572864
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
> checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
> 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 dlltool... no
> checking how to associate runtime and link libraries... printf %s\n
> checking for ar... ar
> checking for archiver @FILE support... @
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for sysroot... no
> checking for mt... mt
> checking if mt is a manifest tool... no
> 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 for dlfcn.h... yes
> 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... yes
> 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 -m elf_x86_64) supports shared libraries... yes
> 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... no
> checking whether to build static libraries... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for ld used by g++... /usr/bin/ld -m elf_x86_64
> checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking for g++ option to produce PIC... -fPIC -DPIC
> checking if g++ PIC flag -fPIC -DPIC works... yes
> checking if g++ static flag -static works... yes
> checking if g++ supports -c -o file.o... yes
> checking if g++ supports -c -o file.o... (cached) yes
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking dynamic linker characteristics... (cached) GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> checking for gfortran option to produce PIC... -fPIC
> checking if gfortran PIC flag -fPIC works... yes
> checking if gfortran static flag -static works... yes
> checking if gfortran supports -c -o file.o... yes
> checking if gfortran supports -c -o file.o... (cached) yes
> checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking dynamic linker characteristics... (cached) GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> checking for gfortran option to produce PIC... -fPIC
> checking if gfortran PIC flag -fPIC works... yes
> checking if gfortran static flag -static works... yes
> checking if gfortran supports -c -o file.o... yes
> checking if gfortran supports -c -o file.o... (cached) yes
> checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking dynamic linker characteristics... (cached) GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking for ranlib... (cached) ranlib
> checking how to get verbose linking output from gfortran... -v
> checking for Fortran 77 libraries of gfortran... -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath
> checking for dummy main to link with Fortran 77 libraries... none
> checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
> checking for sgemm_... no
> checking for ATL_xerbla in -latlas... no
> checking for sgemm_ in -lblas... no
> checking for sgemm_ in -lcxml... no
> checking for sgemm_ in -ldxml... no
> checking for sgemm_ in -lscs... no
> checking for sgemm_ in -lcomplib.sgimath... no
> checking for sgemm_ in -lblas... (cached) no
> checking for sgemm_ in -lblas... (cached) no
> checking how to get verbose linking output from gfortran... -v
> checking for Fortran libraries of gfortran... -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lgfortran -lm -lquadmath
> checking for dummy main to link with Fortran libraries... none
> checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
> checking whether compiler is officially supported by DUNE... yes
> checking whether g++ accepts -std=c++11... yes
> checking whether nullptr is supported... yes
> checking for C++11 constexpr... yes
> checking for C++11 noexcept specifier... yes
> checking for C++11 range-based for... yes
> checking whether compiling C++ code works... yes
> checking whether linking C++ objects works... yes
> checking for __attribute__((deprecated))... yes
> checking for __attribute__((deprecated("message")))... yes
> checking for C++11 keyword 'final'... yes
> checking for __attribute__((unused))... yes
> checking for C++11 std::declval()... yes
> checking whether the compiler properly supports testing for operator[]... yes
> checking for abi::__cxa_demangle... yes
> checking rpc/rpc.h usability... yes
> checking rpc/rpc.h presence... yes
> checking for rpc/rpc.h... yes
> checking for mpicc... /afs/desy.de/user/a/afallahi/extlib/openmpi-1.8/bin/mpicc
> checking for MPI_Init... yes
> checking for mpi.h... yes
> configure: Trying to identify the version of MPI compiler /afs/desy.de/user/a/afallahi/extlib/openmpi-1.8/bin/mpicc
> checking for lam... no
> checking for mpich... no
> checking for OpenMPI... yes
> checking whether compiling with OpenMPI works... yes
> checking whether MPI is recent enough (MPI-2.1)... yes
> configure: WARNING: Disabled test whether running with OpenMPI works.
> checking for MPI_Finalized in -lm... yes
> checking sys/mman.h usability... yes
> checking sys/mman.h presence... yes
> checking for sys/mman.h... yes
> checking for the pthreads library -lpthreads... no
> checking whether pthreads work without any flags... no
> checking whether pthreads work with -Kthread... no
> checking whether pthreads work with -kthread... no
> checking for the pthreads library -llthread... no
> checking whether pthreads work with -pthread... yes
> checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
> checking if more special flags are required for pthreads... no
> checking for cc_r... gcc
> checking whether the linker needs -Wl,-no-as-needed... yes (Ubuntu)
> checking libraries needed for std::thread...
> checking linker flags needed for std::thread... -Wl,-no-as-needed -pthread
> checking compiler flags needed for std::thread... -pthread
> checking whether std::thread works... yes
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking for size_t... yes
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for GMP... configure: searching for GMP in /usr...
> checking gmpxx.h usability... no
> checking gmpxx.h presence... no
> checking for gmpxx.h... no
> configure: WARNING: gmpxx.h not found in /usr
> configure: searching for GMP in /usr/local...
> checking for gmpxx.h... (cached) no
> configure: WARNING: gmpxx.h not found in /usr/local
> no
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking for string.h... (cached) yes
> checking for pow in -lm... yes
> checking for sqrt... yes
> checking for strchr... yes
> configure: creating ./config.lt
> config.lt: creating libtool
> checking for dune-common installation or source tree... testing /afs/desy.de/user/a/afallahi/workspace/dune-common/CMakeCache.txt
> found in /afs/desy.de/user/a/afallahi/workspace/dune-common
> checking dune/common/stdstreams.hh usability... yes
> checking dune/common/stdstreams.hh presence... yes
> checking for dune/common/stdstreams.hh... yes
> checking for libdunecommon... yes
> configure: Searching for dune-geometry...
> checking for dune-geometry installation or source tree... testing /afs/desy.de/user/a/afallahi/workspace/dune-geometry/CMakeCache.txt
> found in /afs/desy.de/user/a/afallahi/workspace/dune-geometry
> checking dune/geometry/quadraturerules.hh usability... yes
> checking dune/geometry/quadraturerules.hh presence... yes
> checking for dune/geometry/quadraturerules.hh... yes
> checking for libdunegeometry... yes
> checking for X... no
> checking whether we are using the Microsoft C compiler... no
> checking windows.h usability... no
> checking windows.h presence... no
> checking for windows.h... no
> checking for OpenGL library... no
> configure: WARNING: X libraries were not found and therefore not Grape check possible! See ./configure --help for X library options.
> configure: PARMETIS: checking for /usr/local/include/parmetis
> checking for METIS library... yes
> checking for METIS_PartGraphKway in -lmetis... yes
> checking for metis.h... yes
> checking METIS in /afs/desy.de/user/a/afallahi/extlib/metis-5.1... ok
> checking parmetis.h usability... no
> checking parmetis.h presence... no
> checking for parmetis.h... no
> configure: WARNING: parmetis.h not found in with -I -I/afs/desy.de/user/a/afallahi/extlib/metis-5.1/include -I/afs/desy.de/user/a/afallahi/extlib/openmpi-1.8/include -pthread -DMPIPP_H -DENABLE_MPI=1
> checking ParMETIS in ... failed
> configure: searching for ALBERTA in /usr...
> configure: searching for ALBERTA in /usr/local...
> configure: searching for ALBERTA in /usr/local/alberta...
> configure: searching for ALBERTA in /opt/alberta...
> checking alberta/alberta.h usability... no
> checking alberta/alberta.h presence... no
> checking for alberta/alberta.h... no
> configure: WARNING: alberta/alberta.h not found in -I/include -I/include/alberta
> Package libug was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libug.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libug' found
> Package libug was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libug.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libug' found
> checking for UG... no
> configure: WARNING: UG not found
> checking for amiramesh/AmiraMesh.h... no
> configure: WARNING: AmiraMesh.h not found in /usr/local/amiramesh/include/amiramesh
> checking for PSURFACE... no
> configure: WARNING: PSurface >= 2.0 not found in /usr/local/psurface
> checking psurface/PSurface.h usability... no
> checking psurface/PSurface.h presence... no
> checking for psurface/PSurface.h... no
> configure: searching for ALUGrid in /afs/desy.de/user/a/afallahi/extlib/alugrid-1.52...
> checking ALUGrid version >= 1.52... yes (ALUGrid-1.52)
> checking alugrid_serial.h usability... yes
> checking alugrid_serial.h presence... yes
> checking for alugrid_serial.h... yes
> configure: WARNING: "ALUGRID was not built for parallel support!"
> checking for library containing malloc... none required
> checking for dune-grid installation or source tree... testing /afs/desy.de/user/a/afallahi/workspace/dune-grid/CMakeCache.txt
> found in /afs/desy.de/user/a/afallahi/workspace/dune-grid
> checking dune/grid/onedgrid.hh usability... yes
> checking dune/grid/onedgrid.hh presence... yes
> checking for dune/grid/onedgrid.hh... yes
> checking for libdunegrid... yes
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating cyrus/Makefile
> config.status: creating m4/Makefile
> config.status: creating cyrus.pc
> config.status: creating config.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
>
> Found the following Dune-components:
>
> ----------------------------------------
>
> dune-common.............: version 2.4-git
> dune-geometry...........: version 2.4-git
> dune-grid...............: version 2.4-git
> ALBERTA.................: no
> ALUGrid.................: version 1.52 (serial)
> AmiraMesh...............: no
> GMP.....................: no
> Grape...................: no
> METIS...................: yes
> MPI.....................: yes (OpenMPI)
> OpenGL..................: no
> ParMETIS................: no
> UG......................: no
> psurface................: no
>
> ----------------------------------------
>
> See ./configure --help and config.log for reasons why a component wasn't found
>
> --- calling make for cyrus ---
> build directory:
> make
> (CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /afs/desy.de/user/a/afallahi/workspace/cyrus/missing autoheader)
> rm -f stamp-h1
> touch config.h.in
> cd . && /bin/bash ./config.status config.h
> config.status: creating config.h
> config.status: config.h is unchanged
> make all-recursive
> make[1]: Entering directory `/afs/desy.de/user/a/afallahi/workspace/cyrus'
> Making all in cyrus
> make[2]: Entering directory `/afs/desy.de/user/a/afallahi/workspace/cyrus/cyrus'
> make[3]: Entering directory `/afs/desy.de/user/a/afallahi/workspace/cyrus/cyrus'
> g++ -std=c++11 -DHAVE_CONFIG_H -I. -I.. -pthread -I/afs/desy.de/user/a/afallahi/workspace/dune-common -I/afs/desy.de/user/a/afallahi/workspace/dune-common -I/afs/desy.de/user/a/afallahi/workspace/dune-geometry -I/afs/desy.de/user/a/afallahi/workspace/dune-geometry -I/afs/desy.de/user/a/afallahi/workspace/dune-grid -I/afs/desy.de/user/a/afallahi/workspace/dune-grid -I/afs/desy.de/user/a/afallahi/extlib/alugrid-1.52/include -I/afs/desy.de/user/a/afallahi/extlib/alugrid-1.52/include/serial -I/afs/desy.de/user/a/afallahi/extlib/alugrid-1.52/include/duneinterface -DENABLE_ALUGRID -DWITH_INDEX_SETS -g -O2 -Wall -MT dgtd-dgtd.o -MD -MP -MF .deps/dgtd-dgtd.Tpo -c -o dgtd-dgtd.o `test -f 'dgtd.cc' || echo './'`dgtd.cc
> In file included from dgtd.cc:6:0:
> ../cyrus/dgtd.hh:26:17: fatal error: mpi.h: No such file or directory
> #include <mpi.h>
> ^
> compilation terminated.
> make[3]: *** [dgtd-dgtd.o] Error 1
> make[3]: Leaving directory `/afs/desy.de/user/a/afallahi/workspace/cyrus/cyrus'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/afs/desy.de/user/a/afallahi/workspace/cyrus/cyrus'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/afs/desy.de/user/a/afallahi/workspace/cyrus'
> make: *** [all] Error 2
> --- Failed to build cyrus ---
> Terminating dunecontrol due to previous errors!
>
> I have also attached the config.log. I will be thankful if you share me any ideas which may solve the problem.
>
> Thank you very much for your helps,
> Arya
>
>> On Wed, Jun 3, 2015 at 1:19 PM, Christoph GrĂ¼ninger <christoph.grueninger at iws.uni-stuttgart.de> wrote:
>> Hi Arya,
>> difficult to tell. You might have a look in to the configure script at
>> line 6982
>>
>> > configure:6863: checking whether gfortran-4.7 accepts -g
>> > configure:6874: gfortran-4.7 -c -g conftest.f >&5
>> > configure:6874: $? = 0
>> > configure:6882: result: yes
>> > configure:6971: checking build system type
>> > configure:6982: error: /bin/sh ./config.sub
>> > failed
>>
>> Your opts file does the line breaks the wrong way. Within the string you
>> have to indicate a line break with a backslash \ without trailing
>> whitespace.
>>
>> When you try without the opts file, you have to pass the necessary flags
>> like that in a single line:
>> CC=/usr/bin/whatever CONFIGURE_FLAGS="--prefix=/home/myself/dune
>> --enable-parallel" dunecontroll all
>>
>> Bye
>> Christoph
>>
>> --
>> A mathematician is a scientist who can figure out anything, except
>> such simple things as squaring the circle and trisecting an angle.
>> [Evan Esar (1899-1995), Esar's Comic Dictionary]
>
> <config.log>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150604/0b9a2c61/attachment.htm>
More information about the Dune
mailing list