I have successfully installed preCICE and its python bindings on Ubuntu a couple of times. I now need to do the same on a Cray system. I’m not root on the Cray system, so everything needs to be installed in my $HOME directory. I prefer to use v1.5.2 because that is the version on my development machine. The installation of preCICE went fairly smoothly. I ran into an issue where the PETSc tests failed, so I turned on the PETSC_EXECUTABLE_RUNS flag. I know that the installation of PETSc works fine because I’ve used it many times with other programs. I was also getting some problems with the python actions, so I turned that off. I think that I read somewhere in the docs that, the python actions aren’t required to use the python bindings. My final cmake configuration looked like below.
cmake -DCMAKE_INSTALL_PREFIX=/p/home/mnucci/install/precice/1.5.2 -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=ON -DBOOST_ROOT=$BOOST_ROOT -DEIGEN3_INCLUDE_DIR=/p/home/mnucci/software/eigen-git-mirror-3.3.7 -DPETSC_DIR=$PETSC_DIR -DPETSC_EXECUTABLE_RUNS=YES -DPYTHON=NO /p/home/mnucci/software/precice-1.5.2
The system python on the Cray system doesn’t have numpy or cython, so I use an anaconda distribution of python 3.5 that I installed. The Cray system is using MPICH, but it’s MPI wrappers are CC (for C++) and cc (for C). These wrappers don’t support the -compile-info or -link-info options that are called out in setup.py for the python bindings. To get past this problem I changed check_mpi_implementation in setup.py to always return MPICH. Similarly, I changed determine_mpi_args to return empty lists for mpi_compile_args and mpi_link_args. Since I installed preCICE to my $HOME directory, I followed the instructions in the README and tried the command below to build the bindings, where $PRECICE_DIR points to my installation directory.
python setup.py build_ext --mpicompiler=CC --include-dirs=$PRECICE_DIR/include --library-dirs=$PRECICE_DIR/lib
This resulted in the error below.
running build_ext
#####
calling my_build_ext
using --mpicompiler=CC
adding extension
Compiling /p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.pyx because it changed.
[1/1] Cythonizing /p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.pyx
#####
#####
calling my_build
using --mpicompiler=CC
#####
building ‘precice’ extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/p
creating build/temp.linux-x86_64-3.5/p/home
creating build/temp.linux-x86_64-3.5/p/home/mnucci
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src/precice
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src/precice/bindings
creating build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python
cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/p/home/mnucci/install/precice/1.5.2/include -I/p/home/mnucci/software/python/anaconda3/include/python3.5m -c /p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.cpp -o build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.o -Wall -std=c++11
gcc: error: =: No such file or directory
error: command ‘cc’ failed with exit status 1
This error is especially puzzling since if I try to execute the last command that the build process was running, it works (see below). It prints a warning, but the precice.o file is created. The error message above seems to be complaining about a missing precice.cpp file, but that file is in the directory, and the path given in the -c option is correct.
cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/p/home/mnucci/install/precice/1.5.2/include -I/p/home/mnucci/software/python/anaconda3/include/python3.5m -c /p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.cpp -o build/temp.linux-x86_64-3.5/p/home/mnucci/software/precice-1.5.2/src/precice/bindings/python/precice.o -Wall -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Do you have any ideas why I am getting this error, or any suggestions for installing the python bindings?