>>> 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/