astrojuanlu / fenics-recipes

This repository contains conda recipes for the FEniCS libraries
The Unlicense
13 stars 15 forks source link

Local building of 1.4.0 fails for scotch #29

Open mthewissen opened 9 years ago

mthewissen commented 9 years ago

I tried to create a new anaconda + fenics install, so here is what I did:

  1. Install/unpack anaconda and append it to path
  2. Using this conda, run conda install conda-build
  3. Then when I attempt to build all packages (conda build boost eigen3 scotch petsc petsc4py slepc scientificpython instant ufl fiat ffc dolfin fenics --python 27) I get the error below for scotch:
...
a - wgraph_part_zr.o
a - wgraph_store.o
ranlib libscotch.a
gcc -I -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64  -c library_error.c -o library_error.o
ar -ruv libscotcherr.a library_error.o
ar: creating libscotcherr.a
a - library_error.o
ranlib libscotcherr.a
gcc -I -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64  -c library_error_exit.c -o library_error_exit.o
ar -ruv libscotcherrexit.a library_error_exit.o
ar: creating libscotcherrexit.a
a - library_error_exit.o
ranlib libscotcherrexit.a
make[2]: Leaving directory `/scratch/anaconda2/conda-bld/work/scotch_6.0.0/src/libscotch'
make CFLAGS="-O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -DSCOTCH_PTSCOTCH" CC="mpicc" \
                                        ptscotch.h                                                      \
                                        ptscotchf.h                                                     \
                                        libptscotch.a                                           \
                                        libptscotcherr.a                                                \
                                        libptscotcherrexit.a
make[2]: Entering directory `/scratch/anaconda2/conda-bld/work/scotch_6.0.0/src/libscotch'
gcc -I -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -DSCOTCH_PTSCOTCH -DSCOTCH_VERSION=6 -DSCOTCH_RELEASE=0 -DSCOTCH_PATCHLEVEL=0 dummysizes.c -o ptdummysizes -lz -lm -lrt
In file included from dummysizes.c:82:
common.h:105:28: error: mpi.h: No such file or directory
In file included from dummysizes.c:84:
graph.h:127: error: expected specifier-qualifier-list before 'MPI_Comm'
In file included from dummysizes.c:87:
arch.h:201: error: expected declaration specifiers or '...' before 'MPI_Datatype'
In file included from dummysizes.c:91:
dgraph.h:173: error: expected specifier-qualifier-list before 'MPI_Comm'
dgraph.h:194: error: expected declaration specifiers or '...' before 'MPI_Comm'
In file included from dummysizes.c:91:
dgraph.h:210: error: expected declaration specifiers or '...' before 'MPI_Datatype'
dgraph.h:211: error: expected declaration specifiers or '...' before 'MPI_Comm'
dgraph.h:211: error: expected declaration specifiers or '...' before 'MPI_Datatype'
dgraph.h:212: error: expected declaration specifiers or '...' before 'MPI_Datatype'
dgraph.h:225: error: expected declaration specifiers or '...' before 'MPI_Datatype'
In file included from dummysizes.c:92:
dgraph_halo.h:68: error: expected specifier-qualifier-list before 'MPI_Datatype'
In file included from dummysizes.c:94:
dorder.h:150: error: expected specifier-qualifier-list before 'MPI_Comm'
dorder.h:165: error: expected declaration specifiers or '...' before 'MPI_Comm'
dorder.h:186: error: expected declaration specifiers or '...' before 'MPI_Comm'
make[2]: *** [ptdummysizes] Error 1
make[2]: Leaving directory `/scratch/anaconda2/conda-bld/work/scotch_6.0.0/src/libscotch'
make[1]: *** [ptscotch] Error 2
make[1]: Leaving directory `/scratch/anaconda2/conda-bld/work/scotch_6.0.0/src/libscotch'
make: *** [ptscotch] Error 2
Command failed: /bin/bash -x -e /scratch/anaconda2/fenics-recipes-maint-1.4.0/scotch/build.sh

For scientific python I get:

Source cache directory is: /scratch/anaconda2/conda-bld/src_cache
Downloading source to cache: ScientificPython-2.9.4.tar.gz
Downloading https://sourcesup.renater.fr/frs/download.php/4570/ScientificPython-2.9.4.tar.gz
ScientificPyth 100% |###################################################################################################################################################################| Time: 0:00:00 261.52 kB/s
Success
Error: MD5 mismatch: 'f7d5f9d2c86a5c99cae4891e65e50db3' != 'dc2987089e106cb807b4ccecf7adc071'

So after removing scotch, scientificpython (and instant) from the list I get:

Extracting download
Package: ffc-1.4.0-py27_1
source tree in: /scratch/anaconda2/conda-bld/work/ffc-1.4.0
+ /scratch/anaconda2/envs/_build/bin/python setup.py install --prefix=/scratch/anaconda2/envs/_build
/scratch/anaconda2/envs/_build/bin/swig: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /scratch/anaconda2/envs/_build/bin/swig)
Traceback (most recent call last):
  File "setup.py", line 290, in <module>
    run_install()
  File "setup.py", line 205, in run_install
    SWIG_EXECUTABLE = get_swig_executable()
  File "setup.py", line 61, in get_swig_executable
    output = subprocess.check_output([swig_executable, "-version"])
  File "/scratch/anaconda2/envs/_build/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/scratch/anaconda2/envs/_build/bin/swig', '-version']' returned non-zero exit status 1
Command failed: /bin/bash -x -e /scratch/anaconda2/fenics-recipes-maint-1.4.0/ffc/build.sh

The last one might be a result from forgoing scotch and instant, so subsequent packages automatically download newer versions for these? However I don't know what causes the first error.

astrojuanlu commented 9 years ago

Thanks for the report @mthewissen, I suspect there's some misconfiguration regarding MPI, hence the line common.h:105:28: error: mpi.h: No such file or directory. I probably I left an unfinished work after trying to fix #7, but I fear there are other issues above this one on the queue. If you manage to fix it please don't hesitate to send a PR.