diff --git a/archer.yaml b/archer.yaml new file mode 100644 index 000000000..5b3158be5 --- /dev/null +++ b/archer.yaml @@ -0,0 +1,2 @@ +extends: + - file: linux.yaml diff --git a/base/base_package.yaml b/base/base_package.yaml index bba0ffdf7..45e44ab60 100644 --- a/base/base_package.yaml +++ b/base/base_package.yaml @@ -44,6 +44,12 @@ post_process: - "check-ignore=.*\\.pyc\\$" - "check-ignore=.*\\.pyo\\$" + - name: insert_location + when: relocatable != True + after: [default] + hit: + - insert-location + profile_links: - when: platform == 'Cygwin' name: copy_dlls diff --git a/config.yaml b/config.yaml index 64b388f63..12d9dddb2 100644 --- a/config.yaml +++ b/config.yaml @@ -5,6 +5,38 @@ package_dirs: hook_import_dirs: - base +build_stores: + - dir: ./bld + + +## Location where temporary directories for building software are created. +## Such directories are by default removed again once the build is done. + +build_temp: ./tmp + + +## Locations of downloaded tarballs and git repositories. A location +## can either be a local filesystem, or a URL to an online, read-only +## mirror. Only the first location, which should be a local directory, +## will be written to. + +source_caches: + - dir: ./src +## For additional source cache mirror: +## - url: https://some.server.org/hashdist/src + + +## The cache directory is used for misc. caching (e.g., probing of host +## system). The contents can always be wiped without resulting in rebuilds. + +cache: ./cache + +## The roots directory contains links to (links to) profiles. Anything +## pointed to through here will not be deleted when garbage-collected. + +gc_roots: ./gcroots + + parameters: BASH: /bin/bash PROLOGUE: | # by default, PROLOGUE is a no-op diff --git a/examples/proteus.archer.yaml b/examples/proteus.archer.yaml new file mode 100644 index 000000000..dcb32eb74 --- /dev/null +++ b/examples/proteus.archer.yaml @@ -0,0 +1,73 @@ +# 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: archer.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. + +parameters: + machine: CrayXC30 + HOST_MPICC: cc + HOST_MPICXX: CC + HOST_MPIF77: ftn + HOST_MPIF90: ftn + HOST_MPIEXEC: aprun + PATH: | + /usr/bin:/bin:/usr/sbin:/sbin + PROLOGUE: | + source /opt/modules/default/init/bash; export MODULEPATH=/opt/cray/craype/default/modulefiles:/opt/cray/ari/modulefiles:/opt/cray/modulefiles:/opt/modulefiles:/cm/local/modulefiles:/cm/shared/modulefiles:/opt/modules/packages-archer; export MODULESHOME=/opt/modules/default; export MODULE_VERSION=3.2.10; export MODULE_VERSION_STACK=3.2.10; export CRAY_CPU_TARGET=ivybridge; echo "unloading modules"; module unload PrgEnv-cray; echo "loading modules"; module load PrgEnv-gnu; module load cray-mpich; module load cray-libsci; module load cray-tpsl; echo "setting default compilers"; export CC=gcc; export CXX=g++; export FC=gfortran; export F77=gfortran; export F90=gfortran; export CPP=cpp; + DYNAMIC_EXE_LINKER_FLAGS: -dynamic + +packages: + launcher: + cmake: + python: + host: false + build_with: | + openssl,bzip2,sqlite + blas: + use: host-libsci-blas + lapack: + use: host-libsci-lapack + daetk: + mpi: + use: host-mpi + mpi4py: + nose: + hdf5: + ipython: + matplotlib: + parmetis: + without_check: true + petsc: + version: 3.6.1 + without_check: true + build_with: | + parmetis + download: | + ptscotch, superlu, superlu_dist, spooles, hypre, blacs, scalapack, mumps + coptflags: -O2 + link: shared + debug: false + petsc4py: + version: 3.6.0 + with_conf: true + pytables: + sphinx: + superlu: + sympy: + tetgen: + triangle: + memory_profiler: + scipy: + use: host-libsci-blas + h5py: + ode: diff --git a/examples/proteus.lightning.gnu.yaml b/examples/proteus.lightning.gnu.yaml new file mode 100644 index 000000000..c8294f38c --- /dev/null +++ b/examples/proteus.lightning.gnu.yaml @@ -0,0 +1,77 @@ +# 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: suse.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. + +parameters: + machine: CrayXC30 + HOST_MPICC: cc + HOST_MPICXX: CC + HOST_MPIF77: ftn + HOST_MPIF90: ftn + HOST_MPIEXEC: aprun + PATH: | + /usr/bin:/bin:/usr/sbin:/sbin + PROLOGUE: | + unset RCLOCAL_PRGENV; source /etc/bash.bashrc; source /etc/bash.bashrc.local; module swap PrgEnv-cray PrgEnv-gnu; module load cray-mpich; module list; echo "setting default compilers"; export CC=gcc; export CXX=g++; export FC=gfortran; export F77=gfortran; export F90=gfortran; export CPP=cpp; + DYNAMIC_EXE_LINKER_FLAGS: -dynamic + +packages: + launcher: + cmake: + python: + host: false + build_with: | + openssl,bzip2,sqlite + blas: + use: host-libsci-blas + lapack: + use: host-libsci-lapack + daetk: + mpi: + use: host-mpi + mpi4py: + nose: + hdf5: + ipython: + matplotlib: + parmetis: + without_check: true + petsc: + version: 3.6.1 + build_with: | + parmetis + download: | + ptscotch, superlu, superlu_dist, spooles, hypre, blacs, scalapack, mumps + coptflags: -O2 + link: shared + debug: false + petsc4py: + version: 3.6.0 + with_conf: true + pytables: + sphinx: + superlu: + sympy: + tetgen: + triangle: + memory_profiler: + scipy: + netcdf4f: + python-netcdf4: + h5py: + ode: + pip: + # pyode: + # vtk: + # pyvtk: diff --git a/pkgs/hdf5/hdf5.yaml b/pkgs/hdf5/hdf5.yaml index a9d97475f..8f543eb3d 100644 --- a/pkgs/hdf5/hdf5.yaml +++ b/pkgs/hdf5/hdf5.yaml @@ -18,7 +18,7 @@ build_stages: bash: | export CC=${MPICC} -- when: machine == 'CrayXE6' +- when: machine == 'CrayXE6' or machine == 'CrayXC30' name: make_exe_builds_static handler: bash after: configure @@ -28,6 +28,10 @@ build_stages: do sed -i 's/CCLD = $(CC)/CCLD = $(CC) -static/g' $f done + for f in {src,test,testpar,tools/*,perform,hl/*,hl/*/*}/Makefile + do + sed -i "s/sed -e 's\/-L\/:\/g' -e 's\/ \/\/g'/sed -e 's\/-L\/:\/g' -e 's\/-rpath=\/:\/g' -e 's\/-Wl,\/\/g' -e 's\/ \/\/g'/g" $f + done - name: configure extra: ['--with-zlib=${ZLIB_DIR}', @@ -40,7 +44,7 @@ build_stages: '--enable-largefile=yes', '--with-default-api-version=v18'] -- when: machine == 'CrayXE6' +- when: machine == 'CrayXE6' or machine == 'CrayXC30' name: configure extra: ['--enable-static-exec', '--with-zlib=${ZLIB_DIR}', diff --git a/pkgs/host-openblas-blas.yaml b/pkgs/host-openblas-blas.yaml new file mode 100644 index 000000000..3a845f318 --- /dev/null +++ b/pkgs/host-openblas-blas.yaml @@ -0,0 +1,2 @@ +when_build_dependency: + - {set: 'BLAS_LDFLAGS', value: '-lopenblas'} \ No newline at end of file diff --git a/pkgs/host-openblas-lapack.yaml b/pkgs/host-openblas-lapack.yaml new file mode 100644 index 000000000..f7c50dc43 --- /dev/null +++ b/pkgs/host-openblas-lapack.yaml @@ -0,0 +1,2 @@ +when_build_dependency: + - {set: 'LAPACK_LDFLAGS', value: '-lopenblas'} \ No newline at end of file diff --git a/pkgs/host-openblas.yaml b/pkgs/host-openblas.yaml new file mode 100644 index 000000000..fdbc77c8f --- /dev/null +++ b/pkgs/host-openblas.yaml @@ -0,0 +1,2 @@ +when_build_dependency: + - {set: 'BLAS_LDFLAGS', value: '-lacml'} \ No newline at end of file diff --git a/pkgs/jupyter-pip.yaml b/pkgs/jupyter-pip.yaml index de0d9c37e..ec747c8ff 100644 --- a/pkgs/jupyter-pip.yaml +++ b/pkgs/jupyter-pip.yaml @@ -5,5 +5,5 @@ dependencies: run: [] sources: - - key: tar.gz:wxla2vqnbs3zhqn3l6kafwyhobj6ppak - url: https://pypi.python.org/packages/source/j/jupyter-pip/jupyter-pip-0.1.tar.gz + - key: git:9fe7ab80870b2c7de8380ab8013fbb33df7ee847 + url: https://github.com/jdfreder/jupyter-pip.git diff --git a/pkgs/netcdf4/netcdf4.yaml b/pkgs/netcdf4/netcdf4.yaml index c7159ee24..173dd6258 100644 --- a/pkgs/netcdf4/netcdf4.yaml +++ b/pkgs/netcdf4/netcdf4.yaml @@ -19,7 +19,7 @@ build_stages: bash: | export CC=$MPICC -- when: machine == 'CrayXE6' +- when: machine == 'CrayXE6' or machine == 'CrayXC30' name: configure mode: override append: {LDFLAGS: {{DYNAMIC_EXE_LINKER_FLAGS}}} diff --git a/pkgs/numpy/numpy.yaml b/pkgs/numpy/numpy.yaml index 7e544e86c..b5a8a54ee 100644 --- a/pkgs/numpy/numpy.yaml +++ b/pkgs/numpy/numpy.yaml @@ -53,7 +53,7 @@ build_stages: export BLAS=None export ATLAS=None - - when: machine == 'CrayXE6' + - when: machine == 'CrayXC30' name: create-site.cfg after: prologue before: install @@ -61,19 +61,42 @@ build_stages: bash: | cat > site.cfg << EOF [DEFAULT] - library_dirs = ${ACML_DIR}/gfortran64/lib - libraries = acml, gfortran + library_dirs = ${CRAY_LIBSCI_PREFIX_DIR}/lib + libraries = sci_gnu EOF - - when: machine == 'CrayXE6' + - when: machine == 'CrayXC30' name: set-LDFLAGS after: prologue before: install handler: bash bash: | - export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${ACML_DIR}/gfortran64/lib $(${PYTHON_DIR}/bin/python-config --ldflags -lgfortran)" - export LAPACK=acml - export BLAS=acml + export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${CRAY_LIBSCI_PREFIX_DIR}/lib $(${PYTHON_DIR}/bin/python-config --ldflags)" + export LAPACK=sci_gnu + export BLAS=sci_gnu + export ATLAS=None + + - when: machine == 'CrayXC30' + name: create-site.cfg + after: prologue + before: install + handler: bash + bash: | + cat > site.cfg << EOF + [DEFAULT] + library_dirs = ${CRAY_LIBSCI_PREFIX_DIR}/lib + libraries = sci_gnu + EOF + + - when: machine == 'CrayXC30' + name: set-LDFLAGS + after: prologue + before: install + handler: bash + bash: | + export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${CRAY_LIBSCI_PREFIX_DIR}/lib $(${PYTHON_DIR}/bin/python-config --ldflags)" + export LAPACK=sci_gnu + export BLAS=sci_gnu export ATLAS=None - when: platform == 'Cygwin' diff --git a/pkgs/petsc/petsc.py b/pkgs/petsc/petsc.py index ba0d5bdae..2cd2dcb07 100644 --- a/pkgs/petsc/petsc.py +++ b/pkgs/petsc/petsc.py @@ -4,6 +4,35 @@ def preConfigureCrayXE6(ctx, conf_lines): conf_lines += ['LDFLAGS=' + ctx.parameters['DYNAMIC_EXE_LINKER_FLAGS'], '--known-mpi-shared-libraries=1', '--with-batch', + '--known-sdot-returns-double=0', + '--known-snrm2-returns-double=0', + '--known-level1-dcache-size=16384', + '--known-level1-dcache-linesize=64', + '--known-level1-dcache-assoc=4', + '--known-memcmp-ok=1', + '--known-sizeof-char=1', + '--known-sizeof-void-p=8', + '--known-sizeof-short=2', + '--known-sizeof-int=4', + '--known-sizeof-long=8', + '--known-sizeof-long-long=8', + '--known-sizeof-float=4', + '--known-sizeof-double=8', + '--known-sizeof-size_t=8', + '--known-bits-per-byte=8', + '--known-sizeof-MPI_Comm=4', + '--known-sizeof-MPI_Fint=4', + '--known-mpi-long-double=1', + '--known-mpi-c-double-complex=1', + '--known-mpi-int64_t=1', + '--with-pthread=1'] + +def preConfigureCrayXC30(ctx, conf_lines): + conf_lines += ['LDFLAGS=' + ctx.parameters['DYNAMIC_EXE_LINKER_FLAGS'], + '--known-mpi-shared-libraries=1', + '--with-batch', + '--known-sdot-returns-double=0', + '--known-snrm2-returns-double=0', '--known-level1-dcache-size=16384', '--known-level1-dcache-linesize=64', '--known-level1-dcache-assoc=4', @@ -87,6 +116,8 @@ def configure(ctx, stage_args): if ctx.parameters.get('machine','') == 'CrayXE6': preConfigureCrayXE6(ctx, conf_lines) + elif ctx.parameters.get('machine','') == 'CrayXC30': + preConfigureCrayXC30(ctx, conf_lines) elif ctx.parameters.get('machine','') == 'SGIICEX': preConfigureSGIICEX(ctx, conf_lines) diff --git a/pkgs/petsc/petsc.yaml b/pkgs/petsc/petsc.yaml index 45fe482ad..14d54aee3 100644 --- a/pkgs/petsc/petsc.yaml +++ b/pkgs/petsc/petsc.yaml @@ -43,8 +43,8 @@ build_stages: handler: bash after: configure bash: | - make - + make MAKE_NP=${HASHDIST_CPU_COUNT} + - name: install mode: replace handler: bash diff --git a/pkgs/scipy/scipy-crayxc30.yaml b/pkgs/scipy/scipy-crayxc30.yaml new file mode 100644 index 000000000..33c1a77a7 --- /dev/null +++ b/pkgs/scipy/scipy-crayxc30.yaml @@ -0,0 +1,33 @@ +when: machine == 'CrayXC30' + +extends: [distutils_package] +dependencies: + build: [blas, lapack, numpy] + run: [blas, lapack, numpy] + +sources: + - url: http://downloads.sourceforge.net/scipy/scipy-0.13.3.tar.gz + key: tar.gz:vhrty7xamdbvzvog5y5mtzpjxo4zegox + +build_stages: + - name: create-site.cfg + after: prologue + before: install + handler: bash + bash: | + cat > site.cfg << EOF + [DEFAULT] + library_dirs = ${CRAY_LIBSCI_PREFIX_DIR}/lib + libraries = sci_gnu + EOF + + - name: set-LDFLAGS + after: prologue + before: install + handler: bash + bash: | + export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${CRAY_LIBSCI_PREFIX_DIR}/lib $(${PYTHON_DIR}/bin/python-config --ldflags)" + export ATLAS=None + export LAPACK=sci_gnu + export BLAS=sci_gnu + diff --git a/pkgs/scipy/scipy-crayxe6.yaml b/pkgs/scipy/scipy-crayxe6.yaml index c39039c4e..fe307d043 100644 --- a/pkgs/scipy/scipy-crayxe6.yaml +++ b/pkgs/scipy/scipy-crayxe6.yaml @@ -17,8 +17,8 @@ build_stages: bash: | cat > site.cfg << EOF [DEFAULT] - library_dirs = ${ACML_DIR}/gfortran64/lib - libraries = acml + library_dirs = ${CRAY_LIBSCI_PREFIX_DIR}/lib + libraries = sci_gnu EOF - name: set-LDFLAGS @@ -26,8 +26,8 @@ build_stages: before: install handler: bash bash: | - export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${ACML_DIR}/gfortran64/lib $(${PYTHON_DIR}/bin/python-config --ldflags)" + export LDFLAGS="-shared -Wl,-rpath=${PYTHON_DIR}/lib -Wl,-rpath=${CRAY_LIBSCI_PREFIX_DIR}/lib $(${PYTHON_DIR}/bin/python-config --ldflags)" export ATLAS=None - export LAPACK=acml - export BLAS=acml + export LAPACK=sci_gnu + export BLAS=sci_gnu