Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,51 @@ You can now for example run the IPython Notebook as follows:
```
./default/bin/ipython notebook
```

### Conda Python in Hashstack (experimental)

The recipe for Python supports a conda based version of Python. Using
a conda based version of Python allows using conda to install packages
in the profile while in develop mode.


#### Specifying the conda installation to use

When using conda python, supply the path for the conda installation to
use using the "conda_prefix" parameter. This should be the place where
conda (anaconda or miniconda) was installed. The conda executable to use
will be <conda-prefix>/bin/conda.


#### Using the conda version of Python

In your profile file use, use "conda: true" in the python package:

```
packages:
python:
conda: true
pyver: '2.7'
```

The pyver will be used to select which version of python to install
(as would without conda). Supported versions for conda are 2.7, 3.3,
3.4, 3.5 and 3.6.


#### Installing conda packages inside your profile (in develop mode)

Just use conda install with the '-p' parameter pointing to the profile
in question.

Bear in mind that conda automatically handles dependencies, and that
conda might not be aware of software installed in your profile that
has not been installed by conda.

For example, to install NumPy into a profile linked as "default":

```
conda install -p default numpy
```


15 changes: 15 additions & 0 deletions base/conda_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from hashdist import build_stage
import pprint
@build_stage()
def conda_install(ctx, stage_args):
"""
Generates conda install line

Example::

- name: conda-install
pkgspec: the spec to use for conda
"""
conda_path = ctx.parameters["conda_prefix"]
cmd_line = '%s/bin/conda install -y -q --copy -p "${ARTIFACT}" %s' %(conda_path, stage_args['pkgspec'])
return [cmd_line]
10 changes: 10 additions & 0 deletions base/conda_package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# use a conda package

extends: [ base_package ]

dependencies:
build: [ conda ]

build_stages:
- name: conda_install
after: prologue
33 changes: 33 additions & 0 deletions examples/adh-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This profile file controls your <#> (HashDist) build environment.

# In the future, we'll provide better incorporation of
# automatic environment detection. For now, have a look
# at the YAML files in the top-level directory and choose
# the most *specific* file that matches your environment.

extends:
- file: debian.yaml

# The packages list specifies all the packages that you
# require installed. <#> will ensure that all packages
# and their dependencies are installed when you build this
# profile.

packages:
cmake:
openssl:
use: host-openssl
python:
host: false
link: shared
build_with: |
bzip2, sqlite, openssl
blas:
use: openblas
lapack:
use: openblas-lapack
mpi:
use: mpich
parmetis:
sympy:
adh:
16 changes: 16 additions & 0 deletions examples/conda-python.osx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This profile file controls your <#> (HashDist) build environment.


extends:
- file: osx.yaml


parameters:
# Specify the conda path to use. This should be the path to the conda script without
# bin/conda
conda_prefix: /Users/FooBar/anaconda

packages:
python:
conda: true
pyver: '2.7'
2 changes: 1 addition & 1 deletion examples/proteus.garnet.gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ packages:
# leafletwidget:
# sources:
# - key: git:f9147c5b13a69b80bc28d3574f7ba6b2c576aed2
# url: https://github.com/erdc-cm/leafletwidget.git
# url: https://github.com/erdc/leafletwidget.git
geojson:
rdp:
# ipython-widgetmode:
Expand Down
116 changes: 0 additions & 116 deletions pkgs/adh.yaml

This file was deleted.

57 changes: 51 additions & 6 deletions pkgs/adh/adh.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
extends: [cmake_package]

dependencies:
build: [python,mpi,parmetis,umfpack3]
build: [python,mpi,parmetis,lapack,blas]

sources:
- url: https://github.com/cekees/adh.git
key: git:ab5024c569e8bac972d706a3d354e43cce319ac3
- url: git@public.git.erdc.dren.mil:adh/adh.git
key: git:01f9fba7f6f95b77be3560cce8bfaa87f174431e

build_stages:
- name: fix_link
files:
- fix_link.patch
before: configure
handler: bash
bash: |
patch -p1 < _hashdist/fix_link.patch

- name: setup_builddir
after: prologue
Expand All @@ -29,7 +36,7 @@ build_stages:
'-DPARMETIS_INCLUDE_DIR:PATH=${PARMETIS_DIR}/include',
'-DPARMETIS_LIBRARY:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.dylib',
'-DMETIS_LIBRARY=${PARMETIS_DIR}/lib/libmetis.dylib',
'-DPACKAGE_UMFPACK:BOOL=True',
'-DPACKAGE_UMFPACK:BOOL=False',
'-DUMFPACK_INCLUDE_DIR:PATH=${UMFPACK_INCLUDE}',
'-DUMFPACK_VERSION:STRING=3',
'-DUMFPACK_INT_SIZE:STRING=32',
Expand All @@ -42,14 +49,52 @@ build_stages:
extra: [
'-DCMAKE_C_COMPILER:FILEPATH=${MPICC}',
'-DCMAKE_CXX_COMPILER:FILEPATH=${MPICXX}',
'-DCMAKE_INSTALL_PREFIX:PATH=${ARTIFACT}',
'-DCMAKE_VERBOSE_MAKEFILE:BOOL=True',
'-DCMAKE_EXE_LINKER_FLAGS:STRING="-L${PARMETIS_DIR}/lib -Wl,-rpath=${PARMETIS_DIR}/lib -L${OPENBLAS_DIR}/lib -lm -Wl,-rpath=${OPENBLAS_DIR}/lib"',
'-DUSE_MPI:BOOL=ON',
'-DPACKAGE_MPI:BOOL=ON',
'-DUSE_BLAS:BOOL=ON',
'-DUSE_LAPACK:BOOL=ON',
'-DBLAS_openblas_LIBRARY:FILEPATH=${OPENBLAS_DIR}/lib/libopenblas.so',
'-DUSE_PARMETIS:BOOL=ON',
'-DPACKAGE_PARMETIS:BOOL=ON',
'-DPARMETIS_INCLUDE_DIR:PATH=${PARMETIS_DIR}/include',
'-DPARMETIS_LIBRARY:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so',
'-DMETIS_LIBRARY=${PARMETIS_DIR}/lib/libmetis.so',
'-DUSE_SUPER_LIBRARY:BOOL=False',
'-DPACKAGE_UMFPACK:BOOL=False',
'-DUMFPACK_INCLUDE_DIR:PATH=${UMFPACK_INCLUDE}',
'-DUMFPACK_VERSION:STRING=3',
'-DUMFPACK_INT_SIZE:STRING=32',
'-DUMFPACK_LIBRARY:FILEPATH=${UMFPACK_LIBRARY}'
]

- when: machine == 'CrayXE6'
name: configure
mode: override
extra: [
'-DCMAKE_C_COMPILER:FILEPATH=${MPICC}',
'-DCMAKE_C_FLAGS:STRING="-fPIC"',
'-DCMAKE_C_FLAGS_DEBUG:STRING="-g -fPIC"',
'-DCMAKE_C_FLAGS_OPT:STRING="-03 -fPIC"',
'-DCMAKE_C_FLAGS_RELEASE:STRING="-O3 -fPIC"',
'-DCMAKE_CXX_COMPILER:FILEPATH=${MPICXX}',
'-DCMAKE_CXX_FLAGS:STRING="-fPIC"',
'-DCMAKE_CXX_FLAGS_DEBUG:STRING="-g -fPIC"',
'-DCMAKE_CXX_FLAGS_RELEASE:STRING="-O3 -fPIC"',
'-DCMAKE_Fortran_COMPILER:FILEPATH=${MPIF90}',
'-DCMAKE_Fortran_FLAGS:STRING="-fPIC"',
'-DCMAKE_Fortran_FLAGS_DEBUG:STRING="-g -fPIC"',
'-DCMAKE_Fortran_FLAGS_RELEASE:STRING="-O3 -fPIC"',
'-DCMAKE_INSTALL_PREFIX:PATH=${ARTIFACT}',
'-DCMAKE_EXE_LINKER_FLAGS:STRING="-static"',
'-DPACKAGE_MPI:BOOL=True',
'-DPACKAGE_PARMETIS:BOOL=True',
'-DPARMETIS_INCLUDE_DIR:PATH=${PARMETIS_DIR}/include',
'-DPARMETIS_LIBRARY:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so',
'-DMETIS_LIBRARY=${PARMETIS_DIR}/lib/libmetis.so',
'-DPACKAGE_UMFPACK:BOOL=True',
'-DPACKAGE_UMFPACK:BOOL=False',
'-DUMFPACK_INCLUDE_DIR:PATH=${UMFPACK_INCLUDE}',
'-DUMFPACK_VERSION:STRING=3',
'-DUMFPACK_INT_SIZE:STRING=32',
Expand All @@ -67,7 +112,7 @@ build_stages:
'-DCMAKE_INSTALL_PREFIX:PATH=${ARTIFACT}',
'-DPACKAGE_MPI:BOOL=True',
'-DPACKAGE_PARMETIS:BOOL=False',
'-DPACKAGE_UMFPACK:BOOL=True',
'-DPACKAGE_UMFPACK:BOOL=False',
'-DUMFPACK_INCLUDE_DIR:PATH=${UMFPACK_INCLUDE}',
'-DUMFPACK_VERSION:STRING=3',
'-DUMFPACK_INT_SIZE:STRING=32',
Expand Down
Loading