Hello,

 

This is probably the wrong way about it, but it’s what got me through a few 
tricky spots and I wish I found it somewhere.  I love hashdist, but I found it 
tricky to ‘break into’ and address build problems without prior knowledge to 
how it works.  The layers of fenics installer -> hashdist -> hashstack were 
rather obscure to me, particularly how to make a change.

 

If you have a local.yaml file in the location you run the script for it will 
use it instead of the profile resolved within install/profiles/ of the 
fenics-developer-tools repository 
(https://bitbucket.org/fenics-project/fenics-developer-tools).  The first thing 
I did was create a local.yaml that was a copy of fenics.Linux.yaml.

 

I had problems with ssl validation until I built python with openssl.  I did 
this by telling hashdist to build it with openssl like so:

 

  python:

    build_with: |

      bzip2, openssl, sqlite

    link: shared

 

The next thing that was useful to me is that you can change where the package 
is pulled from by setting the url and key for the package.  I had to do this as 
one of the providers was offline while I was trying to build (mirrors would be 
nice).  In my case the server for hypre was offline so I had to tell it to find 
it elsewhere.

 

  hypre:

    sources:

    - key: tar.gz:qzga2f4x74qxbkpb7hp5mff4ix5p3kii

      url: 
http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2015.05.07.tar.gz

    with_openblas: true

    without_check: true

    fortran: false

 

If the file is not an exact copy of the file a new key is needed.  To get a new 
key you need ‘hit’ from hashdist.  With the fenics install script this was in 
/tmp/fenics-install.(something random)/hashdist/bin/.  I navigated there and 
ran hit fetch on the url, 

 

./hit fetch  
http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2015.05.07.tar.gz

 

This will output the key associated to the url to use in sources.  I did this 
to also use newer versions of a few packages, namely OpenMPI and HDF5 so that 
they will work on our infiniband cluster.

 

This is my local.yaml file which I on a cluster which did not have a compiler 
supporting c++11 which is a requirement of dolphin.  The path to the gcc 
package is added to the path environment variable and exports, which obviously 
requires that package to be installed.  I had to run it first just to install 
gcc, get the path and then run again.

 

extends:

- file: linux.yaml

 

parameters:

  PATH: 
/home/crcook/.hashdist/bld/gcc/pftiik7msr4k/bin:/opt/gnu/gcc/4.7.2/bin:/usr/bin:/bin

  PROLOGUE: |

    export CC=/home/crcook/.hashdist/bld/gcc/pftiik7msr4k/bin/gcc; export 
XX=/home/crcook/.hashdist/bld/gcc/pftiik7msr4k/bin/g++; export 
FC=/home/crcook/.hashdist/bld/gcc/pftiik7msr4k/bin/gfortran

 

packages:

  gcc:

  bzip2:

  gmp:

  mpfr:

  launcher:

  cmake:

  python:

    build_with: |

      bzip2, openssl, sqlite

    link: shared

  mpi:

    sources:

    - key: tar.bz2:3jrj5g6yecrxtt5p4fpyilxjwyunoriy

      url: 
http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.7.tar.bz2

    use: local-openmpi

  blas:

    use: openblas

    build_with: |

      gcc

  lapack:

    use: openblas

  hypre:

    sources:

    - key: tar.gz:qzga2f4x74qxbkpb7hp5mff4ix5p3kii

      url: 
http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2015.05.07.tar.gz

    with_openblas: true

    without_check: true

    fortran: false

  petsc:

    build_with: |

      openblas, parmetis, scotch, suitesparse, superlu_dist, hypre

    download: |

      mumps, scalapack, blacs, ml, hypre, superlu, superlu_dist

    coptflags: -O2

    link: shared

    debug: false

  swig:

  boost:

    toolset: gcc

    address_model: 64

    build_with: python

  ipython:

  matplotlib:

  ffc:

  fiat:

  instant:

  ufl:

  uflacs:

  hdf5:

    sources:

    - key: tar.gz:sg26e7sfdzpy7mh57eoaji3wmetu2kmo

      url: 
http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.15-patch1/src/hdf5-1.8.15-patch1.tar.gz

  dolfin:

    build_with: |

      openblas, hdf5, parmetis, petsc, petsc4py, suitesparse, scotch, slepc, 
slepc4py, vtk, zlib

  mpi4py:

 

package_dirs:

- /home/crcook/pkgs

 

hook_import_dirs:

- /home/crcook/pkgs

 

 

 

I defined a local-openmpi with local-openmpi.yaml in /home/crcook/pkgs as:

 

 

 

 

extends: [autotools_package]

 

sources:

- url: 
http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2

  key: tar.bz2:7y33voe3l3zdjyfmqlohtaucykvqreal

 

defaults:

  # lib/openmpi/mca_carto_auto_detect.la contains hard-coded path

  relocatable: false

 

build_stages:

- name: configure

#  extra:

#    - '--enable-mpi-thread-multiple'

#    - '--enable-opal-multi-threads'

#    - '--with-threads=posix'

#    - '--disable-mpi-profile'

#    - when platform == 'linux':

#      - '--with-wrapper-ldflags=-Wl'

#    - when platform == 'Darwin':

#      - '--with-wrapper-ldflags=-Wl,-rpath,${ARTIFACT}/lib'

 

when_build_dependency:

- {set: 'MPICC', value: "${ARTIFACT}/bin/mpicc"}

- {set: 'MPICXX', value: "${ARTIFACT}/bin/mpic++"}

- {set: 'MPIF77', value: "${ARTIFACT}/bin/mpifort"}

- {set: 'MPIF90', value: "${ARTIFACT}/bin/mpifort"}

- {set: 'MPIEXEC', value: "${ARTIFACT}/bin/mpiexec"}

 

- prepend_path: PATH

  value: ${ARTIFACT}/bin

 

Hopefully this helps someone,

 

Charles

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Andrew Stershic
Sent: Thursday, August 6, 2015 10:16 AM
To: [email protected]
Subject: [FEniCS-support] Installing FEniCS: urllib failed to download

 

Hello, 

 

I have a question similar to this one: 
http://fenicsproject.org/qa/7318/dolfin-error-urllib-failed-to-download , where 
urllib is failing to download packages. I’ll get a message like the following:

 

Downloading 
https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz...

[ERROR] urllib failed to download (reason: [SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed (_ssl.c:590)): 
https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz

[CRITICAL] You may wish to check your Internet connection or the remote server

 

If it matters, I’m using OS X 10.10.3 installing using fenics-install.sh . I 
find that I can get around this error by following the instructions at that 
linked help page (namely to find a different link for the package and 
substitute that in the yaml file), but it’s happening to so many packages, that 
I worry that this might take days to do them all. 

 

(And FWIW, I do have an internet connection.)

 

It sounds like this is an error on my system or configuration… something that I 
can easily fix by doing some sort of SSL certificate update? But I’m not sure 
where to start.

 

Thanks for any insight you can provide!

-- 

Andrew Stershic
Duke University

 

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to