firedrake-install script fails using wrong C++ compiler
Dear Firedrake developers, I'm trying to install Firedrake with the install script on CentOS Linux release 7.3.1611. I'm doing a "firedrake-install --no_package_manager --disable-ssh". The script fails when building pyop2/sparsity.cpp, because it did not find mpi.h. I notice that he uses gcc for compiling while he should use the appropriate MPI Wrapper function mpicxx. There are environment variables available in my system ($MPICC, $MPICXX, $MPIFC) pointing to the appropriate MPI Wrappers (mpicc, mpicxx, mpif90). How do I tell the install script to use these? I notice the option "--mpicc" for the C compiler, but how do I set the C++ (and Fortran) compiler? Thank you! Henrik -- Dipl.-Math. Henrik Büsing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University ------------------------------------------------------ Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 ------------------------------------------------------ http://www.eonerc.rwth-aachen.de/GGE hbuesing@eonerc.rwth-aachen.de ------------------------------------------------------
On Thu, Mar 9, 2017 at 5:26 PM, Buesing, Henrik <HBuesing@eonerc.rwth-aachen.de> wrote:
Dear Firedrake developers,
I’m trying to install Firedrake with the install script on CentOS Linux release 7.3.1611. I’m doing a
“firedrake-install --no_package_manager --disable-ssh”.
The script fails when building pyop2/sparsity.cpp, because it did not find mpi.h. I notice that he uses gcc for compiling while he should use the appropriate MPI Wrapper function mpicxx.
There are environment variables available in my system ($MPICC, $MPICXX, $MPIFC) pointing to the appropriate MPI Wrappers (mpicc, mpicxx, mpif90).
It is not sufficient to have an $MPICC environment variable. You need to have 'mpicc' in the path, which is what i would recommend you doing.
How do I tell the install script to use these? I notice the option “--mpicc” for the C compiler, but how do I set the C++ (and Fortran) compiler?
PETSc will figure out the mpicxx and mpif compiler itself when you set mpicc, at least it does it for me. But as already stated, add the mpicc binary path to your $PATH and the install script will use the correct mpi compiler wrapper.
Thank you!
Henrik
--
Dipl.-Math. Henrik Büsing
Institute for Applied Geophysics and Geothermal Energy
E.ON Energy Research Center
RWTH Aachen University
------------------------------------------------------
Mathieustr. 10 | Tel +49 (0)241 80 49907
52074 Aachen, Germany | Fax +49 (0)241 80 49889
------------------------------------------------------
http://www.eonerc.rwth-aachen.de/GGE
hbuesing@eonerc.rwth-aachen.de
------------------------------------------------------
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
There are environment variables available in my system ($MPICC,
$MPICXX,
$MPIFC) pointing to the appropriate MPI Wrappers (mpicc, mpicxx, mpif90).
It is not sufficient to have an $MPICC environment variable. You need to have 'mpicc' in the path, which is what i would recommend you doing.
mpicc is in my $PATH. I will do it again and send the log. Thank you! Henrik
There are environment variables available in my system ($MPICC,
$MPICXX,
$MPIFC) pointing to the appropriate MPI Wrappers (mpicc, mpicxx, mpif90).
It is not sufficient to have an $MPICC environment variable. You need to have 'mpicc' in the path, which is what i would recommend you doing.
mpicc is in my $PATH. I will do it again and send the log.
Ok. Here comes the log (see [1]). As you can see while installing PyOP2 he uses gcc instead of mpicxx to compile sparsity.cpp. I compiled this file manually with mpicxx with no problems. So how can I tell him to use mpicxx when installing PyOP2. Thank you! Henrik [1] 2017-03-09 21:24:05,785 INFO Installing PyOP2/ 2017-03-09 21:24:05,785 INFO Firedrake/firedrake/bin/pip install --no-binary mpi4py --no-deps -vvv -e PyOP2/ 2017-03-09 21:24:15,490 DEBUG Obtaining file://Firedrake/firedrake/src/PyOP2 Running setup.py (path:Firedrake/firedrake/src/PyOP2/setup.py) egg_info for package from file://Firedrake/firedrake/src/PyOP2 Running command python setup.py egg_info /rwthfs/rz/SW/UTIL.common/Python/2.7.12/x86_64/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_requires' warnings.warn(msg) running egg_info creating PyOP2.egg-info writing requirements to PyOP2.egg-info/requires.txt writing PyOP2.egg-info/PKG-INFO writing top-level names to PyOP2.egg-info/top_level.txt writing dependency_links to PyOP2.egg-info/dependency_links.txt writing manifest file 'PyOP2.egg-info/SOURCES.txt' reading manifest file 'PyOP2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.c' under directory 'pyop2' writing manifest file 'PyOP2.egg-info/SOURCES.txt' Source in ./PyOP2 has version 0.13.0+295.gb12f740, which satisfies requirement PyOP2==0.13.0+295.gb12f740 from file://Firedrake/firedrake/src/PyOP2 Installing collected packages: PyOP2 Running setup.py develop for PyOP2 Running command Firedrake/firedrake/bin/python -c "import setuptools, tokenize;__file__='Firedrake/firedrake/src/PyOP2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps /rwthfs/rz/SW/UTIL.common/Python/2.7.12/x86_64/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_requires' warnings.warn(msg) running develop running egg_info writing requirements to PyOP2.egg-info/requires.txt writing PyOP2.egg-info/PKG-INFO writing top-level names to PyOP2.egg-info/top_level.txt writing dependency_links to PyOP2.egg-info/dependency_links.txt reading manifest file 'PyOP2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.c' under directory 'pyop2' writing manifest file 'PyOP2.egg-info/SOURCES.txt' running build_ext cythoning pyop2/sparsity.pyx to pyop2/sparsity.cpp building 'pyop2.sparsity' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/pyop2 gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipyop2 -IFiredrake/firedrake/lib/python2.7/site-packages/numpy/core/include -IFiredrake/firedrake/lib/python2.7/site-packages/petsc4py/include -IFiredrake/firedrake/lib/python2.7/site-packages/petsc/include -I/rwthfs/rz/SW/UTIL.common/Python/2.7.12/x86_64/include/python2.7 -c pyop2/sparsity.cpp -o build/temp.linux-x86_64-2.7/pyop2/sparsity.o cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default] In file included from Firedrake/firedrake/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0, from Firedrake/firedrake/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18, from Firedrake/firedrake/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from pyop2/sparsity.cpp:456: Firedrake/firedrake/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \ ^ In file included from Firedrake/firedrake/lib/python2.7/site-packages/petsc/include/petscbag.h:4:0, from Firedrake/firedrake/lib/python2.7/site-packages/petsc/include/petsc.h:5, from pyop2/sparsity.cpp:458: Firedrake/firedrake/lib/python2.7/site-packages/petsc/include/petscsys.h:130:17: fatal error: mpi.h: No such file or directory #include <mpi.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 Cleaning up... Command "Firedrake/firedrake/bin/python -c "import setuptools, tokenize;__file__='Firedrake/firedrake/src/PyOP2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in Firedrake/firedrake/src/PyOP2/ Exception information: Traceback (most recent call last): File "Firedrake/firedrake/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "Firedrake/firedrake/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "Firedrake/firedrake/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install **kwargs File "Firedrake/firedrake/lib/python2.7/site-packages/pip/req/req_install.py", line 845, in install install_options, global_options, prefix=prefix) File "Firedrake/firedrake/lib/python2.7/site-packages/pip/req/req_install.py", line 1007, in install_editable show_stdout=False) File "Firedrake/firedrake/lib/python2.7/site-packages/pip/utils/__init__.py", line 707, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "Firedrake/firedrake/bin/python -c "import setuptools, tokenize;__file__='Firedrake/firedrake/src/PyOP2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in Firedrake/firedrake/src/PyOP2/
Dear Henrik,
On 9 Mar 2017, at 20:41, Buesing, Henrik <HBuesing@eonerc.rwth-aachen.de> wrote:
There are environment variables available in my system ($MPICC, $MPICXX, $MPIFC) pointing to the appropriate MPI Wrappers (mpicc, mpicxx, mpif90).
It is not sufficient to have an $MPICC environment variable. You need to have 'mpicc' in the path, which is what i would recommend you doing.
mpicc is in my $PATH. I will do it again and send the log.
Ok. Here comes the log (see [1]). As you can see while installing PyOP2 he uses gcc instead of mpicxx to compile sparsity.cpp. I compiled this file manually with mpicxx with no problems. So how can I tell him to use mpicxx when installing PyOP2.
Thank you! Henrik
Looking at this failure, I suspect that you have explicitly set the "CC" environment variable to gcc? The PyOP2 setup.py has this code: if 'CC' not in env: env['CC'] = "mpicc" Which is not very robust like this. Does it work if you do: $ unset CC $ firedrake-install ... Thanks, Lawrence
Looking at this failure, I suspect that you have explicitly set the "CC" environment variable to gcc? True!
Does it work if you do:
$ unset CC $ firedrake-install ... Yes! Thank you! Henrik
Thanks,
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
If you want to set the actual compiler used by the wrapper mpicc, there are implementation-specific environment variables for that, e.g. OMPI_CC or MPICH_CC. On 10/03/17 11:15, Buesing, Henrik wrote:
Looking at this failure, I suspect that you have explicitly set the "CC" environment variable to gcc? True!
Does it work if you do:
$ unset CC $ firedrake-install ... Yes! Thank you! Henrik
Thanks,
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (4)
-
Buesing, Henrik
-
Julian Andrej
-
Lawrence Mitchell
-
Miklós Homolya