summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.codecov.yml4
-rw-r--r--.gitignore5
-rw-r--r--.travis.yml72
-rwxr-xr-xbin/sbang2
-rw-r--r--etc/spack/defaults/packages.yaml10
-rw-r--r--lib/spack/docs/_themes/sphinx_rtd_theme/footer.html2
-rw-r--r--lib/spack/docs/basic_usage.rst43
-rw-r--r--lib/spack/docs/binary_caches.rst132
-rw-r--r--lib/spack/docs/config_yaml.rst31
-rw-r--r--lib/spack/docs/configuration.rst49
-rw-r--r--lib/spack/docs/index.rst1
-rw-r--r--lib/spack/docs/mirrors.rst2
-rw-r--r--lib/spack/docs/packaging_guide.rst167
-rw-r--r--lib/spack/docs/workflows.rst78
-rwxr-xr-xlib/spack/env/cc2
-rw-r--r--lib/spack/llnl/util/filesystem.py107
-rw-r--r--lib/spack/llnl/util/lang.py13
-rw-r--r--lib/spack/llnl/util/lock.py9
-rw-r--r--lib/spack/llnl/util/tty/color.py60
-rw-r--r--lib/spack/llnl/util/tty/log.py521
-rw-r--r--lib/spack/spack/__init__.py6
-rw-r--r--lib/spack/spack/architecture.py2
-rw-r--r--lib/spack/spack/binary_distribution.py495
-rw-r--r--lib/spack/spack/build_environment.py204
-rw-r--r--lib/spack/spack/build_systems/autotools.py38
-rw-r--r--lib/spack/spack/build_systems/cmake.py96
-rw-r--r--lib/spack/spack/build_systems/intel.py192
-rw-r--r--lib/spack/spack/build_systems/qmake.py87
-rw-r--r--lib/spack/spack/build_systems/scons.py92
-rw-r--r--lib/spack/spack/cmd/__init__.py84
-rw-r--r--lib/spack/spack/cmd/build.py2
-rw-r--r--lib/spack/spack/cmd/buildcache.py230
-rw-r--r--lib/spack/spack/cmd/clean.py57
-rw-r--r--lib/spack/spack/cmd/common/arguments.py33
-rw-r--r--lib/spack/spack/cmd/compiler.py3
-rw-r--r--lib/spack/spack/cmd/configure.py2
-rw-r--r--lib/spack/spack/cmd/create.py65
-rw-r--r--lib/spack/spack/cmd/dependencies.py87
-rw-r--r--lib/spack/spack/cmd/dependents.py85
-rw-r--r--lib/spack/spack/cmd/find.py12
-rw-r--r--lib/spack/spack/cmd/gpg.py10
-rw-r--r--lib/spack/spack/cmd/graph.py3
-rw-r--r--lib/spack/spack/cmd/info.py115
-rw-r--r--lib/spack/spack/cmd/install.py44
-rw-r--r--lib/spack/spack/cmd/mirror.py2
-rw-r--r--lib/spack/spack/cmd/module.py5
-rw-r--r--lib/spack/spack/cmd/spec.py3
-rw-r--r--lib/spack/spack/cmd/uninstall.py11
-rw-r--r--lib/spack/spack/cmd/url.py2
-rw-r--r--lib/spack/spack/compilers/__init__.py2
-rw-r--r--lib/spack/spack/compilers/cce.py2
-rw-r--r--lib/spack/spack/config.py6
-rw-r--r--lib/spack/spack/database.py41
-rw-r--r--lib/spack/spack/directives.py28
-rw-r--r--lib/spack/spack/directory_layout.py4
-rw-r--r--lib/spack/spack/environment.py205
-rw-r--r--lib/spack/spack/error.py29
-rw-r--r--lib/spack/spack/hooks/case_consistency.py6
-rw-r--r--lib/spack/spack/hooks/sbang.py9
-rw-r--r--lib/spack/spack/main.py114
-rw-r--r--lib/spack/spack/mirror.py8
-rw-r--r--lib/spack/spack/operating_systems/cray_frontend.py76
-rw-r--r--lib/spack/spack/operating_systems/linux_distro.py7
-rw-r--r--lib/spack/spack/package.py255
-rw-r--r--lib/spack/spack/package_prefs.py10
-rw-r--r--lib/spack/spack/patch.py23
-rw-r--r--lib/spack/spack/platforms/cray.py4
-rw-r--r--lib/spack/spack/relocate.py289
-rw-r--r--lib/spack/spack/schema/config.py1
-rw-r--r--lib/spack/spack/spec.py426
-rw-r--r--lib/spack/spack/stage.py14
-rw-r--r--lib/spack/spack/test/build_system_guess.py1
-rw-r--r--lib/spack/spack/test/cmd/clean.py68
-rw-r--r--lib/spack/spack/test/cmd/dependencies.py77
-rw-r--r--lib/spack/spack/test/cmd/dependents.py75
-rw-r--r--lib/spack/spack/test/cmd/gpg.py104
-rw-r--r--lib/spack/spack/test/cmd/info.py40
-rw-r--r--lib/spack/spack/test/cmd/install.py295
-rw-r--r--lib/spack/spack/test/cmd/module.py5
-rw-r--r--lib/spack/spack/test/cmd/python.py22
-rw-r--r--lib/spack/spack/test/cmd/uninstall.py33
-rw-r--r--lib/spack/spack/test/cmd/url.py72
-rw-r--r--lib/spack/spack/test/concretize.py107
-rw-r--r--lib/spack/spack/test/concretize_preferences.py5
-rw-r--r--lib/spack/spack/test/config.py28
-rw-r--r--lib/spack/spack/test/conftest.py61
-rw-r--r--lib/spack/spack/test/data/config/modules.yaml42
-rw-r--r--lib/spack/spack/test/data/patch/bar.txt1
-rw-r--r--lib/spack/spack/test/data/patch/foo.tgzbin0 -> 116 bytes
-rw-r--r--lib/spack/spack/test/environment.py24
-rw-r--r--lib/spack/spack/test/install.py70
-rw-r--r--lib/spack/spack/test/lock.py1351
-rw-r--r--lib/spack/spack/test/log.py95
-rw-r--r--lib/spack/spack/test/module_parsing.py2
-rw-r--r--lib/spack/spack/test/modules.py10
-rw-r--r--lib/spack/spack/test/optional_deps.py119
-rw-r--r--lib/spack/spack/test/packaging.py304
-rw-r--r--lib/spack/spack/test/patch.py84
-rw-r--r--lib/spack/spack/test/sbang.py48
-rw-r--r--lib/spack/spack/test/spec_dag.py315
-rw-r--r--lib/spack/spack/test/spec_semantics.py25
-rw-r--r--lib/spack/spack/test/url_parse.py8
-rw-r--r--lib/spack/spack/test/versions.py56
-rw-r--r--lib/spack/spack/url.py3
-rw-r--r--lib/spack/spack/util/executable.py19
-rw-r--r--lib/spack/spack/util/log_parse.py134
-rw-r--r--lib/spack/spack/util/module_cmd.py2
-rw-r--r--lib/spack/spack/util/path.py4
-rw-r--r--lib/spack/spack/util/web.py36
-rw-r--r--lib/spack/spack/version.py86
-rw-r--r--share/spack/qa/configuration/packages.yaml13
-rwxr-xr-xshare/spack/spack-completion.bash63
-rw-r--r--var/spack/repos/builtin.mock/packages/a/package.py3
-rw-r--r--var/spack/repos/builtin.mock/packages/libdwarf/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/libelf/package.py9
-rw-r--r--var/spack/repos/builtin.mock/packages/mixedversions/package.py36
-rw-r--r--var/spack/repos/builtin.mock/packages/multivalue_variant/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/patchelf/package.py41
-rw-r--r--var/spack/repos/builtin.mock/packages/printing-package/package.py45
-rw-r--r--var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py39
-rw-r--r--var/spack/repos/builtin/packages/abyss/package.py6
-rw-r--r--var/spack/repos/builtin/packages/adept-utils/package.py13
-rw-r--r--var/spack/repos/builtin/packages/adios/package.py76
-rw-r--r--var/spack/repos/builtin/packages/adios2/package.py119
-rw-r--r--var/spack/repos/builtin/packages/adol-c/package.py1
-rw-r--r--var/spack/repos/builtin/packages/alglib/Makefile20
-rw-r--r--var/spack/repos/builtin/packages/alglib/package.py61
-rw-r--r--var/spack/repos/builtin/packages/alquimia/package.py6
-rw-r--r--var/spack/repos/builtin/packages/alsa-lib/package.py36
-rw-r--r--var/spack/repos/builtin/packages/amg2013/package.py73
-rw-r--r--var/spack/repos/builtin/packages/ampliconnoise/package.py67
-rw-r--r--var/spack/repos/builtin/packages/amr-exp-parabolic/package.py95
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ant/package.py2
-rw-r--r--var/spack/repos/builtin/packages/antlr/gcc.patch15
-rw-r--r--var/spack/repos/builtin/packages/antlr/package.py23
-rw-r--r--var/spack/repos/builtin/packages/apex/package.py32
-rw-r--r--var/spack/repos/builtin/packages/apr-util/package.py92
-rw-r--r--var/spack/repos/builtin/packages/apr/package.py14
-rw-r--r--var/spack/repos/builtin/packages/archer/package.py29
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py16
-rw-r--r--var/spack/repos/builtin/packages/arpack/package.py4
-rw-r--r--var/spack/repos/builtin/packages/aspa/package.py72
-rw-r--r--var/spack/repos/builtin/packages/astral/astral.sh3
-rw-r--r--var/spack/repos/builtin/packages/astral/package.py64
-rw-r--r--var/spack/repos/builtin/packages/augustus/package.py1
-rw-r--r--var/spack/repos/builtin/packages/automaded/package.py10
-rw-r--r--var/spack/repos/builtin/packages/bazel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bcftools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bcl2fastq2/package.py15
-rw-r--r--var/spack/repos/builtin/packages/bear/package.py12
-rw-r--r--var/spack/repos/builtin/packages/beast2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/benchmark/package.py24
-rw-r--r--var/spack/repos/builtin/packages/binutils/binutilskrell-2.24.patch52
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py5
-rw-r--r--var/spack/repos/builtin/packages/bml/package.py17
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py32
-rw-r--r--var/spack/repos/builtin/packages/bpp-core/package.py10
-rw-r--r--var/spack/repos/builtin/packages/bpp-phyl/package.py10
-rw-r--r--var/spack/repos/builtin/packages/bpp-seq/package.py10
-rw-r--r--var/spack/repos/builtin/packages/bpp-suite/package.py9
-rw-r--r--var/spack/repos/builtin/packages/braker/package.py52
-rw-r--r--var/spack/repos/builtin/packages/bsseeker2/package.py49
-rw-r--r--var/spack/repos/builtin/packages/bucky/package.py57
-rw-r--r--var/spack/repos/builtin/packages/busco/package.py59
-rw-r--r--var/spack/repos/builtin/packages/butter/package.py46
-rw-r--r--var/spack/repos/builtin/packages/c-blosc/package.py26
-rw-r--r--var/spack/repos/builtin/packages/caffe/package.py8
-rw-r--r--var/spack/repos/builtin/packages/callpath/package.py30
-rw-r--r--var/spack/repos/builtin/packages/cantera/package.py139
-rw-r--r--var/spack/repos/builtin/packages/canu/package.py61
-rw-r--r--var/spack/repos/builtin/packages/cap3/package.py43
-rw-r--r--var/spack/repos/builtin/packages/cares/package.py41
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py97
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis/package.py99
-rw-r--r--var/spack/repos/builtin/packages/cbtf-krell/package.py192
-rw-r--r--var/spack/repos/builtin/packages/cbtf-lanl/package.py83
-rw-r--r--var/spack/repos/builtin/packages/cbtf/package.py120
-rw-r--r--var/spack/repos/builtin/packages/cdbfasta/package.py39
-rw-r--r--var/spack/repos/builtin/packages/cdhit/package.py49
-rw-r--r--var/spack/repos/builtin/packages/cdo/package.py76
-rw-r--r--var/spack/repos/builtin/packages/cereal/package.py31
-rw-r--r--var/spack/repos/builtin/packages/cgal/package.py29
-rw-r--r--var/spack/repos/builtin/packages/cgns/package.py15
-rw-r--r--var/spack/repos/builtin/packages/check/package.py39
-rw-r--r--var/spack/repos/builtin/packages/chlorop/chlorop.patch36
-rw-r--r--var/spack/repos/builtin/packages/chlorop/package.py53
-rw-r--r--var/spack/repos/builtin/packages/clamr/package.py78
-rw-r--r--var/spack/repos/builtin/packages/cleaveland4/package.py48
-rw-r--r--var/spack/repos/builtin/packages/cleverleaf/package.py15
-rw-r--r--var/spack/repos/builtin/packages/clfft/package.py53
-rw-r--r--var/spack/repos/builtin/packages/clhep/package.py21
-rw-r--r--var/spack/repos/builtin/packages/cloverleaf/package.py110
-rw-r--r--var/spack/repos/builtin/packages/cloverleaf3d/package.py93
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py84
-rw-r--r--var/spack/repos/builtin/packages/cmocka/package.py12
-rw-r--r--var/spack/repos/builtin/packages/cnmem/package.py7
-rw-r--r--var/spack/repos/builtin/packages/cnpy/package.py34
-rw-r--r--var/spack/repos/builtin/packages/cns-nospec/package.py109
-rw-r--r--var/spack/repos/builtin/packages/cntk/lock-file.patch20
-rw-r--r--var/spack/repos/builtin/packages/cntk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/codar-cheetah/package.py45
-rw-r--r--var/spack/repos/builtin/packages/cohmm/package.py61
-rw-r--r--var/spack/repos/builtin/packages/comd/package.py55
-rw-r--r--var/spack/repos/builtin/packages/corset/package.py44
-rw-r--r--var/spack/repos/builtin/packages/cosp2/package.py74
-rw-r--r--var/spack/repos/builtin/packages/cpprestsdk/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cppzmq/package.py40
-rw-r--r--var/spack/repos/builtin/packages/cram/package.py13
-rw-r--r--var/spack/repos/builtin/packages/csdp/package.py43
-rw-r--r--var/spack/repos/builtin/packages/cub/package.py1
-rw-r--r--var/spack/repos/builtin/packages/cube/package.py6
-rw-r--r--var/spack/repos/builtin/packages/cufflinks/package.py46
-rw-r--r--var/spack/repos/builtin/packages/cups/package.py44
-rw-r--r--var/spack/repos/builtin/packages/dakota/package.py32
-rw-r--r--var/spack/repos/builtin/packages/daligner/package.py51
-rw-r--r--var/spack/repos/builtin/packages/damselfly/package.py10
-rw-r--r--var/spack/repos/builtin/packages/dataspaces/package.py91
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py39
-rw-r--r--var/spack/repos/builtin/packages/dialign-tx/package.py52
-rw-r--r--var/spack/repos/builtin/packages/discovar/package.py36
-rw-r--r--var/spack/repos/builtin/packages/doxygen/package.py8
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py1
-rw-r--r--var/spack/repos/builtin/packages/ea-utils/package.py51
-rw-r--r--var/spack/repos/builtin/packages/ebms/package.py69
-rw-r--r--var/spack/repos/builtin/packages/eccodes/package.py3
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py12
-rw-r--r--var/spack/repos/builtin/packages/elemental/elemental_cublas.patch668
-rw-r--r--var/spack/repos/builtin/packages/elemental/package.py37
-rw-r--r--var/spack/repos/builtin/packages/elfutils/package.py12
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py4
-rw-r--r--var/spack/repos/builtin/packages/emboss/package.py40
-rw-r--r--var/spack/repos/builtin/packages/espresso/package.py13
-rw-r--r--var/spack/repos/builtin/packages/espressopp/package.py8
-rw-r--r--var/spack/repos/builtin/packages/exabayes/package.py57
-rw-r--r--var/spack/repos/builtin/packages/expat/package.py24
-rw-r--r--var/spack/repos/builtin/packages/falcon/package.py51
-rw-r--r--var/spack/repos/builtin/packages/fastjar/package.py36
-rw-r--r--var/spack/repos/builtin/packages/fastphase/package.py39
-rw-r--r--var/spack/repos/builtin/packages/fastqc/package.py5
-rw-r--r--var/spack/repos/builtin/packages/fastx-toolkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ferret/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ffmpeg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py5
-rw-r--r--var/spack/repos/builtin/packages/fimpute/package.py40
-rw-r--r--var/spack/repos/builtin/packages/flecsale/package.py8
-rw-r--r--var/spack/repos/builtin/packages/flecsi/package.py8
-rw-r--r--var/spack/repos/builtin/packages/fmt/package.py47
-rw-r--r--var/spack/repos/builtin/packages/foam-extend/package.py1
-rw-r--r--var/spack/repos/builtin/packages/folly/package.py5
-rw-r--r--var/spack/repos/builtin/packages/freebayes/package.py51
-rw-r--r--var/spack/repos/builtin/packages/fseq/package.py41
-rw-r--r--var/spack/repos/builtin/packages/gapcloser/package.py39
-rw-r--r--var/spack/repos/builtin/packages/gapfiller/package.py52
-rw-r--r--var/spack/repos/builtin/packages/gaussian/package.py71
-rw-r--r--var/spack/repos/builtin/packages/gblocks/package.py40
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py22
-rw-r--r--var/spack/repos/builtin/packages/gdbm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/geant4/package.py8
-rw-r--r--var/spack/repos/builtin/packages/gearshifft/package.py74
-rw-r--r--var/spack/repos/builtin/packages/genemark-et/package.py53
-rw-r--r--var/spack/repos/builtin/packages/genometools/package.py45
-rw-r--r--var/spack/repos/builtin/packages/gflags/package.py12
-rw-r--r--var/spack/repos/builtin/packages/git/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glm/package.py14
-rw-r--r--var/spack/repos/builtin/packages/gmake/package.py35
-rw-r--r--var/spack/repos/builtin/packages/gmsh/package.py5
-rw-r--r--var/spack/repos/builtin/packages/go-bootstrap/package.py8
-rw-r--r--var/spack/repos/builtin/packages/go/package.py6
-rw-r--r--var/spack/repos/builtin/packages/gobject-introspection/package.py3
-rw-r--r--var/spack/repos/builtin/packages/gradle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphlib/package.py10
-rw-r--r--var/spack/repos/builtin/packages/graphmap/package.py43
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/grib-api/package.py39
-rw-r--r--var/spack/repos/builtin/packages/groff/gropdf.patch13
-rw-r--r--var/spack/repos/builtin/packages/groff/package.py61
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py10
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-atl/package.py44
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py41
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-dill/package.py43
-rw-r--r--var/spack/repos/builtin/packages/gtkorvo-enet/package.py38
-rw-r--r--var/spack/repos/builtin/packages/h5z-zfp/package.py3
-rw-r--r--var/spack/repos/builtin/packages/hadoop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hapcut2/package.py44
-rw-r--r--var/spack/repos/builtin/packages/haploview/haploview.sh3
-rw-r--r--var/spack/repos/builtin/packages/haploview/package.py54
-rw-r--r--var/spack/repos/builtin/packages/hdf/package.py27
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py1
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py40
-rw-r--r--var/spack/repos/builtin/packages/hepmc/package.py21
-rw-r--r--var/spack/repos/builtin/packages/hpccg/package.py77
-rw-r--r--var/spack/repos/builtin/packages/hpx/package.py42
-rw-r--r--var/spack/repos/builtin/packages/hybpiper/package.py59
-rw-r--r--var/spack/repos/builtin/packages/icedtea/package.py181
-rw-r--r--var/spack/repos/builtin/packages/icet/package.py4
-rw-r--r--var/spack/repos/builtin/packages/idba/package.py48
-rw-r--r--var/spack/repos/builtin/packages/igraph/package.py36
-rw-r--r--var/spack/repos/builtin/packages/impute2/package.py39
-rw-r--r--var/spack/repos/builtin/packages/infernal/package.py (renamed from lib/spack/spack/cmd/purge.py)49
-rw-r--r--var/spack/repos/builtin/packages/intel-daal/package.py48
-rw-r--r--var/spack/repos/builtin/packages/intel-ipp/package.py48
-rw-r--r--var/spack/repos/builtin/packages/intel-mkl/package.py81
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi/package.py92
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py598
-rw-r--r--var/spack/repos/builtin/packages/intel-tbb/package.py (renamed from var/spack/repos/builtin/packages/tbb/package.py)4
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py212
-rw-r--r--var/spack/repos/builtin/packages/isaac-server/jpeg.patch34
-rw-r--r--var/spack/repos/builtin/packages/isaac-server/package.py14
-rw-r--r--var/spack/repos/builtin/packages/isaac/package.py9
-rw-r--r--var/spack/repos/builtin/packages/itsx/package.py44
-rw-r--r--var/spack/repos/builtin/packages/jasper/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jdk/package.py5
-rw-r--r--var/spack/repos/builtin/packages/jmol/package.py2
-rw-r--r--var/spack/repos/builtin/packages/jsoncpp/package.py20
-rw-r--r--var/spack/repos/builtin/packages/kahip/package.py22
-rw-r--r--var/spack/repos/builtin/packages/kallisto/package.py39
-rw-r--r--var/spack/repos/builtin/packages/kealib/package.py21
-rw-r--r--var/spack/repos/builtin/packages/kentutils/package.py52
-rw-r--r--var/spack/repos/builtin/packages/kripke/package.py34
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py6
-rw-r--r--var/spack/repos/builtin/packages/last/package.py39
-rw-r--r--var/spack/repos/builtin/packages/lbann/package.py37
-rw-r--r--var/spack/repos/builtin/packages/lcals/package.py122
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py8
-rw-r--r--var/spack/repos/builtin/packages/libaec/package.py42
-rw-r--r--var/spack/repos/builtin/packages/libbeagle/package.py47
-rw-r--r--var/spack/repos/builtin/packages/libbsd/cdefs.h.patch15
-rw-r--r--var/spack/repos/builtin/packages/libbsd/package.py40
-rw-r--r--var/spack/repos/builtin/packages/libdrm/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libemos/package.py28
-rw-r--r--var/spack/repos/builtin/packages/libevpath/package.py49
-rw-r--r--var/spack/repos/builtin/packages/libfabric/package.py64
-rw-r--r--var/spack/repos/builtin/packages/libffs/package.py51
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py31
-rw-r--r--var/spack/repos/builtin/packages/libjpeg-turbo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libjpeg/package.py (renamed from var/spack/repos/builtin/packages/jpeg/package.py)4
-rw-r--r--var/spack/repos/builtin/packages/libpipeline/package.py40
-rw-r--r--var/spack/repos/builtin/packages/libsplash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libsvm/package.py43
-rw-r--r--var/spack/repos/builtin/packages/libszip/package.py (renamed from var/spack/repos/builtin/packages/szip/package.py)23
-rw-r--r--var/spack/repos/builtin/packages/libwebsockets/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libxc/package.py11
-rw-r--r--var/spack/repos/builtin/packages/libxpm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libxslt/package.py1
-rw-r--r--var/spack/repos/builtin/packages/libyogrt/package.py38
-rw-r--r--var/spack/repos/builtin/packages/llvm-lld/package.py25
-rw-r--r--var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py36
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py16
-rw-r--r--var/spack/repos/builtin/packages/lmdb/package.py62
-rw-r--r--var/spack/repos/builtin/packages/lua/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lulesh/package.py65
-rw-r--r--var/spack/repos/builtin/packages/lulesh/remove_defaults.patch60
-rw-r--r--var/spack/repos/builtin/packages/m4/package.py3
-rw-r--r--var/spack/repos/builtin/packages/mad-numdiff/package.py9
-rw-r--r--var/spack/repos/builtin/packages/magics/package.py65
-rw-r--r--var/spack/repos/builtin/packages/mallocmc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/man-db/package.py59
-rw-r--r--var/spack/repos/builtin/packages/mariadb/package.py12
-rw-r--r--var/spack/repos/builtin/packages/matlab/package.py2
-rw-r--r--var/spack/repos/builtin/packages/maven/package.py2
-rw-r--r--var/spack/repos/builtin/packages/maverick/package.py48
-rw-r--r--var/spack/repos/builtin/packages/mbedtls/package.py13
-rw-r--r--var/spack/repos/builtin/packages/mcl/package.py36
-rw-r--r--var/spack/repos/builtin/packages/mesa-glu/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py77
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py4
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py262
-rw-r--r--var/spack/repos/builtin/packages/microbiomeutil/package.py53
-rw-r--r--var/spack/repos/builtin/packages/miniaero/package.py62
-rw-r--r--var/spack/repos/builtin/packages/miniamr/package.py70
-rw-r--r--var/spack/repos/builtin/packages/minife/package.py80
-rw-r--r--var/spack/repos/builtin/packages/minighost/package.py96
-rw-r--r--var/spack/repos/builtin/packages/minigmg/package.py67
-rw-r--r--var/spack/repos/builtin/packages/minimd/package.py76
-rw-r--r--var/spack/repos/builtin/packages/minismac2d/package.py80
-rw-r--r--var/spack/repos/builtin/packages/minixyce/package.py80
-rw-r--r--var/spack/repos/builtin/packages/mitofates/package.py41
-rw-r--r--var/spack/repos/builtin/packages/mitos/package.py10
-rw-r--r--var/spack/repos/builtin/packages/moab/package.py5
-rw-r--r--var/spack/repos/builtin/packages/molcas/install_driver.patch114
-rw-r--r--var/spack/repos/builtin/packages/molcas/package.py48
-rw-r--r--var/spack/repos/builtin/packages/mothur/package.py59
-rw-r--r--var/spack/repos/builtin/packages/mpest/package.py50
-rw-r--r--var/spack/repos/builtin/packages/mpiblast/mpiBLAST-1.6.0-patch-110806182
-rw-r--r--var/spack/repos/builtin/packages/mpiblast/package.py51
-rw-r--r--var/spack/repos/builtin/packages/mpich/mpich32_clang.patch13
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py5
-rw-r--r--var/spack/repos/builtin/packages/mpifileutils/package.py20
-rw-r--r--var/spack/repos/builtin/packages/mpip/package.py14
-rw-r--r--var/spack/repos/builtin/packages/mpix-launch-swift/package.py47
-rw-r--r--var/spack/repos/builtin/packages/mrbayes/package.py72
-rw-r--r--var/spack/repos/builtin/packages/msgpack-c/package.py10
-rw-r--r--var/spack/repos/builtin/packages/muscle/package.py5
-rw-r--r--var/spack/repos/builtin/packages/muse/package.py38
-rw-r--r--var/spack/repos/builtin/packages/muster/package.py13
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py19
-rw-r--r--var/spack/repos/builtin/packages/mxml/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nalu/package.py11
-rw-r--r--var/spack/repos/builtin/packages/nanoflann/package.py39
-rw-r--r--var/spack/repos/builtin/packages/nco/NUL-0-NULL.patch51
-rw-r--r--var/spack/repos/builtin/packages/nco/package.py3
-rw-r--r--var/spack/repos/builtin/packages/ncview/package.py2
-rw-r--r--var/spack/repos/builtin/packages/nekbone/package.py60
-rw-r--r--var/spack/repos/builtin/packages/netcdf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py10
-rw-r--r--var/spack/repos/builtin/packages/nextflow/package.py4
-rw-r--r--var/spack/repos/builtin/packages/ninja-fortran/package.py36
-rw-r--r--var/spack/repos/builtin/packages/ninja/package.py34
-rw-r--r--var/spack/repos/builtin/packages/nut/package.py62
-rw-r--r--var/spack/repos/builtin/packages/octave/package.py8
-rw-r--r--var/spack/repos/builtin/packages/of-adios-write/package.py136
-rw-r--r--var/spack/repos/builtin/packages/ompt-openmp/package.py17
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py23
-rw-r--r--var/spack/repos/builtin/packages/openblas/power8.patch7809
-rw-r--r--var/spack/repos/builtin/packages/opencoarrays/package.py5
-rw-r--r--var/spack/repos/builtin/packages/opencv/package.py171
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-bin.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-build.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-etc.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-mgridgen-lib.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/mgridgen-lib-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-mpi.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-scotch-metis-lib.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-site.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-site-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/1612-zoltan-lib.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch (renamed from var/spack/repos/builtin/packages/openfoam-com/openfoam-site-plus.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-com/package.py44
-rw-r--r--var/spack/repos/builtin/packages/openfoam-org/41-etc.patch (renamed from var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-org/41-site.patch (renamed from var/spack/repos/builtin/packages/openfoam-org/openfoam-site-41.patch)0
-rw-r--r--var/spack/repos/builtin/packages/openfoam-org/package.py7
-rw-r--r--var/spack/repos/builtin/packages/openmc/package.py91
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py31
-rw-r--r--var/spack/repos/builtin/packages/openscenegraph/package.py36
-rw-r--r--var/spack/repos/builtin/packages/openspeedshop/package.py291
-rw-r--r--var/spack/repos/builtin/packages/orfm/package.py37
-rw-r--r--var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py6
-rw-r--r--var/spack/repos/builtin/packages/otf2/package.py7
-rw-r--r--var/spack/repos/builtin/packages/pacbio-daligner/package.py48
-rw-r--r--var/spack/repos/builtin/packages/pacbio-damasker/package.py47
-rw-r--r--var/spack/repos/builtin/packages/pacbio-dazz-db/package.py55
-rw-r--r--var/spack/repos/builtin/packages/pacbio-dextractor/package.py51
-rw-r--r--var/spack/repos/builtin/packages/pagit/package.py68
-rw-r--r--var/spack/repos/builtin/packages/paml/package.py52
-rw-r--r--var/spack/repos/builtin/packages/panda/package.py12
-rw-r--r--var/spack/repos/builtin/packages/paradiseo/package.py27
-rw-r--r--var/spack/repos/builtin/packages/parallel-netcdf/package.py14
-rw-r--r--var/spack/repos/builtin/packages/parmgridgen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/parsimonator/package.py65
-rw-r--r--var/spack/repos/builtin/packages/partitionfinder/package.py52
-rw-r--r--var/spack/repos/builtin/packages/pathfinder/package.py55
-rw-r--r--var/spack/repos/builtin/packages/pbmpi/package.py48
-rw-r--r--var/spack/repos/builtin/packages/pcma/package.py43
-rw-r--r--var/spack/repos/builtin/packages/pdsh/package.py12
-rw-r--r--var/spack/repos/builtin/packages/pegtl/package.py9
-rw-r--r--var/spack/repos/builtin/packages/pennant/package.py99
-rw-r--r--var/spack/repos/builtin/packages/perl-math-cdf/package.py35
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py31
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py6
-rw-r--r--var/spack/repos/builtin/packages/pgdspider/package.py57
-rw-r--r--var/spack/repos/builtin/packages/pgdspider/pgdspider.sh3
-rw-r--r--var/spack/repos/builtin/packages/phylip/package.py45
-rw-r--r--var/spack/repos/builtin/packages/picard/package.py4
-rw-r--r--var/spack/repos/builtin/packages/pidx/package.py12
-rw-r--r--var/spack/repos/builtin/packages/piranha/package.py25
-rw-r--r--var/spack/repos/builtin/packages/pkg-config/package.py11
-rw-r--r--var/spack/repos/builtin/packages/pkgconf/package.py43
-rw-r--r--var/spack/repos/builtin/packages/plink/package.py41
-rw-r--r--var/spack/repos/builtin/packages/pngwriter/package.py2
-rw-r--r--var/spack/repos/builtin/packages/poamsa/package.py50
-rw-r--r--var/spack/repos/builtin/packages/portage/package.py8
-rw-r--r--var/spack/repos/builtin/packages/preseq/package.py44
-rw-r--r--var/spack/repos/builtin/packages/price/package.py40
-rw-r--r--var/spack/repos/builtin/packages/probconsrna/package.py44
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py29
-rw-r--r--var/spack/repos/builtin/packages/protobuf/pkgconfig.patch58
-rw-r--r--var/spack/repos/builtin/packages/pruners-ninja/package.py1
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py35
-rw-r--r--var/spack/repos/builtin/packages/py-3to2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-apache-libcloud/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-apipkg/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-argcomplete/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-biom-format/package.py48
-rw-r--r--var/spack/repos/builtin/packages/py-bleach/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-blessings/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bottleneck/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cdat-lite/package.py11
-rw-r--r--var/spack/repos/builtin/packages/py-csvkit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dask/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dateutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dbf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-decorator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-deeptools/package.py45
-rw-r--r--var/spack/repos/builtin/packages/py-emcee/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-entrypoints/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-epydoc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-execnet/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-fastaindex/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-faststructure/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-funcsigs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-functools32/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-git2/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-html5lib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-igraph/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-iminuit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jpype/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-jsonschema/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lazyarray/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-lit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-lockfile/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-logilab-common/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-macholib/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-machotools/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-macs2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mako/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-misopy/package.py46
-rw-r--r--var/spack/repos/builtin/packages/py-mock/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mpi4py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mpmath/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nestle/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-numexpr/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py24
-rw-r--r--var/spack/repos/builtin/packages/py-pathspec/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-periodictable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-petsc4py/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pipits/package.py80
-rw-r--r--var/spack/repos/builtin/packages/py-pmw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-ppft/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-prettytable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-psutil/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-py2bit/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-pybigwig/package.py37
-rw-r--r--var/spack/repos/builtin/packages/py-pybind11/package.py51
-rw-r--r--var/spack/repos/builtin/packages/py-pycrypto/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycurl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pydatalog/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyelftools/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pylint/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pypeflow/package.py40
-rw-r--r--var/spack/repos/builtin/packages/py-pyrad/package.py41
-rw-r--r--var/spack/repos/builtin/packages/py-pysam/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-pyscaf/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-pyside/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pytest-xdist/package.py39
-rw-r--r--var/spack/repos/builtin/packages/py-python-daemon/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-readme-renderer/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-regex/package.py36
-rw-r--r--var/spack/repos/builtin/packages/py-restview/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-rpy2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-shiboken/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-slepc4py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sncosmo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sphinx/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-sqlalchemy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sympy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tappy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-theano/package.py3
-rw-r--r--var/spack/repos/builtin/packages/py-twisted/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2py3k/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-urwid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-vcversioner/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-xlrd/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qbox/package.py93
-rw-r--r--var/spack/repos/builtin/packages/qhull/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qhull/qhull-unused-intel-17.02.patch18
-rw-r--r--var/spack/repos/builtin/packages/qmd-progress/package.py62
-rw-r--r--var/spack/repos/builtin/packages/qt-creator/package.py34
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py11
-rw-r--r--var/spack/repos/builtin/packages/qtgraph/package.py73
-rw-r--r--var/spack/repos/builtin/packages/quinoa/package.py56
-rw-r--r--var/spack/repos/builtin/packages/qwt/package.py49
-rw-r--r--var/spack/repos/builtin/packages/r-ada/package.py37
-rw-r--r--var/spack/repos/builtin/packages/r-corpcor/package.py34
-rw-r--r--var/spack/repos/builtin/packages/r-mvtnorm/package.py3
-rw-r--r--var/spack/repos/builtin/packages/r-rcpp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rjava/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r-rpart/package.py2
-rw-r--r--var/spack/repos/builtin/packages/r/package.py3
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py8
-rw-r--r--var/spack/repos/builtin/packages/ravel/package.py8
-rw-r--r--var/spack/repos/builtin/packages/raxml/package.py107
-rw-r--r--var/spack/repos/builtin/packages/ray/package.py44
-rw-r--r--var/spack/repos/builtin/packages/rdp-classifier/package.py45
-rw-r--r--var/spack/repos/builtin/packages/redundans/package.py57
-rw-r--r--var/spack/repos/builtin/packages/relion/package.py4
-rw-r--r--var/spack/repos/builtin/packages/revbayes/package.py62
-rw-r--r--var/spack/repos/builtin/packages/rhash/package.py78
-rw-r--r--var/spack/repos/builtin/packages/root/package.py6
-rw-r--r--var/spack/repos/builtin/packages/rose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/rr/package.py66
-rw-r--r--var/spack/repos/builtin/packages/rsbench/package.py66
-rw-r--r--var/spack/repos/builtin/packages/rsem/package.py45
-rw-r--r--var/spack/repos/builtin/packages/rtags/add_string_iterator_erase_compile_check.patch67
-rw-r--r--var/spack/repos/builtin/packages/rtags/package.py49
-rw-r--r--var/spack/repos/builtin/packages/rtax/package.py43
-rw-r--r--var/spack/repos/builtin/packages/sabre/package.py48
-rw-r--r--var/spack/repos/builtin/packages/salmon/package.py41
-rw-r--r--var/spack/repos/builtin/packages/sas/package.py9
-rw-r--r--var/spack/repos/builtin/packages/satsuma2/package.py41
-rw-r--r--var/spack/repos/builtin/packages/savanna/package.py51
-rw-r--r--var/spack/repos/builtin/packages/sbt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scala/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scalasca/package.py5
-rw-r--r--var/spack/repos/builtin/packages/scons/package.py9
-rw-r--r--var/spack/repos/builtin/packages/scorep/gcc7.patch42
-rw-r--r--var/spack/repos/builtin/packages/scorep/package.py7
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py8
-rw-r--r--var/spack/repos/builtin/packages/scr/package.py125
-rw-r--r--var/spack/repos/builtin/packages/sdl2/package.py11
-rw-r--r--var/spack/repos/builtin/packages/seqprep/package.py39
-rw-r--r--var/spack/repos/builtin/packages/serf/package.py68
-rw-r--r--var/spack/repos/builtin/packages/shapeit/package.py44
-rw-r--r--var/spack/repos/builtin/packages/shared-mime-info/package.py1
-rw-r--r--var/spack/repos/builtin/packages/shortstack/package.py45
-rw-r--r--var/spack/repos/builtin/packages/sickle/package.py43
-rw-r--r--var/spack/repos/builtin/packages/signalp/package.py61
-rw-r--r--var/spack/repos/builtin/packages/simplemoc/package.py68
-rw-r--r--var/spack/repos/builtin/packages/singularity/package.py40
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/slurm/package.py109
-rw-r--r--var/spack/repos/builtin/packages/smalt/package.py34
-rw-r--r--var/spack/repos/builtin/packages/smc/package.py83
-rw-r--r--var/spack/repos/builtin/packages/snap-berkeley/package.py57
-rw-r--r--var/spack/repos/builtin/packages/snap/package.py64
-rw-r--r--var/spack/repos/builtin/packages/snbone/package.py64
-rw-r--r--var/spack/repos/builtin/packages/sniffles/package.py42
-rw-r--r--var/spack/repos/builtin/packages/snptest/package.py39
-rw-r--r--var/spack/repos/builtin/packages/soap2/package.py42
-rw-r--r--var/spack/repos/builtin/packages/soapindel/package.py53
-rw-r--r--var/spack/repos/builtin/packages/soapsnp/package.py (renamed from var/spack/repos/builtin/packages/gbenchmark/package.py)30
-rw-r--r--var/spack/repos/builtin/packages/somatic-sniper/package.py38
-rw-r--r--var/spack/repos/builtin/packages/sortmerna/package.py44
-rw-r--r--var/spack/repos/builtin/packages/spades/package.py43
-rw-r--r--var/spack/repos/builtin/packages/spark/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sparta/package.py46
-rw-r--r--var/spack/repos/builtin/packages/sqlite/package.py4
-rw-r--r--var/spack/repos/builtin/packages/sspace-longread/package.py52
-rw-r--r--var/spack/repos/builtin/packages/sspace-standard/package.py56
-rw-r--r--var/spack/repos/builtin/packages/stacks/package.py48
-rw-r--r--var/spack/repos/builtin/packages/stc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/stringtie/package.py41
-rw-r--r--var/spack/repos/builtin/packages/structure/package.py47
-rw-r--r--var/spack/repos/builtin/packages/sublime-text/package.py2
-rw-r--r--var/spack/repos/builtin/packages/subread/package.py52
-rw-r--r--var/spack/repos/builtin/packages/sumaclust/package.py42
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py83
-rw-r--r--var/spack/repos/builtin/packages/superlu/package.py6
-rw-r--r--var/spack/repos/builtin/packages/swarm/package.py41
-rw-r--r--var/spack/repos/builtin/packages/symengine/package.py8
-rw-r--r--var/spack/repos/builtin/packages/sympol/package.py9
-rw-r--r--var/spack/repos/builtin/packages/sz/package.py4
-rw-r--r--var/spack/repos/builtin/packages/tabix/package.py50
-rw-r--r--var/spack/repos/builtin/packages/task/package.py17
-rw-r--r--var/spack/repos/builtin/packages/taskd/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tcoffee/package.py57
-rw-r--r--var/spack/repos/builtin/packages/tealeaf/package.py77
-rw-r--r--var/spack/repos/builtin/packages/tethex/package.py11
-rw-r--r--var/spack/repos/builtin/packages/thrift/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tig/package.py36
-rw-r--r--var/spack/repos/builtin/packages/tk/package.py5
-rw-r--r--var/spack/repos/builtin/packages/tmalign/package.py39
-rw-r--r--var/spack/repos/builtin/packages/tmux/package.py16
-rw-r--r--var/spack/repos/builtin/packages/tophat/package.py47
-rw-r--r--var/spack/repos/builtin/packages/tppred/package.py54
-rw-r--r--var/spack/repos/builtin/packages/transabyss/package.py45
-rw-r--r--var/spack/repos/builtin/packages/transdecoder/package.py50
-rw-r--r--var/spack/repos/builtin/packages/transposome/package.py37
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py70
-rw-r--r--var/spack/repos/builtin/packages/trimgalore/package.py44
-rw-r--r--var/spack/repos/builtin/packages/trimmomatic/package.py4
-rw-r--r--var/spack/repos/builtin/packages/udunits2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/unixodbc/package.py3
-rw-r--r--var/spack/repos/builtin/packages/usearch/package.py49
-rw-r--r--var/spack/repos/builtin/packages/varscan/package.py59
-rw-r--r--var/spack/repos/builtin/packages/varscan/varscan.sh3
-rw-r--r--var/spack/repos/builtin/packages/vc/package.py12
-rw-r--r--var/spack/repos/builtin/packages/vcftools/package.py4
-rw-r--r--var/spack/repos/builtin/packages/vecgeom/package.py9
-rw-r--r--var/spack/repos/builtin/packages/vegas2/package.py49
-rw-r--r--var/spack/repos/builtin/packages/velvet/package.py40
-rw-r--r--var/spack/repos/builtin/packages/viennarna/package.py67
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py35
-rw-r--r--var/spack/repos/builtin/packages/vmatch/package.py42
-rw-r--r--var/spack/repos/builtin/packages/votca-csg/package.py9
-rw-r--r--var/spack/repos/builtin/packages/votca-ctp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/votca-moo/package.py9
-rw-r--r--var/spack/repos/builtin/packages/votca-tools/package.py9
-rw-r--r--var/spack/repos/builtin/packages/votca-xtp/package.py9
-rw-r--r--var/spack/repos/builtin/packages/vpfft/package.py67
-rw-r--r--var/spack/repos/builtin/packages/vpic/package.py9
-rw-r--r--var/spack/repos/builtin/packages/vsearch/package.py39
-rw-r--r--var/spack/repos/builtin/packages/xplor-nih/package.py48
-rw-r--r--var/spack/repos/builtin/packages/xproto/package.py5
-rw-r--r--var/spack/repos/builtin/packages/xrootd/package.py19
-rw-r--r--var/spack/repos/builtin/packages/xsbench/package.py65
-rw-r--r--var/spack/repos/builtin/packages/xsdk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/xsdktrilinos/package.py10
-rw-r--r--var/spack/repos/builtin/packages/yaml-cpp/package.py4
-rw-r--r--var/spack/repos/builtin/packages/zeromq/package.py14
-rw-r--r--var/spack/repos/builtin/packages/zfp/package.py25
-rw-r--r--var/spack/repos/builtin/packages/zlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/zoltan/package.py2
-rw-r--r--var/spack/repos/builtin/packages/zsh/package.py17
-rw-r--r--var/spack/repos/builtin/packages/zstd/package.py6
713 files changed, 31717 insertions, 5166 deletions
diff --git a/.codecov.yml b/.codecov.yml
index 1782e78ff9..639b07012d 100644
--- a/.codecov.yml
+++ b/.codecov.yml
@@ -13,6 +13,10 @@ coverage:
threshold: 0.5
paths:
- lib/spack/spack/cmd
+ build_systems:
+ threshold: 0.5
+ paths:
+ - lib/spack/spack/build_systems
core:
threshold: 0.5
paths:
diff --git a/.gitignore b/.gitignore
index 1a95d49377..49bc74063e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,8 +8,9 @@
*~
.DS_Store
.idea
-/etc/spack/licenses
-/etc/spack/*.yaml
+# Ignore everything in /etc/spack except /etc/spack/defaults
+/etc/spack/*
+!/etc/spack/defaults
/etc/spackconfig
/share/spack/dotkit
/share/spack/modules
diff --git a/.travis.yml b/.travis.yml
index eeeaee85df..ec88f02e39 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,21 +11,23 @@ branches:
#=============================================================================
# Build matrix
#=============================================================================
-matrix:
+jobs:
fast_finish: true
include:
- - python: '2.6'
+ - stage: 'flake8'
+ python: '2.7'
os: linux
language: python
- env: TEST_SUITE=unit
- - python: '2.7'
+ env: TEST_SUITE=flake8
+ - stage: 'unit tests + documentation'
+ python: '2.6'
os: linux
language: python
- env: [ TEST_SUITE=unit, COVERAGE=true ]
+ env: TEST_SUITE=unit
- python: '2.7'
os: linux
language: python
- env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=hypre^mpich' ]
+ env: [ TEST_SUITE=unit, COVERAGE=true ]
- python: '3.3'
os: linux
language: python
@@ -42,21 +44,54 @@ matrix:
os: linux
language: python
env: [ TEST_SUITE=unit, COVERAGE=true ]
- - python: '3.6'
+ - os: osx
+ language: generic
+ env: [ TEST_SUITE=unit, PYTHON_VERSION=2.7, COVERAGE=true ]
+ - python: '2.7'
+ os: linux
+ language: python
+ env: TEST_SUITE=doc
+# mpich (AutotoolsPackage)
+ - stage: 'build tests'
+ python: '2.7'
os: linux
language: python
- env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=hypre^mpich' ]
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=mpich' ]
+# astyle (MakefilePackage)
- python: '2.7'
os: linux
language: python
- env: TEST_SUITE=flake8
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=astyle' ]
+# tut (WafPackage)
- python: '2.7'
os: linux
language: python
- env: TEST_SUITE=doc
- - os: osx
- language: generic
- env: [ TEST_SUITE=unit, PYTHON_VERSION=2.7, COVERAGE=true ]
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=tut' ]
+# py-setuptools (PythonPackage)
+ - python: '2.7'
+ os: linux
+ language: python
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=py-setuptools' ]
+# perl-dbi (PerlPackage)
+# - python: '2.7'
+# os: linux
+# language: python
+# env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=perl-dbi' ]
+# openjpeg (CMakePackage + external cmake)
+ - python: '2.7'
+ os: linux
+ language: python
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=openjpeg' ]
+# r-rcpp (RPackage + external R)
+ - python: '2.7'
+ os: linux
+ language: python
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=r-rcpp' ]
+# mpich (AutotoolsPackage)
+ - python: '3.6'
+ os: linux
+ language: python
+ env: [ TEST_SUITE=build, COVERAGE=true, 'SPEC=mpich' ]
#=============================================================================
# Environment
@@ -72,6 +107,14 @@ addons:
- mercurial
- graphviz
- gnupg2
+ - cmake
+ - r-base
+ - r-base-core
+ - r-base-dev
+ - perl
+ - perl-base
+
+cache: pip
# Work around Travis's lack of support for Python on OSX
before_install:
@@ -99,6 +142,9 @@ before_script:
# Need this to be able to compute the list of changed files
- git fetch origin develop:develop
+ # Set up external dependencies for build tests, because the take too long to compile
+ - if [[ "$TEST_SUITE" == "build" ]]; then cp share/spack/qa/configuration/packages.yaml etc/spack/packages.yaml; fi
+
#=============================================================================
# Building
#=============================================================================
diff --git a/bin/sbang b/bin/sbang
index 0b883a5feb..ce4df4327c 100755
--- a/bin/sbang
+++ b/bin/sbang
@@ -104,6 +104,8 @@ lines=0
while read line && ((lines < 2)) ; do
if [[ "$line" = '#!'* ]]; then
interpreter="${line#\#!}"
+ elif [[ "$line" = '//!'*node* ]]; then
+ interpreter="${line#//!}"
elif [[ "$line" = '--!'*lua* ]]; then
interpreter="${line#--!}"
fi
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml
index d04ce76e6b..2cfdd399df 100644
--- a/etc/spack/defaults/packages.yaml
+++ b/etc/spack/defaults/packages.yaml
@@ -19,15 +19,19 @@ packages:
providers:
awk: [gawk]
blas: [openblas]
- daal: [intel-parallel-studio+daal]
+ daal: [intel-daal]
elf: [elfutils]
golang: [gcc]
- ipp: [intel-parallel-studio+ipp]
+ ipp: [intel-ipp]
+ java: [jdk]
lapack: [openblas]
- mkl: [intel-parallel-studio+mkl]
+ mkl: [intel-mkl]
mpe: [mpe2]
mpi: [openmpi, mpich]
opencl: [pocl]
openfoam: [openfoam-com, openfoam-org, foam-extend]
pil: [py-pillow]
scalapack: [netlib-scalapack]
+ szip: [libszip, libaec]
+ tbb: [intel-tbb]
+ jpeg: [libjpeg-turbo, libjpeg]
diff --git a/lib/spack/docs/_themes/sphinx_rtd_theme/footer.html b/lib/spack/docs/_themes/sphinx_rtd_theme/footer.html
index d000dcbc2c..c4f11f3f8d 100644
--- a/lib/spack/docs/_themes/sphinx_rtd_theme/footer.html
+++ b/lib/spack/docs/_themes/sphinx_rtd_theme/footer.html
@@ -24,7 +24,7 @@
<br/>
Written by Todd Gamblin (<a href="mailto:tgamblin@llnl.gov">tgamblin@llnl.gov</a>) and
- many contributors. LLNL-CODE-647188.
+ many <a href="https://github.com/LLNL/spack/graphs/contributors">contributors.</a> LLNL-CODE-647188.
{%- if last_updated %}
<br/>
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index f25247579b..bb426b4378 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -808,17 +808,46 @@ Specifying Specs by Hash
^^^^^^^^^^^^^^^^^^^^^^^^
Complicated specs can become cumbersome to enter on the command line,
-especially when many of the qualifications are necessary to
-distinguish between similar installs, for example when using the
-``uninstall`` command. To avoid this, when referencing an existing spec,
+especially when many of the qualifications are necessary to distinguish
+between similar installs. To avoid this, when referencing an existing spec,
Spack allows you to reference specs by their hash. We previously
discussed the spec hash that Spack computes. In place of a spec in any
command, substitute ``/<hash>`` where ``<hash>`` is any amount from
-the beginning of a spec hash. If the given spec hash is sufficient
-to be unique, Spack will replace the reference with the spec to which
-it refers. Otherwise, it will prompt for a more qualified hash.
+the beginning of a spec hash.
-Note that this will not work to reinstall a depencency uninstalled by
+For example, lets say that you accidentally installed two different
+``mvapich2`` installations. If you want to uninstall one of them but don't
+know what the difference is, you can run:
+
+.. code-block:: console
+
+ $ spack find --long mvapich2
+ ==> 2 installed packages.
+ -- linux-centos7-x86_64 / gcc@6.3.0 ----------
+ qmt35td mvapich2@2.2%gcc
+ er3die3 mvapich2@2.2%gcc
+
+
+You can then uninstall the latter installation using:
+
+.. code-block:: console
+
+ $ spack uninstall /er3die3
+
+
+Or, if you want to build with a specific installation as a dependency,
+you can use:
+
+.. code-block:: console
+
+ $ spack install trilinos ^/er3die3
+
+
+If the given spec hash is sufficiently long as to be unique, Spack will
+replace the reference with the spec to which it refers. Otherwise, it will
+prompt for a more qualified hash.
+
+Note that this will not work to reinstall a dependency uninstalled by
``spack uninstall --force``.
.. _cmd-spack-providers:
diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst
new file mode 100644
index 0000000000..3839290c98
--- /dev/null
+++ b/lib/spack/docs/binary_caches.rst
@@ -0,0 +1,132 @@
+.. _binary_caches:
+
+============
+Build caches
+============
+
+Some sites may encourage users to set up their own test environments
+before carrying out central installations, or some users may prefer to set
+up these environments on their own motivation. To reduce the load of
+recompiling otherwise identical package specs in different installations,
+installed packages can be put into build cache tarballs, uploaded to
+your Spack mirror and then downloaded and installed by others.
+
+
+--------------------------
+Creating build cache files
+--------------------------
+
+A compressed tarball of an installed package is created. Tarballs are created
+for all of its link and run dependency packages as well. Compressed tarballs are
+signed with gpg and signature and tarball and put in a ``.spack`` file. Optionally,
+the rpaths (and ids and deps on macOS) can be changed to paths relative to
+the Spack install tree before the tarball is created.
+
+Build caches are created via:
+
+.. code-block:: console
+
+ $ spack buildcache create
+
+
+---------------------------------------
+Finding or installing build cache files
+---------------------------------------
+
+To find build caches or install build caches, a Spack mirror must be configured
+with:
+
+.. code-block:: console
+
+ $ spack mirror add <name> <url>
+
+Build caches are found via:
+
+.. code-block:: console
+
+ $ spack buildcache list
+
+Build caches are installed via:
+
+.. code-block:: console
+
+ $ spack buildcache install
+
+
+----------
+Relocation
+----------
+
+Initial build and later installation do not necessarily happen at the same
+location. Spack provides a relocation capability and corrects for RPATHs and
+non-relocatable scripts. However, many packages compile paths into binary
+artifacts directly. In such cases, the build instructions of this package would
+need to be adjusted for better re-locatability.
+
+.. _cmd-spack-buildcache:
+
+--------------------
+``spack buildcache``
+--------------------
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+``spack buildcache create``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Create tarball of installed Spack package and all dependencies.
+Tarballs are checksummed and signed if gpg2 is available.
+Places them in a directory ``build_cache`` that can be copied to a mirror.
+Commands like ``spack buildcache install`` will search it for pre-compiled packages.
+
+============== ========================================================================================================================
+Arguments Description
+============== ========================================================================================================================
+``<packages>`` list of package specs or package hashes with leading ``/``
+``-d <path>`` directory in which ``build_cache`` directory is created, defaults to ``.``
+``-f`` overwrite ``.spack`` file in ``build_cache`` directory if it exists
+``-k <key>`` the key to sign package with. In the case where multiple keys exist, the package will be unsigned unless ``-k`` is used.
+``-r`` make paths in binaries relative before creating tarball
+``-y`` answer yes to all create unsigned ``build_cache`` questions
+============== ========================================================================================================================
+
+^^^^^^^^^^^^^^^^^^^^^^^^^
+``spack buildcache list``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Retrieves all specs for build caches available on a Spack mirror.
+
+============== ==============================================================================
+Arguments Description
+============== ==============================================================================
+``<packages>`` string to be matched to matched to beginning of listed concretized short specs
+============== ==============================================================================
+
+E.g. ``spack buildcache list gcc`` with print only commands to install ``gcc`` package(s)
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+``spack buildcache install``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Retrieves all specs for build caches available on a Spack mirror and installs build caches
+with specs matching the specs or hashes input.
+
+============== ==============================================================
+Arguments Description
+============== ==============================================================
+``<packages>`` list of package specs or package hashes with leading ``/``
+``-f`` remove install directory if it exists before unpacking tarball
+``-y`` answer yes to all to don't verify package with gpg questions
+============== ==============================================================
+
+^^^^^^^^^^^^^^^^^^^^^^^^^
+``spack buildcache keys``
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+List public keys available on Spack mirror.
+
+========= ==============================================
+Arguments Description
+========= ==============================================
+``-i`` trust the keys downloaded with prompt for each
+``-y`` answer yes to all trust all keys downloaded
+========= ==============================================
diff --git a/lib/spack/docs/config_yaml.rst b/lib/spack/docs/config_yaml.rst
index 28b258c2e5..da760f05e3 100644
--- a/lib/spack/docs/config_yaml.rst
+++ b/lib/spack/docs/config_yaml.rst
@@ -14,27 +14,6 @@ see the default settings by looking at
These settings can be overridden in ``etc/spack/config.yaml`` or
``~/.spack/config.yaml``. See :ref:`configuration-scopes` for details.
-.. _config-file-variables:
-
-------------------------------
-Config file variables
-------------------------------
-
-You may notice some variables prefixed with ``$`` in the settings above.
-Spack understands several variables that can be used in values of
-configuration parameters. They are:
-
- * ``$spack``: path to the prefix of this spack installation
- * ``$tempdir``: default system temporary directory (as specified in
- Python's `tempfile.tempdir
- <https://docs.python.org/2/library/tempfile.html#tempfile.tempdir>`_
- variable.
- * ``$user``: name of the current user
-
-Note that, as with shell variables, you can write these as ``$varname``
-or with braces to distinguish the variable from surrounding characters:
-``${varname}``.
-
--------------------
``install_tree``
--------------------
@@ -126,8 +105,8 @@ When Spack builds a package, it creates a temporary directory within the
After a package is successfully installed, Spack deletes the temporary
directory it used to build. Unsuccessful builds are not deleted, but you
-can manually purge them with :ref:`spack purge --stage
-<cmd-spack-purge>`.
+can manually purge them with :ref:`spack clean --stage
+<cmd-spack-clean>`.
.. note::
@@ -142,8 +121,8 @@ can manually purge them with :ref:`spack purge --stage
Location to cache downloaded tarballs and repositories. By default these
are stored in ``$spack/var/spack/cache``. These are stored indefinitely
-by default. Can be purged with :ref:`spack purge --downloads
-<cmd-spack-purge>`.
+by default. Can be purged with :ref:`spack clean --downloads
+<cmd-spack-clean>`.
--------------------
``misc_cache``
@@ -151,7 +130,7 @@ by default. Can be purged with :ref:`spack purge --downloads
Temporary directory to store long-lived cache files, such as indices of
packages available in repositories. Defaults to ``~/.spack/cache``. Can
-be purged with :ref:`spack purge --misc-cache <cmd-spack-purge>`.
+be purged with :ref:`spack clean --misc-cache <cmd-spack-clean>`.
--------------------
``verify_ssl``
diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst
index 5f76a76c81..f1648eb4e0 100644
--- a/lib/spack/docs/configuration.rst
+++ b/lib/spack/docs/configuration.rst
@@ -261,3 +261,52 @@ The merged configuration would look like this:
- /lustre-scratch/$user
- ~/mystage
$ _
+
+.. _config-file-variables:
+
+------------------------------
+Config file variables
+------------------------------
+
+Spack understands several variables which can be used in config file paths
+where ever they appear. There are three sets of these variables, Spack specific
+variables, environment variables, and user path variables. Spack specific
+variables and environment variables both are indicated by prefixing the variable
+name with ``$``. User path variables are indicated at the start of the path with
+``~`` or ``~user``. Let's discuss each in turn.
+
+^^^^^^^^^^^^^^^^^^^^^^^^
+Spack Specific Variables
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Spack understands several special variables. These are:
+
+ * ``$spack``: path to the prefix of this spack installation
+ * ``$tempdir``: default system temporary directory (as specified in
+ Python's `tempfile.tempdir
+ <https://docs.python.org/2/library/tempfile.html#tempfile.tempdir>`_
+ variable.
+ * ``$user``: name of the current user
+
+Note that, as with shell variables, you can write these as ``$varname``
+or with braces to distinguish the variable from surrounding characters:
+``${varname}``. Their names are also case insensitive meaning that ``$SPACK``
+works just as well as ``$spack``. These special variables are also
+substituted first, so any environment variables with the same name will not
+be used.
+
+^^^^^^^^^^^^^^^^^^^^^
+Environment Variables
+^^^^^^^^^^^^^^^^^^^^^
+
+Spack then uses ``os.path.expandvars`` to expand any remaining environment
+variables.
+
+^^^^^^^^^^^^^^
+User Variables
+^^^^^^^^^^^^^^
+
+Spack also uses the ``os.path.expanduser`` function on the path to expand
+any user tilde paths such as ``~`` or ``~user``. These tilde paths must appear
+at the beginning of the path or ``os.path.expanduser`` will not properly
+expand them.
diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst
index f4918b58db..cae404d2f1 100644
--- a/lib/spack/docs/index.rst
+++ b/lib/spack/docs/index.rst
@@ -63,6 +63,7 @@ or refer to the full manual below.
mirrors
module_file_support
repositories
+ binary_caches
command_index
package_list
diff --git a/lib/spack/docs/mirrors.rst b/lib/spack/docs/mirrors.rst
index c69496066f..8f4eea1f8c 100644
--- a/lib/spack/docs/mirrors.rst
+++ b/lib/spack/docs/mirrors.rst
@@ -237,7 +237,7 @@ as other Spack mirrors (so it can be copied anywhere and referenced with a URL
like other mirrors). The mirror is maintained locally (within the Spack
installation directory) at :file:`var/spack/cache/`. It is always enabled (and
is always searched first when attempting to retrieve files for an installation)
-but can be cleared with :ref:`purge <cmd-spack-purge>`; the cache directory can also
+but can be cleared with :ref:`clean <cmd-spack-clean>`; the cache directory can also
be deleted manually without issue.
Caching includes retrieved tarball archives and source control repositories, but
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index ecc3f58830..e400272e59 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -443,26 +443,31 @@ Version URLs
By default, each version's URL is extrapolated from the ``url`` field
in the package. For example, Spack is smart enough to download
version ``8.2.1.`` of the ``Foo`` package above from
-``http://example.com/foo-8.2.1.tar.gz``.
+http://example.com/foo-8.2.1.tar.gz.
If the URL is particularly complicated or changes based on the release,
you can override the default URL generation algorithm by defining your
-own ``url_for_version()`` function. For example, the developers of HDF5
-keep changing the archive layout, so the ``url_for_version()`` function
-looks like:
+own ``url_for_version()`` function. For example, the download URL for
+OpenMPI contains the major.minor version in one spot and the
+major.minor.patch version in another:
-.. literalinclude:: ../../../var/spack/repos/builtin/packages/hdf5/package.py
- :pyobject: Hdf5.url_for_version
+https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
-With the use of this ``url_for_version()``, Spack knows to download HDF5 ``1.8.16``
-from ``http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.16/src/hdf5-1.8.16.tar.gz``
-but download HDF5 ``1.10.0`` from ``http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz``.
+In order to handle this, you can define a ``url_for_version()`` function
+like so:
-You'll notice that HDF5's ``url_for_version()`` function makes use of a special
+.. literalinclude:: ../../../var/spack/repos/builtin/packages/openmpi/package.py
+ :pyobject: Openmpi.url_for_version
+
+With the use of this ``url_for_version()``, Spack knows to download OpenMPI ``2.1.1``
+from http://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
+but download OpenMPI ``1.10.7`` from http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.7.tar.bz2.
+
+You'll notice that OpenMPI's ``url_for_version()`` function makes use of a special
``Version`` function called ``up_to()``. When you call ``version.up_to(2)`` on a
version like ``1.10.0``, it returns ``1.10``. ``version.up_to(1)`` would return
``1``. This can be very useful for packages that place all ``X.Y.*`` versions in
-a single directory and then places all ``X.Y.Z`` versions in a subdirectory.
+a single directory and then places all ``X.Y.Z`` versions in a sub-directory.
There are a few ``Version`` properties you should be aware of. We generally
prefer numeric versions to be separated by dots for uniformity, but not all
@@ -485,6 +490,21 @@ version.joined 123
Python properties don't need parentheses. ``version.dashed`` is correct.
``version.dashed()`` is incorrect.
+In addition, these version properties can be combined with ``up_to()``.
+For example:
+
+.. code-block:: python
+
+ >>> version = Version('1.2.3')
+ >>> version.up_to(2).dashed
+ Version('1-2')
+ >>> version.underscored.up_to(2)
+ Version('1_2')
+
+
+As you can see, order is not important. Just keep in mind that ``up_to()`` and
+the other version properties return ``Version`` objects, not strings.
+
If a URL cannot be derived systematically, or there is a special URL for one
of its versions, you can add an explicit URL for a particular version:
@@ -493,9 +513,6 @@ of its versions, you can add an explicit URL for a particular version:
version('8.2.1', '4136d7b4c04df68b686570afa26988ac',
url='http://example.com/foo-8.2.1-special-version.tar.gz')
-This is common for Python packages that download from PyPi. Since newer
-download URLs often contain a unique hash for each version, there is no
-way to guess the URL systematically.
When you supply a custom URL for a version, Spack uses that URL
*verbatim* and does not perform extrapolation.
@@ -923,7 +940,7 @@ Submodules
.. code-block:: python
version('1.0.1', git='https://github.com/example-project/example.git',
- tag='v1.0.1', submdoules=True)
+ tag='v1.0.1', submodules=True)
.. _github-fetch:
@@ -2101,7 +2118,13 @@ The classes that are currently provided by Spack are:
| :py:class:`.CMakePackage` | Specialized class for packages |
| | built using CMake |
+-------------------------------+----------------------------------+
- | :py:class:`.WafPackage` | Specialize class for packages |
+ | :py:class:`.QMakePackage` | Specialized class for packages |
+ | | build using QMake |
+ +-------------------------------+----------------------------------+
+ | :py:class:`.SConsPackage` | Specialized class for packages |
+ | | built using SCons |
+ +-------------------------------+----------------------------------+
+ | :py:class:`.WafPackage` | Specialized class for packages |
| | built using Waf |
+-------------------------------+----------------------------------+
| :py:class:`.RPackage` | Specialized class for |
@@ -2113,6 +2136,9 @@ The classes that are currently provided by Spack are:
| :py:class:`.PerlPackage` | Specialized class for |
| | :py:class:`.Perl` extensions |
+-------------------------------+----------------------------------+
+ | :py:class:`.IntelPackage` | Specialized class for licensed |
+ | | Intel software |
+ +-------------------------------+----------------------------------+
.. note::
@@ -2388,6 +2414,94 @@ build system.
Compiler flags
^^^^^^^^^^^^^^
+Compiler flags set by the user through the Spec object can be passed to
+the build in one of two ways. For packages inheriting from the
+``CmakePackage`` or ``AutotoolsPackage`` classes, the build environment
+passes those flags to the relevant environment variables (``CFLAGS``,
+``CXXFLAGS``, etc) that are respected by the build system. For all other
+packages, the default behavior is to inject the flags directly into the
+compiler commands using Spack's compiler wrappers.
+
+Individual packages can override the default behavior for the flag
+handling. Packages can define a ``default_flag_handler`` method that
+applies to all sets of flags handled by Spack, or may define
+individual methods ``cflags_handler``, ``cxxflags_handler``,
+etc. Spack will apply the individual method for a flag set if it
+exists, otherwise the ``default_flag_handler`` method if it exists,
+and fall back on the default for that package class if neither exists.
+
+These methods are defined on the package class, and take two
+parameters in addition to the packages itself. The ``env`` parameter
+is an ``EnvironmentModifications`` object that can be used to change
+the build environment. The ``flag_val`` parameter is a tuple. Its
+first entry is the name of the flag (``cflags``, ``cxxflags``, etc.)
+and its second entry is a list of the values for that flag.
+
+There are three primary idioms that can be combined to create whatever
+behavior the package requires.
+
+1. The default behavior for packages inheriting from
+``AutotoolsPackage`` or ``CmakePackage``.
+
+.. code-block:: python
+
+ def default_flag_handler(self, env, flag_val):
+ env.append_flags(flag_val[0].upper(), ' '.join(flag_val[1]))
+ return []
+
+2. The default behavior for other packages
+
+.. code-block:: python
+
+ def default_flag_handler(self, env, flag_val):
+ return flag_val[1]
+
+
+3. Packages may have additional flags to add to the build. These flags
+can be added to either idiom above. For example:
+
+.. code-block:: python
+
+ def default_flag_handler(self, env, flag_val):
+ flags = flag_val[1]
+ flags.append('-flag')
+ return flags
+
+or
+
+.. code-block:: python
+
+ def default_flag_handler(self, env, flag_val):
+ env.append_flags(flag_val[0].upper(), ' '.join(flag_val[1]))
+ env.append_flags(flag_val[0].upper(), '-flag')
+ return []
+
+Packages may also opt for methods that include aspects of any of the
+idioms above. E.g.
+
+.. code-block:: python
+
+ def default_flag_handler(self, env, flag_val):
+ flags = []
+ if len(flag_val[1]) > 3:
+ env.append_flags(flag_val[0].upper(), ' '.join(flag_val[1][3:]))
+ flags = flag_val[1][:3]
+ else:
+ flags = flag_val[1]
+ flags.append('-flag')
+ return flags
+
+Because these methods can pass values through environment variables,
+it is important not to override these variables unnecessarily in other
+package methods. In the ``setup_environment`` and
+``setup_dependent_environment`` methods, use the ``append_flags``
+method of the ``EnvironmentModifications`` class to append values to a
+list of flags whenever there is no good reason to override the
+existing value. In the ``install`` method and other methods that can
+operate on the build environment directly through the ``env``
+variable, test for environment variable existance before overriding
+values to add compiler flags.
+
In rare circumstances such as compiling and running small unit tests, a
package developer may need to know what are the appropriate compiler
flags to enable features like ``OpenMP``, ``c++11``, ``c++14`` and
@@ -3321,24 +3435,12 @@ Does this in one of two ways:
``spack clean``
^^^^^^^^^^^^^^^
-Cleans up temporary files for a particular package, by deleting the
-expanded/checked out source code *and* any downloaded archive. If
-``fetch``, ``stage``, or ``install`` are run again after this, Spack's
-build process will start from scratch.
-
-.. _cmd-spack-purge:
-
-^^^^^^^^^^^^^^^
-``spack purge``
-^^^^^^^^^^^^^^^
-
Cleans up all of Spack's temporary and cached files. This can be used to
recover disk space if temporary files from interrupted or failed installs
accumulate in the staging area.
When called with ``--stage`` or without arguments this removes all staged
-files and will be equivalent to running ``spack clean`` for every package
-you have fetched or staged.
+files.
When called with ``--downloads`` this will clear all resources
:ref:`cached <caching>` during installs.
@@ -3348,6 +3450,11 @@ directory, including cached virtual indices.
To remove all of the above, the command can be called with ``--all``.
+When called with positional arguments, cleans up temporary files only
+for a particular package. If ``fetch``, ``stage``, or ``install``
+are run again after this, Spack's build process will start from scratch.
+
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Keeping the stage directory on success
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -3361,7 +3468,7 @@ package has been successfully built and installed. Use
$ spack install --keep-stage <spec>
This allows you to inspect the build directory and potentially debug
-the build. You can use ``purge`` or ``clean`` later to get rid of the
+the build. You can use ``clean`` later to get rid of the
unwanted temporary files.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst
index 84da3b0f44..10843d302b 100644
--- a/lib/spack/docs/workflows.rst
+++ b/lib/spack/docs/workflows.rst
@@ -1028,6 +1028,84 @@ or filesystem views. However, it has some drawbacks:
integrate Spack explicitly in their workflow. Not all users are
willing to do this.
+------------------------
+Using Spack on Travis-CI
+------------------------
+
+Spack can be deployed as a provider for userland software in
+`Travis-CI <https://http://travis-ci.org>`_.
+
+A starting-point for a ``.travis.yml`` file can look as follows.
+It uses `caching <https://docs.travis-ci.com/user/caching/>`_ for
+already built environments, so make sure to clean the Travis cache if
+you run into problems.
+
+The main points that are implemented below:
+
+#. Travis is detected as having up to 34 cores available, but only 2
+ are actually allocated for the user. We limit the parallelism of
+ the spack builds in the config.
+ (The Travis yaml parser is a bit buggy on the echo command.)
+
+#. Builds over 10 minutes need to be prefixed with ``travis_wait``.
+ Alternatively, generate output once with ``spack install -v``.
+
+#. Travis builds are non-interactive. This prevents using bash
+ aliases and functions for modules. We fix that by sourcing
+ ``/etc/profile`` first (or running everything in a subshell with
+ ``bash -l -c '...'``).
+
+.. code-block:: yaml
+
+ language: cpp
+ sudo: false
+ dist: trusty
+
+ cache:
+ apt: true
+ directories:
+ - $HOME/.cache
+
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-4.9
+ - environment-modules
+
+ env:
+ global:
+ - SPACK_ROOT: $HOME/.cache/spack
+ - PATH: $PATH:$HOME/.cache/spack/bin
+
+ before_install:
+ - export CXX=g++-4.9
+ - export CC=gcc-4.9
+ - export FC=gfortran-4.9
+ - export CXXFLAGS="-std=c++11"
+
+ install:
+ - if ! which spack >/dev/null; then
+ mkdir -p $SPACK_ROOT &&
+ git clone --depth 50 https://github.com/llnl/spack.git $SPACK_ROOT &&
+ echo -e "config:""\n build_jobs:"" 2" > $SPACK_ROOT/etc/spack/config.yaml;
+ fi
+ - travis_wait spack install cmake@3.7.2~openssl~ncurses
+ - travis_wait spack install boost@1.62.0~graph~iostream~locale~log~wave
+ - spack clean -a
+ - source /etc/profile &&
+ source $SPACK_ROOT/share/spack/setup-env.sh
+ - spack load cmake
+ - spack load boost
+
+ script:
+ - mkdir -p $HOME/build
+ - cd $HOME/build
+ - cmake $TRAVIS_BUILD_DIR
+ - make -j 2
+ - make test
+
------------------
Upstream Bug Fixes
------------------
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index afec3eefaa..e63c371318 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -328,8 +328,10 @@ IFS=':' read -ra extra_rpaths <<< "$SPACK_COMPILER_EXTRA_RPATHS"
for extra_rpath in "${extra_rpaths[@]}"; do
if [[ $mode == ccld ]]; then
$add_rpaths && args=("$rpath$extra_rpath" "${args[@]}")
+ args=("-L$extra_rpath" "${args[@]}")
elif [[ $mode == ld ]]; then
$add_rpaths && args=("-rpath" "$extra_rpath" "${args[@]}")
+ args=("-L$extra_rpath" "${args[@]}")
fi
done
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 88e000b6d3..bedc7c9de2 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -251,7 +251,11 @@ def mkdirp(*paths):
"""Creates a directory, as well as parent directories if needed."""
for path in paths:
if not os.path.exists(path):
- os.makedirs(path)
+ try:
+ os.makedirs(path)
+ except OSError as e:
+ if e.errno != errno.EEXIST or not os.path.isdir(path):
+ raise e
elif not os.path.isdir(path):
raise OSError(errno.EEXIST, "File already exists", path)
@@ -291,8 +295,14 @@ def hide_files(*file_list):
def touch(path):
"""Creates an empty file at the specified path."""
- with open(path, 'a'):
+ perms = (os.O_WRONLY | os.O_CREAT | os.O_NONBLOCK | os.O_NOCTTY)
+ fd = None
+ try:
+ fd = os.open(path, perms)
os.utime(path, None)
+ finally:
+ if fd is not None:
+ os.close(fd)
def touchp(path):
@@ -539,7 +549,7 @@ def find(root, files, recurse=True):
if True descends top-down from the root. Defaults to True.
Returns:
- :func:`list`: The files that have been found
+ list of strings: The files that have been found
"""
if isinstance(files, six.string_types):
files = [files]
@@ -608,9 +618,14 @@ class FileList(collections.Sequence):
"""Stable de-duplication of the directories where the files reside.
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/libc.a'])
- >>> assert l.directories == ['/dir1', '/dir2']
+ >>> l.directories
+ ['/dir1', '/dir2']
>>> h = HeaderList(['/dir1/a.h', '/dir1/b.h', '/dir2/c.h'])
- >>> assert h.directories == ['/dir1', '/dir2']
+ >>> h.directories
+ ['/dir1', '/dir2']
+
+ Returns:
+ list of strings: A list of directories
"""
return list(dedupe(
os.path.dirname(x) for x in self.files if os.path.dirname(x)
@@ -621,18 +636,27 @@ class FileList(collections.Sequence):
"""Stable de-duplication of the base-names in the list
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir3/liba.a'])
- >>> assert l.basenames == ['liba.a', 'libb.a']
+ >>> l.basenames
+ ['liba.a', 'libb.a']
>>> h = HeaderList(['/dir1/a.h', '/dir2/b.h', '/dir3/a.h'])
- >>> assert h.basenames == ['a.h', 'b.h']
+ >>> h.basenames
+ ['a.h', 'b.h']
+
+ Returns:
+ list of strings: A list of base-names
"""
return list(dedupe(os.path.basename(x) for x in self.files))
@property
def names(self):
- """Stable de-duplication of file names in the list
+ """Stable de-duplication of file names in the list without extensions
>>> h = HeaderList(['/dir1/a.h', '/dir2/b.h', '/dir3/a.h'])
- >>> assert h.names == ['a', 'b']
+ >>> h.names
+ ['a', 'b']
+
+ Returns:
+ list of strings: A list of files without extensions
"""
return list(dedupe(x.split('.')[0] for x in self.basenames))
@@ -678,6 +702,11 @@ class HeaderList(FileList):
@property
def headers(self):
+ """Stable de-duplication of the headers.
+
+ Returns:
+ list of strings: A list of header files
+ """
return self.files
@property
@@ -685,7 +714,11 @@ class HeaderList(FileList):
"""Include flags
>>> h = HeaderList(['/dir1/a.h', '/dir1/b.h', '/dir2/c.h'])
- >>> assert h.cpp_flags == '-I/dir1 -I/dir2'
+ >>> h.include_flags
+ '-I/dir1 -I/dir2'
+
+ Returns:
+ str: A joined list of include flags
"""
return ' '.join(['-I' + x for x in self.directories])
@@ -696,7 +729,11 @@ class HeaderList(FileList):
>>> h = HeaderList(['/dir1/a.h', '/dir1/b.h', '/dir2/c.h'])
>>> h.add_macro('-DBOOST_LIB_NAME=boost_regex')
>>> h.add_macro('-DBOOST_DYN_LINK')
- >>> assert h.macro_definitions == '-DBOOST_LIB_NAME=boost_regex -DBOOST_DYN_LINK' # noqa
+ >>> h.macro_definitions
+ '-DBOOST_LIB_NAME=boost_regex -DBOOST_DYN_LINK'
+
+ Returns:
+ str: A joined list of macro definitions
"""
return ' '.join(self._macro_definitions)
@@ -705,13 +742,26 @@ class HeaderList(FileList):
"""Include flags + macro definitions
>>> h = HeaderList(['/dir1/a.h', '/dir1/b.h', '/dir2/c.h'])
+ >>> h.cpp_flags
+ '-I/dir1 -I/dir2'
>>> h.add_macro('-DBOOST_DYN_LINK')
- >>> assert h.macro_definitions == '-I/dir1 -I/dir2 -DBOOST_DYN_LINK'
+ >>> h.cpp_flags
+ '-I/dir1 -I/dir2 -DBOOST_DYN_LINK'
+
+ Returns:
+ str: A joined list of include flags and macro definitions
"""
- return self.include_flags + ' ' + self.macro_definitions
+ cpp_flags = self.include_flags
+ if self.macro_definitions:
+ cpp_flags += ' ' + self.macro_definitions
+ return cpp_flags
def add_macro(self, macro):
- """Add a macro definition"""
+ """Add a macro definition
+
+ Parameters:
+ macro (str): The macro to add
+ """
self._macro_definitions.append(macro)
@@ -765,6 +815,11 @@ class LibraryList(FileList):
@property
def libraries(self):
+ """Stable de-duplication of library files.
+
+ Returns:
+ list of strings: A list of library files
+ """
return self.files
@property
@@ -772,7 +827,11 @@ class LibraryList(FileList):
"""Stable de-duplication of library names in the list
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir3/liba.so'])
- >>> assert l.names == ['a', 'b']
+ >>> l.names
+ ['a', 'b']
+
+ Returns:
+ list of strings: A list of library names
"""
return list(dedupe(x.split('.')[0][3:] for x in self.basenames))
@@ -781,7 +840,11 @@ class LibraryList(FileList):
"""Search flags for the libraries
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
- >>> assert l.search_flags == '-L/dir1 -L/dir2'
+ >>> l.search_flags
+ '-L/dir1 -L/dir2'
+
+ Returns:
+ str: A joined list of search flags
"""
return ' '.join(['-L' + x for x in self.directories])
@@ -790,7 +853,11 @@ class LibraryList(FileList):
"""Link flags for the libraries
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
- >>> assert l.search_flags == '-la -lb'
+ >>> l.link_flags
+ '-la -lb'
+
+ Returns:
+ str: A joined list of link flags
"""
return ' '.join(['-l' + name for name in self.names])
@@ -799,7 +866,11 @@ class LibraryList(FileList):
"""Search flags + link flags
>>> l = LibraryList(['/dir1/liba.a', '/dir2/libb.a', '/dir1/liba.so'])
- >>> assert l.search_flags == '-L/dir1 -L/dir2 -la -lb'
+ >>> l.ld_flags
+ '-L/dir1 -L/dir2 -la -lb'
+
+ Returns:
+ str: A joined list of search flags and link flags
"""
return self.search_flags + ' ' + self.link_flags
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py
index 012befeada..563835ecfc 100644
--- a/lib/spack/llnl/util/lang.py
+++ b/lib/spack/llnl/util/lang.py
@@ -391,19 +391,6 @@ class RequiredAttributeError(ValueError):
super(RequiredAttributeError, self).__init__(message)
-def duplicate_stream(original):
- """Duplicates a stream at the os level.
-
- Args:
- original (stream): original stream to be duplicated. Must have a
- ``fileno`` callable attribute.
-
- Returns:
- file like object: duplicate of the original stream
- """
- return os.fdopen(os.dup(original.fileno()))
-
-
class ObjectWrapper(object):
"""Base class that wraps an object. Derived classes can add new behavior
while staying undercover.
diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py
index 2cab436e2d..55837c371e 100644
--- a/lib/spack/llnl/util/lock.py
+++ b/lib/spack/llnl/util/lock.py
@@ -127,8 +127,9 @@ class Lock(object):
return
- except IOError as error:
- if error.errno == errno.EAGAIN or error.errno == errno.EACCES:
+ except IOError as e:
+ if e.errno in (errno.EAGAIN, errno.EACCES):
+ # EAGAIN and EACCES == locked by another process
pass
else:
raise
@@ -197,6 +198,8 @@ class Lock(object):
tty.debug('READ LOCK: {0.path}[{0._start}:{0._length}] [Acquiring]'
.format(self))
self._lock(fcntl.LOCK_SH, timeout=timeout) # can raise LockError.
+ tty.debug('READ LOCK: {0.path}[{0._start}:{0._length}] [Acquired]'
+ .format(self))
self._reads += 1
return True
else:
@@ -219,6 +222,8 @@ class Lock(object):
'WRITE LOCK: {0.path}[{0._start}:{0._length}] [Acquiring]'
.format(self))
self._lock(fcntl.LOCK_EX, timeout=timeout) # can raise LockError.
+ tty.debug('WRITE LOCK: {0.path}[{0._start}:{0._length}] [Acquired]'
+ .format(self))
self._writes += 1
return True
else:
diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py
index fc3b697827..1081acd0f1 100644
--- a/lib/spack/llnl/util/tty/color.py
+++ b/lib/spack/llnl/util/tty/color.py
@@ -80,6 +80,7 @@ To output an @, use '@@'. To output a } inside braces, use '}}'.
"""
import re
import sys
+from contextlib import contextmanager
class ColorParseError(Exception):
@@ -107,15 +108,62 @@ colors = {'k': 30, 'K': 90, # black
# Regex to be used for color formatting
color_re = r'@(?:@|\.|([*_])?([a-zA-Z])?(?:{((?:[^}]|}})*)})?)'
+# Mapping from color arguments to values for tty.set_color
+color_when_values = {
+ 'always': True,
+ 'auto': None,
+ 'never': False
+}
-# Force color even if stdout is not a tty.
-_force_color = False
+# Force color; None: Only color if stdout is a tty
+# True: Always colorize output, False: Never colorize output
+_force_color = None
+
+
+def _color_when_value(when):
+ """Raise a ValueError for an invalid color setting.
+
+ Valid values are 'always', 'never', and 'auto', or equivalently,
+ True, False, and None.
+ """
+ if when in color_when_values:
+ return color_when_values[when]
+ elif when not in color_when_values.values():
+ raise ValueError('Invalid color setting: %s' % when)
+ return when
+
+
+def get_color_when():
+ """Return whether commands should print color or not."""
+ if _force_color is not None:
+ return _force_color
+ return sys.stdout.isatty()
+
+
+def set_color_when(when):
+ """Set when color should be applied. Options are:
+
+ * True or 'always': always print color
+ * False or 'never': never print color
+ * None or 'auto': only print color if sys.stdout is a tty.
+ """
+ global _force_color
+ _force_color = _color_when_value(when)
+
+
+@contextmanager
+def color_when(value):
+ """Context manager to temporarily use a particular color setting."""
+ old_value = value
+ set_color_when(value)
+ yield
+ set_color_when(old_value)
class match_to_ansi(object):
def __init__(self, color=True):
- self.color = color
+ self.color = _color_when_value(color)
def escape(self, s):
"""Returns a TTY escape sequence for a color"""
@@ -166,7 +214,7 @@ def colorize(string, **kwargs):
color (bool): If False, output will be plain text without control
codes, for output to non-console devices.
"""
- color = kwargs.get('color', True)
+ color = _color_when_value(kwargs.get('color', get_color_when()))
return re.sub(color_re, match_to_ansi(color), string)
@@ -188,7 +236,7 @@ def cwrite(string, stream=sys.stdout, color=None):
then it will be set based on stream.isatty().
"""
if color is None:
- color = stream.isatty() or _force_color
+ color = get_color_when()
stream.write(colorize(string, color=color))
@@ -217,7 +265,7 @@ class ColorStream(object):
if raw:
color = True
else:
- color = self._stream.isatty() or _force_color
+ color = get_color_when()
raw_write(colorize(string, color=color))
def writelines(self, sequence, **kwargs):
diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py
index 4bf7c77d2c..e102e63d4b 100644
--- a/lib/spack/llnl/util/tty/log.py
+++ b/lib/spack/llnl/util/tty/log.py
@@ -29,27 +29,32 @@ import os
import re
import select
import sys
+import traceback
+from contextlib import contextmanager
+from six import string_types
+from six import StringIO
-import llnl.util.lang as lang
import llnl.util.tty as tty
-import llnl.util.tty.color as color
# Use this to strip escape sequences
_escape = re.compile(r'\x1b[^m]*m|\x1b\[?1034h')
+# control characters for enabling/disabling echo
+#
+# We use control characters to ensure that echo enable/disable are inline
+# with the other output. We always follow these with a newline to ensure
+# one per line the following newline is ignored in output.
+xon, xoff = '\x11\n', '\x13\n'
+control = re.compile('(\x11\n|\x13\n)')
+
def _strip(line):
"""Strip color and control characters from a line."""
return _escape.sub('', line)
-class _SkipWithBlock():
- """Special exception class used to skip a with block."""
- pass
-
-
class keyboard_input(object):
- """Disable canonical input and echo on a stream within a with block.
+ """Context manager to disable line editing and echoing.
Use this with ``sys.stdin`` for keyboard input, e.g.::
@@ -57,22 +62,44 @@ class keyboard_input(object):
r, w, x = select.select([sys.stdin], [], [])
# ... do something with keypresses ...
- When the with block completes, this will restore settings before
- canonical and echo were disabled.
- """
+ This disables canonical input so that keypresses are available on the
+ stream immediately. Typically standard input allows line editing,
+ which means keypresses won't be sent until the user hits return.
+
+ It also disables echoing, so that keys pressed aren't printed to the
+ terminal. So, the user can hit, e.g., 'v', and it's read on the
+ other end of the pipe immediately but not printed.
+ When the with block completes, prior TTY settings are restored.
+
+ Note: this depends on termios support. If termios isn't available,
+ or if the stream isn't a TTY, this context manager has no effect.
+ """
def __init__(self, stream):
+ """Create a context manager that will enable keyboard input on stream.
+
+ Args:
+ stream (file-like): stream on which to accept keyboard input
+
+ Note that stream can be None, in which case ``keyboard_input``
+ will do nothing.
+ """
self.stream = stream
def __enter__(self):
+ """Enable immediate keypress input on stream.
+
+ If the stream is not a TTY or the system doesn't support termios,
+ do nothing.
+ """
self.old_cfg = None
# Ignore all this if the input stream is not a tty.
- if not self.stream.isatty():
+ if not self.stream or not self.stream.isatty():
return
try:
- # import and mark whether it worked.
+ # If this fails, self.old_cfg will remain None
import termios
# save old termios settings
@@ -89,180 +116,382 @@ class keyboard_input(object):
termios.tcsetattr(fd, termios.TCSADRAIN, self.new_cfg)
except Exception:
- pass # Some OS's do not support termios, so ignore.
+ pass # some OS's do not support termios, so ignore
def __exit__(self, exc_type, exception, traceback):
- # If termios was avaialble, restore old settings after the
- # with block
+ """If termios was avaialble, restore old settings."""
if self.old_cfg:
import termios
termios.tcsetattr(
self.stream.fileno(), termios.TCSADRAIN, self.old_cfg)
+class Unbuffered(object):
+ """Wrapper for Python streams that forces them to be unbuffered.
+
+ This is implemented by forcing a flush after each write.
+ """
+ def __init__(self, stream):
+ self.stream = stream
+
+ def write(self, data):
+ self.stream.write(data)
+ self.stream.flush()
+
+ def writelines(self, datas):
+ self.stream.writelines(datas)
+ self.stream.flush()
+
+ def __getattr__(self, attr):
+ return getattr(self.stream, attr)
+
+
+def _file_descriptors_work(*streams):
+ """Whether we can get file descriptors for the streams specified.
+
+ This tries to call ``fileno()`` on all streams in the argument list,
+ and returns ``False`` if anything goes wrong.
+
+ This can happen, when, e.g., the test framework replaces stdout with
+ a ``StringIO`` object.
+
+ We have to actually try this to see whether it works, rather than
+ checking for the fileno attribute, beacuse frameworks like pytest add
+ dummy fileno methods on their dummy file objects that return
+ ``UnsupportedOperationErrors``.
+
+ """
+ # test whether we can get fds for out and error
+ try:
+ for stream in streams:
+ stream.fileno()
+ return True
+ except:
+ return False
+
+
class log_output(object):
- """Spawns a daemon that reads from a pipe and writes to a file
+ """Context manager that logs its output to a file.
+
+ In the simplest case, the usage looks like this::
- Usage::
+ with log_output('logfile.txt'):
+ # do things ... output will be logged
- # Spawns the daemon
- with log_output('logfile.txt', 'w') as log_redirection:
- # do things ... output is not redirected
- with log_redirection:
- # do things ... output will be logged
+ Any output from the with block will be redirected to ``logfile.txt``.
+ If you also want the output to be echoed to ``stdout``, use the
+ ``echo`` parameter::
- or::
+ with log_output('logfile.txt', echo=True):
+ # do things ... output will be logged and printed out
- with log_output('logfile.txt', echo=True) as log_redirection:
- # do things ... output is not redirected
- with log_redirection:
- # do things ... output will be logged
- # and also printed to stdout.
+ And, if you just want to echo *some* stuff from the parent, use
+ ``force_echo``::
- Opens a stream in 'w' mode at daemon spawning and closes it at
- daemon joining. If echo is True, also prints the output to stdout.
+ with log_output('logfile.txt', echo=False) as logger:
+ # do things ... output will be logged
+
+ with logger.force_echo():
+ # things here will be echoed *and* logged
+
+ Under the hood, we spawn a daemon and set up a pipe between this
+ process and the daemon. The daemon writes our output to both the
+ file and to stdout (if echoing). The parent process can communicate
+ with the daemon to tell it when and when not to echo; this is what
+ force_echo does. You can also enable/disable echoing by typing 'v'.
+
+ We try to use OS-level file descriptors to do the redirection, but if
+ stdout or stderr has been set to some Python-level file object, we
+ use Python-level redirection instead. This allows the redirection to
+ work within test frameworks like nose and pytest.
"""
- def __init__(
- self,
- filename,
- echo=False,
- force_color=False,
- debug=False,
- input_stream=sys.stdin
- ):
- self.filename = filename
- # Various output options
+ def __init__(self, file_like=None, echo=False, debug=False, buffer=False):
+ """Create a new output log context manager.
+
+ Args:
+ file_like (str or stream): open file object or name of file where
+ output should be logged
+ echo (bool): whether to echo output in addition to logging it
+ debug (bool): whether to enable tty debug mode during logging
+ buffer (bool): pass buffer=True to skip unbuffering output; note
+ this doesn't set up any *new* buffering
+
+ log_output can take either a file object or a filename. If a
+ filename is passed, the file will be opened and closed entirely
+ within ``__enter__`` and ``__exit__``. If a file object is passed,
+ this assumes the caller owns it and will close it.
+
+ By default, we unbuffer sys.stdout and sys.stderr because the
+ logger will include output from executed programs and from python
+ calls. If stdout and stderr are buffered, their output won't be
+ printed in the right place w.r.t. output from commands.
+
+ Logger daemon is not started until ``__enter__()``.
+
+ """
+ self.file_like = file_like
self.echo = echo
- self.force_color = force_color
self.debug = debug
+ self.buffer = buffer
+
+ self._active = False # used to prevent re-entry
+
+ def __call__(self, file_like=None, echo=None, debug=None, buffer=None):
+ """Thie behaves the same as init. It allows a logger to be reused.
+
+ Arguments are the same as for ``__init__()``. Args here take
+ precedence over those passed to ``__init__()``.
+
+ With the ``__call__`` function, you can save state between uses
+ of a single logger. This is useful if you want to remember,
+ e.g., the echo settings for a prior ``with log_output()``::
- # Default is to try file-descriptor reassignment unless the system
- # out/err streams do not have an associated file descriptor
- self.directAssignment = False
- self.read, self.write = os.pipe()
+ logger = log_output()
- # Needed to un-summon the daemon
- self.parent_pipe, self.child_pipe = multiprocessing.Pipe()
- # Input stream that controls verbosity interactively
- self.input_stream = input_stream
+ with logger('foo.txt'):
+ # log things; user can change echo settings with 'v'
+
+ with logger('bar.txt'):
+ # log things; logger remembers prior echo settings.
+
+ """
+ if file_like is not None:
+ self.file_like = file_like
+ if echo is not None:
+ self.echo = echo
+ if debug is not None:
+ self.debug = debug
+ if buffer is not None:
+ self.buffer = buffer
+ return self
def __enter__(self):
+ if self._active:
+ raise RuntimeError("Can't re-enter the same log_output!")
+
+ if self.file_like is None:
+ raise RuntimeError(
+ "file argument must be set by either __init__ or __call__")
+
+ # set up a stream for the daemon to write to
+ self.close_log_in_parent = True
+ self.write_log_in_parent = False
+ if isinstance(self.file_like, string_types):
+ self.log_file = open(self.file_like, 'w')
+
+ elif _file_descriptors_work(self.file_like):
+ self.log_file = self.file_like
+ self.close_log_in_parent = False
+
+ else:
+ self.log_file = StringIO()
+ self.write_log_in_parent = True
+
+ # record parent color settings before redirecting. We do this
+ # because color output depends on whether the *original* stdout
+ # is a TTY. New stdout won't be a TTY so we force colorization.
+ self._saved_color = tty.color._force_color
+ forced_color = tty.color.get_color_when()
+
+ # also record parent debug settings -- in case the logger is
+ # forcing debug output.
+ self._saved_debug = tty._debug
+
+ # OS-level pipe for redirecting output to logger
+ self.read_fd, self.write_fd = os.pipe()
+
+ # Multiprocessing pipe for communication back from the daemon
+ # Currently only used to save echo value between uses
+ self.parent, self.child = multiprocessing.Pipe()
+
# Sets a daemon that writes to file what it reads from a pipe
try:
- fwd_input_stream = lang.duplicate_stream(self.input_stream)
- self.p = multiprocessing.Process(
- target=self._spawn_writing_daemon,
- args=(self.read, fwd_input_stream),
- name='logger_daemon'
- )
- self.p.daemon = True
- self.p.start()
- finally:
- fwd_input_stream.close()
- return log_output.OutputRedirection(self)
+ # need to pass this b/c multiprocessing closes stdin in child.
+ try:
+ input_stream = os.fdopen(os.dup(sys.stdin.fileno()))
+ except:
+ input_stream = None # just don't forward input if this fails
- def __exit__(self, exc_type, exc_val, exc_tb):
- self.parent_pipe.send(True)
- self.p.join(60.0) # 1 minute to join the child
+ self.process = multiprocessing.Process(
+ target=self._writer_daemon, args=(input_stream,))
+ self.process.daemon = True # must set before start()
+ self.process.start()
+ os.close(self.read_fd) # close in the parent process
- def _spawn_writing_daemon(self, read, input_stream):
- # This is the Parent: read from child, skip the with block.
+ finally:
+ if input_stream:
+ input_stream.close()
+
+ # Flush immediately before redirecting so that anything buffered
+ # goes to the original stream
+ sys.stdout.flush()
+ sys.stderr.flush()
+
+ # Now do the actual output rediction.
+ self.use_fds = _file_descriptors_work(sys.stdout, sys.stderr)
+ if self.use_fds:
+ # We try first to use OS-level file descriptors, as this
+ # redirects output for subprocesses and system calls.
+
+ # Save old stdout and stderr file descriptors
+ self._saved_stdout = os.dup(sys.stdout.fileno())
+ self._saved_stderr = os.dup(sys.stderr.fileno())
+
+ # redirect to the pipe we created above
+ os.dup2(self.write_fd, sys.stdout.fileno())
+ os.dup2(self.write_fd, sys.stderr.fileno())
+ os.close(self.write_fd)
+
+ else:
+ # Handle I/O the Python way. This won't redirect lower-level
+ # output, but it's the best we can do, and the caller
+ # shouldn't expect any better, since *they* have apparently
+ # redirected I/O the Python way.
+
+ # Save old stdout and stderr file objects
+ self._saved_stdout = sys.stdout
+ self._saved_stderr = sys.stderr
+
+ # create a file object for the pipe; redirect to it.
+ pipe_fd_out = os.fdopen(self.write_fd, 'w')
+ sys.stdout = pipe_fd_out
+ sys.stderr = pipe_fd_out
+
+ # Unbuffer stdout and stderr at the Python level
+ if not self.buffer:
+ sys.stdout = Unbuffered(sys.stdout)
+ sys.stderr = Unbuffered(sys.stderr)
+
+ # Force color and debug settings now that we have redirected.
+ tty.color.set_color_when(forced_color)
+ tty._debug = self.debug
+
+ # track whether we're currently inside this log_output
+ self._active = True
+
+ # return this log_output object so that the user can do things
+ # like temporarily echo some ouptut.
+ return self
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ # Flush any buffered output to the logger daemon.
+ sys.stdout.flush()
+ sys.stderr.flush()
+
+ # restore previous output settings, either the low-level way or
+ # the python way
+ if self.use_fds:
+ os.dup2(self._saved_stdout, sys.stdout.fileno())
+ os.close(self._saved_stdout)
+
+ os.dup2(self._saved_stderr, sys.stderr.fileno())
+ os.close(self._saved_stderr)
+ else:
+ sys.stdout = self._saved_stdout
+ sys.stderr = self._saved_stderr
+
+ # print log contents in parent if needed.
+ if self.write_log_in_parent:
+ string = self.parent.recv()
+ self.file_like.write(string)
+
+ if self.close_log_in_parent:
+ self.log_file.close()
+
+ # recover and store echo settings from the child before it dies
+ self.echo = self.parent.recv()
+
+ # join the daemon process. The daemon will quit automatically
+ # when the write pipe is closed; we just wait for it here.
+ self.process.join()
+
+ # restore old color and debug settings
+ tty.color._force_color = self._saved_color
+ tty._debug = self._saved_debug
+
+ self._active = False # safe to enter again
+
+ @contextmanager
+ def force_echo(self):
+ """Context manager to force local echo, even if echo is off."""
+ if not self._active:
+ raise RuntimeError(
+ "Can't call force_echo() outside log_output region!")
+
+ # This uses the xon/xoff to highlight regions to be echoed in the
+ # output. We us these control characters rather than, say, a
+ # separate pipe, because they're in-band and assured to appear
+ # exactly before and after the text we want to echo.
+ sys.stdout.write(xon)
+ sys.stdout.flush()
+ yield
+ sys.stdout.write(xoff)
+ sys.stdout.flush()
+
+ def _writer_daemon(self, stdin):
+ """Daemon that writes output to the log file and stdout."""
# Use line buffering (3rd param = 1) since Python 3 has a bug
# that prevents unbuffered text I/O.
- read_file = os.fdopen(read, 'r', 1)
+ in_pipe = os.fdopen(self.read_fd, 'r', 1)
+ os.close(self.write_fd)
- with open(self.filename, 'w') as log_file:
- with keyboard_input(input_stream):
+ echo = self.echo # initial echo setting, user-controllable
+ force_echo = False # parent can force echo for certain output
+
+ # list of streams to select from
+ istreams = [in_pipe, stdin] if stdin else [in_pipe]
+
+ log_file = self.log_file
+ try:
+ with keyboard_input(stdin):
while True:
- # Without the last parameter (timeout) select will wait
- # until at least one of the two streams are ready. This
- # may cause the function to hang.
- rlist, _, _ = select.select(
- [read_file, input_stream], [], [], 0
- )
+ # Without the last parameter (timeout) select will
+ # wait until at least one of the two streams are
+ # ready. This may cause the function to hang.
+ rlist, _, xlist = select.select(istreams, [], [], 0)
# Allow user to toggle echo with 'v' key.
# Currently ignores other chars.
- if input_stream in rlist:
- if input_stream.read(1) == 'v':
- self.echo = not self.echo
+ if stdin in rlist:
+ if stdin.read(1) == 'v':
+ echo = not echo
# Handle output from the with block process.
- if read_file in rlist:
- # If we arrive here it means that
- # read_file was ready for reading : it
- # should never happen that line is false-ish
- line = read_file.readline()
-
- # Echo to stdout if requested.
- if self.echo:
+ if in_pipe in rlist:
+ # If we arrive here it means that in_pipe was
+ # ready for reading : it should never happen that
+ # line is false-ish
+ line = in_pipe.readline()
+ if not line:
+ break # EOF
+
+ # find control characters and strip them.
+ controls = control.findall(line)
+ line = re.sub(control, '', line)
+
+ # Echo to stdout if requested or forced
+ if echo or force_echo:
sys.stdout.write(line)
+ sys.stdout.flush()
# Stripped output to log file.
log_file.write(_strip(line))
log_file.flush()
- if self.child_pipe.poll():
- break
-
- def __del__(self):
- """Closes the pipes"""
- os.close(self.write)
- os.close(self.read)
+ if xon in controls:
+ force_echo = True
+ if xoff in controls:
+ force_echo = False
+ except:
+ tty.error("Exception occurred in writer daemon!")
+ traceback.print_exc()
- class OutputRedirection(object):
-
- def __init__(self, other):
- self.__dict__.update(other.__dict__)
-
- def __enter__(self):
- """Redirect output from the with block to a file.
+ finally:
+ # send written data back to parent if we used a StringIO
+ if self.write_log_in_parent:
+ self.child.send(log_file.getvalue())
+ log_file.close()
- Hijacks stdout / stderr and writes to the pipe
- connected to the logger daemon
- """
- # remember these values for later.
- self._force_color = color._force_color
- self._debug = tty._debug
- # Redirect this output to a pipe
- write = self.write
- try:
- # Save old stdout and stderr
- self._stdout = os.dup(sys.stdout.fileno())
- self._stderr = os.dup(sys.stderr.fileno())
-
- # redirect to the pipe.
- os.dup2(write, sys.stdout.fileno())
- os.dup2(write, sys.stderr.fileno())
- except AttributeError:
- self.directAssignment = True
- self._stdout = sys.stdout
- self._stderr = sys.stderr
- output_redirect = os.fdopen(write, 'w')
- sys.stdout = output_redirect
- sys.stderr = output_redirect
- if self.force_color:
- color._force_color = True
- if self.debug:
- tty._debug = True
-
- def __exit__(self, exc_type, exception, traceback):
- """Plugs back the original file descriptors
- for stdout and stderr
- """
- # Flush the log to disk.
- sys.stdout.flush()
- sys.stderr.flush()
- if self.directAssignment:
- # We seem to need this only to pass test/install.py
- sys.stdout = self._stdout
- sys.stderr = self._stderr
- else:
- os.dup2(self._stdout, sys.stdout.fileno())
- os.dup2(self._stderr, sys.stderr.fileno())
-
- # restore output options.
- color._force_color = self._force_color
- tty._debug = self._debug
+ # send echo value back to the parent so it can be preserved.
+ self.child.send(echo)
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index e77a0c75cd..21280f0001 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -172,10 +172,13 @@ from spack.package import Package, run_before, run_after, on_package_attributes
from spack.build_systems.makefile import MakefilePackage
from spack.build_systems.autotools import AutotoolsPackage
from spack.build_systems.cmake import CMakePackage
+from spack.build_systems.qmake import QMakePackage
+from spack.build_systems.scons import SConsPackage
from spack.build_systems.waf import WafPackage
from spack.build_systems.python import PythonPackage
from spack.build_systems.r import RPackage
from spack.build_systems.perl import PerlPackage
+from spack.build_systems.intel import IntelPackage
__all__ += [
'run_before',
@@ -185,10 +188,13 @@ __all__ += [
'MakefilePackage',
'AutotoolsPackage',
'CMakePackage',
+ 'QMakePackage',
+ 'SConsPackage',
'WafPackage',
'PythonPackage',
'RPackage',
'PerlPackage',
+ 'IntelPackage',
]
from spack.version import Version, ver
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 487948dd4e..27092fb344 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -254,7 +254,7 @@ class OperatingSystem(object):
def find_compilers(self, *paths):
"""
- Return a list of compilers found in the suppied paths.
+ Return a list of compilers found in the supplied paths.
This invokes the find() method for each Compiler class,
and appends the compilers detected to a list.
"""
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
new file mode 100644
index 0000000000..2de14938a4
--- /dev/null
+++ b/lib/spack/spack/binary_distribution.py
@@ -0,0 +1,495 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import os
+import re
+import tarfile
+import yaml
+import shutil
+
+import llnl.util.tty as tty
+from spack.util.gpg import Gpg
+from llnl.util.filesystem import mkdirp, join_path, install_tree
+from spack.util.web import spider
+import spack.cmd
+import spack
+from spack.stage import Stage
+import spack.fetch_strategy as fs
+from contextlib import closing
+import spack.util.gpg as gpg_util
+import hashlib
+from spack.util.executable import ProcessError
+import spack.relocate as relocate
+
+
+class NoOverwriteException(Exception):
+ pass
+
+
+class NoGpgException(Exception):
+ pass
+
+
+class PickKeyException(Exception):
+ pass
+
+
+class NoKeyException(Exception):
+ pass
+
+
+class NoVerifyException(Exception):
+ pass
+
+
+class NoChecksumException(Exception):
+ pass
+
+
+def has_gnupg2():
+ try:
+ gpg_util.Gpg.gpg()('--version', output=os.devnull)
+ return True
+ except ProcessError:
+ return False
+
+
+def buildinfo_file_name(prefix):
+ """
+ Filename of the binary package meta-data file
+ """
+ name = prefix + "/.spack/binary_distribution"
+ return name
+
+
+def read_buildinfo_file(prefix):
+ """
+ Read buildinfo file
+ """
+ filename = buildinfo_file_name(prefix)
+ with open(filename, 'r') as inputfile:
+ content = inputfile.read()
+ buildinfo = yaml.load(content)
+ return buildinfo
+
+
+def write_buildinfo_file(prefix):
+ """
+ Create a cache file containing information
+ required for the relocation
+ """
+ text_to_relocate = []
+ binary_to_relocate = []
+ blacklist = (".spack", "man")
+ # Do this at during tarball creation to save time when tarball unpacked.
+ # Used by make_package_relative to determine binaries to change.
+ for root, dirs, files in os.walk(prefix, topdown=True):
+ dirs[:] = [d for d in dirs if d not in blacklist]
+ for filename in files:
+ path_name = os.path.join(root, filename)
+ filetype = relocate.get_filetype(path_name)
+ if relocate.needs_binary_relocation(filetype):
+ rel_path_name = os.path.relpath(path_name, prefix)
+ binary_to_relocate.append(rel_path_name)
+ elif relocate.needs_text_relocation(filetype):
+ rel_path_name = os.path.relpath(path_name, prefix)
+ text_to_relocate.append(rel_path_name)
+
+ # Create buildinfo data and write it to disk
+ buildinfo = {}
+ buildinfo['buildpath'] = spack.store.layout.root
+ buildinfo['relocate_textfiles'] = text_to_relocate
+ buildinfo['relocate_binaries'] = binary_to_relocate
+ filename = buildinfo_file_name(prefix)
+ with open(filename, 'w') as outfile:
+ outfile.write(yaml.dump(buildinfo, default_flow_style=True))
+
+
+def tarball_directory_name(spec):
+ """
+ Return name of the tarball directory according to the convention
+ <os>-<architecture>/<compiler>/<package>-<version>/
+ """
+ return "%s/%s/%s-%s" % (spack.architecture.sys_type(),
+ str(spec.compiler).replace("@", "-"),
+ spec.name, spec.version)
+
+
+def tarball_name(spec, ext):
+ """
+ Return the name of the tarfile according to the convention
+ <os>-<architecture>-<package>-<dag_hash><ext>
+ """
+ return "%s-%s-%s-%s-%s%s" % (spack.architecture.sys_type(),
+ str(spec.compiler).replace("@", "-"),
+ spec.name,
+ spec.version,
+ spec.dag_hash(),
+ ext)
+
+
+def tarball_path_name(spec, ext):
+ """
+ Return the full path+name for a given spec according to the convention
+ <tarball_directory_name>/<tarball_name>
+ """
+ return os.path.join(tarball_directory_name(spec),
+ tarball_name(spec, ext))
+
+
+def checksum_tarball(file):
+ # calculate sha256 hash of tar file
+ BLOCKSIZE = 65536
+ hasher = hashlib.sha256()
+ with open(file, 'rb') as tfile:
+ buf = tfile.read(BLOCKSIZE)
+ while len(buf) > 0:
+ hasher.update(buf)
+ buf = tfile.read(BLOCKSIZE)
+ return hasher.hexdigest()
+
+
+def sign_tarball(yes_to_all, key, force, specfile_path):
+ # Sign the packages if keys available
+ if not has_gnupg2():
+ raise NoGpgException()
+ else:
+ if key is None:
+ keys = Gpg.signing_keys()
+ if len(keys) == 1:
+ key = keys[0]
+ if len(keys) > 1:
+ raise PickKeyException()
+ if len(keys) == 0:
+ raise NoKeyException()
+ if os.path.exists('%s.asc' % specfile_path):
+ if force:
+ os.remove('%s.asc' % specfile_path)
+ else:
+ raise NoOverwriteException('%s.asc' % specfile_path)
+ Gpg.sign(key, specfile_path, '%s.asc' % specfile_path)
+
+
+def generate_index(outdir, indexfile_path):
+ f = open(indexfile_path, 'w')
+ header = """<html>\n
+<head>\n</head>\n
+<list>\n"""
+ footer = "</list>\n</html>\n"
+ paths = os.listdir(outdir + '/build_cache')
+ f.write(header)
+ for path in paths:
+ rel = os.path.basename(path)
+ f.write('<li><a href="%s"> %s</a>\n' % (rel, rel))
+ f.write(footer)
+ f.close()
+
+
+def build_tarball(spec, outdir, force=False, rel=False, yes_to_all=False,
+ key=None):
+ """
+ Build a tarball from given spec and put it into the directory structure
+ used at the mirror (following <tarball_directory_name>).
+ """
+ # set up some paths
+ tarfile_name = tarball_name(spec, '.tar.gz')
+ tarfile_dir = join_path(outdir, "build_cache",
+ tarball_directory_name(spec))
+ tarfile_path = join_path(tarfile_dir, tarfile_name)
+ mkdirp(tarfile_dir)
+ spackfile_path = os.path.join(
+ outdir, "build_cache", tarball_path_name(spec, '.spack'))
+ if os.path.exists(spackfile_path):
+ if force:
+ os.remove(spackfile_path)
+ else:
+ raise NoOverwriteException(str(spackfile_path))
+ # need to copy the spec file so the build cache can be downloaded
+ # without concretizing with the current spack packages
+ # and preferences
+ spec_file = join_path(spec.prefix, ".spack", "spec.yaml")
+ specfile_name = tarball_name(spec, '.spec.yaml')
+ specfile_path = os.path.realpath(
+ join_path(outdir, "build_cache", specfile_name))
+ indexfile_path = join_path(outdir, "build_cache", "index.html")
+ if os.path.exists(specfile_path):
+ if force:
+ os.remove(specfile_path)
+ else:
+ raise NoOverwriteException(str(specfile_path))
+ # make a copy of the install directory to work with
+ prefix = join_path(outdir, os.path.basename(spec.prefix))
+ if os.path.exists(prefix):
+ shutil.rmtree(prefix)
+ install_tree(spec.prefix, prefix)
+
+ # create info for later relocation and create tar
+ write_buildinfo_file(prefix)
+
+ # optinally make the paths in the binaries relative to each other
+ # in the spack install tree before creating tarball
+ if rel:
+ make_package_relative(prefix)
+ # create compressed tarball of the install prefix
+ with closing(tarfile.open(tarfile_path, 'w:gz')) as tar:
+ tar.add(name='%s' % prefix,
+ arcname='%s' % os.path.basename(prefix))
+ # remove copy of install directory
+ shutil.rmtree(prefix)
+
+ # get the sha256 checksum of the tarball
+ checksum = checksum_tarball(tarfile_path)
+
+ # add sha256 checksum to spec.yaml
+ spec_dict = {}
+ with open(spec_file, 'r') as inputfile:
+ content = inputfile.read()
+ spec_dict = yaml.load(content)
+ bchecksum = {}
+ bchecksum['hash_algorithm'] = 'sha256'
+ bchecksum['hash'] = checksum
+ spec_dict['binary_cache_checksum'] = bchecksum
+ with open(specfile_path, 'w') as outfile:
+ outfile.write(yaml.dump(spec_dict))
+ signed = False
+ if not yes_to_all:
+ # sign the tarball and spec file with gpg
+ try:
+ sign_tarball(yes_to_all, key, force, specfile_path)
+ signed = True
+ except NoGpgException:
+ raise NoGpgException()
+ except PickKeyException:
+ raise PickKeyException()
+ except NoKeyException():
+ raise NoKeyException()
+ # put tarball, spec and signature files in .spack archive
+ with closing(tarfile.open(spackfile_path, 'w')) as tar:
+ tar.add(name='%s' % tarfile_path, arcname='%s' % tarfile_name)
+ tar.add(name='%s' % specfile_path, arcname='%s' % specfile_name)
+ if signed:
+ tar.add(name='%s.asc' % specfile_path,
+ arcname='%s.asc' % specfile_name)
+
+ # cleanup file moved to archive
+ os.remove(tarfile_path)
+ if signed:
+ os.remove('%s.asc' % specfile_path)
+
+ # create an index.html for the build_cache directory so specs can be found
+ if os.path.exists(indexfile_path):
+ os.remove(indexfile_path)
+ generate_index(outdir, indexfile_path)
+ return None
+
+
+def download_tarball(spec):
+ """
+ Download binary tarball for given package into stage area
+ Return True if successful
+ """
+ mirrors = spack.config.get_config('mirrors')
+ if len(mirrors) == 0:
+ tty.die("Please add a spack mirror to allow " +
+ "download of pre-compiled packages.")
+ tarball = tarball_path_name(spec, '.spack')
+ for key in mirrors:
+ url = mirrors[key] + "/build_cache/" + tarball
+ # stage the tarball into standard place
+ stage = Stage(url, name="build_cache", keep=True)
+ try:
+ stage.fetch()
+ return stage.save_filename
+ except fs.FetchError:
+ continue
+ return None
+
+
+def make_package_relative(prefix):
+ """
+ Change paths in binaries to relative paths
+ """
+ buildinfo = read_buildinfo_file(prefix)
+ old_path = buildinfo['buildpath']
+ for filename in buildinfo['relocate_binaries']:
+ path_name = os.path.join(prefix, filename)
+ relocate.make_binary_relative(path_name, old_path)
+
+
+def relocate_package(prefix):
+ """
+ Relocate the given package
+ """
+ buildinfo = read_buildinfo_file(prefix)
+ new_path = spack.store.layout.root
+ old_path = buildinfo['buildpath']
+ if new_path == old_path:
+ return
+
+ tty.msg("Relocating package from",
+ "%s to %s." % (old_path, new_path))
+ for filename in buildinfo['relocate_binaries']:
+ path_name = os.path.join(prefix, filename)
+ relocate.relocate_binary(path_name, old_path, new_path)
+
+ for filename in buildinfo['relocate_textfiles']:
+ path_name = os.path.join(prefix, filename)
+ relocate.relocate_text(path_name, old_path, new_path)
+
+
+def extract_tarball(spec, filename, yes_to_all=False, force=False):
+ """
+ extract binary tarball for given package into install area
+ """
+ installpath = spec.prefix
+ if os.path.exists(installpath):
+ if force:
+ shutil.rmtree(installpath)
+ else:
+ raise NoOverwriteException(str(installpath))
+ mkdirp(installpath)
+ stagepath = os.path.dirname(filename)
+ spackfile_name = tarball_name(spec, '.spack')
+ spackfile_path = os.path.join(stagepath, spackfile_name)
+ tarfile_name = tarball_name(spec, '.tar.gz')
+ tarfile_path = os.path.join(stagepath, tarfile_name)
+ specfile_name = tarball_name(spec, '.spec.yaml')
+ specfile_path = os.path.join(stagepath, specfile_name)
+
+ with closing(tarfile.open(spackfile_path, 'r')) as tar:
+ tar.extractall(stagepath)
+
+ if not yes_to_all:
+ if os.path.exists('%s.asc' % specfile_path):
+ Gpg.verify('%s.asc' % specfile_path, specfile_path)
+ os.remove(specfile_path + '.asc')
+ else:
+ raise NoVerifyException()
+
+ # get the sha256 checksum of the tarball
+ checksum = checksum_tarball(tarfile_path)
+
+ if not yes_to_all:
+ # get the sha256 checksum recorded at creation
+ spec_dict = {}
+ with open(specfile_path, 'r') as inputfile:
+ content = inputfile.read()
+ spec_dict = yaml.load(content)
+ bchecksum = spec_dict['binary_cache_checksum']
+
+ # if the checksums don't match don't install
+ if bchecksum['hash'] != checksum:
+ raise NoChecksumException()
+
+ with closing(tarfile.open(tarfile_path, 'r')) as tar:
+ tar.extractall(path=join_path(installpath, '..'))
+
+ os.remove(tarfile_path)
+ os.remove(specfile_path)
+ relocate_package(installpath)
+
+
+def get_specs():
+ """
+ Get spec.yaml's for build caches available on mirror
+ """
+ mirrors = spack.config.get_config('mirrors')
+ if len(mirrors) == 0:
+ tty.die("Please add a spack mirror to allow " +
+ "download of build caches.")
+ path = str(spack.architecture.sys_type())
+ specs = set()
+ urls = set()
+ from collections import defaultdict
+ durls = defaultdict(list)
+ for key in mirrors:
+ url = mirrors[key]
+ if url.startswith('file'):
+ mirror = url.replace('file://', '') + '/build_cache'
+ tty.msg("Finding buildcaches in %s" % mirror)
+ files = os.listdir(mirror)
+ for file in files:
+ if re.search('spec.yaml', file):
+ link = 'file://' + mirror + '/' + file
+ urls.add(link)
+ else:
+ tty.msg("Finding buildcaches on %s" % url)
+ p, links = spider(url + "/build_cache")
+ for link in links:
+ if re.search("spec.yaml", link) and re.search(path, link):
+ urls.add(link)
+ for link in urls:
+ with Stage(link, name="build_cache", keep=True) as stage:
+ try:
+ stage.fetch()
+ except fs.FetchError:
+ continue
+ with open(stage.save_filename, 'r') as f:
+ spec = spack.spec.Spec.from_yaml(f)
+ specs.add(spec)
+ durls[spec].append(link)
+ return specs, durls
+
+
+def get_keys(install=False, yes_to_all=False):
+ """
+ Get pgp public keys available on mirror
+ """
+ mirrors = spack.config.get_config('mirrors')
+ if len(mirrors) == 0:
+ tty.die("Please add a spack mirror to allow " +
+ "download of build caches.")
+
+ keys = set()
+ for key in mirrors:
+ url = mirrors[key]
+ if url.startswith('file'):
+ mirror = url.replace('file://', '') + '/build_cache'
+ tty.msg("Finding public keys in %s" % mirror)
+ files = os.listdir(mirror)
+ for file in files:
+ if re.search('\.key', file):
+ link = 'file://' + mirror + '/' + file
+ keys.add(link)
+ else:
+ tty.msg("Finding public keys on %s" % url)
+ p, links = spider(url + "/build_cache", depth=1)
+ for link in links:
+ if re.search("\.key", link):
+ keys.add(link)
+ for link in keys:
+ with Stage(link, name="build_cache", keep=True) as stage:
+ try:
+ stage.fetch()
+ except fs.FetchError:
+ continue
+ tty.msg('Found key %s' % link)
+ if install:
+ if yes_to_all:
+ Gpg.trust(stage.save_filename)
+ tty.msg('Added this key to trusted keys.')
+ else:
+ tty.msg('Will not add this key to trusted keys.'
+ 'Use -y to override')
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 49fecdb59c..a27d8c68ab 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -58,9 +58,10 @@ import shutil
import sys
import traceback
from six import iteritems
+from six import StringIO
-import llnl.util.lang as lang
import llnl.util.tty as tty
+from llnl.util.tty.color import colorize
from llnl.util.filesystem import *
import spack
@@ -69,6 +70,9 @@ from spack.environment import EnvironmentModifications, validate
from spack.util.environment import *
from spack.util.executable import Executable
from spack.util.module_cmd import load_module, get_path_from_module
+from spack.util.log_parse import *
+
+
#
# This can be set by the user to globally disable parallel builds.
#
@@ -174,7 +178,7 @@ def set_compiler_environment_variables(pkg, env):
return env
-def set_build_environment_variables(pkg, env, dirty=False):
+def set_build_environment_variables(pkg, env, dirty):
"""Ensure a clean install environment when we build packages.
This involves unsetting pesky environment variables that may
@@ -228,7 +232,7 @@ def set_build_environment_variables(pkg, env, dirty=False):
# Install root prefix
env.set(SPACK_INSTALL, spack.store.root)
- # Stuff in here sanitizes the build environemnt to eliminate
+ # Stuff in here sanitizes the build environment to eliminate
# anything the user has set that may interfere.
if not dirty:
# Remove these vars from the environment during build because they
@@ -332,6 +336,7 @@ def set_module_variables_for_package(pkg, module):
m.make = MakeExecutable('make', jobs)
m.gmake = MakeExecutable('gmake', jobs)
m.scons = MakeExecutable('scons', jobs)
+ m.ninja = MakeExecutable('ninja', jobs)
# easy shortcut to os.environ
m.env = os.environ
@@ -445,7 +450,7 @@ def load_external_modules(pkg):
load_module(dep.external_module)
-def setup_package(pkg, dirty=False):
+def setup_package(pkg, dirty):
"""Execute all environment setup routines."""
spack_env = EnvironmentModifications()
run_env = EnvironmentModifications()
@@ -467,6 +472,19 @@ def setup_package(pkg, dirty=False):
for s in pkg.spec.traverse():
s.package.spec = s
+ # Trap spack-tracked compiler flags as appropriate.
+ # Must be before set_compiler_environment_variables
+ # Current implementation of default flag handler relies on this being
+ # the first thing to affect the spack_env (so there is no appending), or
+ # on no other build_environment methods trying to affect these variables
+ # (CFLAGS, CXXFLAGS, etc). Currently both are true, either is sufficient.
+ for flag in spack.spec.FlagMap.valid_compiler_flags():
+ trap_func = getattr(pkg, flag + '_handler',
+ getattr(pkg, 'default_flag_handler',
+ lambda x, y: y[1]))
+ flag_val = pkg.spec.compiler_flags[flag]
+ pkg.spec.compiler_flags[flag] = trap_func(spack_env, (flag, flag_val))
+
set_compiler_environment_variables(pkg, spack_env)
set_build_environment_variables(pkg, spack_env, dirty)
pkg.architecture.platform.setup_platform_environment(pkg, spack_env)
@@ -498,12 +516,12 @@ def setup_package(pkg, dirty=False):
spack_env.apply_modifications()
-def fork(pkg, function, dirty=False):
+def fork(pkg, function, dirty):
"""Fork a child process to do part of a spack build.
Args:
- pkg (PackageBase): package whose environemnt we should set up the
+ pkg (PackageBase): package whose environment we should set up the
forked process for.
function (callable): argless function to run in the child
process.
@@ -521,21 +539,30 @@ def fork(pkg, function, dirty=False):
control over the environment, etc. without affecting other builds
that might be executed in the same spack call.
- If something goes wrong, the child process is expected to print the
- error and the parent process will exit with error as well. If things
- go well, the child exits and the parent carries on.
+ If something goes wrong, the child process catches the error and
+ passes it to the parent wrapped in a ChildError. The parent is
+ expected to handle (or re-raise) the ChildError.
"""
- def child_execution(child_connection, input_stream):
+ def child_process(child_pipe, input_stream):
+ # We are in the child process. Python sets sys.stdin to
+ # open(os.devnull) to prevent our process and its parent from
+ # simultaneously reading from the original stdin. But, we assume
+ # that the parent process is not going to read from it till we
+ # are done with the child, so we undo Python's precaution.
+ if input_stream is not None:
+ sys.stdin = input_stream
+
try:
setup_package(pkg, dirty=dirty)
- function(input_stream)
- child_connection.send(None)
+ return_value = function()
+ child_pipe.send(return_value)
except StopIteration as e:
# StopIteration is used to stop installations
# before the final stage, mainly for debug purposes
tty.msg(e.message)
- child_connection.send(None)
+ child_pipe.send(None)
+
except:
# catch ANYTHING that goes wrong in the child process
exc_type, exc, tb = sys.exc_info()
@@ -553,39 +580,55 @@ def fork(pkg, function, dirty=False):
build_log = pkg.log_path
# make a pickleable exception to send to parent.
- msg = "%s: %s" % (str(exc_type.__name__), str(exc))
+ msg = "%s: %s" % (exc_type.__name__, str(exc))
- ce = ChildError(msg, tb_string, build_log, package_context)
- child_connection.send(ce)
+ ce = ChildError(msg,
+ exc_type.__module__,
+ exc_type.__name__,
+ tb_string, build_log, package_context)
+ child_pipe.send(ce)
finally:
- child_connection.close()
+ child_pipe.close()
- parent_connection, child_connection = multiprocessing.Pipe()
+ parent_pipe, child_pipe = multiprocessing.Pipe()
+ input_stream = None
try:
- # Forward sys.stdin to be able to activate / deactivate
- # verbosity pressing a key at run-time
- input_stream = lang.duplicate_stream(sys.stdin)
+ # Forward sys.stdin when appropriate, to allow toggling verbosity
+ if sys.stdin.isatty() and hasattr(sys.stdin, 'fileno'):
+ input_stream = os.fdopen(os.dup(sys.stdin.fileno()))
+
p = multiprocessing.Process(
- target=child_execution,
- args=(child_connection, input_stream)
- )
+ target=child_process, args=(child_pipe, input_stream))
p.start()
+
finally:
# Close the input stream in the parent process
- input_stream.close()
- child_exc = parent_connection.recv()
+ if input_stream is not None:
+ input_stream.close()
+
+ child_result = parent_pipe.recv()
p.join()
- if child_exc is not None:
- raise child_exc
+ # If the child process raised an error, print its output here rather
+ # than waiting until the call to SpackError.die() in main(). This
+ # allows exception handling output to be logged from within Spack.
+ # see spack.main.SpackCommand.
+ if isinstance(child_result, ChildError):
+ child_result.print_context()
+ raise child_result
+ return child_result
-def get_package_context(traceback):
+
+def get_package_context(traceback, context=3):
"""Return some context for an error message when the build fails.
Args:
- traceback -- A traceback from some exception raised during install.
+ traceback (traceback): A traceback from some exception raised during
+ install
+ context (int): Lines of context to show before and after the line
+ where the error happened
This function inspects the stack to find where we failed in the
package file, and it adds detailed context to the long_message
@@ -621,9 +664,17 @@ def get_package_context(traceback):
# Build a message showing context in the install method.
sourcelines, start = inspect.getsourcelines(frame)
+
+ l = frame.f_lineno - start
+ start_ctx = max(0, l - context)
+ sourcelines = sourcelines[start_ctx:l + context + 1]
for i, line in enumerate(sourcelines):
- mark = ">> " if start + i == frame.f_lineno else " "
- lines.append(" %s%-5d%s" % (mark, start + i, line.rstrip()))
+ is_error = start_ctx + i == l
+ mark = ">> " if is_error else " "
+ marked = " %s%-6d%s" % (mark, start_ctx + i, line.rstrip())
+ if is_error:
+ marked = colorize('@R{%s}' % marked)
+ lines.append(marked)
return lines
@@ -646,40 +697,75 @@ class ChildError(spack.error.SpackError):
failure in lieu of trying to run sys.excepthook on the parent
process, so users will see the correct stack trace from a child.
- 3. They also contain package_context, which shows source code context
- in the Package implementation where the error happened. To get
- this, Spack searches the stack trace for the deepest frame where
- ``self`` is in scope and is an instance of PackageBase. This will
- generally find a useful spot in the ``package.py`` file.
+ 3. They also contain context, which shows context in the Package
+ implementation where the error happened. This helps people debug
+ Python code in their packages. To get it, Spack searches the
+ stack trace for the deepest frame where ``self`` is in scope and
+ is an instance of PackageBase. This will generally find a useful
+ spot in the ``package.py`` file.
+
+ The long_message of a ChildError displays one of two things:
+
+ 1. If the original error was a ProcessError, indicating a command
+ died during the build, we'll show context from the build log.
+
+ 2. If the original error was any other type of error, we'll show
+ context from the Python code.
- The long_message of a ChildError displays all this stuff to the user,
- and SpackError handles displaying the special traceback if we're in
- debug mode with spack -d.
+ SpackError handles displaying the special traceback if we're in debug
+ mode with spack -d.
"""
- def __init__(self, msg, traceback_string, build_log, package_context):
+ # List of errors considered "build errors", for which we'll show log
+ # context instead of Python context.
+ build_errors = [('spack.util.executable', 'ProcessError')]
+
+ def __init__(self, msg, module, classname, traceback_string, build_log,
+ context):
super(ChildError, self).__init__(msg)
+ self.module = module
+ self.name = classname
self.traceback = traceback_string
self.build_log = build_log
- self.package_context = package_context
+ self.context = context
@property
def long_message(self):
- msg = self._long_message if self._long_message else ''
-
- if self.package_context:
- if msg:
- msg += "\n\n"
- msg += '\n'.join(self.package_context)
-
- if msg:
- msg += "\n\n"
+ out = StringIO()
+ out.write(self._long_message if self._long_message else '')
+
+ if (self.module, self.name) in ChildError.build_errors:
+ # The error happened in some external executed process. Show
+ # the build log with errors highlighted.
+ if self.build_log:
+ events = parse_log_events(self.build_log)
+ nerr = len(events)
+ if nerr > 0:
+ if nerr == 1:
+ out.write("\n1 error found in build log:\n")
+ else:
+ out.write("\n%d errors found in build log:\n" % nerr)
+ out.write(make_log_context(events))
+
+ else:
+ # The error happened in in the Python code, so try to show
+ # some context from the Package itself.
+ out.write('%s: %s\n\n' % (self.name, self.message))
+ if self.context:
+ out.write('\n'.join(self.context))
+ out.write('\n')
+
+ if out.getvalue():
+ out.write('\n')
if self.build_log:
- msg += "See build log for details:\n"
- msg += " %s" % self.build_log
+ out.write('See build log for details:\n')
+ out.write(' %s' % self.build_log)
+
+ return out.getvalue()
- return msg
+ def __str__(self):
+ return self.message + self.long_message + self.traceback
def __reduce__(self):
"""__reduce__ is used to serialize (pickle) ChildErrors.
@@ -689,11 +775,13 @@ class ChildError(spack.error.SpackError):
"""
return _make_child_error, (
self.message,
+ self.module,
+ self.name,
self.traceback,
self.build_log,
- self.package_context)
+ self.context)
-def _make_child_error(msg, traceback, build_log, package_context):
+def _make_child_error(msg, module, name, traceback, build_log, context):
"""Used by __reduce__ in ChildError to reconstruct pickled errors."""
- return ChildError(msg, traceback, build_log, package_context)
+ return ChildError(msg, module, name, traceback, build_log, context)
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
index 4378d7aa58..e11127e4ed 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -95,10 +95,17 @@ class AutotoolsPackage(PackageBase):
#: Options to be passed to autoreconf when using the default implementation
autoreconf_extra_args = []
+ @run_after('autoreconf')
def _do_patch_config_guess(self):
"""Some packages ship with an older config.guess and need to have
- this updated when installed on a newer architecture."""
+ this updated when installed on a newer architecture. In particular,
+ config.guess fails for PPC64LE for version prior to a 2013-06-10
+ build date (automake 1.13.4)."""
+ if not self.patch_config_guess or not self.spec.satisfies(
+ 'target=ppc64le'
+ ):
+ return
my_config_guess = None
config_guess = None
if os.path.exists('config.guess'):
@@ -120,11 +127,11 @@ class AutotoolsPackage(PackageBase):
try:
check_call([my_config_guess], stdout=PIPE, stderr=PIPE)
# The package's config.guess already runs OK, so just use it
- return True
+ return
except Exception:
pass
else:
- return True
+ return
# Look for a spack-installed automake package
if 'automake' in self.spec:
@@ -149,11 +156,11 @@ class AutotoolsPackage(PackageBase):
mod = stat(my_config_guess).st_mode & 0o777 | S_IWUSR
os.chmod(my_config_guess, mod)
shutil.copyfile(config_guess, my_config_guess)
- return True
+ return
except Exception:
pass
- return False
+ raise RuntimeError('Failed to find suitable config.guess')
@property
def configure_directory(self):
@@ -176,19 +183,14 @@ class AutotoolsPackage(PackageBase):
"""Override to provide another place to build the package"""
return self.configure_directory
- def patch(self):
- """Patches config.guess if
- :py:attr:``~.AutotoolsPackage.patch_config_guess`` is True
-
- :raise RuntimeError: if something goes wrong when patching
- ``config.guess``
- """
-
- if self.patch_config_guess and self.spec.satisfies(
- 'arch=linux-rhel7-ppc64le'
- ):
- if not self._do_patch_config_guess():
- raise RuntimeError('Failed to find suitable config.guess')
+ def default_flag_handler(self, spack_env, flag_val):
+ # Relies on being the first thing that can affect the spack_env
+ # EnvironmentModification after it is instantiated or no other
+ # method trying to affect these variables. Currently both are true
+ # flag_val is a tuple (flag, value_list).
+ spack_env.set(flag_val[0].upper(),
+ ' '.join(flag_val[1]))
+ return []
@run_before('autoreconf')
def delete_configure_to_force_update(self):
diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py
index 4435a995fc..f643320b10 100644
--- a/lib/spack/spack/build_systems/cmake.py
+++ b/lib/spack/spack/build_systems/cmake.py
@@ -24,17 +24,21 @@
##############################################################################
import inspect
+import os
import platform
import spack.build_environment
from llnl.util.filesystem import working_dir, join_path
-from spack.directives import depends_on
-from spack.package import PackageBase, run_after
+from spack.directives import depends_on, variant
+from spack.package import PackageBase, InstallError, run_after
class CMakePackage(PackageBase):
"""Specialized class for packages built using CMake
+ For more information on the CMake build system, see:
+ https://cmake.org/cmake/help/latest/
+
This class provides three phases that can be overridden:
1. :py:meth:`~.CMakePackage.cmake`
@@ -48,11 +52,6 @@ class CMakePackage(PackageBase):
+-----------------------------------------------+--------------------+
| **Method** | **Purpose** |
+===============================================+====================+
- | :py:meth:`~.CMakePackage.build_type` | Specify the value |
- | | for the |
- | | CMAKE_BUILD_TYPE |
- | | variable |
- +-----------------------------------------------+--------------------+
| :py:meth:`~.CMakePackage.root_cmakelists_dir` | Location of the |
| | root CMakeLists.txt|
+-----------------------------------------------+--------------------+
@@ -73,20 +72,31 @@ class CMakePackage(PackageBase):
build_time_test_callbacks = ['check']
- depends_on('cmake', type='build')
-
- def build_type(self):
- """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable
+ #: The build system generator to use.
+ #:
+ #: See ``cmake --help`` for a list of valid generators.
+ #: Currently, "Unix Makefiles" and "Ninja" are the only generators
+ #: that Spack supports. Defaults to "Unix Makefiles".
+ #:
+ #: See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
+ #: for more information.
+ generator = 'Unix Makefiles'
+
+ # https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
- :return: value for ``CMAKE_BUILD_TYPE``
- """
- return 'RelWithDebInfo'
+ depends_on('cmake', type='build')
@property
def root_cmakelists_dir(self):
- """Returns the location of the root CMakeLists.txt
+ """The relative path to the directory containing CMakeLists.txt
+
+ This path is relative to the root of the extracted tarball,
+ not to the ``build_directory``. Defaults to the current directory.
- :return: directory containing the root CMakeLists.txt
+ :return: directory containing CMakeLists.txt
"""
return self.stage.source_path
@@ -104,13 +114,30 @@ class CMakePackage(PackageBase):
def _std_args(pkg):
"""Computes the standard cmake arguments for a generic package"""
try:
- build_type = pkg.build_type()
+ generator = pkg.generator
except AttributeError:
+ generator = 'Unix Makefiles'
+
+ # Make sure a valid generator was chosen
+ valid_generators = ['Unix Makefiles', 'Ninja']
+ if generator not in valid_generators:
+ msg = "Invalid CMake generator: '{0}'\n".format(generator)
+ msg += "CMakePackage currently supports the following "
+ msg += "generators: '{0}'".format("', '".join(valid_generators))
+ raise InstallError(msg)
+
+ try:
+ build_type = pkg.spec.variants['build_type'].value
+ except KeyError:
build_type = 'RelWithDebInfo'
- args = ['-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(pkg.prefix),
- '-DCMAKE_BUILD_TYPE:STRING={0}'.format(build_type),
- '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON']
+ args = [
+ '-G', generator,
+ '-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(pkg.prefix),
+ '-DCMAKE_BUILD_TYPE:STRING={0}'.format(build_type),
+ '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'
+ ]
+
if platform.mac_ver()[0]:
args.append('-DCMAKE_FIND_FRAMEWORK:STRING=LAST')
@@ -128,6 +155,15 @@ class CMakePackage(PackageBase):
"""
return join_path(self.stage.source_path, 'spack-build')
+ def default_flag_handler(self, spack_env, flag_val):
+ # Relies on being the first thing that can affect the spack_env
+ # EnvironmentModification after it is instantiated or no other
+ # method trying to affect these variables. Currently both are true
+ # flag_val is a tuple (flag, value_list)
+ spack_env.set(flag_val[0].upper(),
+ ' '.join(flag_val[1]))
+ return []
+
def cmake_args(self):
"""Produces a list containing all the arguments that must be passed to
cmake, except:
@@ -143,20 +179,27 @@ class CMakePackage(PackageBase):
def cmake(self, spec, prefix):
"""Runs ``cmake`` in the build directory"""
- options = [self.root_cmakelists_dir] + self.std_cmake_args + \
- self.cmake_args()
+ options = [os.path.abspath(self.root_cmakelists_dir)]
+ options += self.std_cmake_args
+ options += self.cmake_args()
with working_dir(self.build_directory, create=True):
inspect.getmodule(self).cmake(*options)
def build(self, spec, prefix):
"""Make the build targets"""
with working_dir(self.build_directory):
- inspect.getmodule(self).make(*self.build_targets)
+ if self.generator == 'Unix Makefiles':
+ inspect.getmodule(self).make(*self.build_targets)
+ elif self.generator == 'Ninja':
+ inspect.getmodule(self).ninja(*self.build_targets)
def install(self, spec, prefix):
"""Make the install targets"""
with working_dir(self.build_directory):
- inspect.getmodule(self).make(*self.install_targets)
+ if self.generator == 'Unix Makefiles':
+ inspect.getmodule(self).make(*self.install_targets)
+ elif self.generator == 'Ninja':
+ inspect.getmodule(self).ninja(*self.install_targets)
run_after('build')(PackageBase._run_default_build_time_test_callbacks)
@@ -165,7 +208,10 @@ class CMakePackage(PackageBase):
and runs it if found.
"""
with working_dir(self.build_directory):
- self._if_make_target_execute('test')
+ if self.generator == 'Unix Makefiles':
+ self._if_make_target_execute('test')
+ elif self.generator == 'Ninja':
+ self._if_ninja_target_execute('test')
# Check that self.prefix is there after installation
run_after('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py
new file mode 100644
index 0000000000..a97f15d62c
--- /dev/null
+++ b/lib/spack/spack/build_systems/intel.py
@@ -0,0 +1,192 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import os
+import xml.etree.ElementTree as ET
+
+from llnl.util.filesystem import install, join_path
+from spack.package import PackageBase, run_after
+from spack.util.executable import Executable
+
+
+def _valid_components():
+ """A generator that yields valid components."""
+
+ tree = ET.parse('pset/mediaconfig.xml')
+ root = tree.getroot()
+
+ components = root.findall('.//Abbr')
+ for component in components:
+ yield component.text
+
+
+class IntelPackage(PackageBase):
+ """Specialized class for licensed Intel software.
+
+ This class provides two phases that can be overridden:
+
+ 1. :py:meth:`~.IntelPackage.configure`
+ 2. :py:meth:`~.IntelPackage.install`
+
+ They both have sensible defaults and for many packages the
+ only thing necessary will be to override ``setup_environment``
+ to set the appropriate environment variables.
+ """
+ #: Phases of an Intel package
+ phases = ['configure', 'install']
+
+ #: This attribute is used in UI queries that need to know the build
+ #: system base class
+ build_system_class = 'IntelPackage'
+
+ #: By default, we assume that all Intel software requires a license.
+ #: This can be overridden for packages that do not require a license.
+ license_required = True
+
+ #: Comment symbol used in the ``license.lic`` file
+ license_comment = '#'
+
+ #: Location where Intel searches for a license file
+ license_files = ['Licenses/license.lic']
+
+ #: Environment variables that Intel searches for a license file
+ license_vars = ['INTEL_LICENSE_FILE']
+
+ #: URL providing information on how to acquire a license key
+ license_url = 'https://software.intel.com/en-us/articles/intel-license-manager-faq'
+
+ #: Components of the package to install.
+ #: By default, install 'ALL' components.
+ components = ['ALL']
+
+ @property
+ def _filtered_components(self):
+ """Returns a list or set of valid components that match
+ the requested components from ``components``."""
+
+ # Don't filter 'ALL'
+ if self.components == ['ALL']:
+ return self.components
+
+ # mediaconfig.xml is known to contain duplicate components.
+ # If more than one copy of the same component is used, you
+ # will get an error message about invalid components.
+ # Use a set to store components to prevent duplicates.
+ matches = set()
+
+ for valid in _valid_components():
+ for requested in self.components:
+ if valid.startswith(requested):
+ matches.add(valid)
+
+ return matches
+
+ @property
+ def global_license_file(self):
+ """Returns the path where a global license file should be stored.
+
+ All Intel software shares the same license, so we store it in a
+ common 'intel' directory."""
+ return join_path(self.global_license_dir, 'intel',
+ os.path.basename(self.license_files[0]))
+
+ def configure(self, spec, prefix):
+ """Writes the ``silent.cfg`` file used to configure the installation.
+
+ See https://software.intel.com/en-us/articles/configuration-file-format
+ """
+ # Patterns used to check silent configuration file
+ #
+ # anythingpat - any string
+ # filepat - the file location pattern (/path/to/license.lic)
+ # lspat - the license server address pattern (0123@hostname)
+ # snpat - the serial number pattern (ABCD-01234567)
+ config = {
+ # Accept EULA, valid values are: {accept, decline}
+ 'ACCEPT_EULA': 'accept',
+
+ # Optional error behavior, valid values are: {yes, no}
+ 'CONTINUE_WITH_OPTIONAL_ERROR': 'yes',
+
+ # Install location, valid values are: {/opt/intel, filepat}
+ 'PSET_INSTALL_DIR': prefix,
+
+ # Continue with overwrite of existing installation directory,
+ # valid values are: {yes, no}
+ 'CONTINUE_WITH_INSTALLDIR_OVERWRITE': 'yes',
+
+ # List of components to install,
+ # valid values are: {ALL, DEFAULTS, anythingpat}
+ 'COMPONENTS': ';'.join(self._filtered_components),
+
+ # Installation mode, valid values are: {install, repair, uninstall}
+ 'PSET_MODE': 'install',
+
+ # Directory for non-RPM database, valid values are: {filepat}
+ 'NONRPM_DB_DIR': prefix,
+
+ # Perform validation of digital signatures of RPM files,
+ # valid values are: {yes, no}
+ 'SIGNING_ENABLED': 'no',
+
+ # Select target architecture of your applications,
+ # valid values are: {IA32, INTEL64, ALL}
+ 'ARCH_SELECTED': 'ALL',
+ }
+
+ # Not all Intel software requires a license. Trying to specify
+ # one anyway will cause the installation to fail.
+ if self.license_required:
+ config.update({
+ # License file or license server,
+ # valid values are: {lspat, filepat}
+ 'ACTIVATION_LICENSE_FILE': self.global_license_file,
+
+ # Activation type, valid values are: {exist_lic,
+ # license_server, license_file, trial_lic, serial_number}
+ 'ACTIVATION_TYPE': 'license_file',
+
+ # Intel(R) Software Improvement Program opt-in,
+ # valid values are: {yes, no}
+ 'PHONEHOME_SEND_USAGE_DATA': 'no',
+ })
+
+ with open('silent.cfg', 'w') as cfg:
+ for key in config:
+ cfg.write('{0}={1}\n'.format(key, config[key]))
+
+ def install(self, spec, prefix):
+ """Runs the ``install.sh`` installation script."""
+
+ install_script = Executable('./install.sh')
+ install_script('--silent', 'silent.cfg')
+
+ @run_after('install')
+ def save_silent_cfg(self):
+ """Copies the silent.cfg configuration file to ``<prefix>/.spack``."""
+ install('silent.cfg', join_path(self.prefix, '.spack'))
+
+ # Check that self.prefix is there after installation
+ run_after('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/qmake.py b/lib/spack/spack/build_systems/qmake.py
new file mode 100644
index 0000000000..c1a3193b7f
--- /dev/null
+++ b/lib/spack/spack/build_systems/qmake.py
@@ -0,0 +1,87 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import inspect
+
+from spack.directives import depends_on
+from spack.package import PackageBase, run_after
+
+
+class QMakePackage(PackageBase):
+ """Specialized class for packages built using qmake.
+
+ For more information on the qmake build system, see:
+ http://doc.qt.io/qt-5/qmake-manual.html
+
+ This class provides three phases that can be overridden:
+
+ 1. :py:meth:`~.QMakePackage.qmake`
+ 2. :py:meth:`~.QMakePackage.build`
+ 3. :py:meth:`~.QMakePackage.install`
+
+ They all have sensible defaults and for many packages the only thing
+ necessary will be to override :py:meth:`~.QMakePackage.qmake_args`.
+ """
+ #: Phases of a qmake package
+ phases = ['qmake', 'build', 'install']
+
+ #: This attribute is used in UI queries that need to know the build
+ #: system base class
+ build_system_class = 'QMakePackage'
+
+ #: Callback names for build-time test
+ build_time_test_callbacks = ['check']
+
+ depends_on('qt', type='build')
+
+ def qmake_args(self):
+ """Produces a list containing all the arguments that must be passed to
+ qmake
+ """
+ return []
+
+ def qmake(self, spec, prefix):
+ """Run ``qmake`` to configure the project and generate a Makefile."""
+ inspect.getmodule(self).qmake(*self.qmake_args())
+
+ def build(self, spec, prefix):
+ """Make the build targets"""
+ inspect.getmodule(self).make()
+
+ def install(self, spec, prefix):
+ """Make the install targets"""
+ inspect.getmodule(self).make('install')
+
+ # Tests
+
+ def check(self):
+ """Searches the Makefile for a ``check:`` target and runs it if found.
+ """
+ self._if_make_target_execute('check')
+
+ run_after('build')(PackageBase._run_default_build_time_test_callbacks)
+
+ # Check that self.prefix is there after installation
+ run_after('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/build_systems/scons.py b/lib/spack/spack/build_systems/scons.py
new file mode 100644
index 0000000000..694ed936cc
--- /dev/null
+++ b/lib/spack/spack/build_systems/scons.py
@@ -0,0 +1,92 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import inspect
+
+from spack.directives import depends_on
+from spack.package import PackageBase, run_after
+
+
+class SConsPackage(PackageBase):
+ """Specialized class for packages built using SCons.
+
+ See http://scons.org/documentation.html for more information.
+
+ This class provides the following phases that can be overridden:
+
+ 1. :py:meth:`~.SConsPackage.build`
+ 2. :py:meth:`~.SConsPackage.install`
+
+ Packages that use SCons as a build system are less uniform than packages
+ that use other build systems. Developers can add custom subcommands or
+ variables that control the build. You will likely need to override
+ :py:meth:`~.SConsPackage.build_args` to pass the appropriate variables.
+ """
+ #: Phases of a SCons package
+ phases = ['build', 'install']
+
+ #: To be used in UI queries that require to know which
+ #: build-system class we are using
+ build_system_class = 'SConsPackage'
+
+ #: Callback names for build-time test
+ build_time_test_callbacks = ['test']
+
+ depends_on('scons', type='build')
+
+ def build_args(self, spec, prefix):
+ """Arguments to pass to build."""
+ return []
+
+ def build(self, spec, prefix):
+ """Build the package."""
+ args = self.build_args(spec, prefix)
+
+ inspect.getmodule(self).scons(*args)
+
+ def install_args(self, spec, prefix):
+ """Arguments to pass to install."""
+ return []
+
+ def install(self, spec, prefix):
+ """Install the package."""
+ args = self.install_args(spec, prefix)
+
+ inspect.getmodule(self).scons('install', *args)
+
+ # Testing
+
+ def test(self):
+ """Run unit tests after build.
+
+ By default, does nothing. Override this if you want to
+ add package-specific tests.
+ """
+ pass
+
+ run_after('build')(PackageBase._run_default_build_time_test_callbacks)
+
+ # Check that self.prefix is there after installation
+ run_after('install')(PackageBase.sanity_check_prefix)
diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index f691038734..f432fbf585 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -75,7 +75,8 @@ def remove_options(parser, *options):
break
-def get_cmd_function_name(name):
+def get_python_name(name):
+ """Commands can have '-' in their names, unlike Python identifiers."""
return name.replace("-", "_")
@@ -89,7 +90,7 @@ def get_module(name):
attr_setdefault(module, SETUP_PARSER, lambda *args: None) # null-op
attr_setdefault(module, DESCRIPTION, "")
- fn_name = get_cmd_function_name(name)
+ fn_name = get_python_name(name)
if not hasattr(module, fn_name):
tty.die("Command module %s (%s) must define function '%s'." %
(module.__name__, module.__file__, fn_name))
@@ -99,7 +100,8 @@ def get_module(name):
def get_command(name):
"""Imports the command's function from a module and returns it."""
- return getattr(get_module(name), get_cmd_function_name(name))
+ python_name = get_python_name(name)
+ return getattr(get_module(python_name), python_name)
def parse_specs(args, **kwargs):
@@ -152,9 +154,8 @@ def disambiguate_spec(spec):
elif len(matching_specs) > 1:
args = ["%s matches multiple packages." % spec,
"Matching packages:"]
- color = sys.stdout.isatty()
- args += [colorize(" @K{%s} " % s.dag_hash(7), color=color) +
- s.format('$_$@$%@$=', color=color) for s in matching_specs]
+ args += [colorize(" @K{%s} " % s.dag_hash(7)) +
+ s.cformat('$_$@$%@$=') for s in matching_specs]
args += ["Use a more specific spec."]
tty.die(*args)
@@ -165,20 +166,66 @@ def gray_hash(spec, length):
return colorize('@K{%s}' % spec.dag_hash(length))
-def display_specs(specs, **kwargs):
- mode = kwargs.get('mode', 'short')
- hashes = kwargs.get('long', False)
- namespace = kwargs.get('namespace', False)
- flags = kwargs.get('show_flags', False)
- variants = kwargs.get('variants', False)
+def display_specs(specs, args=None, **kwargs):
+ """Display human readable specs with customizable formatting.
+
+ Prints the supplied specs to the screen, formatted according to the
+ arguments provided.
+
+ Specs are grouped by architecture and compiler, and columnized if
+ possible. There are three possible "modes":
+
+ * ``short`` (default): short specs with name and version, columnized
+ * ``paths``: Two columns: one for specs, one for paths
+ * ``deps``: Dependency-tree style, like ``spack spec``; can get long
+
+ Options can add more information to the default display. Options can
+ be provided either as keyword arguments or as an argparse namespace.
+ Keyword arguments take precedence over settings in the argparse
+ namespace.
+
+ Args:
+ specs (list of spack.spec.Spec): the specs to display
+ args (optional argparse.Namespace): namespace containing
+ formatting arguments
+
+ Keyword Args:
+ mode (str): Either 'short', 'paths', or 'deps'
+ long (bool): Display short hashes with specs
+ very_long (bool): Display full hashes with specs (supersedes ``long``)
+ namespace (bool): Print namespaces along with names
+ show_flags (bool): Show compiler flags with specs
+ variants (bool): Show variants with specs
+
+ """
+ def get_arg(name, default=None):
+ """Prefer kwargs, then args, then default."""
+ if name in kwargs:
+ return kwargs.get(name)
+ elif args is not None:
+ return getattr(args, name, default)
+ else:
+ return default
+
+ mode = get_arg('mode', 'short')
+ hashes = get_arg('long', False)
+ namespace = get_arg('namespace', False)
+ flags = get_arg('show_flags', False)
+ full_compiler = get_arg('show_full_compiler', False)
+ variants = get_arg('variants', False)
hlen = 7
- if kwargs.get('very_long', False):
+ if get_arg('very_long', False):
hashes = True
hlen = None
nfmt = '.' if namespace else '_'
- ffmt = '$%+' if flags else ''
+ ffmt = ''
+ if full_compiler or flags:
+ ffmt += '$%'
+ if full_compiler:
+ ffmt += '@'
+ ffmt += '+'
vfmt = '$+' if variants else ''
format_string = '$%s$@%s%s' % (nfmt, ffmt, vfmt)
@@ -198,7 +245,7 @@ def display_specs(specs, **kwargs):
specs = index[(architecture, compiler)]
specs.sort()
- abbreviated = [s.format(format_string, color=True) for s in specs]
+ abbreviated = [s.cformat(format_string) for s in specs]
if mode == 'paths':
# Print one spec per line along with prefix path
width = max(len(s) for s in abbreviated)
@@ -213,19 +260,18 @@ def display_specs(specs, **kwargs):
for spec in specs:
print(spec.tree(
format=format_string,
- color=True,
indent=4,
prefix=(lambda s: gray_hash(s, hlen)) if hashes else None))
elif mode == 'short':
# Print columns of output if not printing flags
- if not flags:
+ if not flags and not full_compiler:
def fmt(s):
string = ""
if hashes:
string += gray_hash(s, hlen) + ' '
- string += s.format('$-%s$@%s' % (nfmt, vfmt), color=True)
+ string += s.cformat('$-%s$@%s' % (nfmt, vfmt))
return string
@@ -235,7 +281,7 @@ def display_specs(specs, **kwargs):
for spec in specs:
# Print the hash if necessary
hsh = gray_hash(spec, hlen) + ' ' if hashes else ''
- print(hsh + spec.format(format_string, color=True) + '\n')
+ print(hsh + spec.cformat(format_string) + '\n')
else:
raise ValueError(
diff --git a/lib/spack/spack/cmd/build.py b/lib/spack/spack/cmd/build.py
index 413b73a08e..a4821214d6 100644
--- a/lib/spack/spack/cmd/build.py
+++ b/lib/spack/spack/cmd/build.py
@@ -34,6 +34,8 @@ level = "long"
build_system_to_phase = {
AutotoolsPackage: 'build',
CMakePackage: 'build',
+ QMakePackage: 'build',
+ SConsPackage: 'build',
WafPackage: 'build',
PythonPackage: 'build',
PerlPackage: 'build',
diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py
new file mode 100644
index 0000000000..213442acef
--- /dev/null
+++ b/lib/spack/spack/cmd/buildcache.py
@@ -0,0 +1,230 @@
+##############################################################################
+# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License (as published by
+# the Free Software Foundation) version 2.1 dated February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import argparse
+
+import os
+import re
+import llnl.util.tty as tty
+
+import spack
+import spack.cmd
+import spack.binary_distribution as bindist
+from spack.binary_distribution import NoOverwriteException, NoGpgException
+from spack.binary_distribution import NoKeyException, PickKeyException
+from spack.binary_distribution import NoVerifyException, NoChecksumException
+
+description = "Create, download and install build cache files."
+section = "caching"
+level = "long"
+
+
+def setup_parser(subparser):
+ setup_parser.parser = subparser
+ subparsers = subparser.add_subparsers(help='buildcache sub-commands')
+
+ create = subparsers.add_parser('create')
+ create.add_argument('-r', '--rel', action='store_true',
+ help="make all rpaths relative" +
+ " before creating tarballs.")
+ create.add_argument('-f', '--force', action='store_true',
+ help="overwrite tarball if it exists.")
+ create.add_argument('-y', '--yes-to-all', action='store_true',
+ help="answer yes to all create unsigned " +
+ "buildcache questions")
+ create.add_argument('-k', '--key', metavar='key',
+ type=str, default=None,
+ help="Key for signing.")
+ create.add_argument('-d', '--directory', metavar='directory',
+ type=str, default='.',
+ help="directory in which to save the tarballs.")
+ create.add_argument(
+ 'packages', nargs=argparse.REMAINDER,
+ help="specs of packages to create buildcache for")
+ create.set_defaults(func=createtarball)
+
+ install = subparsers.add_parser('install')
+ install.add_argument('-f', '--force', action='store_true',
+ help="overwrite install directory if it exists.")
+ install.add_argument('-y', '--yes-to-all', action='store_true',
+ help="answer yes to all install unsigned " +
+ "buildcache questions")
+ install.add_argument(
+ 'packages', nargs=argparse.REMAINDER,
+ help="specs of packages to install biuldache for")
+ install.set_defaults(func=installtarball)
+
+ listcache = subparsers.add_parser('list')
+ listcache.add_argument(
+ 'packages', nargs=argparse.REMAINDER,
+ help="specs of packages to search for")
+ listcache.set_defaults(func=listspecs)
+
+ dlkeys = subparsers.add_parser('keys')
+ dlkeys.add_argument(
+ '-i', '--install', action='store_true',
+ help="install Keys pulled from mirror")
+ dlkeys.add_argument(
+ '-y', '--yes-to-all', action='store_true',
+ help="answer yes to all trust questions")
+ dlkeys.set_defaults(func=getkeys)
+
+
+def createtarball(args):
+ if not args.packages:
+ tty.die("build cache file creation requires at least one" +
+ " installed package argument")
+ pkgs = set(args.packages)
+ specs = set()
+ outdir = os.getcwd()
+ if args.directory:
+ outdir = args.directory
+ signkey = None
+ if args.key:
+ signkey = args.key
+ yes_to_all = False
+ force = False
+ relative = False
+ if args.yes_to_all:
+ yes_to_all = True
+ if args.force:
+ force = True
+ if args.rel:
+ relative = True
+ for pkg in pkgs:
+ for spec in spack.cmd.parse_specs(pkg, concretize=True):
+ specs.add(spec)
+ tty.msg('recursing dependencies')
+ for d, node in spec.traverse(order='post',
+ depth=True,
+ deptype=('link', 'run'),
+ deptype_query='run'):
+ if not node.external:
+ tty.msg('adding dependency %s' % node.format())
+ specs.add(node)
+ for spec in specs:
+ tty.msg('creating binary cache file for package %s ' % spec.format())
+ try:
+ bindist.build_tarball(spec, outdir, force,
+ relative, yes_to_all, signkey)
+ except NoOverwriteException as e:
+ tty.warn("%s exists, use -f to force overwrite." % e)
+ except NoGpgException:
+ tty.warn("gpg2 is not available,"
+ " use -y to create unsigned build caches")
+ except NoKeyException:
+ tty.warn("no default key available for signing,"
+ " use -y to create unsigned build caches"
+ " or spack gpg init to create a default key")
+ except PickKeyException:
+ tty.warn("multi keys available for signing,"
+ " use -y to create unsigned build caches"
+ " or -k <key hash> to pick a key")
+
+
+def installtarball(args):
+ if not args.packages:
+ tty.die("build cache file installation requires" +
+ " at least one package spec argument")
+ pkgs = set(args.packages)
+ specs, links = bindist.get_specs()
+ matches = set()
+ for spec in specs:
+ for pkg in pkgs:
+ if re.match(re.escape(pkg), str(spec)):
+ matches.add(spec)
+ if re.match(re.escape(pkg), '/%s' % spec.dag_hash()):
+ matches.add(spec)
+
+ for match in matches:
+ install_tarball(match, args)
+
+
+def install_tarball(spec, args):
+ s = spack.spec.Spec(spec)
+ yes_to_all = False
+ force = False
+ if args.yes_to_all:
+ yes_to_all = True
+ if args.force:
+ force = True
+ for d in s.dependencies():
+ tty.msg("Installing buildcache for dependency spec %s" % d)
+ install_tarball(d, args)
+ package = spack.repo.get(spec)
+ if s.concrete and package.installed and not force:
+ tty.warn("Package for spec %s already installed." % spec.format(),
+ " Use -f flag to overwrite.")
+ else:
+ tarball = bindist.download_tarball(spec)
+ if tarball:
+ tty.msg('Installing buildcache for spec %s' % spec.format())
+ try:
+ bindist.extract_tarball(spec, tarball, yes_to_all, force)
+ except NoOverwriteException as e:
+ tty.warn("%s exists. use -f to force overwrite." % e.args)
+ except NoVerifyException:
+ tty.die("Package spec file failed signature verification,"
+ " use -y flag to install build cache")
+ except NoChecksumException:
+ tty.die("Package tarball failed checksum verification,"
+ " use -y flag to install build cache")
+ finally:
+ spack.store.db.reindex(spack.store.layout)
+ else:
+ tty.die('Download of binary cache file for spec %s failed.' %
+ spec.format())
+
+
+def listspecs(args):
+ specs, links = bindist.get_specs()
+ if args.packages:
+ pkgs = set(args.packages)
+ for pkg in pkgs:
+ tty.msg("buildcache spec(s) matching %s \n" % pkg)
+ for spec in sorted(specs):
+ if re.search("^" + re.escape(pkg), str(spec)):
+ tty.msg('run "spack buildcache install /%s"' %
+ spec.dag_hash(7) + ' to install %s\n' %
+ spec.format())
+ else:
+ tty.msg("buildcache specs ")
+ for spec in sorted(specs):
+ tty.msg('run "spack buildcache install /%s" to install %s\n' %
+ (spec.dag_hash(7), spec.format()))
+
+
+def getkeys(args):
+ install = False
+ if args.install:
+ install = True
+ yes_to_all = False
+ if args.yes_to_all:
+ yes_to_all = True
+ bindist.get_keys(install, yes_to_all)
+
+
+def buildcache(parser, args):
+ if args.func:
+ args.func(args)
diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py
index b7812bffc4..634e20b4e4 100644
--- a/lib/spack/spack/cmd/clean.py
+++ b/lib/spack/spack/cmd/clean.py
@@ -29,21 +29,60 @@ import llnl.util.tty as tty
import spack
import spack.cmd
-description = "remove build stage and source tarball for packages"
+description = "remove temporary build files and/or downloaded archives"
section = "build"
level = "long"
+class AllClean(argparse.Action):
+ """Activates flags -s -d and -m simultaneously"""
+ def __call__(self, parser, namespace, values, option_string=None):
+ parser.parse_args(['-sdm'], namespace=namespace)
+
+
def setup_parser(subparser):
- subparser.add_argument('packages', nargs=argparse.REMAINDER,
- help="specs of packages to clean")
+ subparser.add_argument(
+ '-s', '--stage', action='store_true',
+ help="remove all temporary build stages (default)")
+ subparser.add_argument(
+ '-d', '--downloads', action='store_true',
+ help="remove cached downloads")
+ subparser.add_argument(
+ '-m', '--misc-cache', action='store_true',
+ help="remove long-lived caches, like the virtual package index")
+ subparser.add_argument(
+ '-a', '--all', action=AllClean, help="equivalent to -sdm", nargs=0
+ )
+ subparser.add_argument(
+ 'specs',
+ nargs=argparse.REMAINDER,
+ help="removes the build stages and tarballs for specs"
+ )
def clean(parser, args):
- if not args.packages:
- tty.die("spack clean requires at least one package spec.")
- specs = spack.cmd.parse_specs(args.packages, concretize=True)
- for spec in specs:
- package = spack.repo.get(spec)
- package.do_clean()
+ # If nothing was set, activate the default
+ if not any([args.specs, args.stage, args.downloads, args.misc_cache]):
+ args.stage = True
+
+ # Then do the cleaning falling through the cases
+ if args.specs:
+ specs = spack.cmd.parse_specs(args.specs, concretize=True)
+ for spec in specs:
+ msg = 'Cleaning build stage [{0}]'
+ tty.msg(msg.format(spec.short_spec))
+ package = spack.repo.get(spec)
+ package.do_clean()
+
+ if args.stage:
+ tty.msg('Removing all temporary build stages')
+ spack.stage.purge()
+
+ if args.downloads:
+ tty.msg('Removing cached downloads')
+ spack.fetch_cache.destroy()
+
+ if args.misc_cache:
+ tty.msg('Removing cached information on repositories')
+ spack.misc_cache.destroy()
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py
index 46ff44c84a..d1b0418770 100644
--- a/lib/spack/spack/cmd/common/arguments.py
+++ b/lib/spack/spack/cmd/common/arguments.py
@@ -74,6 +74,23 @@ class ConstraintAction(argparse.Action):
return sorted(specs)
+class CleanOrDirtyAction(argparse.Action):
+ """Sets the dirty flag in the current namespace"""
+
+ def __init__(self, *args, **kwargs):
+ kwargs['default'] = spack.dirty
+ super(CleanOrDirtyAction, self).__init__(*args, **kwargs)
+
+ def __call__(self, parser, namespace, values, option_string=None):
+ if option_string == '--clean':
+ setattr(namespace, self.dest, False)
+ elif option_string == '--dirty':
+ setattr(namespace, self.dest, True)
+ else:
+ msg = 'expected "--dirty" or "--clean" [got {0} instead]'
+ raise argparse.ArgumentError(msg.format(option_string))
+
+
_arguments['constraint'] = Args(
'constraint', nargs=argparse.REMAINDER, action=ConstraintAction,
help='constraint to select a subset of installed packages')
@@ -93,12 +110,20 @@ _arguments['recurse_dependencies'] = Args(
help='recursively traverse spec dependencies')
_arguments['clean'] = Args(
- '--clean', action='store_false', dest='dirty',
- help='clean environment before installing package')
+ '--clean',
+ action=CleanOrDirtyAction,
+ dest='dirty',
+ help='clean environment before installing package',
+ nargs=0
+)
_arguments['dirty'] = Args(
- '--dirty', action='store_true', dest='dirty',
- help='do NOT clean environment before installing')
+ '--dirty',
+ action=CleanOrDirtyAction,
+ dest='dirty',
+ help='do NOT clean environment before installing',
+ nargs=0
+)
_arguments['long'] = Args(
'-l', '--long', action='store_true',
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py
index d5aa25ee8e..356161d3b3 100644
--- a/lib/spack/spack/cmd/compiler.py
+++ b/lib/spack/spack/cmd/compiler.py
@@ -36,7 +36,6 @@ from llnl.util.lang import index_by
from llnl.util.tty.colify import colify
from llnl.util.tty.color import colorize
from spack.spec import CompilerSpec, ArchSpec
-from spack.util.environment import get_path
description = "manage compilers"
section = "system"
@@ -89,8 +88,6 @@ def compiler_find(args):
"""
paths = args.add_paths
- if not paths:
- paths = get_path('PATH')
# Don't initialize compilers config via compilers.get_compiler_config.
# Just let compiler_find do the
diff --git a/lib/spack/spack/cmd/configure.py b/lib/spack/spack/cmd/configure.py
index 4b590e6176..c8588334a5 100644
--- a/lib/spack/spack/cmd/configure.py
+++ b/lib/spack/spack/cmd/configure.py
@@ -38,8 +38,10 @@ level = "long"
build_system_to_phase = {
AutotoolsPackage: 'configure',
CMakePackage: 'cmake',
+ QMakePackage: 'qmake',
WafPackage: 'configure',
PerlPackage: 'configure',
+ IntelPackage: 'configure',
}
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index 62de3e24e9..e68b20a6ac 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -46,7 +46,7 @@ level = "short"
package_template = '''\
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -193,18 +193,29 @@ class CMakePackageTemplate(PackageTemplate):
return args"""
+class QMakePackageTemplate(PackageTemplate):
+ """Provides appropriate overrides for QMake-based packages"""
+
+ base_class_name = 'QMakePackage'
+
+ body = """\
+ def qmake_args(self):
+ # FIXME: If not needed delete this function
+ args = []
+ return args"""
+
+
class SconsPackageTemplate(PackageTemplate):
"""Provides appropriate overrides for SCons-based packages"""
- dependencies = """\
- # FIXME: Add additional dependencies if required.
- depends_on('scons', type='build')"""
+ base_class_name = 'SConsPackage'
body = """\
- def install(self, spec, prefix):
- # FIXME: Add logic to build and install here.
- scons('prefix={0}'.format(prefix))
- scons('install')"""
+ def build_args(self, spec, prefix):
+ # FIXME: Add arguments to pass to build.
+ # FIXME: If not needed delete this function
+ args = []
+ return args"""
class WafPackageTemplate(PackageTemplate):
@@ -359,10 +370,20 @@ class MakefilePackageTemplate(PackageTemplate):
# makefile.filter('CC = .*', 'CC = cc')"""
+class IntelPackageTemplate(PackageTemplate):
+ """Provides appropriate overrides for licensed Intel software"""
+
+ base_class_name = 'IntelPackage'
+
+ body = """\
+ # FIXME: Override `setup_environment` if necessary."""
+
+
templates = {
'autotools': AutotoolsPackageTemplate,
'autoreconf': AutoreconfPackageTemplate,
'cmake': CMakePackageTemplate,
+ 'qmake': QMakePackageTemplate,
'scons': SconsPackageTemplate,
'waf': WafPackageTemplate,
'bazel': BazelPackageTemplate,
@@ -372,6 +393,7 @@ templates = {
'perlbuild': PerlbuildPackageTemplate,
'octave': OctavePackageTemplate,
'makefile': MakefilePackageTemplate,
+ 'intel': IntelPackageTemplate,
'generic': PackageTemplate,
}
@@ -425,19 +447,22 @@ class BuildSystemGuesser:
# A list of clues that give us an idea of the build system a package
# uses. If the regular expression matches a file contained in the
# archive, the corresponding build system is assumed.
+ # NOTE: Order is important here. If a package supports multiple
+ # build systems, we choose the first match in this list.
clues = [
- ('/configure$', 'autotools'),
- ('/configure.(in|ac)$', 'autoreconf'),
- ('/Makefile.am$', 'autoreconf'),
- ('/CMakeLists.txt$', 'cmake'),
- ('/SConstruct$', 'scons'),
- ('/waf$', 'waf'),
- ('/setup.py$', 'python'),
- ('/NAMESPACE$', 'r'),
- ('/WORKSPACE$', 'bazel'),
- ('/Build.PL$', 'perlbuild'),
- ('/Makefile.PL$', 'perlmake'),
- ('/(GNU)?[Mm]akefile$', 'makefile'),
+ (r'/CMakeLists\.txt$', 'cmake'),
+ (r'/configure$', 'autotools'),
+ (r'/configure\.(in|ac)$', 'autoreconf'),
+ (r'/Makefile\.am$', 'autoreconf'),
+ (r'/SConstruct$', 'scons'),
+ (r'/waf$', 'waf'),
+ (r'/setup\.py$', 'python'),
+ (r'/NAMESPACE$', 'r'),
+ (r'/WORKSPACE$', 'bazel'),
+ (r'/Build\.PL$', 'perlbuild'),
+ (r'/Makefile\.PL$', 'perlmake'),
+ (r'/.*\.pro$', 'qmake'),
+ (r'/(GNU)?[Mm]akefile$', 'makefile'),
]
# Peek inside the compressed file.
diff --git a/lib/spack/spack/cmd/dependencies.py b/lib/spack/spack/cmd/dependencies.py
new file mode 100644
index 0000000000..b35c324fc7
--- /dev/null
+++ b/lib/spack/spack/cmd/dependencies.py
@@ -0,0 +1,87 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import argparse
+
+import llnl.util.tty as tty
+from llnl.util.tty.colify import colify
+
+import spack
+import spack.store
+import spack.cmd
+
+description = "show dependencies of a package"
+section = "basic"
+level = "long"
+
+
+def setup_parser(subparser):
+ subparser.add_argument(
+ '-i', '--installed', action='store_true', default=False,
+ help="List installed dependencies of an installed spec, "
+ "instead of possible dependencies of a package.")
+ subparser.add_argument(
+ '-t', '--transitive', action='store_true', default=False,
+ help="Show all transitive dependencies.")
+ subparser.add_argument(
+ 'spec', nargs=argparse.REMAINDER, help="spec or package name")
+
+
+def dependencies(parser, args):
+ specs = spack.cmd.parse_specs(args.spec)
+ if len(specs) != 1:
+ tty.die("spack dependencies takes only one spec.")
+
+ if args.installed:
+ spec = spack.cmd.disambiguate_spec(specs[0])
+
+ tty.msg("Dependencies of %s" % spec.format('$_$@$%@$/', color=True))
+ deps = spack.store.db.installed_relatives(
+ spec, 'children', args.transitive)
+ if deps:
+ spack.cmd.display_specs(deps, long=True)
+ else:
+ print("No dependencies")
+
+ else:
+ spec = specs[0]
+
+ if not spec.virtual:
+ packages = [spec.package]
+ else:
+ packages = [spack.repo.get(s.name)
+ for s in spack.repo.providers_for(spec)]
+
+ dependencies = set()
+ for pkg in packages:
+ dependencies.update(
+ set(pkg.possible_dependencies(args.transitive)))
+
+ if spec.name in dependencies:
+ dependencies.remove(spec.name)
+
+ if dependencies:
+ colify(sorted(dependencies))
+ else:
+ print("No dependencies")
diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py
index c983dd79ce..3413ac3227 100644
--- a/lib/spack/spack/cmd/dependents.py
+++ b/lib/spack/spack/cmd/dependents.py
@@ -25,31 +25,98 @@
import argparse
import llnl.util.tty as tty
+from llnl.util.tty.colify import colify
import spack
import spack.store
import spack.cmd
-description = "show installed packages that depend on another"
+description = "show packages that depend on another"
section = "basic"
level = "long"
def setup_parser(subparser):
subparser.add_argument(
- 'spec', nargs=argparse.REMAINDER,
- help="specs to list dependencies of")
+ '-i', '--installed', action='store_true', default=False,
+ help="List installed dependents of an installed spec, "
+ "instead of possible dependents of a package.")
+ subparser.add_argument(
+ '-t', '--transitive', action='store_true', default=False,
+ help="Show all transitive dependents.")
+ subparser.add_argument(
+ 'spec', nargs=argparse.REMAINDER, help="spec or package name")
+
+
+def inverted_dependencies():
+ """Iterate through all packages and return a dictionary mapping package
+ names to possible dependnecies.
+
+ Virtual packages are included as sources, so that you can query
+ dependents of, e.g., `mpi`, but virtuals are not included as
+ actual dependents.
+ """
+ dag = {}
+ for pkg in spack.repo.all_packages():
+ dag.setdefault(pkg.name, set())
+ for dep in pkg.dependencies:
+ deps = [dep]
+
+ # expand virtuals if necessary
+ if spack.repo.is_virtual(dep):
+ deps += [s.name for s in spack.repo.providers_for(dep)]
+
+ for d in deps:
+ dag.setdefault(d, set()).add(pkg.name)
+ return dag
+
+
+def get_dependents(pkg_name, ideps, transitive=False, dependents=None):
+ """Get all dependents for a package.
+
+ Args:
+ pkg_name (str): name of the package whose dependents should be returned
+ ideps (dict): dictionary of dependents, from inverted_dependencies()
+ transitive (bool, optional): return transitive dependents when True
+ """
+ if dependents is None:
+ dependents = set()
+
+ if pkg_name in dependents:
+ return set()
+ dependents.add(pkg_name)
+
+ direct = ideps[pkg_name]
+ if transitive:
+ for dep_name in direct:
+ get_dependents(dep_name, ideps, transitive, dependents)
+ dependents.update(direct)
+ return dependents
def dependents(parser, args):
specs = spack.cmd.parse_specs(args.spec)
if len(specs) != 1:
tty.die("spack dependents takes only one spec.")
- spec = spack.cmd.disambiguate_spec(specs[0])
- tty.msg("Dependents of %s" % spec.format('$_$@$%@$/', color=True))
- deps = spack.store.db.installed_dependents(spec)
- if deps:
- spack.cmd.display_specs(deps)
+ if args.installed:
+ spec = spack.cmd.disambiguate_spec(specs[0])
+
+ tty.msg("Dependents of %s" % spec.cformat('$_$@$%@$/'))
+ deps = spack.store.db.installed_relatives(
+ spec, 'parents', args.transitive)
+ if deps:
+ spack.cmd.display_specs(deps, long=True)
+ else:
+ print("No dependents")
+
else:
- print("No dependents")
+ spec = specs[0]
+ ideps = inverted_dependencies()
+
+ dependents = get_dependents(spec.name, ideps, args.transitive)
+ dependents.remove(spec.name)
+ if dependents:
+ colify(sorted(dependents))
+ else:
+ print("No dependents")
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py
index cbf91e4a8a..02ff10f425 100644
--- a/lib/spack/spack/cmd/find.py
+++ b/lib/spack/spack/cmd/find.py
@@ -60,6 +60,10 @@ def setup_parser(subparser):
action='store_true',
dest='show_flags',
help='show spec compiler flags')
+ subparser.add_argument('--show-full-compiler',
+ action='store_true',
+ dest='show_full_compiler',
+ help='show full compiler specs')
implicit_explicit = subparser.add_mutually_exclusive_group()
implicit_explicit.add_argument(
'-e', '--explicit',
@@ -128,10 +132,4 @@ def find(parser, args):
if sys.stdout.isatty():
tty.msg("%d installed packages." % len(query_specs))
- display_specs(query_specs,
- mode=args.mode,
- long=args.long,
- very_long=args.very_long,
- show_flags=args.show_flags,
- namespace=args.namespace,
- variants=args.variants)
+ display_specs(query_specs, args)
diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py
index 1f46033813..3ec6094cac 100644
--- a/lib/spack/spack/cmd/gpg.py
+++ b/lib/spack/spack/cmd/gpg.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack.util.gpg import Gpg
+import argparse
import spack
import os
@@ -87,8 +88,9 @@ def setup_parser(subparser):
list.set_defaults(func=gpg_list)
init = subparsers.add_parser('init')
+ init.add_argument('--from', metavar='DIR', type=str,
+ dest='import_dir', help=argparse.SUPPRESS)
init.set_defaults(func=gpg_init)
- init.set_defaults(import_dir=spack.gpg_keys_path)
export = subparsers.add_parser('export')
export.add_argument('location', type=str,
@@ -144,7 +146,11 @@ def gpg_trust(args):
def gpg_init(args):
- for root, _, filenames in os.walk(args.import_dir):
+ import_dir = args.import_dir
+ if import_dir is None:
+ import_dir = spack.gpg_keys_path
+
+ for root, _, filenames in os.walk(import_dir):
for filename in filenames:
if not filename.endswith('.key'):
continue
diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py
index e42e355f8f..e750e5a959 100644
--- a/lib/spack/spack/cmd/graph.py
+++ b/lib/spack/spack/cmd/graph.py
@@ -90,7 +90,8 @@ def graph(parser, args):
deptype = alldeps
if args.deptype:
deptype = tuple(args.deptype.split(','))
- validate_deptype(deptype)
+ if deptype == ('all',):
+ deptype = 'all'
deptype = canonical_deptype(deptype)
if args.dot: # Dot graph only if asked for.
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py
index 575b65f8b0..b7f824c091 100644
--- a/lib/spack/spack/cmd/info.py
+++ b/lib/spack/spack/cmd/info.py
@@ -25,14 +25,22 @@
from __future__ import print_function
import textwrap
-from six.moves import zip_longest
-from llnl.util.tty.colify import *
+
+import llnl.util.tty.color as color
import spack
import spack.fetch_strategy as fs
+import spack.spec
+
+from llnl.util.tty.colify import *
-description = "get detailed information on a particular package"
-section = "basic"
-level = "short"
+from six.moves import zip_longest
+
+description = 'get detailed information on a particular package'
+section = 'basic'
+level = 'short'
+
+header_color = '@*b'
+plain_format = '@.'
def padder(str_list, extra=0):
@@ -48,11 +56,23 @@ def padder(str_list, extra=0):
def setup_parser(subparser):
subparser.add_argument(
- 'name', metavar="PACKAGE", help="name of package to get info for")
+ 'name', metavar='PACKAGE', help='name of package to get info for')
+
+
+def section_title(s):
+ return header_color + s + plain_format
+
+
+def version(s):
+ return spack.spec.version_color + s + plain_format
+
+
+def variant(s):
+ return spack.spec.enabled_variant_color + s + plain_format
class VariantFormatter(object):
- def __init__(self, variants, max_widths=(25, 20, 35)):
+ def __init__(self, variants, max_widths=(30, 20, 30)):
self.variants = variants
self.headers = ('Name [Default]', 'Allowed values', 'Description')
# Set max headers lengths
@@ -102,9 +122,9 @@ class VariantFormatter(object):
@property
def lines(self):
if not self.variants:
- yield " None"
+ yield ' None'
else:
- yield " " + self.fmt % self.headers
+ yield ' ' + self.fmt % self.headers
yield '\n'
for k, v in sorted(self.variants.items()):
name = textwrap.wrap(
@@ -123,61 +143,87 @@ class VariantFormatter(object):
name, allowed, description, fillvalue=''
):
yield " " + self.fmt % t
- yield '' # Trigger a new line
def print_text_info(pkg):
"""Print out a plain text description of a package."""
- header = "{0}: ".format(pkg.build_system_class)
- print(header, pkg.name)
+ header = section_title(
+ '{0}: '
+ ).format(pkg.build_system_class) + pkg.name
+ color.cprint(header)
- print()
- print("Description:")
+ color.cprint('')
+ color.cprint(section_title('Description:'))
if pkg.__doc__:
print(pkg.format_doc(indent=4))
else:
print(" None")
- whitespaces = ''.join([' '] * (len(header) - len("Homepage: ")))
- print("Homepage:", whitespaces, pkg.homepage)
+ color.cprint(section_title('Homepage: ') + pkg.homepage)
+
+ if len(pkg.maintainers) > 0:
+ mnt = " ".join(['@@' + m for m in pkg.maintainers])
+ color.cprint('')
+ color.cprint(section_title('Maintainers: ') + mnt)
- print()
- print("Safe versions: ")
+ color.cprint('')
+ color.cprint(section_title('Preferred version: '))
if not pkg.versions:
- print(" None")
+ color.cprint(version(' None'))
+ color.cprint('')
+ color.cprint(section_title('Safe versions: '))
+ color.cprint(version(' None'))
else:
pad = padder(pkg.versions, 4)
+
+ # Here we sort first on the fact that a version is marked
+ # as preferred in the package, then on the fact that the
+ # version is not develop, then lexicographically
+ l = [
+ (value.get('preferred', False), not key.isdevelop(), key)
+ for key, value in pkg.versions.items()
+ ]
+ l = sorted(l)
+ _, _, preferred = l.pop()
+
+ f = fs.for_package_version(pkg, preferred)
+ line = version(' {0}'.format(pad(preferred))) + str(f)
+ color.cprint(line)
+ color.cprint('')
+ color.cprint(section_title('Safe versions: '))
+
for v in reversed(sorted(pkg.versions)):
f = fs.for_package_version(pkg, v)
- print(" %s%s" % (pad(v), str(f)))
+ line = version(' {0}'.format(pad(v))) + str(f)
+ color.cprint(line)
- print()
- print("Variants:")
+ color.cprint('')
+ color.cprint(section_title('Variants:'))
formatter = VariantFormatter(pkg.variants)
for line in formatter.lines:
- print(line)
+ color.cprint(line)
- print()
- print("Installation Phases:")
+ color.cprint('')
+ color.cprint(section_title('Installation Phases:'))
phase_str = ''
for phase in pkg.phases:
phase_str += " {0}".format(phase)
- print(phase_str)
+ color.cprint(phase_str)
for deptype in ('build', 'link', 'run'):
- print()
- print("%s Dependencies:" % deptype.capitalize())
+ color.cprint('')
+ color.cprint(section_title('%s Dependencies:' % deptype.capitalize()))
deps = sorted(pkg.dependencies_of_type(deptype))
if deps:
colify(deps, indent=4)
else:
- print(" None")
+ print(' None')
- print()
- print("Virtual Packages: ")
+ color.cprint('')
+ color.cprint(section_title('Virtual Packages: '))
if pkg.provided:
inverse_map = {}
for spec, whens in pkg.provided.items():
@@ -186,8 +232,11 @@ def print_text_info(pkg):
inverse_map[when] = set()
inverse_map[when].add(spec)
for when, specs in reversed(sorted(inverse_map.items())):
- print(" %s provides %s" % (
- when, ', '.join(str(s) for s in specs)))
+ line = " %s provides %s" % (
+ when.colorized(), ', '.join(s.colorized() for s in specs)
+ )
+ print(line)
+
else:
print(" None")
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 9f35837220..83ebe71787 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -69,6 +69,9 @@ the dependencies"""
'--restage', action='store_true', dest='restage',
help="if a partial install is detected, delete prior state")
subparser.add_argument(
+ '--source', action='store_true', dest='install_source',
+ help="install source files in prefix")
+ subparser.add_argument(
'-n', '--no-checksum', action='store_true', dest='no_checksum',
help="do not check packages against checksum")
subparser.add_argument(
@@ -314,6 +317,7 @@ def install(parser, args, **kwargs):
'keep_prefix': args.keep_prefix,
'keep_stage': args.keep_stage,
'restage': args.restage,
+ 'install_source': args.install_source,
'install_deps': 'dependencies' in args.things_to_install,
'make_jobs': args.jobs,
'run_tests': args.run_tests,
@@ -334,31 +338,41 @@ def install(parser, args, **kwargs):
tty.error('The `spack install` command requires a spec to install.')
for spec in specs:
+ saved_do_install = PackageBase.do_install
+ decorator = lambda fn: fn
+
# Check if we were asked to produce some log for dashboards
if args.log_format is not None:
# Compute the filename for logging
log_filename = args.log_file
if not log_filename:
log_filename = default_log_file(spec)
+
# Create the test suite in which to log results
test_suite = TestSuite(spec)
- # Decorate PackageBase.do_install to get installation status
- PackageBase.do_install = junit_output(
- spec, test_suite
- )(PackageBase.do_install)
+
+ # Temporarily decorate PackageBase.do_install to monitor
+ # recursive calls.
+ decorator = junit_output(spec, test_suite)
# Do the actual installation
- if args.things_to_install == 'dependencies':
- # Install dependencies as-if they were installed
- # for root (explicit=False in the DB)
- kwargs['explicit'] = False
- for s in spec.dependencies():
- p = spack.repo.get(s)
- p.do_install(**kwargs)
- else:
- package = spack.repo.get(spec)
- kwargs['explicit'] = True
- package.do_install(**kwargs)
+ try:
+ # decorate the install if necessary
+ PackageBase.do_install = decorator(PackageBase.do_install)
+
+ if args.things_to_install == 'dependencies':
+ # Install dependencies as-if they were installed
+ # for root (explicit=False in the DB)
+ kwargs['explicit'] = False
+ for s in spec.dependencies():
+ p = spack.repo.get(s)
+ p.do_install(**kwargs)
+ else:
+ package = spack.repo.get(spec)
+ kwargs['explicit'] = True
+ package.do_install(**kwargs)
+ finally:
+ PackageBase.do_install = saved_do_install
# Dump log file if asked to
if args.log_format is not None:
diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py
index bfc36c4107..b89ac4121d 100644
--- a/lib/spack/spack/cmd/mirror.py
+++ b/lib/spack/spack/cmd/mirror.py
@@ -213,7 +213,7 @@ def mirror_create(args):
" %-4d failed to fetch." % e)
if error:
tty.error("Failed downloads:")
- colify(s.format("$_$@") for s in error)
+ colify(s.cformat("$_$@") for s in error)
def mirror(parser, args):
diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py
index ed20ad4029..d59d4433b7 100644
--- a/lib/spack/spack/cmd/module.py
+++ b/lib/spack/spack/cmd/module.py
@@ -236,7 +236,8 @@ def refresh(mtype, specs, args):
if len(writer_list) > 1:
message += '\nfile: {0}\n'.format(filename)
for x in writer_list:
- message += 'spec: {0}\n'.format(x.spec.format(color=True))
+ message += 'spec: {0}\n'.format(x.spec.format())
+
tty.error(message)
tty.error('Operation aborted')
raise SystemExit(1)
@@ -269,7 +270,7 @@ def module(parser, args):
"and this is not allowed in this context")
tty.error(message.format(query=constraint))
for s in specs:
- sys.stderr.write(s.format(color=True) + '\n')
+ sys.stderr.write(s.cformat() + '\n')
raise SystemExit(1)
except NoMatch:
message = ("the constraint '{query}' matches no package, "
diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py
index ee1ec882e2..b4740b4ece 100644
--- a/lib/spack/spack/cmd/spec.py
+++ b/lib/spack/spack/cmd/spec.py
@@ -60,8 +60,7 @@ def setup_parser(subparser):
def spec(parser, args):
name_fmt = '$.' if args.namespaces else '$_'
- kwargs = {'color': True,
- 'cover': args.cover,
+ kwargs = {'cover': args.cover,
'format': name_fmt + '$@$%@+$+$=',
'hashes': args.long or args.very_long,
'hashlen': None if args.very_long else 7,
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py
index 499521ede0..e95a5f3430 100644
--- a/lib/spack/spack/cmd/uninstall.py
+++ b/lib/spack/spack/cmd/uninstall.py
@@ -128,8 +128,8 @@ def installed_dependents(specs):
"""
dependents = {}
for item in specs:
- lst = [x for x in spack.store.db.installed_dependents(item)
- if x not in specs]
+ installed = spack.store.db.installed_relatives(item, 'parents', True)
+ lst = [x for x in installed if x not in specs]
if lst:
lst = list(set(lst))
dependents[item] = lst
@@ -157,7 +157,9 @@ def do_uninstall(specs, force):
# Sort packages to be uninstalled by the number of installed dependents
# This ensures we do things in the right order
def num_installed_deps(pkg):
- return len(spack.store.db.installed_dependents(pkg.spec))
+ dependents = spack.store.db.installed_relatives(
+ pkg.spec, 'parents', True)
+ return len(dependents)
packages.sort(key=num_installed_deps)
for item in packages:
@@ -180,8 +182,7 @@ def get_uninstall_list(args):
has_error = False
if dependent_list and not args.dependents and not args.force:
for spec, lst in dependent_list.items():
- tty.error('Will not uninstall {0}'.format(
- spec.format("$_$@$%@$/", color=True)))
+ tty.error("Will not uninstall %s" % spec.cformat("$_$@$%@$/"))
print('')
print('The following packages depend on it:')
spack.cmd.display_specs(lst, **display_args)
diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py
index 49c29ff469..633e345640 100644
--- a/lib/spack/spack/cmd/url.py
+++ b/lib/spack/spack/cmd/url.py
@@ -334,6 +334,8 @@ def name_parsed_correctly(pkg, name):
pkg_name = pkg_name[2:]
elif pkg_name.startswith('py-'):
pkg_name = pkg_name[3:]
+ elif pkg_name.startswith('perl-'):
+ pkg_name = pkg_name[5:]
elif pkg_name.startswith('octave-'):
pkg_name = pkg_name[7:]
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py
index 53b2572ab9..517a0bd5e8 100644
--- a/lib/spack/spack/compilers/__init__.py
+++ b/lib/spack/spack/compilers/__init__.py
@@ -182,7 +182,7 @@ def all_compiler_specs(scope=None, init_config=True):
def find_compilers(*paths):
- """Return a list of compilers found in the suppied paths.
+ """Return a list of compilers found in the supplied paths.
This invokes the find_compilers() method for each operating
system associated with the host platform, and appends
the compilers detected to a list.
diff --git a/lib/spack/spack/compilers/cce.py b/lib/spack/spack/compilers/cce.py
index 936614efac..2a5858f4e8 100644
--- a/lib/spack/spack/compilers/cce.py
+++ b/lib/spack/spack/compilers/cce.py
@@ -52,7 +52,7 @@ class Cce(Compiler):
@classmethod
def default_version(cls, comp):
- return get_compiler_version(comp, '-V', r'[Vv]ersion.*(\d+(\.\d+)+)')
+ return get_compiler_version(comp, '-V', r'[Vv]ersion.*?(\d+(\.\d+)+)')
@property
def openmp_flag(self):
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index d3a385ea80..8b7fcf334c 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -162,7 +162,7 @@ class ConfigScope(object):
def __init__(self, name, path):
self.name = name # scope name.
self.path = path # path to directory containing configs.
- self.sections = {} # sections read from config files.
+ self.sections = syaml.syaml_dict() # sections read from config files.
# Register in a dict of all ConfigScopes
# TODO: make this cleaner. Mocking up for testing is brittle.
@@ -197,7 +197,7 @@ class ConfigScope(object):
def clear(self):
"""Empty cached config information."""
- self.sections = {}
+ self.sections = syaml.syaml_dict()
def __repr__(self):
return '<ConfigScope: %s: %s>' % (self.name, self.path)
@@ -314,7 +314,7 @@ def _mark_overrides(data):
return [_mark_overrides(elt) for elt in data]
elif isinstance(data, dict):
- marked = {}
+ marked = syaml.syaml_dict()
for key, val in iteritems(data):
if isinstance(key, string_types) and key.endswith(':'):
key = syaml.syaml_str(key[:-1])
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index 75862ff87c..6b54dc5939 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -288,7 +288,7 @@ class Database(object):
if dhash not in data:
tty.warn("Missing dependency not in database: ",
"%s needs %s-%s" % (
- spec.format('$_$/'), dname, dhash[:7]))
+ spec.cformat('$_$/'), dname, dhash[:7]))
continue
child = data[dhash].spec
@@ -440,8 +440,7 @@ class Database(object):
# just to be conservative in case a command like
# "autoremove" is run by the user after a reindex.
tty.debug(
- 'RECONSTRUCTING FROM SPEC.YAML: {0}'.format(spec)
- )
+ 'RECONSTRUCTING FROM SPEC.YAML: {0}'.format(spec))
explicit = True
if old_data is not None:
old_info = old_data.get(spec.dag_hash())
@@ -467,8 +466,7 @@ class Database(object):
# installed compilers or externally installed
# applications.
tty.debug(
- 'RECONSTRUCTING FROM OLD DB: {0}'.format(entry.spec)
- )
+ 'RECONSTRUCTING FROM OLD DB: {0}'.format(entry.spec))
try:
layout = spack.store.layout
if entry.spec.external:
@@ -713,13 +711,34 @@ class Database(object):
return self._remove(spec)
@_autospec
- def installed_dependents(self, spec):
- """List the installed specs that depend on this one."""
- dependents = set()
+ def installed_relatives(self, spec, direction='children', transitive=True):
+ """Return installed specs related to this one."""
+ if direction not in ('parents', 'children'):
+ raise ValueError("Invalid direction: %s" % direction)
+
+ relatives = set()
for spec in self.query(spec):
- for dependent in spec.traverse(direction='parents', root=False):
- dependents.add(dependent)
- return dependents
+ if transitive:
+ to_add = spec.traverse(direction=direction, root=False)
+ elif direction == 'parents':
+ to_add = spec.dependents()
+ else: # direction == 'children'
+ to_add = spec.dependencies()
+
+ for relative in to_add:
+ hash_key = relative.dag_hash()
+ if hash_key not in self._data:
+ reltype = ('Dependent' if direction == 'parents'
+ else 'Dependency')
+ tty.warn("Inconsistent state! %s %s of %s not in DB"
+ % (reltype, hash_key, spec.dag_hash()))
+ continue
+
+ if not self._data[hash_key].installed:
+ continue
+
+ relatives.add(relative)
+ return relatives
@_autospec
def installed_extensions_for(self, extendee_spec):
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index 2b160bc8a3..7b9a3aa953 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -241,8 +241,7 @@ def _depends_on(pkg, spec, when=None, type=None):
# but is most backwards-compatible.
type = ('build', 'link')
- if isinstance(type, str):
- type = spack.spec.special_types.get(type, (type,))
+ type = spack.spec.canonical_deptype(type)
for deptype in type:
if deptype not in spack.spec.alldeps:
@@ -264,7 +263,7 @@ def _depends_on(pkg, spec, when=None, type=None):
@directive('conflicts')
-def conflicts(conflict_spec, when=None):
+def conflicts(conflict_spec, when=None, msg=None):
"""Allows a package to define a conflict.
Currently, a "conflict" is a concretized configuration that is known
@@ -281,14 +280,16 @@ def conflicts(conflict_spec, when=None):
Args:
conflict_spec (Spec): constraint defining the known conflict
when (Spec): optional constraint that triggers the conflict
+ msg (str): optional user defined message
"""
def _execute(pkg):
# If when is not specified the conflict always holds
condition = pkg.name if when is None else when
when_spec = parse_anonymous_spec(condition, pkg.name)
+ # Save in a list the conflicts and the associated custom messages
when_spec_list = pkg.conflicts.setdefault(conflict_spec, [])
- when_spec_list.append(when_spec)
+ when_spec_list.append((when_spec, msg))
return _execute
@@ -356,6 +357,17 @@ def patch(url_or_filename, level=1, when=None, **kwargs):
optionally provide a when spec to indicate that a particular
patch should only be applied when the package's spec meets
certain conditions (e.g. a particular version).
+
+ Args:
+ url_or_filename (str): url or filename of the patch
+ level (int): patch level (as in the patch shell command)
+ when (Spec): optional anonymous spec that specifies when to apply
+ the patch
+ **kwargs: the following list of keywords is supported
+
+ - md5 (str): md5 sum of the patch (used to verify the file
+ if it comes from a url)
+
"""
def _execute(pkg):
constraint = pkg.name if when is None else when
@@ -372,7 +384,7 @@ def variant(
name,
default=None,
description='',
- values=(True, False),
+ values=None,
multi=False,
validator=None
):
@@ -394,6 +406,12 @@ def variant(
logic. It receives a tuple of values and should raise an instance
of SpackError if the group doesn't meet the additional constraints
"""
+ if values is None:
+ if default in (True, False) or (type(default) is str and
+ default.upper() in ('TRUE', 'FALSE')):
+ values = (True, False)
+ else:
+ values = lambda x: True
if default is None:
default = False if values == (True, False) else ''
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 5e9341ced9..5b430224d6 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -168,7 +168,9 @@ class YamlDirectoryLayout(DirectoryLayout):
self.metadata_dir = kwargs.get('metadata_dir', '.spack')
self.hash_len = kwargs.get('hash_len')
self.path_scheme = kwargs.get('path_scheme') or (
- "${ARCHITECTURE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}") # NOQA: E501
+ "${ARCHITECTURE}/"
+ "${COMPILERNAME}-${COMPILERVER}/"
+ "${PACKAGE}-${VERSION}-${HASH}")
if self.hash_len is not None:
if re.search('\${HASH:\d+}', self.path_scheme):
raise InvalidDirectoryLayoutParametersError(
diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py
index bb760bfd2f..567e54e356 100644
--- a/lib/spack/spack/environment.py
+++ b/lib/spack/spack/environment.py
@@ -63,6 +63,15 @@ class SetEnv(NameValueModifier):
os.environ[self.name] = str(self.value)
+class AppendFlagsEnv(NameValueModifier):
+
+ def execute(self):
+ if self.name in os.environ and os.environ[self.name]:
+ os.environ[self.name] += self.separator + str(self.value)
+ else:
+ os.environ[self.name] = str(self.value)
+
+
class UnsetEnv(NameModifier):
def execute(self):
@@ -171,6 +180,20 @@ class EnvironmentModifications(object):
item = SetEnv(name, value, **kwargs)
self.env_modifications.append(item)
+ def append_flags(self, name, value, sep=' ', **kwargs):
+ """
+ Stores in the current object a request to append to an env variable
+
+ Args:
+ name: name of the environment variable to be appended to
+ value: value to append to the environment variable
+ Appends with spaces separating different additions to the variable
+ """
+ kwargs.update(self._get_outside_caller_attributes())
+ kwargs.update({'separator': sep})
+ item = AppendFlagsEnv(name, value, **kwargs)
+ self.env_modifications.append(item)
+
def unset(self, name, **kwargs):
"""
Stores in the current object a request to unset an environment variable
@@ -261,132 +284,157 @@ class EnvironmentModifications(object):
x.execute()
@staticmethod
- def from_sourcing_files(*args, **kwargs):
- """Returns modifications that would be made by sourcing files.
-
- Args:
- *args (list of str): list of files to be sourced
+ def from_sourcing_file(filename, *args, **kwargs):
+ """Returns modifications that would be made by sourcing a file.
+
+ Parameters:
+ filename (str): The file to source
+ *args (list of str): Arguments to pass on the command line
+
+ Keyword Arguments:
+ shell (str): The shell to use (default: ``bash``)
+ shell_options (str): Options passed to the shell (default: ``-c``)
+ source_command (str): The command to run (default: ``source``)
+ suppress_output (str): Redirect used to suppress output of command
+ (default: ``&> /dev/null``)
+ concatenate_on_success (str): Operator used to execute a command
+ only when the previous command succeeds (default: ``&&``)
Returns:
EnvironmentModifications: an object that, if executed, has
- the same effect on the environment as sourcing the files
- passed as parameters
+ the same effect on the environment as sourcing the file
"""
- env = EnvironmentModifications()
+ # Check if the file actually exists
+ if not os.path.isfile(filename):
+ msg = 'Trying to source non-existing file: {0}'.format(filename)
+ raise RuntimeError(msg)
- # Check if the files are actually there
- files = [line.split(' ')[0] for line in args]
- non_existing = [file for file in files if not os.path.isfile(file)]
- if non_existing:
- message = 'trying to source non-existing files\n'
- message += '\n'.join(non_existing)
- raise RuntimeError(message)
-
- # Relevant kwd parameters and formats
- info = dict(kwargs)
- info.setdefault('shell', '/bin/bash')
- info.setdefault('shell_options', '-c')
- info.setdefault('source_command', 'source')
- info.setdefault('suppress_output', '&> /dev/null')
- info.setdefault('concatenate_on_success', '&&')
-
- shell = '{shell}'.format(**info)
- shell_options = '{shell_options}'.format(**info)
- source_file = '{source_command} {file} {concatenate_on_success}'
-
- dump_cmd = "import os, json; print(json.dumps(dict(os.environ)))"
- dump_environment = 'python -c "%s"' % dump_cmd
+ # Kwargs parsing and default values
+ shell = kwargs.get('shell', '/bin/bash')
+ shell_options = kwargs.get('shell_options', '-c')
+ source_command = kwargs.get('source_command', 'source')
+ suppress_output = kwargs.get('suppress_output', '&> /dev/null')
+ concatenate_on_success = kwargs.get('concatenate_on_success', '&&')
+
+ source_file = [source_command, filename]
+ source_file.extend(args)
+ source_file = ' '.join(source_file)
+
+ dump_cmd = 'import os, json; print(json.dumps(dict(os.environ)))'
+ dump_environment = 'python -c "{0}"'.format(dump_cmd)
# Construct the command that will be executed
- command = [source_file.format(file=file, **info) for file in args]
- command.append(dump_environment)
- command = ' '.join(command)
command = [
shell,
shell_options,
- command
+ ' '.join([
+ source_file, suppress_output,
+ concatenate_on_success, dump_environment,
+ ]),
]
- # Try to source all the files,
+ # Try to source the file
proc = subprocess.Popen(
command, stdout=subprocess.PIPE, env=os.environ)
proc.wait()
+
if proc.returncode != 0:
- raise RuntimeError('sourcing files returned a non-zero exit code')
+ msg = 'Sourcing file {0} returned a non-zero exit code'.format(
+ filename)
+ raise RuntimeError(msg)
+
output = ''.join([line.decode('utf-8') for line in proc.stdout])
- # Construct a dictionaries of the environment before and after
- # sourcing the files, so that we can diff them.
- this_environment = dict(os.environ)
- after_source_env = json.loads(output)
+ # Construct dictionaries of the environment before and after
+ # sourcing the file, so that we can diff them.
+ env_before = dict(os.environ)
+ env_after = json.loads(output)
# If we're in python2, convert to str objects instead of unicode
# like json gives us. We can't put unicode in os.environ anyway.
if sys.version_info[0] < 3:
- after_source_env = dict((k.encode('utf-8'), v.encode('utf-8'))
- for k, v in after_source_env.items())
+ env_after = dict((k.encode('utf-8'), v.encode('utf-8'))
+ for k, v in env_after.items())
# Filter variables that are not related to sourcing a file
- to_be_filtered = 'SHLVL', '_', 'PWD', 'OLDPWD'
- for d in after_source_env, this_environment:
+ to_be_filtered = 'SHLVL', '_', 'PWD', 'OLDPWD', 'PS2'
+ for d in env_after, env_before:
for name in to_be_filtered:
d.pop(name, None)
# Fill the EnvironmentModifications instance
+ env = EnvironmentModifications()
# New variables
- new_variables = set(after_source_env) - set(this_environment)
- for x in new_variables:
- env.set(x, after_source_env[x])
+ new_variables = set(env_after) - set(env_before)
# Variables that have been unset
- unset_variables = set(this_environment) - set(after_source_env)
- for x in unset_variables:
- env.unset(x)
+ unset_variables = set(env_before) - set(env_after)
# Variables that have been modified
common_variables = set(
- this_environment).intersection(set(after_source_env))
+ env_before).intersection(set(env_after))
modified_variables = [x for x in common_variables
- if this_environment[x] != after_source_env[x]]
+ if env_before[x] != env_after[x]]
- def return_separator_if_any(first_value, second_value):
+ def return_separator_if_any(*args):
separators = ':', ';'
for separator in separators:
- if separator in first_value and separator in second_value:
- return separator
+ for arg in args:
+ if separator in arg:
+ return separator
return None
- for x in modified_variables:
- current = this_environment[x]
- modified = after_source_env[x]
- sep = return_separator_if_any(current, modified)
- if sep is None:
- # We just need to set the variable to the new value
- env.set(x, after_source_env[x])
+ # Add variables to env.
+ # Assume that variables with 'PATH' in the name or that contain
+ # separators like ':' or ';' are more likely to be paths
+ for x in new_variables:
+ sep = return_separator_if_any(env_after[x])
+ if sep:
+ env.prepend_path(x, env_after[x], separator=sep)
+ elif 'PATH' in x:
+ env.prepend_path(x, env_after[x])
else:
- current_list = current.split(sep)
- modified_list = modified.split(sep)
+ # We just need to set the variable to the new value
+ env.set(x, env_after[x])
+
+ for x in unset_variables:
+ env.unset(x)
+
+ for x in modified_variables:
+ before = env_before[x]
+ after = env_after[x]
+ sep = return_separator_if_any(before, after)
+ if sep:
+ before_list = before.split(sep)
+ after_list = after.split(sep)
+
+ # Filter out empty strings
+ before_list = list(filter(None, before_list))
+ after_list = list(filter(None, after_list))
+
# Paths that have been removed
remove_list = [
- ii for ii in current_list if ii not in modified_list]
- # Check that nothing has been added in the middle of vurrent
- # list
+ ii for ii in before_list if ii not in after_list]
+ # Check that nothing has been added in the middle of
+ # before_list
remaining_list = [
- ii for ii in current_list if ii in modified_list]
- start = modified_list.index(remaining_list[0])
- end = modified_list.index(remaining_list[-1])
- search = sep.join(modified_list[start:end + 1])
-
- if search not in current:
+ ii for ii in before_list if ii in after_list]
+ try:
+ start = after_list.index(remaining_list[0])
+ end = after_list.index(remaining_list[-1])
+ search = sep.join(after_list[start:end + 1])
+ except IndexError:
+ env.prepend_path(x, env_after[x])
+
+ if search not in before:
# We just need to set the variable to the new value
- env.set(x, after_source_env[x])
- break
+ env.prepend_path(x, env_after[x])
else:
try:
- prepend_list = modified_list[:start]
+ prepend_list = after_list[:start]
except KeyError:
prepend_list = []
try:
- append_list = modified_list[end + 1:]
+ append_list = after_list[end + 1:]
except KeyError:
append_list = []
@@ -396,6 +444,9 @@ class EnvironmentModifications(object):
env.append_path(x, item)
for item in prepend_list:
env.prepend_path(x, item)
+ else:
+ # We just need to set the variable to the new value
+ env.set(x, env_after[x])
return env
diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py
index 7b86415202..8f54e82b11 100644
--- a/lib/spack/spack/error.py
+++ b/lib/spack/spack/error.py
@@ -24,7 +24,6 @@
##############################################################################
from __future__ import print_function
-import os
import sys
import llnl.util.tty as tty
@@ -46,15 +45,32 @@ class SpackError(Exception):
# traceback as a string and print it in the parent.
self.traceback = None
+ # we allow exceptions to print debug info via print_context()
+ # before they are caught at the top level. If they *haven't*
+ # printed context early, we do it by default when die() is
+ # called, so we need to remember whether it's been called.
+ self.printed = False
+
@property
def long_message(self):
return self._long_message
- def die(self):
+ def print_context(self):
+ """Print extended debug information about this exception.
+
+ This is usually printed when the top-level Spack error handler
+ calls ``die()``, but it acn be called separately beforehand if a
+ lower-level error handler needs to print error context and
+ continue without raising the exception to the top level.
+ """
+ if self.printed:
+ return
+
# basic debug message
tty.error(self.message)
if self.long_message:
- print(self.long_message)
+ sys.stderr.write(self.long_message)
+ sys.stderr.write('\n')
# stack trace, etc. in debug mode.
if spack.debug:
@@ -66,7 +82,12 @@ class SpackError(Exception):
# run parent exception hook.
sys.excepthook(*sys.exc_info())
- os._exit(1)
+ sys.stderr.flush()
+ self.printed = True
+
+ def die(self):
+ self.print_context()
+ sys.exit(1)
def __str__(self):
msg = self.message
diff --git a/lib/spack/spack/hooks/case_consistency.py b/lib/spack/spack/hooks/case_consistency.py
index fcf9ee2588..f6246f6008 100644
--- a/lib/spack/spack/hooks/case_consistency.py
+++ b/lib/spack/spack/hooks/case_consistency.py
@@ -39,7 +39,11 @@ def pre_run():
if platform.system() != "Darwin":
return
- git_case_consistency_check(spack.repo.get_repo('builtin').packages_path)
+ try:
+ repo = spack.repo.get_repo('builtin')
+ git_case_consistency_check(repo.packages_path)
+ except spack.repository.UnknownNamespaceError:
+ pass
def git_case_consistency_check(path):
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py
index e86f8260b8..cd3529dbb8 100644
--- a/lib/spack/spack/hooks/sbang.py
+++ b/lib/spack/spack/hooks/sbang.py
@@ -62,10 +62,17 @@ def filter_shebang(path):
if original.startswith(new_sbang_line):
return
+ # In the following, newlines have to be excluded in the regular expression
+ # else any mention of "lua" in the document will lead to spurious matches.
+
# Use --! instead of #! on second line for lua.
- if re.search(r'^#!(/[^/]*)*lua\b', original):
+ if re.search(r'^#!(/[^/\n]*)*lua\b', original):
original = re.sub(r'^#', '--', original)
+ # Use //! instead of #! on second line for node.js.
+ if re.search(r'^#!(/[^/\n]*)*node\b', original):
+ original = re.sub(r'^#', '//', original)
+
# Change non-writable files to be writable if needed.
saved_mode = None
if not os.access(path, os.W_OK):
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index 3ae8403bcf..2f542604d5 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -34,8 +34,10 @@ import os
import inspect
import pstats
import argparse
+from six import StringIO
import llnl.util.tty as tty
+from llnl.util.tty.log import log_output
from llnl.util.tty.color import *
import spack
@@ -57,7 +59,7 @@ intro_by_level = {
# control top-level spack options shown in basic vs. advanced help
options_by_level = {
- 'short': 'hkV',
+ 'short': ['h', 'k', 'V', 'color'],
'long': 'all'
}
@@ -236,10 +238,14 @@ class SpackArgumentParser(argparse.ArgumentParser):
def add_command(self, name):
"""Add one subcommand to this parser."""
+ # convert CLI command name to python module name
+ name = spack.cmd.get_python_name(name)
+
# lazily initialize any subparsers
if not hasattr(self, 'subparsers'):
# remove the dummy "command" argument.
- self._remove_action(self._actions[-1])
+ if self._actions[-1].dest == 'command':
+ self._remove_action(self._actions[-1])
self.subparsers = self.add_subparsers(metavar='COMMAND',
dest="command")
@@ -275,6 +281,9 @@ def make_argument_parser():
parser.add_argument('-h', '--help', action='store_true',
help="show this help message and exit")
+ parser.add_argument('--color', action='store', default='auto',
+ choices=('always', 'never', 'auto'),
+ help="when to colorize output; default is auto")
parser.add_argument('-d', '--debug', action='store_true',
help="write out debug logs during compile")
parser.add_argument('-D', '--pdb', action='store_true',
@@ -320,9 +329,12 @@ def setup_main_options(args):
tty.warn("You asked for --insecure. Will NOT check SSL certificates.")
spack.insecure = True
+ # when to use color (takes always, auto, or never)
+ tty.color.set_color_when(args.color)
+
def allows_unknown_args(command):
- """This is a basic argument injection test.
+ """Implements really simple argument injection for unknown arguments.
Commands may add an optional argument called "unknown args" to
indicate they can handle unknonwn args, and we'll pass the unknown
@@ -334,7 +346,87 @@ def allows_unknown_args(command):
return (argcount == 3 and varnames[2] == 'unknown_args')
+def _invoke_spack_command(command, parser, args, unknown_args):
+ """Run a spack command *without* setting spack global options."""
+ if allows_unknown_args(command):
+ return_val = command(parser, args, unknown_args)
+ else:
+ if unknown_args:
+ tty.die('unrecognized arguments: %s' % ' '.join(unknown_args))
+ return_val = command(parser, args)
+
+ # Allow commands to return and error code if they want
+ return 0 if return_val is None else return_val
+
+
+class SpackCommand(object):
+ """Callable object that invokes a spack command (for testing).
+
+ Example usage::
+
+ install = SpackCommand('install')
+ install('-v', 'mpich')
+
+ Use this to invoke Spack commands directly from Python and check
+ their output.
+ """
+ def __init__(self, command):
+ """Create a new SpackCommand that invokes ``command`` when called."""
+ self.parser = make_argument_parser()
+ self.parser.add_command(command)
+ self.command_name = command
+ self.command = spack.cmd.get_command(command)
+
+ def __call__(self, *argv, **kwargs):
+ """Invoke this SpackCommand.
+
+ Args:
+ argv (list of str): command line arguments.
+
+ Keyword Args:
+ fail_on_error (optional bool): Don't raise an exception on error
+
+ Returns:
+ (str): combined output and error as a string
+
+ On return, if ``fail_on_error`` is False, return value of comman
+ is set in ``returncode`` property, and the error is set in the
+ ``error`` property. Otherwise, raise an error.
+ """
+ # set these before every call to clear them out
+ self.returncode = None
+ self.error = None
+
+ args, unknown = self.parser.parse_known_args(
+ [self.command_name] + list(argv))
+
+ fail_on_error = kwargs.get('fail_on_error', True)
+
+ out = StringIO()
+ try:
+ with log_output(out):
+ self.returncode = _invoke_spack_command(
+ self.command, self.parser, args, unknown)
+
+ except SystemExit as e:
+ self.returncode = e.code
+
+ except:
+ self.error = sys.exc_info()[1]
+ if fail_on_error:
+ raise
+
+ if fail_on_error and self.returncode not in (None, 0):
+ raise SpackCommandError(
+ "Command exited with code %d: %s(%s)" % (
+ self.returncode, self.command_name,
+ ', '.join("'%s'" % a for a in argv)))
+
+ return out.getvalue()
+
+
def _main(command, parser, args, unknown_args):
+ """Run a spack command *and* set spack globaloptions."""
# many operations will fail without a working directory.
set_working_dir()
@@ -345,12 +437,7 @@ def _main(command, parser, args, unknown_args):
# Now actually execute the command
try:
- if allows_unknown_args(command):
- return_val = command(parser, args, unknown_args)
- else:
- if unknown_args:
- tty.die('unrecognized arguments: %s' % ' '.join(unknown_args))
- return_val = command(parser, args)
+ return _invoke_spack_command(command, parser, args, unknown_args)
except SpackError as e:
e.die() # gracefully die on any SpackErrors
except Exception as e:
@@ -361,9 +448,6 @@ def _main(command, parser, args, unknown_args):
sys.stderr.write('\n')
tty.die("Keyboard interrupt.")
- # Allow commands to return and error code if they want
- return 0 if return_val is None else return_val
-
def _profile_wrapper(command, parser, args, unknown_args):
import cProfile
@@ -431,7 +515,7 @@ def main(argv=None):
# Try to load the particular command the caller asked for. If there
# is no module for it, just die.
- command_name = args.command[0].replace('-', '_')
+ command_name = spack.cmd.get_python_name(args.command[0])
try:
parser.add_command(command_name)
except ImportError:
@@ -465,3 +549,7 @@ def main(argv=None):
except SystemExit as e:
return e.code
+
+
+class SpackCommandError(Exception):
+ """Raised when SpackCommand execution fails."""
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py
index 9b9f816db4..bfa7b858d2 100644
--- a/lib/spack/spack/mirror.py
+++ b/lib/spack/spack/mirror.py
@@ -224,14 +224,14 @@ def add_single_spec(spec, mirror_root, categories, **kwargs):
# create a subdirectory for the current package@version
archive_path = os.path.abspath(join_path(
mirror_root, mirror_archive_path(spec, fetcher)))
- name = spec.format("$_$@")
+ name = spec.cformat("$_$@")
else:
resource = stage.resource
archive_path = os.path.abspath(join_path(
mirror_root,
mirror_archive_path(spec, fetcher, resource.name)))
name = "{resource} ({pkg}).".format(
- resource=resource.name, pkg=spec.format("$_$@"))
+ resource=resource.name, pkg=spec.cformat("$_$@"))
subdir = os.path.dirname(archive_path)
mkdirp(subdir)
@@ -258,8 +258,8 @@ def add_single_spec(spec, mirror_root, categories, **kwargs):
if spack.debug:
sys.excepthook(*sys.exc_info())
else:
- tty.warn("Error while fetching %s"
- % spec.format('$_$@'), e.message)
+ tty.warn(
+ "Error while fetching %s" % spec.cformat('$_$@'), e.message)
categories['error'].append(spec)
diff --git a/lib/spack/spack/operating_systems/cray_frontend.py b/lib/spack/spack/operating_systems/cray_frontend.py
new file mode 100644
index 0000000000..bf3b76faf2
--- /dev/null
+++ b/lib/spack/spack/operating_systems/cray_frontend.py
@@ -0,0 +1,76 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import os
+
+from spack.operating_systems.linux_distro import LinuxDistro
+from spack.util.module_cmd import get_module_cmd
+
+
+class CrayFrontend(LinuxDistro):
+ """Represents OS that runs on login and service nodes of the Cray platform.
+ It acts as a regular Linux without Cray-specific modules and compiler
+ wrappers."""
+
+ def find_compilers(self, *paths):
+ """Calls the overridden method but prevents it from detecting Cray
+ compiler wrappers to avoid possible false detections. The detected
+ compilers come into play only if a user decides to work with the Cray's
+ frontend OS as if it was a regular Linux environment."""
+
+ env_bu = None
+
+ # We rely on the fact that the PrgEnv-* modules set the PE_ENV
+ # environment variable.
+ if 'PE_ENV' in os.environ:
+ # Copy environment variables to restore them after the compiler
+ # detection. We expect that the only thing PrgEnv-* modules do is
+ # the environment variables modifications.
+ env_bu = os.environ.copy()
+
+ # Get the name of the module from the environment variable.
+ prg_env = 'PrgEnv-' + os.environ['PE_ENV'].lower()
+
+ # Unload the PrgEnv-* module. By doing this we intentionally
+ # provoke errors when the Cray's compiler wrappers are executed
+ # (Error: A PrgEnv-* modulefile must be loaded.) so they will not
+ # be detected as valid compilers by the overridden method. We also
+ # expect that the modules that add the actual compilers' binaries
+ # into the PATH environment variable (i.e. the following modules:
+ # 'intel', 'cce', 'gcc', etc.) will also be unloaded since they are
+ # specified as prerequisites in the PrgEnv-* modulefiles.
+ modulecmd = get_module_cmd()
+ exec (compile(
+ modulecmd('unload', prg_env, output=str, error=os.devnull),
+ '<string>', 'exec'))
+
+ # Call the overridden method.
+ clist = super(CrayFrontend, self).find_compilers(*paths)
+
+ # Restore the environment.
+ if env_bu is not None:
+ os.environ.clear()
+ os.environ.update(env_bu)
+
+ return clist
diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py
index 0e97317b1b..276235d18b 100644
--- a/lib/spack/spack/operating_systems/linux_distro.py
+++ b/lib/spack/spack/operating_systems/linux_distro.py
@@ -48,6 +48,11 @@ class LinuxDistro(OperatingSystem):
# grab the first legal identifier in the version field. On
# debian you get things like 'wheezy/sid'; sid means unstable.
# We just record 'wheezy' and don't get quite so detailed.
- version = re.split(r'[^\w-]', version)[0]
+ version = re.split(r'[^\w-]', version)
+
+ if 'ubuntu' in distname:
+ version = '.'.join(version[0:2])
+ else:
+ version = version[0]
super(LinuxDistro, self).__init__(distname, version)
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index dc23f6351f..b3d619f6f3 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -58,6 +58,7 @@ import spack.mirror
import spack.repository
import spack.url
import spack.util.web
+import spack.multimethod
from llnl.util.filesystem import *
from llnl.util.lang import *
@@ -185,10 +186,9 @@ class PackageMeta(spack.directives.DirectiveMetaMixin):
# Clear the attribute for the next class
setattr(mcs, attr_name, {})
- # Preconditions
_flush_callbacks('run_before')
- # Sanity checks
_flush_callbacks('run_after')
+
return super(PackageMeta, mcs).__new__(mcs, name, bases, attr_dict)
@staticmethod
@@ -483,38 +483,72 @@ class PackageBase(with_metaclass(PackageMeta, object)):
#
# These are default values for instance variables.
#
- """By default we build in parallel. Subclasses can override this."""
+
+ #: By default we build in parallel. Subclasses can override this.
parallel = True
- """# jobs to use for parallel make. If set, overrides default of ncpus."""
+ #: # jobs to use for parallel make. If set, overrides default of ncpus.
make_jobs = spack.build_jobs
- """By default do not run tests within package's install()"""
+ #: By default do not run tests within package's install()
run_tests = False
# FIXME: this is a bad object-oriented design, should be moved to Clang.
- """By default do not setup mockup XCode on macOS with Clang"""
+ #: By default do not setup mockup XCode on macOS with Clang
use_xcode = False
- """Most packages are NOT extendable. Set to True if you want extensions."""
+ #: Most packages are NOT extendable. Set to True if you want extensions.
extendable = False
- """When True, add RPATHs for the entire DAG. When False, add RPATHs only
- for immediate dependencies."""
+ #: When True, add RPATHs for the entire DAG. When False, add RPATHs only
+ #: for immediate dependencies.
transitive_rpaths = True
- """List of prefix-relative file paths (or a single path). If these do
- not exist after install, or if they exist but are not files,
- sanity checks fail.
- """
+ #: List of prefix-relative file paths (or a single path). If these do
+ #: not exist after install, or if they exist but are not files,
+ #: sanity checks fail.
sanity_check_is_file = []
- """List of prefix-relative directory paths (or a single path). If
- these do not exist after install, or if they exist but are not
- directories, sanity checks will fail.
- """
+ #: List of prefix-relative directory paths (or a single path). If
+ #: these do not exist after install, or if they exist but are not
+ #: directories, sanity checks will fail.
sanity_check_is_dir = []
+ #
+ # Set default licensing information
+ #
+
+ #: Boolean. If set to ``True``, this software requires a license.
+ #: If set to ``False``, all of the ``license_*`` attributes will
+ #: be ignored. Defaults to ``False``.
+ license_required = False
+
+ #: String. Contains the symbol used by the license manager to denote
+ #: a comment. Defaults to ``#``.
+ license_comment = '#'
+
+ #: List of strings. These are files that the software searches for when
+ #: looking for a license. All file paths must be relative to the
+ #: installation directory. More complex packages like Intel may require
+ #: multiple licenses for individual components. Defaults to the empty list.
+ license_files = []
+
+ #: List of strings. Environment variables that can be set to tell the
+ #: software where to look for a license if it is not in the usual location.
+ #: Defaults to the empty list.
+ license_vars = []
+
+ #: String. A URL pointing to license setup instructions for the software.
+ #: Defaults to the empty string.
+ license_url = ''
+
+ # Verbosity level, preserved across installs.
+ _verbose = None
+
+ #: List of strings which contains GitHub usernames of package maintainers.
+ #: Do not include @ here in order not to unnecessarily ping the users.
+ maintainers = []
+
def __init__(self, spec):
# this determines how the package should be built.
self.spec = spec
@@ -568,22 +602,6 @@ class PackageBase(with_metaclass(PackageMeta, object)):
if not hasattr(self, 'list_depth'):
self.list_depth = 0
- # Set default licensing information
- if not hasattr(self, 'license_required'):
- self.license_required = False
-
- if not hasattr(self, 'license_comment'):
- self.license_comment = '#'
-
- if not hasattr(self, 'license_files'):
- self.license_files = []
-
- if not hasattr(self, 'license_vars'):
- self.license_vars = []
-
- if not hasattr(self, 'license_url'):
- self.license_url = None
-
# Set up some internal variables for timing.
self._fetch_time = 0.0
self._total_time = 0.0
@@ -593,17 +611,31 @@ class PackageBase(with_metaclass(PackageMeta, object)):
self.extra_args = {}
- def possible_dependencies(self, visited=None):
- """Return set of possible transitive dependencies of this package."""
+ def possible_dependencies(self, transitive=True, visited=None):
+ """Return set of possible transitive dependencies of this package.
+
+ Args:
+ transitive (bool): include all transitive dependencies if True,
+ only direct dependencies if False.
+ """
if visited is None:
visited = set()
visited.add(self.name)
for name in self.dependencies:
- if name not in visited and not spack.spec.Spec(name).virtual:
- pkg = spack.repo.get(name)
- for name in pkg.possible_dependencies(visited):
- visited.add(name)
+ spec = spack.spec.Spec(name)
+
+ if not spec.virtual:
+ visited.add(name)
+ if transitive:
+ pkg = spack.repo.get(name)
+ pkg.possible_dependencies(transitive, visited)
+ else:
+ for provider in spack.repo.providers_for(spec):
+ visited.add(provider.name)
+ if transitive:
+ pkg = spack.repo.get(provider.name)
+ pkg.possible_dependencies(transitive, visited)
return visited
@@ -732,10 +764,6 @@ class PackageBase(with_metaclass(PackageMeta, object)):
# Append the item to the composite
composite_stage.append(stage)
- # Create stage on first access. Needed because fetch, stage,
- # patch, and install can be called independently of each
- # other, so `with self.stage:` in do_install isn't sufficient.
- composite_stage.create()
return composite_stage
@property
@@ -744,6 +772,12 @@ class PackageBase(with_metaclass(PackageMeta, object)):
raise ValueError("Can only get a stage for a concrete package.")
if self._stage is None:
self._stage = self._make_stage()
+
+ # Create stage on first access. Needed because fetch, stage,
+ # patch, and install can be called independently of each
+ # other, so `with self.stage:` in do_install isn't sufficient.
+ self._stage.create()
+
return self._stage
@stage.setter
@@ -904,7 +938,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
start_time = time.time()
if spack.do_checksum and self.version not in self.versions:
tty.warn("There is no checksum on file to fetch %s safely." %
- self.spec.format('$_$@'))
+ self.spec.cformat('$_$@'))
# Ask the user whether to skip the checksum if we're
# interactive, but just fail if non-interactive.
@@ -939,10 +973,6 @@ class PackageBase(with_metaclass(PackageMeta, object)):
self.stage.expand_archive()
self.stage.chdir_to_source()
- def patch(self):
- """Default patch implementation is a no-op."""
- pass
-
def do_patch(self):
"""Calls do_stage(), then applied patches to the expanded tarball if they
haven't been applied already."""
@@ -1003,6 +1033,10 @@ class PackageBase(with_metaclass(PackageMeta, object)):
self.patch()
tty.msg("Ran patch() for %s" % self.name)
patched = True
+ except spack.multimethod.NoSuchMethodError:
+ # We are running a multimethod without a default case.
+ # If there's no default it means we don't need to patch.
+ tty.msg("No patches needed for %s" % self.name)
except:
tty.msg("patch() function failed for %s" % self.name)
touch(bad_file)
@@ -1065,12 +1099,30 @@ class PackageBase(with_metaclass(PackageMeta, object)):
matches = [line for line in f.readlines() if regex.match(line)]
if not matches:
- tty.msg('Target \'' + target + ':\' not found in Makefile')
+ tty.msg("Target '" + target + ":' not found in Makefile")
return
# Execute target
inspect.getmodule(self).make(target)
+ def _if_ninja_target_execute(self, target):
+ # Check if we have a ninja build script
+ if not os.path.exists('build.ninja'):
+ tty.msg('No ninja build script found in the build directory')
+ return
+
+ # Check if 'target' is in the ninja build script
+ regex = re.compile('^build ' + target + ':')
+ with open('build.ninja', 'r') as f:
+ matches = [line for line in f.readlines() if regex.match(line)]
+
+ if not matches:
+ tty.msg("Target 'build " + target + ":' not found in build.ninja")
+ return
+
+ # Execute target
+ inspect.getmodule(self).ninja(target)
+
def _get_needed_resources(self):
resources = []
# Select the resources that are needed for this build
@@ -1145,6 +1197,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
def do_install(self,
keep_prefix=False,
keep_stage=False,
+ install_source=False,
install_deps=True,
skip_patch=False,
verbose=False,
@@ -1165,6 +1218,8 @@ class PackageBase(with_metaclass(PackageMeta, object)):
keep_stage (bool): By default, stage is destroyed only if there
are no exceptions during build. Set to True to keep the stage
even with exceptions.
+ install_source (bool): By default, source is not installed, but
+ for debugging it might be useful to keep it around.
install_deps (bool): Install dependencies before installing this
package
skip_patch (bool): Skip patch stage of build if True.
@@ -1203,10 +1258,6 @@ class PackageBase(with_metaclass(PackageMeta, object)):
rec = spack.store.db.get_record(self.spec)
return self._update_explicit_entry_in_db(rec, explicit)
- # Dirty argument takes precedence over dirty config setting.
- if dirty is None:
- dirty = spack.dirty
-
self._do_install_pop_kwargs(kwargs)
# First, install dependencies recursively.
@@ -1216,6 +1267,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
dep.package.do_install(
keep_prefix=keep_prefix,
keep_stage=keep_stage,
+ install_source=install_source,
install_deps=install_deps,
fake=fake,
skip_patch=skip_patch,
@@ -1235,22 +1287,14 @@ class PackageBase(with_metaclass(PackageMeta, object)):
self.make_jobs = make_jobs
# Then install the package itself.
- def build_process(input_stream):
- """Forked for each build. Has its own process and python
- module space set up by build_environment.fork()."""
-
- # We are in the child process. This means that our sys.stdin is
- # equal to open(os.devnull). Python did this to prevent our process
- # and the parent process from possible simultaneous reading from
- # the original standard input. But we assume that the parent
- # process is not going to read from it till we are done here,
- # otherwise it should not have passed us the copy of the stream.
- # Thus, we are free to work with the the copy (input_stream)
- # however we want. For example, we might want to call functions
- # (e.g. input()) that implicitly read from whatever stream is
- # assigned to sys.stdin. Since we want them to work with the
- # original input stream, we are making the following assignment:
- sys.stdin = input_stream
+ def build_process():
+ """This implements the process forked for each build.
+
+ Has its own process and python module space set up by
+ build_environment.fork().
+
+ This function's return value is returned to the parent process.
+ """
start_time = time.time()
if not fake:
@@ -1263,6 +1307,11 @@ class PackageBase(with_metaclass(PackageMeta, object)):
'Building {0} [{1}]'.format(self.name, self.build_system_class)
)
+ # get verbosity from do_install() parameter or saved value
+ echo = verbose
+ if PackageBase._verbose is not None:
+ echo = PackageBase._verbose
+
self.stage.keep = keep_stage
with self._stage_and_write_lock():
# Run the pre-install hook in the child process after
@@ -1271,6 +1320,13 @@ class PackageBase(with_metaclass(PackageMeta, object)):
if fake:
self.do_fake_install()
else:
+ source_path = self.stage.source_path
+ if install_source and os.path.isdir(source_path):
+ src_target = join_path(
+ self.spec.prefix, 'share', self.name, 'src')
+ tty.msg('Copying source to {0}'.format(src_target))
+ install_tree(self.stage.source_path, src_target)
+
# Do the real install in the source directory.
self.stage.chdir_to_source()
@@ -1288,23 +1344,18 @@ class PackageBase(with_metaclass(PackageMeta, object)):
# Spawn a daemon that reads from a pipe and redirects
# everything to log_path
- redirection_context = log_output(
- log_path,
- echo=verbose,
- force_color=sys.stdout.isatty(),
- debug=True,
- input_stream=input_stream
- )
- with redirection_context as log_redirection:
- for phase_name, phase in zip(
+ with log_output(log_path, echo, True) as logger:
+ for phase_name, phase_attr in zip(
self.phases, self._InstallPhase_phases):
- tty.msg(
- 'Executing phase : \'{0}\''.format(phase_name)
- )
+
+ with logger.force_echo():
+ tty.msg("Executing phase: '%s'" % phase_name)
+
# Redirect stdout and stderr to daemon pipe
- with log_redirection:
- getattr(self, phase)(
- self.spec, self.prefix)
+ phase = getattr(self, phase_attr)
+ phase(self.spec, self.prefix)
+
+ echo = logger.echo
self.log()
# Run post install hooks before build stage is removed.
spack.hooks.post_install(self.spec)
@@ -1319,12 +1370,19 @@ class PackageBase(with_metaclass(PackageMeta, object)):
_hms(self._total_time)))
print_pkg(self.prefix)
+ # preserve verbosity across runs
+ return echo
+
try:
# Create the install prefix and fork the build process.
if not os.path.exists(self.prefix):
spack.store.layout.create_install_directory(self.spec)
+
# Fork a child to do the actual installation
- spack.build_environment.fork(self, build_process, dirty=dirty)
+ # we preserve verbosity settings across installs.
+ PackageBase._verbose = spack.build_environment.fork(
+ self, build_process, dirty=dirty)
+
# If we installed then we should keep the prefix
keep_prefix = self.last_phase is None or keep_prefix
# note: PARENT of the build process adds the new package to
@@ -1349,6 +1407,11 @@ class PackageBase(with_metaclass(PackageMeta, object)):
if not keep_prefix:
self.remove_prefix()
+ # The subprocess *may* have removed the build stage. Mark it
+ # not created so that the next time self.stage is invoked, we
+ # check the filesystem for it.
+ self.stage.created = False
+
def check_for_unfinished_installation(
self, keep_prefix=False, restage=False):
"""Check for leftover files from partially-completed prior install to
@@ -1399,12 +1462,9 @@ class PackageBase(with_metaclass(PackageMeta, object)):
def log(self):
# Copy provenance into the install directory on success
- log_install_path = spack.store.layout.build_log_path(
- self.spec)
- env_install_path = spack.store.layout.build_env_path(
- self.spec)
- packages_dir = spack.store.layout.build_packages_path(
- self.spec)
+ log_install_path = spack.store.layout.build_log_path(self.spec)
+ env_install_path = spack.store.layout.build_env_path(self.spec)
+ packages_dir = spack.store.layout.build_packages_path(self.spec)
# Remove first if we're overwriting another build
# (can happen with spack setup)
@@ -1572,7 +1632,8 @@ class PackageBase(with_metaclass(PackageMeta, object)):
raise InstallError(str(spec) + " is not installed.")
if not force:
- dependents = spack.store.db.installed_dependents(spec)
+ dependents = spack.store.db.installed_relatives(
+ spec, 'parents', True)
if dependents:
raise PackageStillNeededError(spec, dependents)
@@ -1648,8 +1709,9 @@ class PackageBase(with_metaclass(PackageMeta, object)):
self.extendee_spec.package.activate(self, **self.extendee_args)
spack.store.layout.add_extension(self.extendee_spec, self.spec)
- tty.msg("Activated extension %s for %s" %
- (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@")))
+ tty.msg(
+ "Activated extension %s for %s" %
+ (self.spec.short_spec, self.extendee_spec.cformat("$_$@$+$%@")))
def dependency_activations(self):
return (spec for spec in self.spec.traverse(root=False, deptype='run')
@@ -1707,8 +1769,9 @@ class PackageBase(with_metaclass(PackageMeta, object)):
spack.store.layout.remove_extension(
self.extendee_spec, self.spec)
- tty.msg("Deactivated extension %s for %s" %
- (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@")))
+ tty.msg(
+ "Deactivated extension %s for %s" %
+ (self.spec.short_spec, self.extendee_spec.cformat("$_$@$+$%@")))
def deactivate(self, extension, **kwargs):
"""Unlinks all files from extension out of this package's install dir.
diff --git a/lib/spack/spack/package_prefs.py b/lib/spack/spack/package_prefs.py
index 2e70a3b7dc..56efb604b1 100644
--- a/lib/spack/spack/package_prefs.py
+++ b/lib/spack/spack/package_prefs.py
@@ -112,9 +112,17 @@ class PackagePrefs(object):
# integer is the index of the first spec in order that satisfies
# spec, or it's a number larger than any position in the order.
- return next(
+ match_index = next(
(i for i, s in enumerate(spec_order) if spec.satisfies(s)),
len(spec_order))
+ if match_index < len(spec_order) and spec_order[match_index] == spec:
+ # If this is called with multiple specs that all satisfy the same
+ # minimum index in spec_order, the one which matches that element
+ # of spec_order exactly is considered slightly better. Note
+ # that because this decreases the value by less than 1, it is not
+ # better than a match which occurs at an earlier index.
+ match_index -= 0.5
+ return match_index
@classproperty
@classmethod
diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py
index 78bb15f41c..5742f312ce 100644
--- a/lib/spack/spack/patch.py
+++ b/lib/spack/spack/patch.py
@@ -23,16 +23,28 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
+import os.path
+import inspect
import spack
import spack.error
-import spack.stage
import spack.fetch_strategy as fs
-
+import spack.stage
from llnl.util.filesystem import join_path
from spack.util.executable import which
+def absolute_path_for_package(pkg):
+ """Returns the absolute path to the ``package.py`` file implementing
+ the recipe for the package passed as argument.
+
+ Args:
+ pkg: a valid package object
+ """
+ m = inspect.getmodule(pkg)
+ return os.path.abspath(m.__file__)
+
+
class Patch(object):
"""Base class to describe a patch that needs to be applied to some
expanded source code.
@@ -90,7 +102,7 @@ class FilePatch(Patch):
def __init__(self, pkg, path_or_url, level):
super(FilePatch, self).__init__(pkg, path_or_url, level)
- pkg_dir = spack.repo.dirname_for_package_name(pkg.name)
+ pkg_dir = os.path.dirname(absolute_path_for_package(pkg))
self.path = join_path(pkg_dir, path_or_url)
if not os.path.isfile(self.path):
raise NoSuchPatchFileError(pkg.name, self.path)
@@ -119,7 +131,10 @@ class UrlPatch(Patch):
patch_stage.fetch()
patch_stage.check()
patch_stage.cache_local()
- patch_stage.expand_archive()
+
+ if spack.util.compression.allowed_archive(self.url):
+ patch_stage.expand_archive()
+
self.path = os.path.abspath(
os.listdir(patch_stage.path).pop()
)
diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py
index 9a7301d1f8..411eb32b1c 100644
--- a/lib/spack/spack/platforms/cray.py
+++ b/lib/spack/spack/platforms/cray.py
@@ -28,7 +28,7 @@ import llnl.util.tty as tty
from spack import build_env_path
from spack.util.executable import which
from spack.architecture import Platform, Target, NoPlatformError
-from spack.operating_systems.linux_distro import LinuxDistro
+from spack.operating_systems.cray_frontend import CrayFrontend
from spack.operating_systems.cnl import Cnl
from llnl.util.filesystem import join_path
from spack.util.module_cmd import get_module_cmd
@@ -88,7 +88,7 @@ class Cray(Platform):
else:
raise NoPlatformError()
- front_distro = LinuxDistro()
+ front_distro = CrayFrontend()
back_distro = Cnl()
self.default_os = str(back_distro)
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
new file mode 100644
index 0000000000..b4251d05ca
--- /dev/null
+++ b/lib/spack/spack/relocate.py
@@ -0,0 +1,289 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import os
+import platform
+import re
+import spack
+import spack.cmd
+from spack.util.executable import Executable
+from llnl.util.filesystem import filter_file
+import llnl.util.tty as tty
+
+
+def get_patchelf():
+ """
+ Builds and installs spack patchelf package on linux platforms
+ using the first concretized spec.
+ Returns the full patchelf binary path.
+ """
+ # as we may need patchelf, find out where it is
+ if platform.system() == 'Darwin':
+ return None
+ patchelf_spec = spack.cmd.parse_specs("patchelf", concretize=True)[0]
+ patchelf = spack.repo.get(patchelf_spec)
+ if not patchelf.installed:
+ patchelf.do_install()
+ patchelf_executable = os.path.join(patchelf.prefix.bin, "patchelf")
+ return patchelf_executable
+
+
+def get_existing_elf_rpaths(path_name):
+ """
+ Return the RPATHS returned by patchelf --print-rpath path_name
+ as a list of strings.
+ """
+ if platform.system() == 'Linux':
+ command = Executable(get_patchelf())
+ output = command('--print-rpath', '%s' %
+ path_name, output=str, err=str)
+ return output.rstrip('\n').split(':')
+ else:
+ tty.die('relocation not supported for this platform')
+ return
+
+
+def get_relative_rpaths(path_name, orig_dir, orig_rpaths):
+ """
+ Replaces orig_dir with relative path from dirname(path_name) if an rpath
+ in orig_rpaths contains orig_path. Prefixes $ORIGIN
+ to relative paths and returns replacement rpaths.
+ """
+ rel_rpaths = []
+ for rpath in orig_rpaths:
+ if re.match(orig_dir, rpath):
+ rel = os.path.relpath(rpath, start=os.path.dirname(path_name))
+ rel_rpaths.append('$ORIGIN/%s' % rel)
+ else:
+ rel_rpaths.append(rpath)
+ return rel_rpaths
+
+
+def macho_get_paths(path_name):
+ """
+ Examines the output of otool -l path_name for these three fields:
+ LC_ID_DYLIB, LC_LOAD_DYLIB, LC_RPATH and parses out the rpaths,
+ dependiencies and library id.
+ Returns these values.
+ """
+ otool = Executable('otool')
+ output = otool("-l", path_name, output=str, err=str)
+ last_cmd = None
+ idpath = ''
+ rpaths = []
+ deps = []
+ for line in output.split('\n'):
+ match = re.search('( *[a-zA-Z]+ )(.*)', line)
+ if match:
+ lhs = match.group(1).lstrip().rstrip()
+ rhs = match.group(2)
+ match2 = re.search('(.*) \(.*\)', rhs)
+ if match2:
+ rhs = match2.group(1)
+ if lhs == 'cmd':
+ last_cmd = rhs
+ if lhs == 'path' and last_cmd == 'LC_RPATH':
+ rpaths.append(rhs)
+ if lhs == 'name' and last_cmd == 'LC_ID_DYLIB':
+ idpath = rhs
+ if lhs == 'name' and last_cmd == 'LC_LOAD_DYLIB':
+ deps.append(rhs)
+ return rpaths, deps, idpath
+
+
+def macho_make_paths_relative(path_name, old_dir, rpaths, deps, idpath):
+ """
+ Replace old_dir with relative path from dirname(path_name)
+ in rpaths and deps; idpaths are replaced with @rpath/basebane(path_name);
+ replacement are returned.
+ """
+ id = None
+ nrpaths = []
+ ndeps = []
+ if idpath:
+ id = '@rpath/%s' % os.path.basename(idpath)
+ for rpath in rpaths:
+ if re.match(old_dir, rpath):
+ rel = os.path.relpath(rpath, start=os.path.dirname(path_name))
+ nrpaths.append('@loader_path/%s' % rel)
+ else:
+ nrpaths.append(rpath)
+ for dep in deps:
+ if re.match(old_dir, dep):
+ rel = os.path.relpath(dep, start=os.path.dirname(path_name))
+ ndeps.append('@loader_path/%s' % rel)
+ else:
+ ndeps.append(dep)
+ return nrpaths, ndeps, id
+
+
+def macho_replace_paths(old_dir, new_dir, rpaths, deps, idpath):
+ """
+ Replace old_dir with new_dir in rpaths, deps and idpath
+ and return replacements
+ """
+ id = None
+ nrpaths = []
+ ndeps = []
+ if idpath:
+ id = idpath.replace(old_dir, new_dir)
+ for rpath in rpaths:
+ nrpath = rpath.replace(old_dir, new_dir)
+ nrpaths.append(nrpath)
+ for dep in deps:
+ ndep = dep.replace(old_dir, new_dir)
+ ndeps.append(ndep)
+ return nrpaths, ndeps, id
+
+
+def modify_macho_object(path_name, old_dir, new_dir, relative):
+ """
+ Modify MachO binary path_name by replacing old_dir with new_dir
+ or the relative path to spack install root.
+ The old install dir in LC_ID_DYLIB is replaced with the new install dir
+ using install_name_tool -id newid binary
+ The old install dir in LC_LOAD_DYLIB is replaced with the new install dir
+ using install_name_tool -change old new binary
+ The old install dir in LC_RPATH is replaced with the new install dir using
+ install_name_tool -rpath old new binary
+ """
+ # avoid error message for libgcc_s
+ if 'libgcc_' in path_name:
+ return
+ rpaths, deps, idpath = macho_get_paths(path_name)
+ id = None
+ nrpaths = []
+ ndeps = []
+ if relative:
+ nrpaths, ndeps, id = macho_make_paths_relative(path_name,
+ old_dir, rpaths,
+ deps, idpath)
+ else:
+ nrpaths, ndeps, id = macho_replace_paths(old_dir, new_dir, rpaths,
+ deps, idpath)
+ install_name_tool = Executable('install_name_tool')
+ if id:
+ install_name_tool('-id', id, path_name, output=str, err=str)
+
+ for orig, new in zip(deps, ndeps):
+ install_name_tool('-change', orig, new, path_name)
+
+ for orig, new in zip(rpaths, nrpaths):
+ install_name_tool('-rpath', orig, new, path_name)
+ return
+
+
+def get_filetype(path_name):
+ """
+ Return the output of file path_name as a string to identify file type.
+ """
+ file = Executable('file')
+ file.add_default_env('LC_ALL', 'C')
+ output = file('-b', '-h', '%s' % path_name,
+ output=str, err=str)
+ return output.strip()
+
+
+def modify_elf_object(path_name, orig_rpath, new_rpath):
+ """
+ Replace orig_rpath with new_rpath in RPATH of elf object path_name
+ """
+ if platform.system() == 'Linux':
+ new_joined = ':'.join(new_rpath)
+ patchelf = Executable(get_patchelf())
+ patchelf('--force-rpath', '--set-rpath', '%s' % new_joined,
+ '%s' % path_name, output=str, cmd=str)
+ else:
+ tty.die('relocation not supported for this platform')
+
+
+def needs_binary_relocation(filetype):
+ """
+ Check whether the given filetype is a binary that may need relocation.
+ """
+ retval = False
+ if "relocatable" in filetype:
+ return False
+ if platform.system() == 'Darwin':
+ return ('Mach-O' in filetype)
+ elif platform.system() == 'Linux':
+ return ('ELF' in filetype)
+ else:
+ tty.die("Relocation not implemented for %s" % platform.system())
+ return retval
+
+
+def needs_text_relocation(filetype):
+ """
+ Check whether the given filetype is text that may need relocation.
+ """
+ return ("text" in filetype)
+
+
+def relocate_binary(path_name, old_dir, new_dir):
+ """
+ Change old_dir to new_dir in RPATHs of elf or mach-o file path_name
+ """
+ if platform.system() == 'Darwin':
+ modify_macho_object(path_name, old_dir, new_dir, relative=False)
+ elif platform.system() == 'Linux':
+ orig_rpaths = get_existing_elf_rpaths(path_name)
+ new_rpaths = substitute_rpath(orig_rpaths, old_dir, new_dir)
+ modify_elf_object(path_name, orig_rpaths, new_rpaths)
+ else:
+ tty.die("Relocation not implemented for %s" % platform.system())
+
+
+def make_binary_relative(path_name, old_dir):
+ """
+ Make RPATHs relative to old_dir in given elf or mach-o file path_name
+ """
+ if platform.system() == 'Darwin':
+ new_dir = ''
+ modify_macho_object(path_name, old_dir, new_dir, relative=True)
+ elif platform.system() == 'Linux':
+ orig_rpaths = get_existing_elf_rpaths(path_name)
+ new_rpaths = get_relative_rpaths(path_name, old_dir, orig_rpaths)
+ modify_elf_object(path_name, orig_rpaths, new_rpaths)
+ else:
+ tty.die("Prelocation not implemented for %s" % platform.system())
+
+
+def relocate_text(path_name, old_dir, new_dir):
+ """
+ Replace old path with new path in text file path_name
+ """
+ filter_file("r'%s'" % old_dir, "r'%s'" % new_dir, path_name)
+
+
+def substitute_rpath(orig_rpath, topdir, new_root_path):
+ """
+ Replace topdir with new_root_path RPATH list orig_rpath
+ """
+ new_rpaths = []
+ for path in orig_rpath:
+ new_rpath = path.replace(topdir, new_root_path)
+ new_rpaths.append(new_rpath)
+ return new_rpaths
diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py
index abcb8d6051..73b59ea3c7 100644
--- a/lib/spack/spack/schema/config.py
+++ b/lib/spack/spack/schema/config.py
@@ -38,7 +38,6 @@ schema = {
'config': {
'type': 'object',
'default': {},
- 'additionalProperties': False,
'properties': {
'install_tree': {'type': 'string'},
'install_hash_length': {'type': 'integer', 'minimum': 1},
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index db8dcf61a8..7bc0dce12a 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -108,6 +108,10 @@ from six import StringIO
from six import string_types
from six import iteritems
+from llnl.util.filesystem import find_headers, find_libraries, is_exe
+from llnl.util.lang import *
+from llnl.util.tty.color import *
+
import spack
import spack.architecture
import spack.compilers as compilers
@@ -117,9 +121,6 @@ import spack.store
import spack.util.spack_json as sjson
import spack.util.spack_yaml as syaml
-from llnl.util.filesystem import find_headers, find_libraries, is_exe
-from llnl.util.lang import *
-from llnl.util.tty.color import *
from spack.util.module_cmd import get_path_from_module, load_module
from spack.error import SpecError, UnsatisfiableSpecError
from spack.provider_index import ProviderIndex
@@ -136,7 +137,6 @@ __all__ = [
'Spec',
'alldeps',
'canonical_deptype',
- 'validate_deptype',
'parse',
'parse_anonymous_spec',
'SpecError',
@@ -149,7 +149,6 @@ __all__ = [
'DuplicateArchitectureError',
'InconsistentSpecError',
'InvalidDependencyError',
- 'InvalidDependencyTypeError',
'NoProviderError',
'MultipleProviderError',
'UnsatisfiableSpecError',
@@ -166,21 +165,20 @@ __all__ = [
'NoSuchHashError',
'RedundantSpecError']
-# Valid pattern for an identifier in Spack
+#: Valid pattern for an identifier in Spack
identifier_re = r'\w[\w-]*'
-# Convenient names for color formats so that other things can use them
-compiler_color = '@g'
-version_color = '@c'
-architecture_color = '@m'
-enabled_variant_color = '@B'
-disabled_variant_color = '@r'
-dependency_color = '@.'
-hash_color = '@K'
-
-"""This map determines the coloring of specs when using color output.
- We make the fields different colors to enhance readability.
- See spack.color for descriptions of the color codes. """
+compiler_color = '@g' #: color for highlighting compilers
+version_color = '@c' #: color for highlighting versions
+architecture_color = '@m' #: color for highlighting architectures
+enabled_variant_color = '@B' #: color for highlighting enabled variants
+disabled_variant_color = '@r' #: color for highlighting disabled varaints
+dependency_color = '@.' #: color for highlighting dependencies
+hash_color = '@K' #: color for highlighting package hashes
+
+#: This map determines the coloring of specs when using color output.
+#: We make the fields different colors to enhance readability.
+#: See spack.color for descriptions of the color codes.
color_formats = {'%': compiler_color,
'@': version_color,
'=': architecture_color,
@@ -189,51 +187,36 @@ color_formats = {'%': compiler_color,
'^': dependency_color,
'#': hash_color}
-"""Regex used for splitting by spec field separators."""
-_separators = '[%s]' % ''.join(color_formats.keys())
+#: Regex used for splitting by spec field separators.
+#: These need to be escaped to avoid metacharacters in
+#: ``color_formats.keys()``.
+_separators = '[\\%s]' % '\\'.join(color_formats.keys())
-"""Versionlist constant so we don't have to build a list
- every time we call str()"""
+#: Versionlist constant so we don't have to build a list
+#: every time we call str()
_any_version = VersionList([':'])
-# Special types of dependencies.
+#: Types of dependencies that Spack understands.
alldeps = ('build', 'link', 'run')
-norun = ('link', 'build')
-special_types = {
- 'alldeps': alldeps,
- 'all': alldeps, # allow "all" as string but not symbol.
- 'norun': norun,
-}
-legal_deps = tuple(special_types) + alldeps
-
-"""Max integer helps avoid passing too large a value to cyaml."""
+#: Max integer helps avoid passing too large a value to cyaml.
maxint = 2 ** (ctypes.sizeof(ctypes.c_int) * 8 - 1) - 1
-def validate_deptype(deptype):
- if isinstance(deptype, str):
- if deptype not in legal_deps:
- raise InvalidDependencyTypeError(
- "Invalid dependency type: %s" % deptype)
-
- elif isinstance(deptype, (list, tuple)):
- for t in deptype:
- validate_deptype(t)
-
- elif deptype is None:
- raise InvalidDependencyTypeError("deptype cannot be None!")
-
-
def canonical_deptype(deptype):
- if deptype is None:
+ if deptype in (None, 'all', all):
return alldeps
elif isinstance(deptype, string_types):
- return special_types.get(deptype, (deptype,))
+ if deptype not in alldeps:
+ raise ValueError('Invalid dependency type: %s' % deptype)
+ return (deptype,)
elif isinstance(deptype, (tuple, list)):
- return (sum((canonical_deptype(d) for d in deptype), ()))
+ invalid = next((d for d in deptype if d not in alldeps), None)
+ if invalid:
+ raise ValueError('Invalid dependency type: %s' % invalid)
+ return tuple(sorted(deptype))
return deptype
@@ -820,7 +803,18 @@ def _libs_default_handler(descriptor, spec, cls):
Raises:
RuntimeError: If no libraries are found
"""
- name = 'lib' + spec.name
+
+ # Variable 'name' is passed to function 'find_libraries', which supports
+ # glob characters. For example, we have a package with a name 'abc-abc'.
+ # Now, we don't know if the original name of the package is 'abc_abc'
+ # (and it generates a library 'libabc_abc.so') or 'abc-abc' (and it
+ # generates a library 'libabc-abc.so'). So, we tell the function
+ # 'find_libraries' to give us anything that matches 'libabc?abc' and it
+ # gives us either 'libabc-abc.so' or 'libabc_abc.so' (or an error)
+ # depending on which one exists (there is a possibility, of course, to
+ # get something like 'libabcXabc.so, but for now we consider this
+ # unlikely).
+ name = 'lib' + spec.name.replace('-', '?')
if '+shared' in spec:
libs = find_libraries(
@@ -977,7 +971,159 @@ class SpecBuildInterface(ObjectWrapper):
@key_ordering
class Spec(object):
- def __init__(self, spec_like, *dep_like, **kwargs):
+ @staticmethod
+ def from_literal(spec_dict, normal=True):
+ """Builds a Spec from a dictionary containing the spec literal.
+
+ The dictionary must have a single top level key, representing the root,
+ and as many secondary level keys as needed in the spec.
+
+ The keys can be either a string or a Spec or a tuple containing the
+ Spec and the dependency types.
+
+ Args:
+ spec_dict (dict): the dictionary containing the spec literal
+ normal (bool): if True the same key appearing at different levels
+ of the ``spec_dict`` will map to the same object in memory.
+
+ Examples:
+ A simple spec ``foo`` with no dependencies:
+
+ .. code-block:: python
+
+ {'foo': None}
+
+ A spec ``foo`` with a ``(build, link)`` dependency ``bar``:
+
+ .. code-block:: python
+
+ {'foo':
+ {'bar:build,link': None}}
+
+ A spec with a diamond dependency and various build types:
+
+ .. code-block:: python
+
+ {'dt-diamond': {
+ 'dt-diamond-left:build,link': {
+ 'dt-diamond-bottom:build': None
+ },
+ 'dt-diamond-right:build,link': {
+ 'dt-diamond-bottom:build,link,run': None
+ }
+ }}
+
+ The same spec with a double copy of ``dt-diamond-bottom`` and
+ no diamond structure:
+
+ .. code-block:: python
+
+ {'dt-diamond': {
+ 'dt-diamond-left:build,link': {
+ 'dt-diamond-bottom:build': None
+ },
+ 'dt-diamond-right:build,link': {
+ 'dt-diamond-bottom:build,link,run': None
+ }
+ }, normal=False}
+
+ Constructing a spec using a Spec object as key:
+
+ .. code-block:: python
+
+ mpich = Spec('mpich')
+ libelf = Spec('libelf@1.8.11')
+ expected_normalized = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {libelf: None},
+ libelf: None
+ },
+ mpich: None
+ },
+ mpich: None
+ },
+ })
+
+ """
+
+ # Maps a literal to a Spec, to be sure we are reusing the same object
+ spec_cache = LazySpecCache()
+
+ def spec_builder(d):
+ # The invariant is that the top level dictionary must have
+ # only one key
+ assert len(d) == 1
+
+ # Construct the top-level spec
+ spec_like, dep_like = next(iter(d.items()))
+
+ # If the requirements was for unique nodes (default)
+ # then re-use keys from the local cache. Otherwise build
+ # a new node every time.
+ if not isinstance(spec_like, Spec):
+ spec = spec_cache[spec_like] if normal else Spec(spec_like)
+ else:
+ spec = spec_like
+
+ if dep_like is None:
+ return spec
+
+ def name_and_dependency_types(s):
+ """Given a key in the dictionary containing the literal,
+ extracts the name of the spec and its dependency types.
+
+ Args:
+ s (str): key in the dictionary containing the literal
+
+ """
+ t = s.split(':')
+
+ if len(t) > 2:
+ msg = 'more than one ":" separator in key "{0}"'
+ raise KeyError(msg.format(s))
+
+ n = t[0]
+ if len(t) == 2:
+ dtypes = tuple(dt.strip() for dt in t[1].split(','))
+ else:
+ dtypes = ()
+
+ return n, dtypes
+
+ def spec_and_dependency_types(s):
+ """Given a non-string key in the literal, extracts the spec
+ and its dependency types.
+
+ Args:
+ s (spec or tuple): either a Spec object or a tuple
+ composed of a Spec object and a string with the
+ dependency types
+
+ """
+ if isinstance(s, Spec):
+ return s, ()
+
+ spec_obj, dtypes = s
+ return spec_obj, tuple(dt.strip() for dt in dtypes.split(','))
+
+ # Recurse on dependencies
+ for s, s_dependencies in dep_like.items():
+
+ if isinstance(s, string_types):
+ dag_node, dependency_types = name_and_dependency_types(s)
+ else:
+ dag_node, dependency_types = spec_and_dependency_types(s)
+
+ dependency_spec = spec_builder({dag_node: s_dependencies})
+ spec._add_dependency(dependency_spec, dependency_types)
+
+ return spec
+
+ return spec_builder(spec_dict)
+
+ def __init__(self, spec_like, **kwargs):
# Copy if spec_like is a Spec.
if isinstance(spec_like, Spec):
self._dup(spec_like)
@@ -987,55 +1133,24 @@ class Spec(object):
if not isinstance(spec_like, string_types):
raise TypeError("Can't make spec out of %s" % type(spec_like))
- spec_list = SpecParser().parse(spec_like)
+ # parse string types *into* this spec
+ spec_list = SpecParser(self).parse(spec_like)
if len(spec_list) > 1:
raise ValueError("More than one spec in string: " + spec_like)
if len(spec_list) < 1:
raise ValueError("String contains no specs: " + spec_like)
- # Take all the attributes from the first parsed spec without copying.
- # This is safe b/c we throw out the parsed spec. It's a bit nasty,
- # but it's nastier to implement the constructor so that the parser
- # writes directly into this Spec object.
- other = spec_list[0]
- self.name = other.name
- self.versions = other.versions
- self.architecture = other.architecture
- self.compiler = other.compiler
- self.compiler_flags = other.compiler_flags
- self.compiler_flags.spec = self
- self._dependencies = other._dependencies
- self._dependents = other._dependents
- self.variants = other.variants
- self.variants.spec = self
- self.namespace = other.namespace
- self._hash = other._hash
- self._cmp_key_cache = other._cmp_key_cache
-
- # Specs are by default not assumed to be normal or concrete.
- self._normal = False
- self._concrete = False
+ # Specs are by default not assumed to be normal, but in some
+ # cases we've read them from a file want to assume normal.
+ # This allows us to manipulate specs that Spack doesn't have
+ # package.py files for.
+ self._normal = kwargs.get('normal', False)
+ self._concrete = kwargs.get('concrete', False)
# Allow a spec to be constructed with an external path.
self.external_path = kwargs.get('external_path', None)
self.external_module = kwargs.get('external_module', None)
- # This allows users to construct a spec DAG with literals.
- # Note that given two specs a and b, Spec(a) copies a, but
- # Spec(a, b) will copy a but just add b as a dep.
- deptypes = ()
- for dep in dep_like:
-
- if isinstance(dep, (list, tuple)):
- # Literals can be deptypes -- if there are tuples in the
- # list, they will be used as deptypes for the following Spec.
- deptypes = tuple(dep)
- continue
-
- spec = dep if isinstance(dep, Spec) else Spec(dep)
- self._add_dependency(spec, deptypes)
- deptypes = ()
-
@property
def external(self):
return bool(self.external_path) or bool(self.external_module)
@@ -1363,9 +1478,8 @@ class Spec(object):
@property
def cshort_spec(self):
- """Returns a version of the spec with the dependencies hashed
- instead of completely enumerated."""
- return self.format('$_$@$%@$+$=$/', color=True)
+ """Returns an auto-colorized version of ``self.short_spec``."""
+ return self.cformat('$_$@$%@$+$=$/')
@property
def prefix(self):
@@ -1805,9 +1919,9 @@ class Spec(object):
for x in self.traverse():
for conflict_spec, when_list in x.package.conflicts.items():
if x.satisfies(conflict_spec):
- for when_spec in when_list:
+ for when_spec, msg in when_list:
if x.satisfies(when_spec):
- matches.append((x, conflict_spec, when_spec))
+ matches.append((x, conflict_spec, when_spec, msg))
if matches:
raise ConflictsInSpecError(self, matches)
@@ -1887,6 +2001,7 @@ class Spec(object):
pkg = spack.repo.get(self.fullname)
conditions = pkg.dependencies[name]
+ substitute_abstract_variants(self)
# evaluate when specs to figure out constraints on the dependency.
dep = None
for when_spec, dep_spec in conditions.items():
@@ -1992,10 +2107,19 @@ class Spec(object):
try:
changed |= spec_deps[dep.name].constrain(dep)
except UnsatisfiableSpecError as e:
- e.message = "Invalid spec: '%s'. "
- e.message += "Package %s requires %s %s, but spec asked for %s"
- e.message %= (spec_deps[dep.name], dep.name,
- e.constraint_type, e.required, e.provided)
+ fmt = 'An unsatisfiable {0}'.format(e.constraint_type)
+ fmt += ' constraint has been detected for spec:'
+ fmt += '\n\n{0}\n\n'.format(spec_deps[dep.name].tree(indent=4))
+ fmt += 'while trying to concretize the partial spec:'
+ fmt += '\n\n{0}\n\n'.format(self.tree(indent=4))
+ fmt += '{0} requires {1} {2} {3}, but spec asked for {4}'
+ e.message = fmt.format(
+ self.name,
+ dep.name,
+ e.constraint_type,
+ e.required,
+ e.provided
+ )
raise e
# Add merged spec to my deps and recurse
@@ -2419,15 +2543,24 @@ class Spec(object):
def _dup(self, other, deps=True, cleardeps=True):
"""Copy the spec other into self. This is an overwriting
- copy. It does not copy any dependents (parents), but by default
- copies dependencies.
+ copy. It does not copy any dependents (parents), but by default
+ copies dependencies.
- To duplicate an entire DAG, call _dup() on the root of the DAG.
+ To duplicate an entire DAG, call _dup() on the root of the DAG.
+
+ Args:
+ other (Spec): spec to be copied onto ``self``
+ deps (bool or Sequence): if True copies all the dependencies. If
+ False copies None. If a sequence of dependency types copy
+ only those types.
+ cleardeps (bool): if True clears the dependencies of ``self``,
+ before possibly copying the dependencies of ``other`` onto
+ ``self``
+
+ Returns:
+ True if ``self`` changed because of the copy operation,
+ False otherwise.
- Options:
- dependencies[=True]
- Whether deps should be copied too. Set to False to copy a
- spec but not its dependencies.
"""
# We don't count dependencies as changes here
changed = True
@@ -2453,6 +2586,7 @@ class Spec(object):
self._dependents = DependencyMap(self)
self._dependencies = DependencyMap(self)
self.compiler_flags = other.compiler_flags.copy()
+ self.compiler_flags.spec = self
self.variants = other.variants.copy()
self.variants.spec = self
self.external_path = other.external_path
@@ -2725,11 +2859,8 @@ class Spec(object):
named_str = fmt = ''
def write(s, c):
- if color:
- f = color_formats[c] + cescape(s) + '@.'
- cwrite(f, stream=out, color=color)
- else:
- out.write(s)
+ f = color_formats[c] + cescape(s) + '@.'
+ cwrite(f, stream=out, color=color)
iterator = enumerate(format_string)
for i, c in iterator:
@@ -2821,7 +2952,7 @@ class Spec(object):
write(fmt % str(self.variants), '+')
elif named_str == 'ARCHITECTURE':
if self.architecture and str(self.architecture):
- write(fmt % str(self.architecture), ' arch=')
+ write(fmt % str(self.architecture), '=')
elif named_str == 'SHA1':
if self.dependencies:
out.write(fmt % str(self.dag_hash(7)))
@@ -2852,6 +2983,12 @@ class Spec(object):
result = out.getvalue()
return result
+ def cformat(self, *args, **kwargs):
+ """Same as format, but color defaults to auto instead of False."""
+ kwargs = kwargs.copy()
+ kwargs.setdefault('color', None)
+ return self.format(*args, **kwargs)
+
def dep_string(self):
return ''.join("^" + dep.format() for dep in self.sorted_deps())
@@ -2882,7 +3019,7 @@ class Spec(object):
def tree(self, **kwargs):
"""Prints out this spec and its dependencies, tree-formatted
with indentation."""
- color = kwargs.pop('color', False)
+ color = kwargs.pop('color', get_color_when())
depth = kwargs.pop('depth', False)
hashes = kwargs.pop('hashes', False)
hlen = kwargs.pop('hashlen', None)
@@ -2938,6 +3075,19 @@ class Spec(object):
return str(self)
+class LazySpecCache(collections.defaultdict):
+ """Cache for Specs that uses a spec_like as key, and computes lazily
+ the corresponding value ``Spec(spec_like``.
+ """
+ def __init__(self):
+ super(LazySpecCache, self).__init__(Spec)
+
+ def __missing__(self, key):
+ value = self.default_factory(key)
+ self[key] = value
+ return value
+
+
#
# These are possible token types in the spec grammar.
#
@@ -2976,9 +3126,17 @@ _lexer = SpecLexer()
class SpecParser(spack.parse.Parser):
- def __init__(self):
+ def __init__(self, initial_spec=None):
+ """Construct a new SpecParser.
+
+ Args:
+ initial_spec (Spec, optional): provide a Spec that we'll parse
+ directly into. This is used to avoid construction of a
+ superfluous Spec object in the Spec constructor.
+ """
super(SpecParser, self).__init__(_lexer)
self.previous = None
+ self._initial = initial_spec
def do_parse(self):
specs = []
@@ -3102,8 +3260,14 @@ class SpecParser(spack.parse.Parser):
spec_namespace = None
spec_name = None
- # This will init the spec without calling __init__.
- spec = Spec.__new__(Spec)
+ if self._initial is None:
+ # This will init the spec without calling Spec.__init__
+ spec = Spec.__new__(Spec)
+ else:
+ # this is used by Spec.__init__
+ spec = self._initial
+ self._initial = None
+
spec.name = spec_name
spec.versions = VersionList()
spec.variants = VariantMap(spec)
@@ -3161,7 +3325,7 @@ class SpecParser(spack.parse.Parser):
# Get spec by hash and confirm it matches what we already have
hash_spec = self.spec_by_hash()
if hash_spec.satisfies(spec):
- spec = hash_spec
+ spec._dup(hash_spec)
break
else:
raise InvalidHashError(spec, hash_spec.dag_hash())
@@ -3332,10 +3496,6 @@ class InvalidDependencyError(SpecError):
of the package."""
-class InvalidDependencyTypeError(SpecError):
- """Raised when a dependency type is not a legal Spack dep type."""
-
-
class NoProviderError(SpecError):
"""Raised when there is no package that provides a particular
virtual dependency.
@@ -3445,8 +3605,24 @@ class ConflictsInSpecError(SpecError, RuntimeError):
message = 'Conflicts in concretized spec "{0}"\n'.format(
spec.short_spec
)
- long_message = 'List of matching conflicts:\n\n'
- match_fmt = '{0}. "{1}" conflicts with "{2}" in spec "{3}"\n'
- for idx, (s, c, w) in enumerate(matches):
- long_message += match_fmt.format(idx + 1, c, w, s)
+
+ visited = set()
+
+ long_message = ''
+
+ match_fmt_default = '{0}. "{1}" conflicts with "{2}"\n'
+ match_fmt_custom = '{0}. "{1}" conflicts with "{2}" [{3}]\n'
+
+ for idx, (s, c, w, msg) in enumerate(matches):
+
+ if s not in visited:
+ visited.add(s)
+ long_message += 'List of matching conflicts for spec:\n\n'
+ long_message += s.tree(indent=4) + '\n'
+
+ if msg is None:
+ long_message += match_fmt_default.format(idx + 1, c, w)
+ else:
+ long_message += match_fmt_custom.format(idx + 1, c, w, msg)
+
super(ConflictsInSpecError, self).__init__(message, long_message)
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 09f18f7d67..f9995bce6c 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -236,6 +236,10 @@ class Stage(object):
self._lock = Stage.stage_locks[self.name]
+ # When stages are reused, we need to know whether to re-create
+ # it. This marks whether it has been created/destroyed.
+ self.created = False
+
def __enter__(self):
"""
Entering a stage context will create the stage directory
@@ -521,6 +525,7 @@ class Stage(object):
mkdirp(self.path)
# Make sure we can actually do something with the stage we made.
ensure_access(self.path)
+ self.created = True
def destroy(self):
"""Removes this stage directory."""
@@ -532,6 +537,9 @@ class Stage(object):
except OSError:
os.chdir(os.path.dirname(self.path))
+ # mark as destroyed
+ self.created = False
+
class ResourceStage(Stage):
@@ -573,8 +581,9 @@ class ResourceStage(Stage):
shutil.move(source_path, destination_path)
-@pattern.composite(method_list=['fetch', 'create', 'check', 'expand_archive',
- 'restage', 'destroy', 'cache_local'])
+@pattern.composite(method_list=[
+ 'fetch', 'create', 'created', 'check', 'expand_archive', 'restage',
+ 'destroy', 'cache_local'])
class StageComposite:
"""Composite for Stage type objects. The first item in this composite is
considered to be the root package, and operations that return a value are
@@ -623,6 +632,7 @@ class DIYStage(object):
self.archive_file = None
self.path = path
self.source_path = path
+ self.created = True
def chdir(self):
if os.path.isdir(self.path):
diff --git a/lib/spack/spack/test/build_system_guess.py b/lib/spack/spack/test/build_system_guess.py
index 733173e3fc..54431e0020 100644
--- a/lib/spack/spack/test/build_system_guess.py
+++ b/lib/spack/spack/test/build_system_guess.py
@@ -34,6 +34,7 @@ import spack.stage
params=[
('configure', 'autotools'),
('CMakeLists.txt', 'cmake'),
+ ('project.pro', 'qmake'),
('SConstruct', 'scons'),
('waf', 'waf'),
('setup.py', 'python'),
diff --git a/lib/spack/spack/test/cmd/clean.py b/lib/spack/spack/test/cmd/clean.py
new file mode 100644
index 0000000000..a905cd9e1e
--- /dev/null
+++ b/lib/spack/spack/test/cmd/clean.py
@@ -0,0 +1,68 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import pytest
+import spack
+import spack.main
+import spack.package
+
+clean = spack.main.SpackCommand('clean')
+
+
+@pytest.fixture()
+def mock_calls_for_clean(monkeypatch):
+
+ class Counter(object):
+ def __init__(self):
+ self.call_count = 0
+
+ def __call__(self, *args, **kwargs):
+ self.call_count += 1
+
+ monkeypatch.setattr(spack.package.PackageBase, 'do_clean', Counter())
+ monkeypatch.setattr(spack.stage, 'purge', Counter())
+ monkeypatch.setattr(spack.fetch_cache, 'destroy', Counter(), raising=False)
+ monkeypatch.setattr(spack.misc_cache, 'destroy', Counter())
+
+
+@pytest.mark.usefixtures(
+ 'builtin_mock', 'config', 'mock_calls_for_clean'
+)
+@pytest.mark.parametrize('command_line,counters', [
+ ('mpileaks', [1, 0, 0, 0]),
+ ('-s', [0, 1, 0, 0]),
+ ('-sd', [0, 1, 1, 0]),
+ ('-a', [0, 1, 1, 1]),
+])
+def test_function_calls(command_line, counters):
+
+ # Call the command with the supplied command line
+ clean(command_line)
+
+ # Assert that we called the expected functions the correct
+ # number of times
+ assert spack.package.PackageBase.do_clean.call_count == counters[0]
+ assert spack.stage.purge.call_count == counters[1]
+ assert spack.fetch_cache.destroy.call_count == counters[2]
+ assert spack.misc_cache.destroy.call_count == counters[3]
diff --git a/lib/spack/spack/test/cmd/dependencies.py b/lib/spack/spack/test/cmd/dependencies.py
new file mode 100644
index 0000000000..58f778c660
--- /dev/null
+++ b/lib/spack/spack/test/cmd/dependencies.py
@@ -0,0 +1,77 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import re
+
+from llnl.util.tty.color import color_when
+
+import spack
+from spack.main import SpackCommand
+
+dependencies = SpackCommand('dependencies')
+
+mpis = ['mpich', 'mpich2', 'multi-provider-mpi', 'zmpi']
+mpi_deps = ['fake']
+
+
+def test_immediate_dependencies(builtin_mock):
+ out = dependencies('mpileaks')
+ actual = set(re.split(r'\s+', out.strip()))
+ expected = set(['callpath'] + mpis)
+ assert expected == actual
+
+
+def test_transitive_dependencies(builtin_mock):
+ out = dependencies('--transitive', 'mpileaks')
+ actual = set(re.split(r'\s+', out.strip()))
+ expected = set(
+ ['callpath', 'dyninst', 'libdwarf', 'libelf'] + mpis + mpi_deps)
+ assert expected == actual
+
+
+def test_immediate_installed_dependencies(builtin_mock, database):
+ with color_when(False):
+ out = dependencies('--installed', 'mpileaks^mpich')
+
+ lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
+ hashes = set([re.split(r'\s+', l)[0] for l in lines])
+
+ expected = set([spack.store.db.query_one(s).dag_hash(7)
+ for s in ['mpich', 'callpath^mpich']])
+
+ assert expected == hashes
+
+
+def test_transitive_installed_dependencies(builtin_mock, database):
+ with color_when(False):
+ out = dependencies('--installed', '--transitive', 'mpileaks^zmpi')
+
+ lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
+ hashes = set([re.split(r'\s+', l)[0] for l in lines])
+
+ expected = set([spack.store.db.query_one(s).dag_hash(7)
+ for s in ['zmpi', 'callpath^zmpi', 'fake',
+ 'dyninst', 'libdwarf', 'libelf']])
+
+ assert expected == hashes
diff --git a/lib/spack/spack/test/cmd/dependents.py b/lib/spack/spack/test/cmd/dependents.py
new file mode 100644
index 0000000000..c43270a2af
--- /dev/null
+++ b/lib/spack/spack/test/cmd/dependents.py
@@ -0,0 +1,75 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import re
+
+from llnl.util.tty.color import color_when
+
+import spack
+from spack.main import SpackCommand
+
+dependents = SpackCommand('dependents')
+
+
+def test_immediate_dependents(builtin_mock):
+ out = dependents('libelf')
+ actual = set(re.split(r'\s+', out.strip()))
+ assert actual == set(['dyninst', 'libdwarf'])
+
+
+def test_transitive_dependents(builtin_mock):
+ out = dependents('--transitive', 'libelf')
+ actual = set(re.split(r'\s+', out.strip()))
+ assert actual == set(
+ ['callpath', 'dyninst', 'libdwarf', 'mpileaks', 'multivalue_variant',
+ 'singlevalue-variant-dependent'])
+
+
+def test_immediate_installed_dependents(builtin_mock, database):
+ with color_when(False):
+ out = dependents('--installed', 'libelf')
+
+ lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
+ hashes = set([re.split(r'\s+', l)[0] for l in lines])
+
+ expected = set([spack.store.db.query_one(s).dag_hash(7)
+ for s in ['dyninst', 'libdwarf']])
+
+ libelf = spack.store.db.query_one('libelf')
+ expected = set([d.dag_hash(7) for d in libelf.dependents()])
+
+ assert expected == hashes
+
+
+def test_transitive_installed_dependents(builtin_mock, database):
+ with color_when(False):
+ out = dependents('--installed', '--transitive', 'fake')
+
+ lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
+ hashes = set([re.split(r'\s+', l)[0] for l in lines])
+
+ expected = set([spack.store.db.query_one(s).dag_hash(7)
+ for s in ['zmpi', 'callpath^zmpi', 'mpileaks^zmpi']])
+
+ assert expected == hashes
diff --git a/lib/spack/spack/test/cmd/gpg.py b/lib/spack/spack/test/cmd/gpg.py
index 189c827d05..111436f24f 100644
--- a/lib/spack/spack/test/cmd/gpg.py
+++ b/lib/spack/spack/test/cmd/gpg.py
@@ -22,13 +22,12 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import argparse
import os
import pytest
import spack
-import spack.cmd.gpg as gpg
import spack.util.gpg as gpg_util
+from spack.main import SpackCommand
from spack.util.executable import ProcessError
@@ -40,6 +39,11 @@ def testing_gpg_directory(tmpdir):
gpg_util.GNUPGHOME = old_gpg_path
+@pytest.fixture(scope='function')
+def gpg():
+ return SpackCommand('gpg')
+
+
def has_gnupg2():
try:
gpg_util.Gpg.gpg()('--version', output=os.devnull)
@@ -48,45 +52,30 @@ def has_gnupg2():
return False
-@pytest.mark.usefixtures('testing_gpg_directory')
@pytest.mark.skipif(not has_gnupg2(),
reason='These tests require gnupg2')
-def test_gpg(tmpdir):
- parser = argparse.ArgumentParser()
- gpg.setup_parser(parser)
-
+def test_gpg(gpg, tmpdir, testing_gpg_directory):
# Verify a file with an empty keyring.
- args = parser.parse_args(['verify', os.path.join(
- spack.mock_gpg_data_path, 'content.txt')])
with pytest.raises(ProcessError):
- gpg.gpg(parser, args)
+ gpg('verify', os.path.join(spack.mock_gpg_data_path, 'content.txt'))
# Import the default key.
- args = parser.parse_args(['init'])
- args.import_dir = spack.mock_gpg_keys_path
- gpg.gpg(parser, args)
+ gpg('init', '--from', spack.mock_gpg_keys_path)
# List the keys.
# TODO: Test the output here.
- args = parser.parse_args(['list', '--trusted'])
- gpg.gpg(parser, args)
- args = parser.parse_args(['list', '--signing'])
- gpg.gpg(parser, args)
+ gpg('list', '--trusted')
+ gpg('list', '--signing')
# Verify the file now that the key has been trusted.
- args = parser.parse_args(['verify', os.path.join(
- spack.mock_gpg_data_path, 'content.txt')])
- gpg.gpg(parser, args)
+ gpg('verify', os.path.join(spack.mock_gpg_data_path, 'content.txt'))
# Untrust the default key.
- args = parser.parse_args(['untrust', 'Spack testing'])
- gpg.gpg(parser, args)
+ gpg('untrust', 'Spack testing')
# Now that the key is untrusted, verification should fail.
- args = parser.parse_args(['verify', os.path.join(
- spack.mock_gpg_data_path, 'content.txt')])
with pytest.raises(ProcessError):
- gpg.gpg(parser, args)
+ gpg('verify', os.path.join(spack.mock_gpg_data_path, 'content.txt'))
# Create a file to test signing.
test_path = tmpdir.join('to-sign.txt')
@@ -94,88 +83,71 @@ def test_gpg(tmpdir):
fout.write('Test content for signing.\n')
# Signing without a private key should fail.
- args = parser.parse_args(['sign', str(test_path)])
with pytest.raises(RuntimeError) as exc_info:
- gpg.gpg(parser, args)
+ gpg('sign', str(test_path))
assert exc_info.value.args[0] == 'no signing keys are available'
# Create a key for use in the tests.
keypath = tmpdir.join('testing-1.key')
- args = parser.parse_args(['create',
- '--comment', 'Spack testing key',
- '--export', str(keypath),
- 'Spack testing 1',
- 'spack@googlegroups.com'])
- gpg.gpg(parser, args)
+ gpg('create',
+ '--comment', 'Spack testing key',
+ '--export', str(keypath),
+ 'Spack testing 1',
+ 'spack@googlegroups.com')
keyfp = gpg_util.Gpg.signing_keys()[0]
# List the keys.
# TODO: Test the output here.
- args = parser.parse_args(['list', '--trusted'])
- gpg.gpg(parser, args)
- args = parser.parse_args(['list', '--signing'])
- gpg.gpg(parser, args)
+ gpg('list', '--trusted')
+ gpg('list', '--signing')
# Signing with the default (only) key.
- args = parser.parse_args(['sign', str(test_path)])
- gpg.gpg(parser, args)
+ gpg('sign', str(test_path))
# Verify the file we just verified.
- args = parser.parse_args(['verify', str(test_path)])
- gpg.gpg(parser, args)
+ gpg('verify', str(test_path))
# Export the key for future use.
export_path = tmpdir.join('export.testing.key')
- args = parser.parse_args(['export', str(export_path)])
- gpg.gpg(parser, args)
+ gpg('export', str(export_path))
# Create a second key for use in the tests.
- args = parser.parse_args(['create',
- '--comment', 'Spack testing key',
- 'Spack testing 2',
- 'spack@googlegroups.com'])
- gpg.gpg(parser, args)
+ gpg('create',
+ '--comment', 'Spack testing key',
+ 'Spack testing 2',
+ 'spack@googlegroups.com')
# List the keys.
# TODO: Test the output here.
- args = parser.parse_args(['list', '--trusted'])
- gpg.gpg(parser, args)
- args = parser.parse_args(['list', '--signing'])
- gpg.gpg(parser, args)
+ gpg('list', '--trusted')
+ gpg('list', '--signing')
test_path = tmpdir.join('to-sign-2.txt')
with open(str(test_path), 'w+') as fout:
fout.write('Test content for signing.\n')
# Signing with multiple signing keys is ambiguous.
- args = parser.parse_args(['sign', str(test_path)])
with pytest.raises(RuntimeError) as exc_info:
- gpg.gpg(parser, args)
+ gpg('sign', str(test_path))
assert exc_info.value.args[0] == \
'multiple signing keys are available; please choose one'
# Signing with a specified key.
- args = parser.parse_args(['sign', '--key', keyfp, str(test_path)])
- gpg.gpg(parser, args)
+ gpg('sign', '--key', keyfp, str(test_path))
# Untrusting signing keys needs a flag.
- args = parser.parse_args(['untrust', 'Spack testing 1'])
with pytest.raises(ProcessError):
- gpg.gpg(parser, args)
+ gpg('untrust', 'Spack testing 1')
# Untrust the key we created.
- args = parser.parse_args(['untrust', '--signing', keyfp])
- gpg.gpg(parser, args)
+ gpg('untrust', '--signing', keyfp)
# Verification should now fail.
- args = parser.parse_args(['verify', str(test_path)])
with pytest.raises(ProcessError):
- gpg.gpg(parser, args)
+ gpg('verify', str(test_path))
# Trust the exported key.
- args = parser.parse_args(['trust', str(export_path)])
- gpg.gpg(parser, args)
+ gpg('trust', str(export_path))
# Verification should now succeed again.
- args = parser.parse_args(['verify', str(test_path)])
- gpg.gpg(parser, args)
+ gpg('verify', str(test_path))
diff --git a/lib/spack/spack/test/cmd/info.py b/lib/spack/spack/test/cmd/info.py
new file mode 100644
index 0000000000..9819f2cd84
--- /dev/null
+++ b/lib/spack/spack/test/cmd/info.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import pytest
+
+from spack.main import SpackCommand
+
+info = SpackCommand('info')
+
+
+@pytest.mark.parametrize('pkg', [
+ 'openmpi',
+ 'trilinos',
+ 'boost',
+ 'python',
+ 'dealii'
+])
+def test_it_just_runs(pkg):
+ info(pkg)
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index 7f9db1baa2..2886aa5d6a 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -23,193 +23,122 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import argparse
-import codecs
-import collections
-import contextlib
-import unittest
-from six import StringIO
+import os
+import filecmp
-import llnl.util.filesystem
-import spack
-import spack.cmd
-import spack.cmd.install as install
-
-FILE_REGISTRY = collections.defaultdict(StringIO)
-
-
-# Monkey-patch open to write module files to a StringIO instance
-@contextlib.contextmanager
-def mock_open(filename, mode, *args):
- if not mode == 'wb':
- message = 'test.test_install : unexpected opening mode for mock_open'
- raise RuntimeError(message)
-
- FILE_REGISTRY[filename] = StringIO()
-
- try:
- yield FILE_REGISTRY[filename]
- finally:
- handle = FILE_REGISTRY[filename]
- FILE_REGISTRY[filename] = handle.getvalue()
- handle.close()
-
-
-class MockSpec(object):
-
- def __init__(self, name, version, hashStr=None):
- self._dependencies = {}
- self.name = name
- self.version = version
- self.hash = hashStr if hashStr else hash((name, version))
-
- def _deptype_norm(self, deptype):
- if deptype is None:
- return spack.alldeps
- # Force deptype to be a tuple so that we can do set intersections.
- if isinstance(deptype, str):
- return (deptype,)
- return deptype
-
- def _find_deps(self, where, deptype):
- deptype = self._deptype_norm(deptype)
-
- return [dep.spec
- for dep in where.values()
- if deptype and any(d in deptype for d in dep.deptypes)]
-
- def dependencies(self, deptype=None):
- return self._find_deps(self._dependencies, deptype)
-
- def dependents(self, deptype=None):
- return self._find_deps(self._dependents, deptype)
-
- def traverse(self, order=None):
- for _, spec in self._dependencies.items():
- yield spec.spec
- yield self
-
- def dag_hash(self):
- return self.hash
-
- @property
- def short_spec(self):
- return '-'.join([self.name, str(self.version), str(self.hash)])
+import pytest
+import spack
+import spack.cmd.install
+from spack.spec import Spec
+from spack.main import SpackCommand
-class MockPackage(object):
+install = SpackCommand('install')
- def __init__(self, spec, buildLogPath):
- self.name = spec.name
- self.spec = spec
- self.installed = False
- self.build_log_path = buildLogPath
- def do_install(self, *args, **kwargs):
- for x in self.spec.dependencies():
- x.package.do_install(*args, **kwargs)
- self.installed = True
+@pytest.fixture(scope='module')
+def parser():
+ """Returns the parser for the module command"""
+ parser = argparse.ArgumentParser()
+ spack.cmd.install.setup_parser(parser)
+ return parser
+
+
+def test_install_package_and_dependency(
+ tmpdir, builtin_mock, mock_archive, mock_fetch, config,
+ install_mockery):
+
+ tmpdir.chdir()
+ install('--log-format=junit', '--log-file=test.xml', 'libdwarf')
+
+ files = tmpdir.listdir()
+ filename = tmpdir.join('test.xml')
+ assert filename in files
+
+ content = filename.open().read()
+ assert 'tests="2"' in content
+ assert 'failures="0"' in content
+ assert 'errors="0"' in content
+
+ s = Spec('libdwarf').concretized()
+ assert not spack.repo.get(s).stage.created
+
+
+def test_install_package_already_installed(
+ tmpdir, builtin_mock, mock_archive, mock_fetch, config,
+ install_mockery):
+
+ tmpdir.chdir()
+ install('libdwarf')
+ install('--log-format=junit', '--log-file=test.xml', 'libdwarf')
+
+ files = tmpdir.listdir()
+ filename = tmpdir.join('test.xml')
+ assert filename in files
+
+ content = filename.open().read()
+ assert 'tests="2"' in content
+ assert 'failures="0"' in content
+ assert 'errors="0"' in content
+
+ skipped = [line for line in content.split('\n') if 'skipped' in line]
+ assert len(skipped) == 2
+
+
+@pytest.mark.parametrize('arguments,expected', [
+ ([], spack.dirty), # The default read from configuration file
+ (['--clean'], False),
+ (['--dirty'], True),
+])
+def test_install_dirty_flag(parser, arguments, expected):
+ args = parser.parse_args(arguments)
+ assert args.dirty == expected
+
+
+def test_package_output(tmpdir, capsys, install_mockery, mock_fetch):
+ """Ensure output printed from pkgs is captured by output redirection."""
+ # we can't use output capture here because it interferes with Spack's
+ # logging. TODO: see whether we can get multiple log_outputs to work
+ # when nested AND in pytest
+ spec = Spec('printing-package').concretized()
+ pkg = spec.package
+ pkg.do_install(verbose=True)
+
+ log_file = os.path.join(spec.prefix, '.spack', 'build.out')
+ with open(log_file) as f:
+ out = f.read()
+
+ # make sure that output from the actual package file appears in the
+ # right place in the build log.
+ assert "BEFORE INSTALL\n==> './configure'" in out
+ assert "'install'\nAFTER INSTALL" in out
+
+
+def _test_install_output_on_build_error(builtin_mock, mock_archive, mock_fetch,
+ config, install_mockery, capfd):
+ # capfd interferes with Spack's capturing
+ with capfd.disabled():
+ out = install('build-error', fail_on_error=False)
+ assert isinstance(install.error, spack.build_environment.ChildError)
+ assert install.error.name == 'ProcessError'
+ assert 'configure: error: in /path/to/some/file:' in out
+ assert 'configure: error: cannot run C compiled programs.' in out
+
+
+def test_install_output_on_python_error(builtin_mock, mock_archive, mock_fetch,
+ config, install_mockery):
+ out = install('failing-build', fail_on_error=False)
+ assert isinstance(install.error, spack.build_environment.ChildError)
+ assert install.error.name == 'InstallError'
+ assert 'raise InstallError("Expected failure.")' in out
-class MockPackageDb(object):
-
- def __init__(self, init=None):
- self.specToPkg = {}
- if init:
- self.specToPkg.update(init)
-
- def get(self, spec):
- return self.specToPkg[spec]
-
-
-def mock_fetch_log(path):
- return []
-
-
-specX = MockSpec('X', '1.2.0')
-specY = MockSpec('Y', '2.3.8')
-specX._dependencies['Y'] = spack.spec.DependencySpec(
- specX, specY, spack.alldeps)
-pkgX = MockPackage(specX, 'logX')
-pkgY = MockPackage(specY, 'logY')
-specX.package = pkgX
-specY.package = pkgY
-
-
-# TODO: add test(s) where Y fails to install
-class InstallTestJunitLog(unittest.TestCase):
- """Tests test-install where X->Y"""
-
- def setUp(self):
- super(InstallTestJunitLog, self).setUp()
- install.PackageBase = MockPackage
- # Monkey patch parse specs
-
- def monkey_parse_specs(x, concretize):
- if x == ['X']:
- return [specX]
- elif x == ['Y']:
- return [specY]
- return []
-
- self.parse_specs = spack.cmd.parse_specs
- spack.cmd.parse_specs = monkey_parse_specs
-
- # Monkey patch os.mkdirp
- self.mkdirp = llnl.util.filesystem.mkdirp
- llnl.util.filesystem.mkdirp = lambda x: True
-
- # Monkey patch open
- self.codecs_open = codecs.open
- codecs.open = mock_open
-
- # Clean FILE_REGISTRY
- FILE_REGISTRY.clear()
-
- pkgX.installed = False
- pkgY.installed = False
-
- # Monkey patch pkgDb
- self.saved_db = spack.repo
- pkgDb = MockPackageDb({specX: pkgX, specY: pkgY})
- spack.repo = pkgDb
-
- def tearDown(self):
- # Remove the monkey patched test_install.open
- codecs.open = self.codecs_open
-
- # Remove the monkey patched os.mkdir
- llnl.util.filesystem.mkdirp = self.mkdirp
- del self.mkdirp
-
- # Remove the monkey patched parse_specs
- spack.cmd.parse_specs = self.parse_specs
- del self.parse_specs
- super(InstallTestJunitLog, self).tearDown()
-
- spack.repo = self.saved_db
-
- def test_installing_both(self):
- parser = argparse.ArgumentParser()
- install.setup_parser(parser)
- args = parser.parse_args(['--log-format=junit', 'X'])
- install.install(parser, args)
- self.assertEqual(len(FILE_REGISTRY), 1)
- for _, content in FILE_REGISTRY.items():
- self.assertTrue('tests="2"' in content)
- self.assertTrue('failures="0"' in content)
- self.assertTrue('errors="0"' in content)
-
- def test_dependency_already_installed(self):
- pkgX.installed = True
- pkgY.installed = True
- parser = argparse.ArgumentParser()
- install.setup_parser(parser)
- args = parser.parse_args(['--log-format=junit', 'X'])
- install.install(parser, args)
- self.assertEqual(len(FILE_REGISTRY), 1)
- for _, content in FILE_REGISTRY.items():
- self.assertTrue('tests="2"' in content)
- self.assertTrue('failures="0"' in content)
- self.assertTrue('errors="0"' in content)
- self.assertEqual(
- sum('skipped' in line for line in content.split('\n')), 2)
+def test_install_with_source(
+ builtin_mock, mock_archive, mock_fetch, config, install_mockery):
+ """Verify that source has been copied into place."""
+ install('--source', '--keep-stage', 'trivial-install-test-package')
+ spec = Spec('trivial-install-test-package').concretized()
+ src = os.path.join(
+ spec.prefix.share, 'trivial-install-test-package', 'src')
+ assert filecmp.cmp(os.path.join(mock_archive.path, 'configure'),
+ os.path.join(src, 'configure'))
diff --git a/lib/spack/spack/test/cmd/module.py b/lib/spack/spack/test/cmd/module.py
index 8d15afdd0c..b8f24856be 100644
--- a/lib/spack/spack/test/cmd/module.py
+++ b/lib/spack/spack/test/cmd/module.py
@@ -70,15 +70,20 @@ def test_remove_and_add_tcl(database, parser):
# Remove existing modules [tcl]
args = parser.parse_args(['rm', '-y', 'mpileaks'])
module_files = _get_module_files(args)
+
for item in module_files:
assert os.path.exists(item)
+
module.module(parser, args)
+
for item in module_files:
assert not os.path.exists(item)
# Add them back [tcl]
args = parser.parse_args(['refresh', '-y', 'mpileaks'])
+
module.module(parser, args)
+
for item in module_files:
assert os.path.exists(item)
diff --git a/lib/spack/spack/test/cmd/python.py b/lib/spack/spack/test/cmd/python.py
index 5ad8456e49..db9d9c5e41 100644
--- a/lib/spack/spack/test/cmd/python.py
+++ b/lib/spack/spack/test/cmd/python.py
@@ -22,22 +22,12 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import argparse
-import pytest
+import spack
+from spack.main import SpackCommand
-from spack.cmd.python import *
+python = SpackCommand('python')
-@pytest.fixture(scope='module')
-def parser():
- """Returns the parser for the ``python`` command"""
- parser = argparse.ArgumentParser()
- setup_parser(parser)
- return parser
-
-
-def test_python(parser):
- args = parser.parse_args([
- '-c', 'import spack; print(spack.spack_version)'
- ])
- python(parser, args)
+def test_python():
+ out = python('-c', 'import spack; print(spack.spack_version)')
+ assert out.strip() == str(spack.spack_version)
diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py
index a47c76715b..72dda23f93 100644
--- a/lib/spack/spack/test/cmd/uninstall.py
+++ b/lib/spack/spack/test/cmd/uninstall.py
@@ -24,7 +24,9 @@
##############################################################################
import pytest
import spack.store
-import spack.cmd.uninstall
+from spack.main import SpackCommand, SpackCommandError
+
+uninstall = SpackCommand('uninstall')
class MockArgs(object):
@@ -37,20 +39,21 @@ class MockArgs(object):
self.yes_to_all = True
-def test_uninstall(database):
- parser = None
- uninstall = spack.cmd.uninstall.uninstall
- # Multiple matches
- args = MockArgs(['mpileaks'])
- with pytest.raises(SystemExit):
- uninstall(parser, args)
- # Installed dependents
- args = MockArgs(['libelf'])
- with pytest.raises(SystemExit):
- uninstall(parser, args)
- # Recursive uninstall
- args = MockArgs(['callpath'], all=True, dependents=True)
- uninstall(parser, args)
+def test_multiple_matches(database):
+ """Test unable to uninstall when multiple matches."""
+ with pytest.raises(SpackCommandError):
+ uninstall('-y', 'mpileaks')
+
+
+def test_installed_dependents(database):
+ """Test can't uninstall when ther are installed dependents."""
+ with pytest.raises(SpackCommandError):
+ uninstall('-y', 'libelf')
+
+
+def test_recursive_uninstall(database):
+ """Test recursive uninstall."""
+ uninstall('-y', '-a', '--dependents', 'callpath')
all_specs = spack.store.layout.all_specs()
assert len(all_specs) == 8
diff --git a/lib/spack/spack/test/cmd/url.py b/lib/spack/spack/test/cmd/url.py
index ae585b328f..ab2d750dee 100644
--- a/lib/spack/spack/test/cmd/url.py
+++ b/lib/spack/spack/test/cmd/url.py
@@ -22,18 +22,13 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import argparse
+import re
import pytest
-
+from spack.url import UndetectableVersionError
+from spack.main import SpackCommand
from spack.cmd.url import *
-
-@pytest.fixture(scope='module')
-def parser():
- """Returns the parser for the ``url`` command"""
- parser = argparse.ArgumentParser()
- setup_parser(parser)
- return parser
+url = SpackCommand('url')
class MyPackage:
@@ -77,51 +72,64 @@ def test_version_parsed_correctly():
assert not version_parsed_correctly(MyPackage('', ['0.18.0']), 'oce-0.18.0') # noqa
-def test_url_parse(parser):
- args = parser.parse_args(['parse', 'http://zlib.net/fossils/zlib-1.2.10.tar.gz'])
- url(parser, args)
+def test_url_parse():
+ url('parse', 'http://zlib.net/fossils/zlib-1.2.10.tar.gz')
-@pytest.mark.xfail
-def test_url_parse_xfail(parser):
+def test_url_with_no_version_fails():
# No version in URL
- args = parser.parse_args(['parse', 'http://www.netlib.org/voronoi/triangle.zip'])
- url(parser, args)
+ with pytest.raises(UndetectableVersionError):
+ url('parse', 'http://www.netlib.org/voronoi/triangle.zip')
-def test_url_list(parser):
- args = parser.parse_args(['list'])
- total_urls = url_list(args)
+def test_url_list():
+ out = url('list')
+ total_urls = len(out.split('\n'))
# The following two options should not change the number of URLs printed.
- args = parser.parse_args(['list', '--color', '--extrapolation'])
- colored_urls = url_list(args)
+ out = url('list', '--color', '--extrapolation')
+ colored_urls = len(out.split('\n'))
assert colored_urls == total_urls
# The following options should print fewer URLs than the default.
# If they print the same number of URLs, something is horribly broken.
# If they say we missed 0 URLs, something is probably broken too.
- args = parser.parse_args(['list', '--incorrect-name'])
- incorrect_name_urls = url_list(args)
+ out = url('list', '--incorrect-name')
+ incorrect_name_urls = len(out.split('\n'))
assert 0 < incorrect_name_urls < total_urls
- args = parser.parse_args(['list', '--incorrect-version'])
- incorrect_version_urls = url_list(args)
+ out = url('list', '--incorrect-version')
+ incorrect_version_urls = len(out.split('\n'))
assert 0 < incorrect_version_urls < total_urls
- args = parser.parse_args(['list', '--correct-name'])
- correct_name_urls = url_list(args)
+ out = url('list', '--correct-name')
+ correct_name_urls = len(out.split('\n'))
assert 0 < correct_name_urls < total_urls
- args = parser.parse_args(['list', '--correct-version'])
- correct_version_urls = url_list(args)
+ out = url('list', '--correct-version')
+ correct_version_urls = len(out.split('\n'))
assert 0 < correct_version_urls < total_urls
-def test_url_summary(parser):
- args = parser.parse_args(['summary'])
+def test_url_summary():
+ """Test the URL summary command."""
+ # test url_summary, the internal function that does the work
(total_urls, correct_names, correct_versions,
- name_count_dict, version_count_dict) = url_summary(args)
+ name_count_dict, version_count_dict) = url_summary(None)
assert 0 < correct_names <= sum(name_count_dict.values()) <= total_urls # noqa
assert 0 < correct_versions <= sum(version_count_dict.values()) <= total_urls # noqa
+
+ # make sure it agrees with the actual command.
+ out = url('summary')
+ out_total_urls = int(
+ re.search(r'Total URLs found:\s*(\d+)', out).group(1))
+ assert out_total_urls == total_urls
+
+ out_correct_names = int(
+ re.search(r'Names correctly parsed:\s*(\d+)', out).group(1))
+ assert out_correct_names == correct_names
+
+ out_correct_versions = int(
+ re.search(r'Versions correctly parsed:\s*(\d+)', out).group(1))
+ assert out_correct_versions == correct_versions
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 414b0fab84..572436a4b2 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -330,59 +330,94 @@ class TestConcretize(object):
def test_find_spec_parents(self):
"""Tests the spec finding logic used by concretization. """
- s = Spec('a +foo',
- Spec('b +foo',
- Spec('c'),
- Spec('d +foo')),
- Spec('e +foo'))
+ s = Spec.from_literal({
+ 'a +foo': {
+ 'b +foo': {
+ 'c': None,
+ 'd+foo': None
+ },
+ 'e +foo': None
+ }
+ })
assert 'a' == find_spec(s['b'], lambda s: '+foo' in s).name
def test_find_spec_children(self):
- s = Spec('a',
- Spec('b +foo',
- Spec('c'),
- Spec('d +foo')),
- Spec('e +foo'))
+ s = Spec.from_literal({
+ 'a': {
+ 'b +foo': {
+ 'c': None,
+ 'd+foo': None
+ },
+ 'e +foo': None
+ }
+ })
+
assert 'd' == find_spec(s['b'], lambda s: '+foo' in s).name
- s = Spec('a',
- Spec('b +foo',
- Spec('c +foo'),
- Spec('d')),
- Spec('e +foo'))
+
+ s = Spec.from_literal({
+ 'a': {
+ 'b +foo': {
+ 'c+foo': None,
+ 'd': None
+ },
+ 'e +foo': None
+ }
+ })
+
assert 'c' == find_spec(s['b'], lambda s: '+foo' in s).name
def test_find_spec_sibling(self):
- s = Spec('a',
- Spec('b +foo',
- Spec('c'),
- Spec('d')),
- Spec('e +foo'))
+
+ s = Spec.from_literal({
+ 'a': {
+ 'b +foo': {
+ 'c': None,
+ 'd': None
+ },
+ 'e +foo': None
+ }
+ })
+
assert 'e' == find_spec(s['b'], lambda s: '+foo' in s).name
assert 'b' == find_spec(s['e'], lambda s: '+foo' in s).name
- s = Spec('a',
- Spec('b +foo',
- Spec('c'),
- Spec('d')),
- Spec('e',
- Spec('f +foo')))
+ s = Spec.from_literal({
+ 'a': {
+ 'b +foo': {
+ 'c': None,
+ 'd': None
+ },
+ 'e': {
+ 'f +foo': None
+ }
+ }
+ })
+
assert 'f' == find_spec(s['b'], lambda s: '+foo' in s).name
def test_find_spec_self(self):
- s = Spec('a',
- Spec('b +foo',
- Spec('c'),
- Spec('d')),
- Spec('e'))
+ s = Spec.from_literal({
+ 'a': {
+ 'b +foo': {
+ 'c': None,
+ 'd': None
+ },
+ 'e': None
+ }
+ })
assert 'b' == find_spec(s['b'], lambda s: '+foo' in s).name
def test_find_spec_none(self):
- s = Spec('a',
- Spec('b',
- Spec('c'),
- Spec('d')),
- Spec('e'))
+ s = Spec.from_literal({
+ 'a': {
+ 'b': {
+ 'c': None,
+ 'd': None
+ },
+ 'e': None
+ }
+ })
assert find_spec(s['b'], lambda s: '+foo' in s) is None
def test_compiler_child(self):
diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py
index 5e880bc4d6..45c037eec7 100644
--- a/lib/spack/spack/test/concretize_preferences.py
+++ b/lib/spack/spack/test/concretize_preferences.py
@@ -102,6 +102,11 @@ class TestConcretizePreferences(object):
spec = concretize('mpileaks')
assert spec.version == spack.spec.Version('2.2')
+ def test_preferred_versions_mixed_version_types(self):
+ update_packages('mixedversions', 'version', ['2.0'])
+ spec = concretize('mixedversions')
+ assert spec.version == spack.spec.Version('2.0')
+
def test_preferred_providers(self):
"""Test preferred providers of virtual packages are
applied correctly
diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py
index 2363754a00..d00dc64bb3 100644
--- a/lib/spack/spack/test/config.py
+++ b/lib/spack/spack/test/config.py
@@ -369,3 +369,31 @@ class TestConfig(object):
'install_tree': 'install_tree_path',
'build_stage': ['patha', 'pathb']
}
+
+
+def test_keys_are_ordered():
+
+ expected_order = (
+ 'bin',
+ 'man',
+ 'share/man',
+ 'share/aclocal',
+ 'lib',
+ 'lib64',
+ 'include',
+ 'lib/pkgconfig',
+ 'lib64/pkgconfig',
+ ''
+ )
+
+ config_scope = spack.config.ConfigScope(
+ 'modules',
+ os.path.join(spack.test_path, 'data', 'config')
+ )
+
+ data = config_scope.get_section('modules')
+
+ prefix_inspections = data['modules']['prefix_inspections']
+
+ for actual, expected in zip(prefix_inspections, expected_order):
+ assert actual == expected
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index c23fb466a5..f407943326 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -27,40 +27,28 @@ import copy
import os
import re
import shutil
-from six import StringIO
-import llnl.util.filesystem
-import llnl.util.lang
import ordereddict_backport
import py
import pytest
+
import spack
import spack.architecture
import spack.database
import spack.directory_layout
-import spack.fetch_strategy
import spack.platforms.test
import spack.repository
import spack.stage
import spack.util.executable
import spack.util.pattern
+from spack.package import PackageBase
+from spack.fetch_strategy import *
##########
# Monkey-patching that is applied to all tests
##########
-
-
-@pytest.fixture(autouse=True)
-def no_stdin_duplication(monkeypatch):
- """Duplicating stdin (or any other stream) returns an empty
- StringIO object.
- """
- monkeypatch.setattr(llnl.util.lang, 'duplicate_stream',
- lambda x: StringIO())
-
-
@pytest.fixture(autouse=True)
def mock_fetch_cache(monkeypatch):
"""Substitutes spack.fetch_cache with a mock object that does nothing
@@ -78,12 +66,10 @@ def mock_fetch_cache(monkeypatch):
pass
def fetch(self):
- raise spack.fetch_strategy.FetchError(
- 'Mock cache always fails for tests'
- )
+ raise FetchError('Mock cache always fails for tests')
def __str__(self):
- return "[mock fetcher]"
+ return "[mock fetch cache]"
monkeypatch.setattr(spack, 'fetch_cache', MockCache())
@@ -287,6 +273,43 @@ def refresh_db_on_exit(database):
yield
database.refresh()
+
+@pytest.fixture()
+def install_mockery(tmpdir, config, builtin_mock):
+ """Hooks a fake install directory and a fake db into Spack."""
+ layout = spack.store.layout
+ db = spack.store.db
+ # Use a fake install directory to avoid conflicts bt/w
+ # installed pkgs and mock packages.
+ spack.store.layout = spack.directory_layout.YamlDirectoryLayout(
+ str(tmpdir))
+ spack.store.db = spack.database.Database(str(tmpdir))
+ # We use a fake package, so skip the checksum.
+ spack.do_checksum = False
+ yield
+ # Turn checksumming back on
+ spack.do_checksum = True
+ # Restore Spack's layout.
+ spack.store.layout = layout
+ spack.store.db = db
+
+
+@pytest.fixture()
+def mock_fetch(mock_archive):
+ """Fake the URL for a package so it downloads from a file."""
+ fetcher = FetchStrategyComposite()
+ fetcher.append(URLFetchStrategy(mock_archive.url))
+
+ @property
+ def fake_fn(self):
+ return fetcher
+
+ orig_fn = PackageBase.fetcher
+ PackageBase.fetcher = fake_fn
+ yield
+ PackageBase.fetcher = orig_fn
+
+
##########
# Fake archives and repositories
##########
diff --git a/lib/spack/spack/test/data/config/modules.yaml b/lib/spack/spack/test/data/config/modules.yaml
new file mode 100644
index 0000000000..25fe2088e7
--- /dev/null
+++ b/lib/spack/spack/test/data/config/modules.yaml
@@ -0,0 +1,42 @@
+# -------------------------------------------------------------------------
+# This is the default configuration for Spack's module file generation.
+#
+# Settings here are versioned with Spack and are intended to provide
+# sensible defaults out of the box. Spack maintainers should edit this
+# file to keep it current.
+#
+# Users can override these settings by editing the following files.
+#
+# Per-spack-instance settings (overrides defaults):
+# $SPACK_ROOT/etc/spack/modules.yaml
+#
+# Per-user settings (overrides default and site settings):
+# ~/.spack/modules.yaml
+# -------------------------------------------------------------------------
+modules:
+ enable:
+ - tcl
+ - dotkit
+ prefix_inspections:
+ bin:
+ - PATH
+ man:
+ - MANPATH
+ share/man:
+ - MANPATH
+ share/aclocal:
+ - ACLOCAL_PATH
+ lib:
+ - LIBRARY_PATH
+ - LD_LIBRARY_PATH
+ lib64:
+ - LIBRARY_PATH
+ - LD_LIBRARY_PATH
+ include:
+ - CPATH
+ lib/pkgconfig:
+ - PKG_CONFIG_PATH
+ lib64/pkgconfig:
+ - PKG_CONFIG_PATH
+ '':
+ - CMAKE_PREFIX_PATH
diff --git a/lib/spack/spack/test/data/patch/bar.txt b/lib/spack/spack/test/data/patch/bar.txt
new file mode 100644
index 0000000000..ba578e48b1
--- /dev/null
+++ b/lib/spack/spack/test/data/patch/bar.txt
@@ -0,0 +1 @@
+BAR
diff --git a/lib/spack/spack/test/data/patch/foo.tgz b/lib/spack/spack/test/data/patch/foo.tgz
new file mode 100644
index 0000000000..73f598ac25
--- /dev/null
+++ b/lib/spack/spack/test/data/patch/foo.tgz
Binary files differ
diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py
index 671d6ee6c9..d07223221c 100644
--- a/lib/spack/spack/test/environment.py
+++ b/lib/spack/spack/test/environment.py
@@ -89,7 +89,7 @@ def files_to_be_sourced():
files = [
os.path.join(datadir, 'sourceme_first.sh'),
os.path.join(datadir, 'sourceme_second.sh'),
- os.path.join(datadir, 'sourceme_parameters.sh intel64'),
+ os.path.join(datadir, 'sourceme_parameters.sh'),
os.path.join(datadir, 'sourceme_unicode.sh')
]
@@ -110,6 +110,19 @@ def test_set(env):
assert str(3) == os.environ['B']
+def test_append_flags(env):
+ """Tests appending to a value in the environment."""
+
+ # Store a couple of commands
+ env.append_flags('APPEND_TO_ME', 'flag1')
+ env.append_flags('APPEND_TO_ME', 'flag2')
+
+ # ... execute the commands
+ env.apply_modifications()
+
+ assert 'flag1 flag2' == os.environ['APPEND_TO_ME']
+
+
def test_unset(env):
"""Tests unsetting values in the environment."""
@@ -211,7 +224,14 @@ def test_source_files(files_to_be_sourced):
"""Tests the construction of a list of environment modifications that are
the result of sourcing a file.
"""
- env = EnvironmentModifications.from_sourcing_files(*files_to_be_sourced)
+ env = EnvironmentModifications()
+ for filename in files_to_be_sourced:
+ if filename.endswith('sourceme_parameters.sh'):
+ env.extend(EnvironmentModifications.from_sourcing_file(
+ filename, 'intel64'))
+ else:
+ env.extend(EnvironmentModifications.from_sourcing_file(filename))
+
modifications = env.group_by_name()
# This is sensitive to the user's environment; can include
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py
index 3a934d5ea2..278b2efb70 100644
--- a/lib/spack/spack/test/install.py
+++ b/lib/spack/spack/test/install.py
@@ -22,45 +22,15 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
+import os
import pytest
+
import spack
import spack.store
-from spack.database import Database
-from spack.directory_layout import YamlDirectoryLayout
-from spack.fetch_strategy import URLFetchStrategy, FetchStrategyComposite
from spack.spec import Spec
-import os
-
-@pytest.fixture()
-def install_mockery(tmpdir, config, builtin_mock):
- """Hooks a fake install directory and a fake db into Spack."""
- layout = spack.store.layout
- db = spack.store.db
- # Use a fake install directory to avoid conflicts bt/w
- # installed pkgs and mock packages.
- spack.store.layout = YamlDirectoryLayout(str(tmpdir))
- spack.store.db = Database(str(tmpdir))
- # We use a fake package, so skip the checksum.
- spack.do_checksum = False
- yield
- # Turn checksumming back on
- spack.do_checksum = True
- # Restore Spack's layout.
- spack.store.layout = layout
- spack.store.db = db
-
-
-def fake_fetchify(url, pkg):
- """Fake the URL for a package so it downloads from a file."""
- fetcher = FetchStrategyComposite()
- fetcher.append(URLFetchStrategy(url))
- pkg.fetcher = fetcher
-
-
-@pytest.mark.usefixtures('install_mockery')
-def test_install_and_uninstall(mock_archive):
+def test_install_and_uninstall(install_mockery, mock_fetch):
# Get a basic concrete spec for the trivial install package.
spec = Spec('trivial-install-test-package')
spec.concretize()
@@ -69,8 +39,6 @@ def test_install_and_uninstall(mock_archive):
# Get the package
pkg = spack.repo.get(spec)
- fake_fetchify(mock_archive.url, pkg)
-
try:
pkg.do_install()
pkg.do_uninstall()
@@ -114,12 +82,10 @@ class MockStage(object):
return getattr(self.wrapped_stage, attr)
-@pytest.mark.usefixtures('install_mockery')
-def test_partial_install_delete_prefix_and_stage(mock_archive):
+def test_partial_install_delete_prefix_and_stage(install_mockery, mock_fetch):
spec = Spec('canfail')
spec.concretize()
pkg = spack.repo.get(spec)
- fake_fetchify(mock_archive.url, pkg)
remove_prefix = spack.package.Package.remove_prefix
instance_rm_prefix = pkg.remove_prefix
@@ -145,14 +111,12 @@ def test_partial_install_delete_prefix_and_stage(mock_archive):
pass
-@pytest.mark.usefixtures('install_mockery')
-def test_partial_install_keep_prefix(mock_archive):
+def test_partial_install_keep_prefix(install_mockery, mock_fetch):
spec = Spec('canfail')
spec.concretize()
pkg = spack.repo.get(spec)
# Normally the stage should start unset, but other tests set it
pkg._stage = None
- fake_fetchify(mock_archive.url, pkg)
remove_prefix = spack.package.Package.remove_prefix
try:
# If remove_prefix is called at any point in this test, that is an
@@ -175,12 +139,10 @@ def test_partial_install_keep_prefix(mock_archive):
pass
-@pytest.mark.usefixtures('install_mockery')
-def test_second_install_no_overwrite_first(mock_archive):
+def test_second_install_no_overwrite_first(install_mockery, mock_fetch):
spec = Spec('canfail')
spec.concretize()
pkg = spack.repo.get(spec)
- fake_fetchify(mock_archive.url, pkg)
remove_prefix = spack.package.Package.remove_prefix
try:
spack.package.Package.remove_prefix = mock_remove_prefix
@@ -198,28 +160,14 @@ def test_second_install_no_overwrite_first(mock_archive):
pass
-@pytest.mark.usefixtures('install_mockery')
-def test_store(mock_archive):
+def test_store(install_mockery, mock_fetch):
spec = Spec('cmake-client').concretized()
-
- for s in spec.traverse():
- fake_fetchify(mock_archive.url, s.package)
-
pkg = spec.package
- try:
- pkg.do_install()
- except Exception:
- pkg.remove_prefix()
- raise
+ pkg.do_install()
-@pytest.mark.usefixtures('install_mockery')
-def test_failing_build(mock_archive):
+def test_failing_build(install_mockery, mock_fetch):
spec = Spec('failing-build').concretized()
-
- for s in spec.traverse():
- fake_fetchify(mock_archive.url, s.package)
-
pkg = spec.package
with pytest.raises(spack.build_environment.ChildError):
pkg.do_install()
diff --git a/lib/spack/spack/test/lock.py b/lib/spack/spack/test/lock.py
index 5a4c3073f5..347b72b575 100644
--- a/lib/spack/spack/test/lock.py
+++ b/lib/spack/spack/test/lock.py
@@ -22,566 +22,881 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-"""
-These tests ensure that our lock works correctly.
+"""These tests ensure that our lock works correctly.
+
+This can be run in two ways.
+
+First, it can be run as a node-local test, with a typical invocation like
+this::
+
+ spack test lock
+
+You can *also* run it as an MPI program, which allows you to test locks
+across nodes. So, e.g., you can run the test like this::
+
+ mpirun -n 7 spack test lock
+
+And it will test locking correctness among MPI processes. Ideally, you
+want the MPI processes to span across multiple nodes, so, e.g., for SLURM
+you might do this::
+
+ srun -N 7 -n 7 -m cyclic spack test lock
+
+You can use this to test whether your shared filesystem properly supports
+POSIX reader-writer locking with byte ranges through fcntl.
+
+If you want to test on multiple filesystems, you can modify the
+``locations`` list below. By default it looks like this::
+
+ locations = [
+ tempfile.gettempdir(), # standard tmp directory (potentially local)
+ '/nfs/tmp2/%u', # NFS tmp mount
+ '/p/lscratch*/%u' # Lustre scratch mount
+ ]
+
+Add names and paths for your preferred filesystem mounts to test on them;
+the tests are parametrized to run on all the filesystems listed in this
+dict. Note that 'tmp' will be skipped for MPI testing, as it is often a
+node-local filesystem, and multi-node tests will fail if the locks aren't
+actually on a shared filesystem.
+
"""
import os
import shutil
import tempfile
-import unittest
+import traceback
+import glob
+import getpass
+from contextlib import contextmanager
from multiprocessing import Process
+import pytest
+
from llnl.util.filesystem import join_path, touch
from llnl.util.lock import *
from spack.util.multiproc import Barrier
-# This is the longest a failed test will take, as the barriers will
-# time out and raise an exception.
+
+#
+# This test can be run with MPI. MPI is "enabled" if we can import
+# mpi4py and the number of total MPI processes is greater than 1.
+# Otherwise it just runs as a node-local test.
+#
+# NOTE: MPI mode is different from node-local mode in that node-local
+# mode will spawn its own test processes, while MPI mode assumes you've
+# run this script as a SPMD application. In MPI mode, no additional
+# processes are spawned, and you need to ensure that you mpirun the
+# script with enough processes for all the multiproc_test cases below.
+#
+# If you don't run with enough processes, tests that require more
+# processes than you currently have will be skipped.
+#
+mpi = False
+comm = None
+try:
+ from mpi4py import MPI
+ comm = MPI.COMM_WORLD
+ if comm.size > 1:
+ mpi = True
+except:
+ pass
+
+
+"""This is a list of filesystem locations to test locks in. Paths are
+expanded so that %u is replaced with the current username. '~' is also
+legal and will be expanded to the user's home directory.
+
+Tests are skipped for directories that don't exist, so you'll need to
+update this with the locations of NFS, Lustre, and other mounts on your
+system.
+"""
+locations = [
+ tempfile.gettempdir(),
+ os.path.join('/nfs/tmp2/', getpass.getuser()),
+ os.path.join('/p/lscratch*/', getpass.getuser()),
+]
+
+"""This is the longest a failed multiproc test will take.
+Barriers will time out and raise an exception after this interval.
+In MPI mode, barriers don't time out (they hang). See mpi_multiproc_test.
+"""
barrier_timeout = 5
+"""This is the lock timeout for expected failures.
+This may need to be higher for some filesystems."""
+lock_fail_timeout = 0.1
+
+
+@contextmanager
+def read_only(path):
+ orginal_mode = os.stat(path).st_mode
+ os.chmod(path, 0o444)
+ yield
+ os.chmod(path, orginal_mode)
+
+
+@pytest.fixture(scope='session', params=locations)
+def lock_test_directory(request):
+ """This fixture causes tests to be executed for many different mounts.
+
+ See the ``locations`` dict above for details.
+ """
+ return request.param
+
+
+@pytest.fixture(scope='session')
+def lock_dir(lock_test_directory):
+ parent = next((p for p in glob.glob(lock_test_directory)
+ if os.path.exists(p) and os.access(p, os.W_OK)), None)
+ if not parent:
+ # Skip filesystems that don't exist or aren't writable
+ pytest.skip("requires filesystem: '%s'" % lock_test_directory)
+ elif mpi and parent == tempfile.gettempdir():
+ # Skip local tmp test for MPI runs
+ pytest.skip("skipping local tmp directory for MPI test.")
+
+ tempdir = None
+ if not mpi or comm.rank == 0:
+ tempdir = tempfile.mkdtemp(dir=parent)
+ if mpi:
+ tempdir = comm.bcast(tempdir)
+
+ yield tempdir
+
+ if mpi:
+ # rank 0 may get here before others, in which case it'll try to
+ # remove the directory while other processes try to re-create the
+ # lock. This will give errno 39: directory not empty. Use a
+ # barrier to ensure everyone is done first.
+ comm.barrier()
+
+ if not mpi or comm.rank == 0:
+ shutil.rmtree(tempdir)
+
+
+@pytest.fixture
+def private_lock_path(lock_dir):
+ """In MPI mode, this is a private lock for each rank in a multiproc test.
+
+ For other modes, it is the same as a shared lock.
+ """
+ lock_file = join_path(lock_dir, 'lockfile')
+ if mpi:
+ lock_file += '.%s' % comm.rank
+ yield lock_file
+
+
+@pytest.fixture
+def lock_path(lock_dir):
+ """This lock is shared among all processes in a multiproc test."""
+ lock_file = join_path(lock_dir, 'lockfile')
+ yield lock_file
+
+
+def local_multiproc_test(*functions):
+ """Order some processes using simple barrier synchronization."""
+ b = Barrier(len(functions), timeout=barrier_timeout)
+ procs = [Process(target=f, args=(b,)) for f in functions]
+
+ for p in procs:
+ p.start()
+
+ for p in procs:
+ p.join()
+ assert p.exitcode == 0
+
+
+def mpi_multiproc_test(*functions):
+ """SPMD version of multiproc test.
+
+ This needs to be run like so:
+
+ srun spack test lock
+
+ Each process executes its corresponding function. This is different
+ from ``multiproc_test`` above, which spawns the processes. This will
+ skip tests if there are too few processes to run them.
+ """
+ procs = len(functions)
+ if procs > comm.size:
+ pytest.skip("requires at least %d MPI processes" % procs)
+
+ comm.Barrier() # barrier before each MPI test
+
+ include = comm.rank < len(functions)
+ subcomm = comm.Split(include)
+
+ class subcomm_barrier(object):
+ """Stand-in for multiproc barrier for MPI-parallel jobs."""
+ def wait(self):
+ subcomm.Barrier()
+
+ if include:
+ try:
+ functions[subcomm.rank](subcomm_barrier())
+ except:
+ # aborting is the best we can do for MPI tests without
+ # hanging, since we're using MPI barriers. This will fail
+ # early and it loses the nice pytest output, but at least it
+ # gets use a stacktrace on the processes that failed.
+ traceback.print_exc()
+ comm.Abort()
+ subcomm.Free()
+
+ comm.Barrier() # barrier after each MPI test.
+
+
+"""``multiproc_test()`` should be called by tests below.
+``multiproc_test()`` will work for either MPI runs or for local runs.
+"""
+multiproc_test = mpi_multiproc_test if mpi else local_multiproc_test
+
+
+#
+# Process snippets below can be composed into tests.
+#
+def acquire_write(lock_path, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(lock_path, start, length)
+ lock.acquire_write() # grab exclusive lock
+ barrier.wait()
+ barrier.wait() # hold the lock until timeout in other procs.
+ return fn
+
+
+def acquire_read(lock_path, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(lock_path, start, length)
+ lock.acquire_read() # grab shared lock
+ barrier.wait()
+ barrier.wait() # hold the lock until timeout in other procs.
+ return fn
+
+
+def timeout_write(lock_path, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(lock_path, start, length)
+ barrier.wait() # wait for lock acquire in first process
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ barrier.wait()
+ return fn
+
+
+def timeout_read(lock_path, start=0, length=0):
+ def fn(barrier):
+ lock = Lock(lock_path, start, length)
+ barrier.wait() # wait for lock acquire in first process
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait()
+ return fn
+
+
+#
+# Test that exclusive locks on other processes time out when an
+# exclusive lock is held.
+#
+def test_write_lock_timeout_on_write(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_write_2(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_write_3(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_write_ranges(lock_path):
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ timeout_write(lock_path, 0, 1))
+
+
+def test_write_lock_timeout_on_write_ranges_2(lock_path):
+ multiproc_test(
+ acquire_write(lock_path, 0, 64),
+ acquire_write(lock_path, 65, 1),
+ timeout_write(lock_path, 0, 1),
+ timeout_write(lock_path, 63, 1))
+
+
+def test_write_lock_timeout_on_write_ranges_3(lock_path):
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ acquire_write(lock_path, 1, 1),
+ timeout_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_write_ranges_4(lock_path):
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ acquire_write(lock_path, 1, 1),
+ acquire_write(lock_path, 2, 456),
+ acquire_write(lock_path, 500, 64),
+ timeout_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+#
+# Test that shared locks on other processes time out when an
+# exclusive lock is held.
+#
+def test_read_lock_timeout_on_write(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_read(lock_path))
+
+
+def test_read_lock_timeout_on_write_2(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_read(lock_path),
+ timeout_read(lock_path))
+
+
+def test_read_lock_timeout_on_write_3(lock_path):
+ multiproc_test(
+ acquire_write(lock_path),
+ timeout_read(lock_path),
+ timeout_read(lock_path),
+ timeout_read(lock_path))
+
+
+def test_read_lock_timeout_on_write_ranges(lock_path):
+ """small write lock, read whole file."""
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ timeout_read(lock_path))
+
+
+def test_read_lock_timeout_on_write_ranges_2(lock_path):
+ """small write lock, small read lock"""
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ timeout_read(lock_path, 0, 1))
+
+
+def test_read_lock_timeout_on_write_ranges_3(lock_path):
+ """two write locks, overlapping read locks"""
+ multiproc_test(
+ acquire_write(lock_path, 0, 1),
+ acquire_write(lock_path, 64, 128),
+ timeout_read(lock_path, 0, 1),
+ timeout_read(lock_path, 128, 256))
-class LockTest(unittest.TestCase):
-
- def setUp(self):
- self.tempdir = tempfile.mkdtemp()
- self.lock_path = join_path(self.tempdir, 'lockfile')
-
- def tearDown(self):
- shutil.rmtree(self.tempdir, ignore_errors=True)
-
- def multiproc_test(self, *functions):
- """Order some processes using simple barrier synchronization."""
- b = Barrier(len(functions), timeout=barrier_timeout)
- procs = [Process(target=f, args=(b,)) for f in functions]
-
- for p in procs:
- p.start()
-
- for p in procs:
- p.join()
- self.assertEqual(p.exitcode, 0)
-
- #
- # Process snippets below can be composed into tests.
- #
- def acquire_write(self, start=0, length=0):
- def fn(barrier):
- lock = Lock(self.lock_path, start, length)
- lock.acquire_write() # grab exclusive lock
- barrier.wait()
- barrier.wait() # hold the lock until timeout in other procs.
- return fn
-
- def acquire_read(self, start=0, length=0):
- def fn(barrier):
- lock = Lock(self.lock_path, start, length)
- lock.acquire_read() # grab shared lock
- barrier.wait()
- barrier.wait() # hold the lock until timeout in other procs.
- return fn
-
- def timeout_write(self, start=0, length=0):
- def fn(barrier):
- lock = Lock(self.lock_path, start, length)
- barrier.wait() # wait for lock acquire in first process
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- barrier.wait()
- return fn
-
- def timeout_read(self, start=0, length=0):
- def fn(barrier):
- lock = Lock(self.lock_path, start, length)
- barrier.wait() # wait for lock acquire in first process
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait()
- return fn
-
- #
- # Test that exclusive locks on other processes time out when an
- # exclusive lock is held.
- #
- def test_write_lock_timeout_on_write(self):
- self.multiproc_test(self.acquire_write(), self.timeout_write())
-
- def test_write_lock_timeout_on_write_2(self):
- self.multiproc_test(
- self.acquire_write(), self.timeout_write(), self.timeout_write())
-
- def test_write_lock_timeout_on_write_3(self):
- self.multiproc_test(
- self.acquire_write(), self.timeout_write(), self.timeout_write(),
- self.timeout_write())
-
- def test_write_lock_timeout_on_write_ranges(self):
- self.multiproc_test(
- self.acquire_write(0, 1), self.timeout_write(0, 1))
-
- def test_write_lock_timeout_on_write_ranges_2(self):
- self.multiproc_test(
- self.acquire_write(0, 64), self.acquire_write(65, 1),
- self.timeout_write(0, 1), self.timeout_write(63, 1))
-
- def test_write_lock_timeout_on_write_ranges_3(self):
- self.multiproc_test(
- self.acquire_write(0, 1), self.acquire_write(1, 1),
- self.timeout_write(), self.timeout_write(), self.timeout_write())
-
- def test_write_lock_timeout_on_write_ranges_4(self):
- self.multiproc_test(
- self.acquire_write(0, 1), self.acquire_write(1, 1),
- self.acquire_write(2, 456), self.acquire_write(500, 64),
- self.timeout_write(), self.timeout_write(), self.timeout_write())
-
- #
- # Test that shared locks on other processes time out when an
- # exclusive lock is held.
- #
- def test_read_lock_timeout_on_write(self):
- self.multiproc_test(self.acquire_write(), self.timeout_read())
-
- def test_read_lock_timeout_on_write_2(self):
- self.multiproc_test(
- self.acquire_write(), self.timeout_read(), self.timeout_read())
-
- def test_read_lock_timeout_on_write_3(self):
- self.multiproc_test(
- self.acquire_write(), self.timeout_read(), self.timeout_read(),
- self.timeout_read())
-
- def test_read_lock_timeout_on_write_ranges(self):
- """small write lock, read whole file."""
- self.multiproc_test(self.acquire_write(0, 1), self.timeout_read())
-
- def test_read_lock_timeout_on_write_ranges_2(self):
- """small write lock, small read lock"""
- self.multiproc_test(self.acquire_write(0, 1), self.timeout_read(0, 1))
-
- def test_read_lock_timeout_on_write_ranges_3(self):
- """two write locks, overlapping read locks"""
- self.multiproc_test(
- self.acquire_write(0, 1), self.acquire_write(64, 128),
- self.timeout_read(0, 1), self.timeout_read(128, 256))
-
- #
- # Test that exclusive locks time out when shared locks are held.
- #
- def test_write_lock_timeout_on_read(self):
- self.multiproc_test(self.acquire_read(), self.timeout_write())
-
- def test_write_lock_timeout_on_read_2(self):
- self.multiproc_test(
- self.acquire_read(), self.timeout_write(), self.timeout_write())
-
- def test_write_lock_timeout_on_read_3(self):
- self.multiproc_test(
- self.acquire_read(), self.timeout_write(), self.timeout_write(),
- self.timeout_write())
-
- def test_write_lock_timeout_on_read_ranges(self):
- self.multiproc_test(self.acquire_read(0, 1), self.timeout_write())
-
- def test_write_lock_timeout_on_read_ranges_2(self):
- self.multiproc_test(self.acquire_read(0, 1), self.timeout_write(0, 1))
-
- def test_write_lock_timeout_on_read_ranges_3(self):
- self.multiproc_test(
- self.acquire_read(0, 1), self.acquire_read(10, 1),
- self.timeout_write(0, 1), self.timeout_write(10, 1))
-
- def test_write_lock_timeout_on_read_ranges_4(self):
- self.multiproc_test(
- self.acquire_read(0, 64),
- self.timeout_write(10, 1), self.timeout_write(32, 1))
-
- def test_write_lock_timeout_on_read_ranges_5(self):
- self.multiproc_test(
- self.acquire_read(64, 128),
- self.timeout_write(65, 1), self.timeout_write(127, 1),
- self.timeout_write(90, 10))
-
- #
- # Test that exclusive locks time while lots of shared locks are held.
- #
- def test_write_lock_timeout_with_multiple_readers_2_1(self):
- self.multiproc_test(
- self.acquire_read(), self.acquire_read(), self.timeout_write())
-
- def test_write_lock_timeout_with_multiple_readers_2_2(self):
- self.multiproc_test(
- self.acquire_read(), self.acquire_read(), self.timeout_write(),
- self.timeout_write())
-
- def test_write_lock_timeout_with_multiple_readers_3_1(self):
- self.multiproc_test(
- self.acquire_read(), self.acquire_read(), self.acquire_read(),
- self.timeout_write())
-
- def test_write_lock_timeout_with_multiple_readers_3_2(self):
- self.multiproc_test(
- self.acquire_read(), self.acquire_read(), self.acquire_read(),
- self.timeout_write(), self.timeout_write())
-
- def test_write_lock_timeout_with_multiple_readers_2_1_ranges(self):
- self.multiproc_test(
- self.acquire_read(0, 10), self.acquire_read(5, 10),
- self.timeout_write(5, 5))
-
- def test_write_lock_timeout_with_multiple_readers_2_3_ranges(self):
- self.multiproc_test(
- self.acquire_read(0, 10), self.acquire_read(5, 15),
- self.timeout_write(0, 1), self.timeout_write(11, 3),
- self.timeout_write(7, 1))
-
- def test_write_lock_timeout_with_multiple_readers_3_1_ranges(self):
- self.multiproc_test(
- self.acquire_read(0, 5), self.acquire_read(5, 5),
- self.acquire_read(10, 5),
- self.timeout_write(0, 15))
-
- def test_write_lock_timeout_with_multiple_readers_3_2_ranges(self):
- self.multiproc_test(
- self.acquire_read(0, 5), self.acquire_read(5, 5),
- self.acquire_read(10, 5),
- self.timeout_write(3, 10), self.timeout_write(5, 1))
-
- #
- # Test that read can be upgraded to write.
- #
- def test_upgrade_read_to_write(self):
- # ensure lock file exists the first time, so we open it read-only
- # to begin wtih.
- touch(self.lock_path)
-
- lock = Lock(self.lock_path)
- self.assertTrue(lock._reads == 0)
- self.assertTrue(lock._writes == 0)
+
+#
+# Test that exclusive locks time out when shared locks are held.
+#
+def test_write_lock_timeout_on_read(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_read_2(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_read_3(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_read_ranges(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 1),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_on_read_ranges_2(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 1),
+ timeout_write(lock_path, 0, 1))
+
+
+def test_write_lock_timeout_on_read_ranges_3(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 1),
+ acquire_read(lock_path, 10, 1),
+ timeout_write(lock_path, 0, 1),
+ timeout_write(lock_path, 10, 1))
+
+
+def test_write_lock_timeout_on_read_ranges_4(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 64),
+ timeout_write(lock_path, 10, 1),
+ timeout_write(lock_path, 32, 1))
+
+
+def test_write_lock_timeout_on_read_ranges_5(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 64, 128),
+ timeout_write(lock_path, 65, 1),
+ timeout_write(lock_path, 127, 1),
+ timeout_write(lock_path, 90, 10))
+
+
+#
+# Test that exclusive locks time while lots of shared locks are held.
+#
+def test_write_lock_timeout_with_multiple_readers_2_1(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_with_multiple_readers_2_2(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_with_multiple_readers_3_1(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_with_multiple_readers_3_2(lock_path):
+ multiproc_test(
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ acquire_read(lock_path),
+ timeout_write(lock_path),
+ timeout_write(lock_path))
+
+
+def test_write_lock_timeout_with_multiple_readers_2_1_ranges(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 10),
+ acquire_read(lock_path, 0.5, 10),
+ timeout_write(lock_path, 5, 5))
+
+
+def test_write_lock_timeout_with_multiple_readers_2_3_ranges(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 10),
+ acquire_read(lock_path, 5, 15),
+ timeout_write(lock_path, 0, 1),
+ timeout_write(lock_path, 11, 3),
+ timeout_write(lock_path, 7, 1))
+
+
+def test_write_lock_timeout_with_multiple_readers_3_1_ranges(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 5),
+ acquire_read(lock_path, 5, 5),
+ acquire_read(lock_path, 10, 5),
+ timeout_write(lock_path, 0, 15))
+
+
+def test_write_lock_timeout_with_multiple_readers_3_2_ranges(lock_path):
+ multiproc_test(
+ acquire_read(lock_path, 0, 5),
+ acquire_read(lock_path, 5, 5),
+ acquire_read(lock_path, 10, 5),
+ timeout_write(lock_path, 3, 10),
+ timeout_write(lock_path, 5, 1))
+
+
+#
+# Test that read can be upgraded to write.
+#
+def test_upgrade_read_to_write(private_lock_path):
+ """Test that a read lock can be upgraded to a write lock.
+
+ Note that to upgrade a read lock to a write lock, you have the be the
+ only holder of a read lock. Client code needs to coordinate that for
+ shared locks. For this test, we use a private lock just to test that an
+ upgrade is possible.
+ """
+ # ensure lock file exists the first time, so we open it read-only
+ # to begin wtih.
+ touch(private_lock_path)
+
+ lock = Lock(private_lock_path)
+ assert lock._reads == 0
+ assert lock._writes == 0
+
+ lock.acquire_read()
+ assert lock._reads == 1
+ assert lock._writes == 0
+ assert lock._file.mode == 'r+'
+
+ lock.acquire_write()
+ assert lock._reads == 1
+ assert lock._writes == 1
+ assert lock._file.mode == 'r+'
+
+ lock.release_write()
+ assert lock._reads == 1
+ assert lock._writes == 0
+ assert lock._file.mode == 'r+'
+
+ lock.release_read()
+ assert lock._reads == 0
+ assert lock._writes == 0
+ assert lock._file is None
+
+
+#
+# Test that read-only file can be read-locked but not write-locked.
+#
+def test_upgrade_read_to_write_fails_with_readonly_file(private_lock_path):
+ # ensure lock file exists the first time, so we open it read-only
+ # to begin wtih.
+ touch(private_lock_path)
+
+ with read_only(private_lock_path):
+ lock = Lock(private_lock_path)
+ assert lock._reads == 0
+ assert lock._writes == 0
lock.acquire_read()
- self.assertTrue(lock._reads == 1)
- self.assertTrue(lock._writes == 0)
- self.assertTrue(lock._file.mode == 'r+')
+ assert lock._reads == 1
+ assert lock._writes == 0
+ assert lock._file.mode == 'r'
+
+ with pytest.raises(LockError):
+ lock.acquire_write()
+
+
+#
+# Longer test case that ensures locks are reusable. Ordering is
+# enforced by barriers throughout -- steps are shown with numbers.
+#
+def test_complex_acquire_and_release_chain(lock_path):
+ def p1(barrier):
+ lock = Lock(lock_path)
lock.acquire_write()
- self.assertTrue(lock._reads == 1)
- self.assertTrue(lock._writes == 1)
- self.assertTrue(lock._file.mode == 'r+')
+ barrier.wait() # ---------------------------------------- 1
+ # others test timeout
+ barrier.wait() # ---------------------------------------- 2
+ lock.release_write() # release and others acquire read
+ barrier.wait() # ---------------------------------------- 3
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 4
+ lock.release_read()
+ barrier.wait() # ---------------------------------------- 5
+
+ # p2 upgrades read to write
+ barrier.wait() # ---------------------------------------- 6
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 7
+ # p2 releases write and read
+ barrier.wait() # ---------------------------------------- 8
+
+ # p3 acquires read
+ barrier.wait() # ---------------------------------------- 9
+ # p3 upgrades read to write
+ barrier.wait() # ---------------------------------------- 10
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 11
+ # p3 releases locks
+ barrier.wait() # ---------------------------------------- 12
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 13
+ lock.release_read()
- lock.release_write()
- self.assertTrue(lock._reads == 1)
- self.assertTrue(lock._writes == 0)
- self.assertTrue(lock._file.mode == 'r+')
+ def p2(barrier):
+ lock = Lock(lock_path)
+ # p1 acquires write
+ barrier.wait() # ---------------------------------------- 1
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 2
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 3
+ # p1 tests shared read
+ barrier.wait() # ---------------------------------------- 4
+ # others release reads
+ barrier.wait() # ---------------------------------------- 5
+
+ lock.acquire_write() # upgrade read to write
+ barrier.wait() # ---------------------------------------- 6
+ # others test timeout
+ barrier.wait() # ---------------------------------------- 7
+ lock.release_write() # release read AND write (need both)
lock.release_read()
- self.assertTrue(lock._reads == 0)
- self.assertTrue(lock._writes == 0)
- self.assertTrue(lock._file is None)
-
- #
- # Test that read-only file can be read-locked but not write-locked.
- #
- def test_upgrade_read_to_write_fails_with_readonly_file(self):
- # ensure lock file exists the first time, so we open it read-only
- # to begin wtih.
- touch(self.lock_path)
- os.chmod(self.lock_path, 0o444)
-
- lock = Lock(self.lock_path)
- self.assertTrue(lock._reads == 0)
- self.assertTrue(lock._writes == 0)
+ barrier.wait() # ---------------------------------------- 8
+
+ # p3 acquires read
+ barrier.wait() # ---------------------------------------- 9
+ # p3 upgrades read to write
+ barrier.wait() # ---------------------------------------- 10
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 11
+ # p3 releases locks
+ barrier.wait() # ---------------------------------------- 12
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 13
+ lock.release_read()
+
+ def p3(barrier):
+ lock = Lock(lock_path)
+ # p1 acquires write
+ barrier.wait() # ---------------------------------------- 1
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 2
lock.acquire_read()
- self.assertTrue(lock._reads == 1)
- self.assertTrue(lock._writes == 0)
- self.assertTrue(lock._file.mode == 'r')
+ barrier.wait() # ---------------------------------------- 3
+ # p1 tests shared read
+ barrier.wait() # ---------------------------------------- 4
+ lock.release_read()
+ barrier.wait() # ---------------------------------------- 5
+
+ # p2 upgrades read to write
+ barrier.wait() # ---------------------------------------- 6
+ with pytest.raises(LockError):
+ lock.acquire_write(lock_fail_timeout)
+ with pytest.raises(LockError):
+ lock.acquire_read(lock_fail_timeout)
+ barrier.wait() # ---------------------------------------- 7
+ # p2 releases write & read
+ barrier.wait() # ---------------------------------------- 8
- self.assertRaises(LockError, lock.acquire_write)
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 9
+ lock.acquire_write()
+ barrier.wait() # ---------------------------------------- 10
+ # others test timeout
+ barrier.wait() # ---------------------------------------- 11
+ lock.release_read() # release read AND write in opposite
+ lock.release_write() # order from before on p2
+ barrier.wait() # ---------------------------------------- 12
+ lock.acquire_read()
+ barrier.wait() # ---------------------------------------- 13
+ lock.release_read()
- #
- # Longer test case that ensures locks are reusable. Ordering is
- # enforced by barriers throughout -- steps are shown with numbers.
- #
- def test_complex_acquire_and_release_chain(self):
- def p1(barrier):
- lock = Lock(self.lock_path)
+ multiproc_test(p1, p2, p3)
- lock.acquire_write()
- barrier.wait() # ---------------------------------------- 1
- # others test timeout
- barrier.wait() # ---------------------------------------- 2
- lock.release_write() # release and others acquire read
- barrier.wait() # ---------------------------------------- 3
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 4
- lock.release_read()
- barrier.wait() # ---------------------------------------- 5
-
- # p2 upgrades read to write
- barrier.wait() # ---------------------------------------- 6
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 7
- # p2 releases write and read
- barrier.wait() # ---------------------------------------- 8
-
- # p3 acquires read
- barrier.wait() # ---------------------------------------- 9
- # p3 upgrades read to write
- barrier.wait() # ---------------------------------------- 10
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 11
- # p3 releases locks
- barrier.wait() # ---------------------------------------- 12
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 13
- lock.release_read()
-
- def p2(barrier):
- lock = Lock(self.lock_path)
-
- # p1 acquires write
- barrier.wait() # ---------------------------------------- 1
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 2
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 3
- # p1 tests shared read
- barrier.wait() # ---------------------------------------- 4
- # others release reads
- barrier.wait() # ---------------------------------------- 5
-
- lock.acquire_write() # upgrade read to write
- barrier.wait() # ---------------------------------------- 6
- # others test timeout
- barrier.wait() # ---------------------------------------- 7
- lock.release_write() # release read AND write (need both)
- lock.release_read()
- barrier.wait() # ---------------------------------------- 8
-
- # p3 acquires read
- barrier.wait() # ---------------------------------------- 9
- # p3 upgrades read to write
- barrier.wait() # ---------------------------------------- 10
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 11
- # p3 releases locks
- barrier.wait() # ---------------------------------------- 12
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 13
- lock.release_read()
-
- def p3(barrier):
- lock = Lock(self.lock_path)
-
- # p1 acquires write
- barrier.wait() # ---------------------------------------- 1
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 2
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 3
- # p1 tests shared read
- barrier.wait() # ---------------------------------------- 4
- lock.release_read()
- barrier.wait() # ---------------------------------------- 5
-
- # p2 upgrades read to write
- barrier.wait() # ---------------------------------------- 6
- self.assertRaises(LockError, lock.acquire_write, 0.1)
- self.assertRaises(LockError, lock.acquire_read, 0.1)
- barrier.wait() # ---------------------------------------- 7
- # p2 releases write & read
- barrier.wait() # ---------------------------------------- 8
-
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 9
- lock.acquire_write()
- barrier.wait() # ---------------------------------------- 10
- # others test timeout
- barrier.wait() # ---------------------------------------- 11
- lock.release_read() # release read AND write in opposite
- lock.release_write() # order from before on p2
- barrier.wait() # ---------------------------------------- 12
- lock.acquire_read()
- barrier.wait() # ---------------------------------------- 13
- lock.release_read()
-
- self.multiproc_test(p1, p2, p3)
-
- def test_transaction(self):
- def enter_fn():
- vals['entered'] = True
- def exit_fn(t, v, tb):
- vals['exited'] = True
- vals['exception'] = (t or v or tb)
+def test_transaction(lock_path):
+ def enter_fn():
+ vals['entered'] = True
- lock = Lock(self.lock_path)
- vals = {'entered': False, 'exited': False, 'exception': False}
- with ReadTransaction(lock, enter_fn, exit_fn):
- pass
+ def exit_fn(t, v, tb):
+ vals['exited'] = True
+ vals['exception'] = (t or v or tb)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
+ lock = Lock(lock_path)
+ vals = {'entered': False, 'exited': False, 'exception': False}
+ with ReadTransaction(lock, enter_fn, exit_fn):
+ pass
- vals = {'entered': False, 'exited': False, 'exception': False}
- with WriteTransaction(lock, enter_fn, exit_fn):
- pass
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
+ vals = {'entered': False, 'exited': False, 'exception': False}
+ with WriteTransaction(lock, enter_fn, exit_fn):
+ pass
- def test_transaction_with_exception(self):
- def enter_fn():
- vals['entered'] = True
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
- def exit_fn(t, v, tb):
- vals['exited'] = True
- vals['exception'] = (t or v or tb)
- lock = Lock(self.lock_path)
+def test_transaction_with_exception(lock_path):
+ def enter_fn():
+ vals['entered'] = True
- def do_read_with_exception():
- with ReadTransaction(lock, enter_fn, exit_fn):
- raise Exception()
+ def exit_fn(t, v, tb):
+ vals['exited'] = True
+ vals['exception'] = (t or v or tb)
- def do_write_with_exception():
- with WriteTransaction(lock, enter_fn, exit_fn):
- raise Exception()
+ lock = Lock(lock_path)
- vals = {'entered': False, 'exited': False, 'exception': False}
- self.assertRaises(Exception, do_read_with_exception)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
+ def do_read_with_exception():
+ with ReadTransaction(lock, enter_fn, exit_fn):
+ raise Exception()
- vals = {'entered': False, 'exited': False, 'exception': False}
- self.assertRaises(Exception, do_write_with_exception)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
+ def do_write_with_exception():
+ with WriteTransaction(lock, enter_fn, exit_fn):
+ raise Exception()
- def test_transaction_with_context_manager(self):
- class TestContextManager(object):
+ vals = {'entered': False, 'exited': False, 'exception': False}
+ with pytest.raises(Exception):
+ do_read_with_exception()
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
- def __enter__(self):
- vals['entered'] = True
+ vals = {'entered': False, 'exited': False, 'exception': False}
+ with pytest.raises(Exception):
+ do_write_with_exception()
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
- def __exit__(self, t, v, tb):
- vals['exited'] = True
- vals['exception'] = (t or v or tb)
- def exit_fn(t, v, tb):
- vals['exited_fn'] = True
- vals['exception_fn'] = (t or v or tb)
+def test_transaction_with_context_manager(lock_path):
+ class TestContextManager(object):
- lock = Lock(self.lock_path)
+ def __enter__(self):
+ vals['entered'] = True
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
+ def __exit__(self, t, v, tb):
+ vals['exited'] = True
+ vals['exception'] = (t or v or tb)
+
+ def exit_fn(t, v, tb):
+ vals['exited_fn'] = True
+ vals['exception_fn'] = (t or v or tb)
+
+ lock = Lock(lock_path)
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with ReadTransaction(lock, TestContextManager, exit_fn):
+ pass
+
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
+ assert vals['exited_fn']
+ assert not vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with ReadTransaction(lock, TestContextManager):
+ pass
+
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
+ assert not vals['exited_fn']
+ assert not vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with WriteTransaction(lock, TestContextManager, exit_fn):
+ pass
+
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
+ assert vals['exited_fn']
+ assert not vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with WriteTransaction(lock, TestContextManager):
+ pass
+
+ assert vals['entered']
+ assert vals['exited']
+ assert not vals['exception']
+ assert not vals['exited_fn']
+ assert not vals['exception_fn']
+
+
+def test_transaction_with_context_manager_and_exception(lock_path):
+ class TestContextManager(object):
+ def __enter__(self):
+ vals['entered'] = True
+
+ def __exit__(self, t, v, tb):
+ vals['exited'] = True
+ vals['exception'] = (t or v or tb)
+
+ def exit_fn(t, v, tb):
+ vals['exited_fn'] = True
+ vals['exception_fn'] = (t or v or tb)
+
+ lock = Lock(lock_path)
+
+ def do_read_with_exception(exit_fn):
with ReadTransaction(lock, TestContextManager, exit_fn):
- pass
-
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
- self.assertTrue(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- with ReadTransaction(lock, TestContextManager):
- pass
-
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
- self.assertFalse(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
+ raise Exception()
+
+ def do_write_with_exception(exit_fn):
with WriteTransaction(lock, TestContextManager, exit_fn):
- pass
-
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
- self.assertTrue(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- with WriteTransaction(lock, TestContextManager):
- pass
-
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertFalse(vals['exception'])
- self.assertFalse(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
-
- def test_transaction_with_context_manager_and_exception(self):
- class TestContextManager(object):
-
- def __enter__(self):
- vals['entered'] = True
-
- def __exit__(self, t, v, tb):
- vals['exited'] = True
- vals['exception'] = (t or v or tb)
-
- def exit_fn(t, v, tb):
- vals['exited_fn'] = True
- vals['exception_fn'] = (t or v or tb)
-
- lock = Lock(self.lock_path)
-
- def do_read_with_exception(exit_fn):
- with ReadTransaction(lock, TestContextManager, exit_fn):
- raise Exception()
-
- def do_write_with_exception(exit_fn):
- with WriteTransaction(lock, TestContextManager, exit_fn):
- raise Exception()
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- self.assertRaises(Exception, do_read_with_exception, exit_fn)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
- self.assertTrue(vals['exited_fn'])
- self.assertTrue(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- self.assertRaises(Exception, do_read_with_exception, None)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
- self.assertFalse(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- self.assertRaises(Exception, do_write_with_exception, exit_fn)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
- self.assertTrue(vals['exited_fn'])
- self.assertTrue(vals['exception_fn'])
-
- vals = {'entered': False, 'exited': False, 'exited_fn': False,
- 'exception': False, 'exception_fn': False}
- self.assertRaises(Exception, do_write_with_exception, None)
- self.assertTrue(vals['entered'])
- self.assertTrue(vals['exited'])
- self.assertTrue(vals['exception'])
- self.assertFalse(vals['exited_fn'])
- self.assertFalse(vals['exception_fn'])
+ raise Exception()
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with pytest.raises(Exception):
+ do_read_with_exception(exit_fn)
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
+ assert vals['exited_fn']
+ assert vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with pytest.raises(Exception):
+ do_read_with_exception(None)
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
+ assert not vals['exited_fn']
+ assert not vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with pytest.raises(Exception):
+ do_write_with_exception(exit_fn)
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
+ assert vals['exited_fn']
+ assert vals['exception_fn']
+
+ vals = {'entered': False, 'exited': False, 'exited_fn': False,
+ 'exception': False, 'exception_fn': False}
+ with pytest.raises(Exception):
+ do_write_with_exception(None)
+ assert vals['entered']
+ assert vals['exited']
+ assert vals['exception']
+ assert not vals['exited_fn']
+ assert not vals['exception_fn']
diff --git a/lib/spack/spack/test/log.py b/lib/spack/spack/test/log.py
new file mode 100644
index 0000000000..9c05ed002d
--- /dev/null
+++ b/lib/spack/spack/test/log.py
@@ -0,0 +1,95 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from __future__ import print_function
+import pytest
+
+from llnl.util.tty.log import log_output
+from spack.util.executable import which
+
+
+def test_log_python_output_with_python_stream(capsys, tmpdir):
+ # pytest's DontReadFromInput object does not like what we do here, so
+ # disable capsys or things hang.
+ with capsys.disabled():
+ with log_output('foo.txt'):
+ print('logged')
+
+ with open('foo.txt') as f:
+ assert f.read() == 'logged\n'
+
+ assert capsys.readouterr() == ('', '')
+
+
+def test_log_python_output_with_fd_stream(capfd, tmpdir):
+ with log_output('foo.txt'):
+ print('logged')
+
+ with open('foo.txt') as f:
+ assert f.read() == 'logged\n'
+
+ assert capfd.readouterr() == ('', '')
+
+
+def test_log_python_output_and_echo_output(capfd, tmpdir):
+ with log_output('foo.txt') as logger:
+ with logger.force_echo():
+ print('echo')
+ print('logged')
+
+ assert capfd.readouterr() == ('echo\n', '')
+
+ with open('foo.txt') as f:
+ assert f.read() == 'echo\nlogged\n'
+
+
+@pytest.mark.skipif(not which('echo'), reason="needs echo command")
+def test_log_subproc_output(capsys, tmpdir):
+ echo = which('echo')
+
+ # pytest seems to interfere here, so we need to use capsys.disabled()
+ # TODO: figure out why this is and whether it means we're doing
+ # sometihng wrong with OUR redirects. Seems like it should work even
+ # with capsys enabled.
+ with capsys.disabled():
+ with log_output('foo.txt'):
+ echo('logged')
+
+ with open('foo.txt') as f:
+ assert f.read() == 'logged\n'
+
+
+@pytest.mark.skipif(not which('echo'), reason="needs echo command")
+def test_log_subproc_and_echo_output(capfd, tmpdir):
+ echo = which('echo')
+
+ with log_output('foo.txt') as logger:
+ with logger.force_echo():
+ echo('echo')
+ print('logged')
+
+ assert capfd.readouterr() == ('echo\n', '')
+
+ with open('foo.txt') as f:
+ assert f.read() == 'logged\n'
diff --git a/lib/spack/spack/test/module_parsing.py b/lib/spack/spack/test/module_parsing.py
index d306915834..e563953478 100644
--- a/lib/spack/spack/test/module_parsing.py
+++ b/lib/spack/spack/test/module_parsing.py
@@ -112,7 +112,7 @@ def test_get_module_cmd_from_bash_ticks(save_env):
def test_get_module_cmd_from_bash_parens(save_env):
- os.environ['BASH_FUNC_module()'] = '() { eval $(echo fill bash $*)\n}'
+ os.environ['BASH_FUNC_module()'] = '() { eval $(echo fill sh $*)\n}'
module_cmd = get_module_cmd()
module_cmd_list = module_cmd('list', output=str, error=str)
diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py
index bd37196f2a..40841f15a7 100644
--- a/lib/spack/spack/test/modules.py
+++ b/lib/spack/spack/test/modules.py
@@ -27,6 +27,7 @@ import contextlib
from six import StringIO
import pytest
+
import spack.modules
import spack.spec
@@ -105,8 +106,13 @@ def test_update_dictionary_extending_list():
assert target['baz'] == 'foobaz'
-def test_inspect_path():
- env = spack.modules.inspect_path('/usr')
+def test_inspect_path(tmpdir):
+ tmpdir.chdir()
+ tmpdir.mkdir('bin')
+ tmpdir.mkdir('lib')
+ tmpdir.mkdir('include')
+
+ env = spack.modules.inspect_path(str(tmpdir))
names = [item.name for item in env]
assert 'PATH' in names
assert 'LIBRARY_PATH' in names
diff --git a/lib/spack/spack/test/optional_deps.py b/lib/spack/spack/test/optional_deps.py
index db2267f047..0023fce52d 100644
--- a/lib/spack/spack/test/optional_deps.py
+++ b/lib/spack/spack/test/optional_deps.py
@@ -29,65 +29,82 @@ from spack.spec import Spec
@pytest.fixture(
params=[
# Normalize simple conditionals
- ('optional-dep-test', Spec('optional-dep-test')),
- ('optional-dep-test~a', Spec('optional-dep-test~a')),
- ('optional-dep-test+a', Spec('optional-dep-test+a', Spec('a'))),
- ('optional-dep-test a=true', Spec(
- 'optional-dep-test a=true', Spec('a')
- )),
- ('optional-dep-test a=true', Spec('optional-dep-test+a', Spec('a'))),
- ('optional-dep-test@1.1', Spec('optional-dep-test@1.1', Spec('b'))),
- ('optional-dep-test%intel', Spec(
- 'optional-dep-test%intel', Spec('c')
- )),
- ('optional-dep-test%intel@64.1', Spec(
- 'optional-dep-test%intel@64.1', Spec('c'), Spec('d')
- )),
- ('optional-dep-test%intel@64.1.2', Spec(
- 'optional-dep-test%intel@64.1.2', Spec('c'), Spec('d')
- )),
- ('optional-dep-test%clang@35', Spec(
- 'optional-dep-test%clang@35', Spec('e')
- )),
+ ('optional-dep-test', {'optional-dep-test': None}),
+ ('optional-dep-test~a', {'optional-dep-test~a': None}),
+ ('optional-dep-test+a', {'optional-dep-test+a': {'a': None}}),
+ ('optional-dep-test a=true', {
+ 'optional-dep-test a=true': {
+ 'a': None
+ }}),
+ ('optional-dep-test a=true', {
+ 'optional-dep-test+a': {
+ 'a': None
+ }}),
+ ('optional-dep-test@1.1', {'optional-dep-test@1.1': {'b': None}}),
+ ('optional-dep-test%intel', {'optional-dep-test%intel': {'c': None}}),
+ ('optional-dep-test%intel@64.1', {
+ 'optional-dep-test%intel@64.1': {
+ 'c': None,
+ 'd': None
+ }}),
+ ('optional-dep-test%intel@64.1.2', {
+ 'optional-dep-test%intel@64.1.2': {
+ 'c': None,
+ 'd': None
+ }}),
+ ('optional-dep-test%clang@35', {
+ 'optional-dep-test%clang@35': {
+ 'e': None
+ }}),
# Normalize multiple conditionals
- ('optional-dep-test+a@1.1', Spec(
- 'optional-dep-test+a@1.1', Spec('a'), Spec('b')
- )),
- ('optional-dep-test+a%intel', Spec(
- 'optional-dep-test+a%intel', Spec('a'), Spec('c')
- )),
- ('optional-dep-test@1.1%intel', Spec(
- 'optional-dep-test@1.1%intel', Spec('b'), Spec('c')
- )),
- ('optional-dep-test@1.1%intel@64.1.2+a', Spec(
- 'optional-dep-test@1.1%intel@64.1.2+a',
- Spec('b'),
- Spec('a'),
- Spec('c'),
- Spec('d')
- )),
- ('optional-dep-test@1.1%clang@36.5+a', Spec(
- 'optional-dep-test@1.1%clang@36.5+a',
- Spec('b'),
- Spec('a'),
- Spec('e')
- )),
+ ('optional-dep-test+a@1.1', {
+ 'optional-dep-test+a@1.1': {
+ 'a': None,
+ 'b': None
+ }}),
+ ('optional-dep-test+a%intel', {
+ 'optional-dep-test+a%intel': {
+ 'a': None,
+ 'c': None
+ }}),
+ ('optional-dep-test@1.1%intel', {
+ 'optional-dep-test@1.1%intel': {
+ 'b': None,
+ 'c': None
+ }}),
+ ('optional-dep-test@1.1%intel@64.1.2+a', {
+ 'optional-dep-test@1.1%intel@64.1.2+a': {
+ 'a': None,
+ 'b': None,
+ 'c': None,
+ 'd': None
+ }}),
+ ('optional-dep-test@1.1%clang@36.5+a', {
+ 'optional-dep-test@1.1%clang@36.5+a': {
+ 'b': None,
+ 'a': None,
+ 'e': None
+ }}),
# Chained MPI
- ('optional-dep-test-2+mpi', Spec(
- 'optional-dep-test-2+mpi',
- Spec('optional-dep-test+mpi', Spec('mpi'))
- )),
+ ('optional-dep-test-2+mpi', {
+ 'optional-dep-test-2+mpi': {
+ 'optional-dep-test+mpi': {'mpi': None}
+ }}),
# Each of these dependencies comes from a conditional
# dependency on another. This requires iterating to evaluate
# the whole chain.
- ('optional-dep-test+f', Spec(
- 'optional-dep-test+f', Spec('f'), Spec('g'), Spec('mpi')
- ))
+ ('optional-dep-test+f', {
+ 'optional-dep-test+f': {
+ 'f': None,
+ 'g': None,
+ 'mpi': None
+ }})
]
)
def spec_and_expected(request):
- """Parameters for te normalization test."""
- return request.param
+ """Parameters for the normalization test."""
+ spec, d = request.param
+ return spec, Spec.from_literal(d)
def test_normalize(spec_and_expected, config, builtin_mock):
diff --git a/lib/spack/spack/test/packaging.py b/lib/spack/spack/test/packaging.py
new file mode 100644
index 0000000000..bac8bf980f
--- /dev/null
+++ b/lib/spack/spack/test/packaging.py
@@ -0,0 +1,304 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+"""
+This test checks the binary packaging infrastructure
+"""
+import pytest
+import spack
+import spack.store
+from spack.fetch_strategy import URLFetchStrategy, FetchStrategyComposite
+from spack.spec import Spec
+import spack.binary_distribution as bindist
+from llnl.util.filesystem import join_path, mkdirp
+import argparse
+import spack.cmd.buildcache as buildcache
+from spack.relocate import *
+import os
+import stat
+import sys
+import shutil
+from spack.util.executable import ProcessError
+
+
+@pytest.fixture(scope='function')
+def testing_gpg_directory(tmpdir):
+ old_gpg_path = spack.util.gpg.GNUPGHOME
+ spack.util.gpg.GNUPGHOME = str(tmpdir.join('gpg'))
+ yield
+ spack.util.gpg.GNUPGHOME = old_gpg_path
+
+
+def has_gnupg2():
+ try:
+ spack.util.gpg.Gpg.gpg()('--version', output=os.devnull)
+ return True
+ except ProcessError:
+ return False
+
+
+def fake_fetchify(url, pkg):
+ """Fake the URL for a package so it downloads from a file."""
+ fetcher = FetchStrategyComposite()
+ fetcher.append(URLFetchStrategy(url))
+ pkg.fetcher = fetcher
+
+
+@pytest.mark.usefixtures('install_mockery', 'testing_gpg_directory')
+def test_packaging(mock_archive, tmpdir):
+ # tweak patchelf to only do a download
+ spec = Spec("patchelf")
+ spec.concretize()
+ pkg = spack.repo.get(spec)
+ fake_fetchify(pkg.fetcher, pkg)
+ mkdirp(join_path(pkg.prefix, "bin"))
+ patchelfscr = join_path(pkg.prefix, "bin", "patchelf")
+ f = open(patchelfscr, 'w')
+ body = """#!/bin/bash
+echo $PATH"""
+ f.write(body)
+ f.close()
+ st = os.stat(patchelfscr)
+ os.chmod(patchelfscr, st.st_mode | stat.S_IEXEC)
+
+ # Install the test package
+ spec = Spec('trivial-install-test-package')
+ spec.concretize()
+ assert spec.concrete
+ pkg = spack.repo.get(spec)
+ fake_fetchify(mock_archive.url, pkg)
+ pkg.do_install()
+
+ # Put some non-relocatable file in there
+ filename = join_path(spec.prefix, "dummy.txt")
+ with open(filename, "w") as script:
+ script.write(spec.prefix)
+
+ # Create the build cache and
+ # put it directly into the mirror
+
+ mirror_path = join_path(tmpdir, 'test-mirror')
+ specs = [spec]
+ spack.mirror.create(
+ mirror_path, specs, no_checksum=True
+ )
+
+ # register mirror with spack config
+ mirrors = {'spack-mirror-test': 'file://' + mirror_path}
+ spack.config.update_config('mirrors', mirrors)
+
+ stage = spack.stage.Stage(
+ mirrors['spack-mirror-test'], name="build_cache", keep=True)
+ stage.create()
+ # setup argument parser
+ parser = argparse.ArgumentParser()
+ buildcache.setup_parser(parser)
+
+ # Create a private key to sign package with if gpg2 available
+ if has_gnupg2():
+ spack.util.gpg.Gpg.create(name='test key 1', expires='0',
+ email='spack@googlegroups.com',
+ comment='Spack test key')
+ # Create build cache with signing
+ args = parser.parse_args(['create', '-d', mirror_path, str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # Uninstall the package
+ pkg.do_uninstall(force=True)
+
+ # test overwrite install
+ args = parser.parse_args(['install', '-f', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # create build cache with relative path and signing
+ args = parser.parse_args(
+ ['create', '-d', mirror_path, '-f', '-r', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # Uninstall the package
+ pkg.do_uninstall(force=True)
+
+ # install build cache with verification
+ args = parser.parse_args(['install', str(spec)])
+ buildcache.install_tarball(spec, args)
+
+ # test overwrite install
+ args = parser.parse_args(['install', '-f', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ else:
+ # create build cache without signing
+ args = parser.parse_args(
+ ['create', '-d', mirror_path, '-y', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # Uninstall the package
+ pkg.do_uninstall(force=True)
+
+ # install build cache without verification
+ args = parser.parse_args(['install', '-y', str(spec)])
+ buildcache.install_tarball(spec, args)
+
+ # test overwrite install without verification
+ args = parser.parse_args(['install', '-f', '-y', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # create build cache with relative path
+ args = parser.parse_args(
+ ['create', '-d', mirror_path, '-f', '-r', '-y', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # Uninstall the package
+ pkg.do_uninstall(force=True)
+
+ # install build cache
+ args = parser.parse_args(['install', '-y', str(spec)])
+ buildcache.install_tarball(spec, args)
+
+ # test overwrite install
+ args = parser.parse_args(['install', '-f', '-y', str(spec)])
+ buildcache.buildcache(parser, args)
+
+ # Validate the relocation information
+ buildinfo = bindist.read_buildinfo_file(spec.prefix)
+ assert(buildinfo['relocate_textfiles'] == ['dummy.txt'])
+
+ args = parser.parse_args(['list'])
+ buildcache.buildcache(parser, args)
+
+ args = parser.parse_args(['list', 'trivial'])
+ buildcache.buildcache(parser, args)
+
+ # Copy a key to the mirror to have something to download
+ shutil.copyfile(spack.mock_gpg_keys_path + '/external.key',
+ mirror_path + '/external.key')
+
+ args = parser.parse_args(['keys'])
+ buildcache.buildcache(parser, args)
+
+ # unregister mirror with spack config
+ mirrors = {}
+ spack.config.update_config('mirrors', mirrors)
+ shutil.rmtree(mirror_path)
+ stage.destroy()
+
+
+def test_relocate():
+ assert (needs_binary_relocation('relocatable') is False)
+
+ out = macho_make_paths_relative('/Users/Shares/spack/pkgC/lib/libC.dylib',
+ '/Users/Shared/spack',
+ ('/Users/Shared/spack/pkgA/lib',
+ '/Users/Shared/spack/pkgB/lib',
+ '/usr/local/lib'),
+ ('/Users/Shared/spack/pkgA/libA.dylib',
+ '/Users/Shared/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'),
+ '/Users/Shared/spack/pkgC/lib/libC.dylib')
+ assert out == (['@loader_path/../../../../Shared/spack/pkgA/lib',
+ '@loader_path/../../../../Shared/spack/pkgB/lib',
+ '/usr/local/lib'],
+ ['@loader_path/../../../../Shared/spack/pkgA/libA.dylib',
+ '@loader_path/../../../../Shared/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'],
+ '@rpath/libC.dylib')
+
+ out = macho_make_paths_relative('/Users/Shared/spack/pkgC/bin/exeC',
+ '/Users/Shared/spack',
+ ('/Users/Shared/spack/pkgA/lib',
+ '/Users/Shared/spack/pkgB/lib',
+ '/usr/local/lib'),
+ ('/Users/Shared/spack/pkgA/libA.dylib',
+ '/Users/Shared/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'), None)
+
+ assert out == (['@loader_path/../../pkgA/lib',
+ '@loader_path/../../pkgB/lib',
+ '/usr/local/lib'],
+ ['@loader_path/../../pkgA/libA.dylib',
+ '@loader_path/../../pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'], None)
+
+ out = macho_replace_paths('/Users/Shared/spack',
+ '/Applications/spack',
+ ('/Users/Shared/spack/pkgA/lib',
+ '/Users/Shared/spack/pkgB/lib',
+ '/usr/local/lib'),
+ ('/Users/Shared/spack/pkgA/libA.dylib',
+ '/Users/Shared/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'),
+ '/Users/Shared/spack/pkgC/lib/libC.dylib')
+ assert out == (['/Applications/spack/pkgA/lib',
+ '/Applications/spack/pkgB/lib',
+ '/usr/local/lib'],
+ ['/Applications/spack/pkgA/libA.dylib',
+ '/Applications/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'],
+ '/Applications/spack/pkgC/lib/libC.dylib')
+
+ out = macho_replace_paths('/Users/Shared/spack',
+ '/Applications/spack',
+ ('/Users/Shared/spack/pkgA/lib',
+ '/Users/Shared/spack/pkgB/lib',
+ '/usr/local/lib'),
+ ('/Users/Shared/spack/pkgA/libA.dylib',
+ '/Users/Shared/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'),
+ None)
+ assert out == (['/Applications/spack/pkgA/lib',
+ '/Applications/spack/pkgB/lib',
+ '/usr/local/lib'],
+ ['/Applications/spack/pkgA/libA.dylib',
+ '/Applications/spack/pkgB/libB.dylib',
+ '/usr/local/lib/libloco.dylib'],
+ None)
+
+ out = get_relative_rpaths(
+ '/usr/bin/test', '/usr',
+ ('/usr/lib', '/usr/lib64', '/opt/local/lib'))
+ assert out == ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib']
+
+ out = substitute_rpath(
+ ('/usr/lib', '/usr/lib64', '/opt/local/lib'), '/usr', '/opt')
+ assert out == ['/opt/lib', '/opt/lib64', '/opt/local/lib']
+
+
+@pytest.mark.skipif(sys.platform != 'darwin',
+ reason="only works with Mach-o objects")
+def test_relocate_macho():
+ get_patchelf()
+ assert (needs_binary_relocation('Mach-O') is True)
+ macho_get_paths('/bin/bash')
+ shutil.copyfile('/bin/bash', 'bash')
+ modify_macho_object('bash', '/usr', '/opt', False)
+ modify_macho_object('bash', '/usr', '/opt', True)
+ shutil.copyfile('/usr/lib/libncurses.5.4.dylib', 'libncurses.5.4.dylib')
+ modify_macho_object('libncurses.5.4.dylib', '/usr', '/opt', False)
+ modify_macho_object('libncurses.5.4.dylib', '/usr', '/opt', True)
+
+
+@pytest.mark.skipif(sys.platform != 'linux2',
+ reason="only works with Elf objects")
+def test_relocate_elf():
+ assert (needs_binary_relocation('ELF') is True)
diff --git a/lib/spack/spack/test/patch.py b/lib/spack/spack/test/patch.py
new file mode 100644
index 0000000000..7976956748
--- /dev/null
+++ b/lib/spack/spack/test/patch.py
@@ -0,0 +1,84 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import os.path
+
+import pytest
+import sys
+
+import spack
+import spack.util.compression
+import spack.stage
+
+
+@pytest.fixture()
+def mock_apply(monkeypatch):
+ """Monkeypatches ``Patch.apply`` to test only the additional behavior of
+ derived classes.
+ """
+
+ m = sys.modules['spack.patch']
+
+ def check_expand(self, *args, **kwargs):
+ # Check tarball expansion
+ if spack.util.compression.allowed_archive(self.url):
+ file = os.path.join(self.path, 'foo.txt')
+ assert os.path.exists(file)
+
+ # Check tarball fetching
+ dirname = os.path.dirname(self.path)
+ basename = os.path.basename(self.url)
+ tarball = os.path.join(dirname, basename)
+ assert os.path.exists(tarball)
+
+ monkeypatch.setattr(m.Patch, 'apply', check_expand)
+
+
+@pytest.fixture()
+def mock_stage(tmpdir, monkeypatch):
+
+ monkeypatch.setattr(spack, 'stage_path', str(tmpdir))
+
+ class MockStage(object):
+ def __init__(self):
+ self.mirror_path = str(tmpdir)
+
+ return MockStage()
+
+
+data_path = os.path.join(spack.test_path, 'data', 'patch')
+
+
+@pytest.mark.usefixtures('mock_apply')
+@pytest.mark.parametrize('filename,md5', [
+ (os.path.join(data_path, 'foo.tgz'), 'bff717ca9cbbb293bdf188e44c540758'),
+ (os.path.join(data_path, 'bar.txt'), 'f98bf6f12e995a053b7647b10d937912')
+])
+def test_url_patch_expansion(mock_stage, filename, md5):
+
+ m = sys.modules['spack.patch']
+ url = 'file://' + filename
+ patch = m.Patch.create(None, url, 0, md5=md5)
+ patch.apply(mock_stage)
diff --git a/lib/spack/spack/test/sbang.py b/lib/spack/spack/test/sbang.py
index c0831a4e2d..0962f508cc 100644
--- a/lib/spack/spack/test/sbang.py
+++ b/lib/spack/spack/test/sbang.py
@@ -30,6 +30,7 @@ import stat
import pytest
import tempfile
import shutil
+import filecmp
from llnl.util.filesystem import *
@@ -38,12 +39,16 @@ from spack.hooks.sbang import *
from spack.util.executable import which
-short_line = "#!/this/is/short/bin/bash\n"
-long_line = "#!/this/" + ('x' * 200) + "/is/long\n"
-lua_line = "#!/this/" + ('x' * 200) + "/is/lua\n"
-lua_line_patched = "--!/this/" + ('x' * 200) + "/is/lua\n"
-sbang_line = '#!/bin/bash %s/bin/sbang\n' % spack.spack_root
-last_line = "last!\n"
+short_line = "#!/this/is/short/bin/bash\n"
+long_line = "#!/this/" + ('x' * 200) + "/is/long\n"
+lua_line = "#!/this/" + ('x' * 200) + "/is/lua\n"
+lua_in_text = ("line\n") * 100 + "lua\n" + ("line\n" * 100)
+lua_line_patched = "--!/this/" + ('x' * 200) + "/is/lua\n"
+node_line = "#!/this/" + ('x' * 200) + "/is/node\n"
+node_in_text = ("line\n") * 100 + "lua\n" + ("line\n" * 100)
+node_line_patched = "//!/this/" + ('x' * 200) + "/is/node\n"
+sbang_line = '#!/bin/bash %s/bin/sbang\n' % spack.spack_root
+last_line = "last!\n"
class ScriptDirectory(object):
@@ -72,6 +77,26 @@ class ScriptDirectory(object):
f.write(lua_line)
f.write(last_line)
+ # Lua script with long shebang
+ self.lua_textbang = os.path.join(self.tempdir, 'lua_in_text')
+ with open(self.lua_textbang, 'w') as f:
+ f.write(short_line)
+ f.write(lua_in_text)
+ f.write(last_line)
+
+ # Node script with long shebang
+ self.node_shebang = os.path.join(self.tempdir, 'node')
+ with open(self.node_shebang, 'w') as f:
+ f.write(node_line)
+ f.write(last_line)
+
+ # Node script with long shebang
+ self.node_textbang = os.path.join(self.tempdir, 'node_in_text')
+ with open(self.node_textbang, 'w') as f:
+ f.write(short_line)
+ f.write(node_in_text)
+ f.write(last_line)
+
# Script already using sbang.
self.has_sbang = os.path.join(self.tempdir, 'shebang')
with open(self.has_sbang, 'w') as f:
@@ -123,6 +148,17 @@ def test_shebang_handling(script_dir):
assert f.readline() == lua_line_patched
assert f.readline() == last_line
+ # Make sure this got patched.
+ with open(script_dir.node_shebang, 'r') as f:
+ assert f.readline() == sbang_line
+ assert f.readline() == node_line_patched
+ assert f.readline() == last_line
+
+ assert filecmp.cmp(script_dir.lua_textbang,
+ os.path.join(script_dir.tempdir, 'lua_in_text'))
+ assert filecmp.cmp(script_dir.node_textbang,
+ os.path.join(script_dir.tempdir, 'node_in_text'))
+
# Make sure this is untouched
with open(script_dir.has_sbang, 'r') as f:
assert f.readline() == sbang_line
diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py
index 07a9b72e09..0d04cb5b0c 100644
--- a/lib/spack/spack/test/spec_dag.py
+++ b/lib/spack/spack/test/spec_dag.py
@@ -30,7 +30,7 @@ import spack
import spack.architecture
import spack.package
-from spack.spec import Spec
+from spack.spec import Spec, canonical_deptype, alldeps
def check_links(spec_to_check):
@@ -197,15 +197,19 @@ class TestSpecDag(object):
spec.normalize()
spec.normalize()
- def test_normalize_with_virtual_spec(self):
- dag = Spec('mpileaks',
- Spec('callpath',
- Spec('dyninst',
- Spec('libdwarf',
- Spec('libelf')),
- Spec('libelf')),
- Spec('mpi')),
- Spec('mpi'))
+ def test_normalize_with_virtual_spec(self, ):
+ dag = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {'libelf': None},
+ 'libelf': None
+ },
+ 'mpi': None
+ },
+ 'mpi': None
+ }
+ })
dag.normalize()
# make sure nothing with the same name occurs twice
@@ -219,14 +223,18 @@ class TestSpecDag(object):
assert counts[name] == 1
def test_dependents_and_dependencies_are_correct(self):
- spec = Spec('mpileaks',
- Spec('callpath',
- Spec('dyninst',
- Spec('libdwarf',
- Spec('libelf')),
- Spec('libelf')),
- Spec('mpi')),
- Spec('mpi'))
+ spec = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {'libelf': None},
+ 'libelf': None
+ },
+ 'mpi': None
+ },
+ 'mpi': None
+ }
+ })
check_links(spec)
spec.normalize()
@@ -274,21 +282,45 @@ class TestSpecDag(object):
def test_equal(self):
# Different spec structures to test for equality
- flat = Spec('mpileaks ^callpath ^libelf ^libdwarf')
-
- flat_init = Spec(
- 'mpileaks', Spec('callpath'), Spec('libdwarf'), Spec('libelf'))
-
- flip_flat = Spec(
- 'mpileaks', Spec('libelf'), Spec('libdwarf'), Spec('callpath'))
-
- dag = Spec('mpileaks', Spec('callpath',
- Spec('libdwarf',
- Spec('libelf'))))
-
- flip_dag = Spec('mpileaks', Spec('callpath',
- Spec('libelf',
- Spec('libdwarf'))))
+ flat = Spec.from_literal(
+ {'mpileaks ^callpath ^libelf ^libdwarf': None}
+ )
+
+ flat_init = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': None,
+ 'libdwarf': None,
+ 'libelf': None
+ }
+ })
+
+ flip_flat = Spec.from_literal({
+ 'mpileaks': {
+ 'libelf': None,
+ 'libdwarf': None,
+ 'callpath': None
+ }
+ })
+
+ dag = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'libdwarf': {
+ 'libelf': None
+ }
+ }
+ }
+ })
+
+ flip_dag = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'libelf': {
+ 'libdwarf': None
+ }
+ }
+ }
+ })
# All these are equal to each other with regular ==
specs = (flat, flat_init, flip_flat, dag, flip_dag)
@@ -311,39 +343,52 @@ class TestSpecDag(object):
def test_normalize_mpileaks(self):
# Spec parsed in from a string
- spec = Spec('mpileaks ^mpich ^callpath ^dyninst ^libelf@1.8.11'
- ' ^libdwarf')
+ spec = Spec.from_literal({
+ 'mpileaks ^mpich ^callpath ^dyninst ^libelf@1.8.11 ^libdwarf': None
+ })
# What that spec should look like after parsing
- expected_flat = Spec(
- 'mpileaks', Spec('mpich'), Spec('callpath'), Spec('dyninst'),
- Spec('libelf@1.8.11'), Spec('libdwarf'))
+ expected_flat = Spec.from_literal({
+ 'mpileaks': {
+ 'mpich': None,
+ 'callpath': None,
+ 'dyninst': None,
+ 'libelf@1.8.11': None,
+ 'libdwarf': None
+ }
+ })
# What it should look like after normalization
mpich = Spec('mpich')
libelf = Spec('libelf@1.8.11')
- expected_normalized = Spec(
- 'mpileaks',
- Spec('callpath',
- Spec('dyninst',
- Spec('libdwarf',
- libelf),
- libelf),
- mpich),
- mpich)
+ expected_normalized = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {libelf: None},
+ libelf: None
+ },
+ mpich: None
+ },
+ mpich: None
+ },
+ })
# Similar to normalized spec, but now with copies of the same
# libelf node. Normalization should result in a single unique
# node for each package, so this is the wrong DAG.
- non_unique_nodes = Spec(
- 'mpileaks',
- Spec('callpath',
- Spec('dyninst',
- Spec('libdwarf',
- Spec('libelf@1.8.11')),
- Spec('libelf@1.8.11')),
- mpich),
- Spec('mpich'))
+ non_unique_nodes = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {'libelf@1.8.11': None},
+ 'libelf@1.8.11': None
+ },
+ mpich: None
+ },
+ mpich: None
+ }
+ }, normal=False)
# All specs here should be equal under regular equality
specs = (spec, expected_flat, expected_normalized, non_unique_nodes)
@@ -380,14 +425,18 @@ class TestSpecDag(object):
spec = Spec('mpileaks ^mpi ^libelf@1.8.11 ^libdwarf')
spec.normalize()
- expected_normalized = Spec(
- 'mpileaks',
- Spec('callpath',
- Spec('dyninst',
- Spec('libdwarf',
- Spec('libelf@1.8.11')),
- Spec('libelf@1.8.11')),
- Spec('mpi')), Spec('mpi'))
+ expected_normalized = Spec.from_literal({
+ 'mpileaks': {
+ 'callpath': {
+ 'dyninst': {
+ 'libdwarf': {'libelf@1.8.11': None},
+ 'libelf@1.8.11': None
+ },
+ 'mpi': None
+ },
+ 'mpi': None
+ }
+ })
assert str(spec) == str(expected_normalized)
@@ -552,16 +601,18 @@ class TestSpecDag(object):
def test_traversal_directions(self):
"""Make sure child and parent traversals of specs work."""
- # We'll use d for a diamond dependency
- d = Spec('d')
-
- # Mock spec.
- spec = Spec('a',
- Spec('b',
- Spec('c', d),
- Spec('e')),
- Spec('f',
- Spec('g', d)))
+ # Mock spec - d is used for a diamond dependency
+ spec = Spec.from_literal({
+ 'a': {
+ 'b': {
+ 'c': {'d': None},
+ 'e': None
+ },
+ 'f': {
+ 'g': {'d': None}
+ }
+ }
+ })
assert (
['a', 'b', 'c', 'd', 'e', 'f', 'g'] ==
@@ -577,16 +628,18 @@ class TestSpecDag(object):
def test_edge_traversals(self):
"""Make sure child and parent traversals of specs work."""
- # We'll use d for a diamond dependency
- d = Spec('d')
-
- # Mock spec.
- spec = Spec('a',
- Spec('b',
- Spec('c', d),
- Spec('e')),
- Spec('f',
- Spec('g', d)))
+ # Mock spec - d is used for a diamond dependency
+ spec = Spec.from_literal({
+ 'a': {
+ 'b': {
+ 'c': {'d': None},
+ 'e': None
+ },
+ 'f': {
+ 'g': {'d': None}
+ }
+ }
+ })
assert (
['a', 'b', 'c', 'd', 'e', 'f', 'g'] ==
@@ -610,12 +663,14 @@ class TestSpecDag(object):
def test_construct_spec_with_deptypes(self):
"""Ensure that it is possible to construct a spec with explicit
dependency types."""
- s = Spec('a',
- Spec('b',
- ['build'], Spec('c')),
- Spec('d',
- ['build', 'link'], Spec('e',
- ['run'], Spec('f'))))
+ s = Spec.from_literal({
+ 'a': {
+ 'b': {'c:build': None},
+ 'd': {
+ 'e:build,link': {'f:run': None}
+ }
+ }
+ })
assert s['b']._dependencies['c'].deptypes == ('build',)
assert s['d']._dependencies['e'].deptypes == ('build', 'link')
@@ -653,12 +708,19 @@ class TestSpecDag(object):
'dt-diamond-bottom'].deptypes == ('build', 'link', 'run')
def check_diamond_normalized_dag(self, spec):
- bottom = Spec('dt-diamond-bottom')
- dag = Spec('dt-diamond',
- ['build', 'link'], Spec('dt-diamond-left',
- ['build'], bottom),
- ['build', 'link'], Spec('dt-diamond-right',
- ['build', 'link', 'run'], bottom))
+
+ dag = Spec.from_literal({
+ 'dt-diamond': {
+ 'dt-diamond-left:build,link': {
+ 'dt-diamond-bottom:build': None
+ },
+ 'dt-diamond-right:build,link': {
+ 'dt-diamond-bottom:build,link,run': None
+ },
+
+ }
+ })
+
assert spec.eq_dag(dag)
def test_normalize_diamond_deptypes(self):
@@ -737,3 +799,64 @@ class TestSpecDag(object):
with pytest.raises(AttributeError):
q.libs
+
+ def test_canonical_deptype(self):
+ # special values
+ assert canonical_deptype(all) == alldeps
+ assert canonical_deptype('all') == alldeps
+ assert canonical_deptype(None) == alldeps
+
+ # everything in alldeps is canonical
+ for v in alldeps:
+ assert canonical_deptype(v) == (v,)
+
+ # tuples
+ assert canonical_deptype(('build',)) == ('build',)
+ assert canonical_deptype(
+ ('build', 'link', 'run')) == ('build', 'link', 'run')
+ assert canonical_deptype(
+ ('build', 'link')) == ('build', 'link')
+ assert canonical_deptype(
+ ('build', 'run')) == ('build', 'run')
+
+ # lists
+ assert canonical_deptype(
+ ['build', 'link', 'run']) == ('build', 'link', 'run')
+ assert canonical_deptype(
+ ['build', 'link']) == ('build', 'link')
+ assert canonical_deptype(
+ ['build', 'run']) == ('build', 'run')
+
+ # sorting
+ assert canonical_deptype(
+ ('run', 'build', 'link')) == ('build', 'link', 'run')
+ assert canonical_deptype(
+ ('run', 'link', 'build')) == ('build', 'link', 'run')
+ assert canonical_deptype(
+ ('run', 'link')) == ('link', 'run')
+ assert canonical_deptype(
+ ('link', 'build')) == ('build', 'link')
+
+ # can't put 'all' in tuple or list
+ with pytest.raises(ValueError):
+ canonical_deptype(['all'])
+ with pytest.raises(ValueError):
+ canonical_deptype(('all',))
+
+ # invalid values
+ with pytest.raises(ValueError):
+ canonical_deptype('foo')
+ with pytest.raises(ValueError):
+ canonical_deptype(('foo', 'bar'))
+ with pytest.raises(ValueError):
+ canonical_deptype(('foo',))
+
+ def test_invalid_literal_spec(self):
+
+ # Can't give type 'build' to a top-level spec
+ with pytest.raises(spack.spec.SpecParseError):
+ Spec.from_literal({'foo:build': None})
+
+ # Can't use more than one ':' separator
+ with pytest.raises(KeyError):
+ Spec.from_literal({'foo': {'bar:build:link': None}})
diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index 1623133ef3..2c7c1d22ed 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -307,6 +307,20 @@ class TestSpecSematics(object):
# Check that conditional dependencies are treated correctly
assert '^b' in a
+ def test_unsatisfied_single_valued_variant(self):
+ a = Spec('a foobar=baz')
+ a.concretize()
+ assert '^b' not in a
+
+ mv = Spec('multivalue_variant')
+ mv.concretize()
+ assert 'a@1.0' not in mv
+
+ def test_indirect_unsatisfied_single_valued_variant(self):
+ spec = Spec('singlevalue-variant-dependent')
+ spec.concretize()
+ assert 'a@1.0' not in spec
+
def test_unsatisfiable_multi_value_variant(self):
# Semantics for a multi-valued variant is different
@@ -693,3 +707,14 @@ class TestSpecSematics(object):
check_constrain_not_changed(
'libelf^foo target=' + default_target,
'libelf^foo target=' + default_target)
+
+ def test_exceptional_paths_for_constructor(self):
+
+ with pytest.raises(TypeError):
+ Spec((1, 2))
+
+ with pytest.raises(ValueError):
+ Spec('')
+
+ with pytest.raises(ValueError):
+ Spec('libelf foo')
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 5b24821a28..5749ff2d6e 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -57,6 +57,8 @@ from spack.url import *
('gromacs-4.6.1-tar', 'gromacs-4.6.1'),
# Download type - sh
('Miniconda2-4.3.11-Linux-x86_64.sh', 'Miniconda2-4.3.11'),
+ # Download version - release
+ ('v1.0.4-release', 'v1.0.4'),
# Download version - stable
('libevent-2.0.21-stable', 'libevent-2.0.21'),
# Download version - final
@@ -105,7 +107,9 @@ from spack.url import *
# Combinations of multiple patterns - public
('dakota-6.3-public.src', 'dakota-6.3'),
# Combinations of multiple patterns - universal
- ('synergy-1.3.6p2-MacOSX-Universal', 'synergy-1.3.6p2')
+ ('synergy-1.3.6p2-MacOSX-Universal', 'synergy-1.3.6p2'),
+ # Combinations of multiple patterns - dynamic
+ ('snptest_v2.5.2_linux_x86_64_dynamic', 'snptest_v2.5.2'),
])
def test_url_strip_version_suffixes(url, expected):
stripped = strip_version_suffixes(url)
@@ -120,6 +124,8 @@ def test_url_strip_version_suffixes(url, expected):
('converge_install_2.3.16', '2.3.16', 'converge'),
# Download type - src
('jpegsrc.v9b', '9b', 'jpeg'),
+ # Download type - archive
+ ('coinhsl-archive-2014.01.17', '2014.01.17', 'coinhsl'),
# Download type - std
('ghostscript-fonts-std-8.11', '8.11', 'ghostscript-fonts'),
# Download version - release
diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py
index 3b04e1d4aa..72292e4dcd 100644
--- a/lib/spack/spack/test/versions.py
+++ b/lib/spack/spack/test/versions.py
@@ -204,6 +204,8 @@ def test_underscores():
assert_ver_eq('2_0', '2_0')
assert_ver_eq('2.0', '2_0')
assert_ver_eq('2_0', '2.0')
+ assert_ver_eq('2-0', '2_0')
+ assert_ver_eq('2_0', '2-0')
def test_rpm_oddities():
@@ -426,20 +428,56 @@ def test_satisfaction_with_lists():
def test_formatted_strings():
- versions = '1.2.3', '1_2_3', '1-2-3'
+ versions = (
+ '1.2.3b', '1_2_3b', '1-2-3b',
+ '1.2-3b', '1.2_3b', '1-2.3b',
+ '1-2_3b', '1_2.3b', '1_2-3b'
+ )
for item in versions:
v = Version(item)
- assert v.dotted == '1.2.3'
- assert v.dashed == '1-2-3'
- assert v.underscored == '1_2_3'
- assert v.joined == '123'
+ assert v.dotted.string == '1.2.3b'
+ assert v.dashed.string == '1-2-3b'
+ assert v.underscored.string == '1_2_3b'
+ assert v.joined.string == '123b'
+
+ assert v.dotted.dashed.string == '1-2-3b'
+ assert v.dotted.underscored.string == '1_2_3b'
+ assert v.dotted.dotted.string == '1.2.3b'
+ assert v.dotted.joined.string == '123b'
+
+
+def test_up_to():
+ v = Version('1.23-4_5b')
+
+ assert v.up_to(1).string == '1'
+ assert v.up_to(2).string == '1.23'
+ assert v.up_to(3).string == '1.23-4'
+ assert v.up_to(4).string == '1.23-4_5'
+ assert v.up_to(5).string == '1.23-4_5b'
+
+ assert v.up_to(-1).string == '1.23-4_5'
+ assert v.up_to(-2).string == '1.23-4'
+ assert v.up_to(-3).string == '1.23'
+ assert v.up_to(-4).string == '1'
+
+ assert v.up_to(2).dotted.string == '1.23'
+ assert v.up_to(2).dashed.string == '1-23'
+ assert v.up_to(2).underscored.string == '1_23'
+ assert v.up_to(2).joined.string == '123'
+
+ assert v.dotted.up_to(2).string == '1.23' == v.up_to(2).dotted.string
+ assert v.dashed.up_to(2).string == '1-23' == v.up_to(2).dashed.string
+ assert v.underscored.up_to(2).string == '1_23'
+ assert v.up_to(2).underscored.string == '1_23'
+
+ assert v.up_to(2).up_to(1).string == '1'
def test_repr_and_str():
def check_repr_and_str(vrs):
a = Version(vrs)
- assert repr(a) == 'Version(\'' + vrs + '\')'
+ assert repr(a) == "Version('" + vrs + "')"
b = eval(repr(a))
assert a == b
assert str(a) == vrs
@@ -457,17 +495,17 @@ def test_get_item():
b = a[0:2]
assert isinstance(b, Version)
assert b == Version('0.1')
- assert repr(b) == 'Version(\'0.1\')'
+ assert repr(b) == "Version('0.1')"
assert str(b) == '0.1'
b = a[0:3]
assert isinstance(b, Version)
assert b == Version('0.1_2')
- assert repr(b) == 'Version(\'0.1_2\')'
+ assert repr(b) == "Version('0.1_2')"
assert str(b) == '0.1_2'
b = a[1:]
assert isinstance(b, Version)
assert b == Version('1_2-3')
- assert repr(b) == 'Version(\'1_2-3\')'
+ assert repr(b) == "Version('1_2-3')"
assert str(b) == '1_2-3'
# Raise TypeError on tuples
with pytest.raises(TypeError):
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index 88557596fd..67a58cdd12 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -177,12 +177,14 @@ def strip_version_suffixes(path):
'[Uu]niversal',
'jar',
'complete',
+ 'dynamic',
'oss',
'gem',
'tar',
'sh',
# Download version
+ 'release',
'stable',
'[Ff]inal',
'rel',
@@ -288,6 +290,7 @@ def strip_name_suffixes(path, version):
'install',
'src',
'(open)?[Ss]ources?',
+ '[._-]archive',
'[._-]std',
# Download version
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index 584e224db7..5fd40790ed 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -26,6 +26,7 @@ import os
import re
import subprocess
from six import string_types
+import sys
import llnl.util.tty as tty
import spack
@@ -184,9 +185,9 @@ class Executable(object):
if output is str or error is str:
result = ''
if output is str:
- result += out.decode('utf-8')
+ result += to_str(out)
if error is str:
- result += err.decode('utf-8')
+ result += to_str(err)
return result
except OSError as e:
@@ -223,6 +224,20 @@ class Executable(object):
return ' '.join(self.exe)
+def to_str(content):
+ """Produce a str type from the content of a process stream obtained with
+ Popen.communicate.
+ """
+ # Prior to python3, Popen.communicate returns a str type. For python3 it
+ # returns a bytes type. In the case of python3 we decode the
+ # byte string to produce a str type. This will generate junk if the
+ # encoding is not UTF-8 (which includes ASCII).
+ if sys.version_info < (3, 0, 0):
+ return content
+ else:
+ return content.decode('utf-8')
+
+
def which(*args, **kwargs):
"""Finds an executable in the path like command-line which.
diff --git a/lib/spack/spack/util/log_parse.py b/lib/spack/spack/util/log_parse.py
new file mode 100644
index 0000000000..a9ff356aff
--- /dev/null
+++ b/lib/spack/spack/util/log_parse.py
@@ -0,0 +1,134 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from __future__ import print_function
+
+import re
+from six import StringIO
+
+from llnl.util.tty.color import colorize
+
+
+class LogEvent(object):
+ """Class representing interesting events (e.g., errors) in a build log."""
+ def __init__(self, text, line_no,
+ pre_context='', post_context='', repeat_count=0):
+ self.text = text
+ self.line_no = line_no
+ self.pre_context = pre_context
+ self.post_context = post_context
+ self.repeat_count = repeat_count
+
+ @property
+ def start(self):
+ """First line in the log with text for the event or its context."""
+ return self.line_no - len(self.pre_context)
+
+ @property
+ def end(self):
+ """Last line in the log with text for event or its context."""
+ return self.line_no + len(self.post_context) + 1
+
+ def __getitem__(self, line_no):
+ """Index event text and context by actual line number in file."""
+ if line_no == self.line_no:
+ return self.text
+ elif line_no < self.line_no:
+ return self.pre_context[line_no - self.line_no]
+ elif line_no > self.line_no:
+ return self.post_context[line_no - self.line_no - 1]
+
+ def __str__(self):
+ """Returns event lines and context."""
+ out = StringIO()
+ for i in range(self.start, self.end):
+ if i == self.line_no:
+ out.write(' >> %-6d%s' % (i, self[i]))
+ else:
+ out.write(' %-6d%s' % (i, self[i]))
+ return out.getvalue()
+
+
+def parse_log_events(logfile, context=6):
+ """Extract interesting events from a log file as a list of LogEvent.
+
+ Args:
+ logfile (str): name of the build log to parse
+ context (int): lines of context to extract around each log event
+
+ Currently looks for lines that contain the string 'error:', ignoring case.
+
+ TODO: Extract warnings and other events from the build log.
+ """
+ with open(logfile, 'r') as f:
+ lines = [line for line in f]
+
+ log_events = []
+ for i, line in enumerate(lines):
+ if re.search('\berror:', line, re.IGNORECASE):
+ event = LogEvent(
+ line.strip(),
+ i + 1,
+ [l.rstrip() for l in lines[i - context:i]],
+ [l.rstrip() for l in lines[i + 1:i + context + 1]])
+ log_events.append(event)
+ return log_events
+
+
+def make_log_context(log_events):
+ """Get error context from a log file.
+
+ Args:
+ log_events (list of LogEvent): list of events created by, e.g.,
+ ``parse_log_events``
+
+ Returns:
+ str: context from the build log with errors highlighted
+
+ Parses the log file for lines containing errors, and prints them out
+ with line numbers and context. Errors are highlighted with '>>' and
+ with red highlighting (if color is enabled).
+ """
+ error_lines = set(e.line_no for e in log_events)
+
+ out = StringIO()
+ next_line = 1
+ for event in log_events:
+ start = event.start
+
+ if start > next_line:
+ out.write(' [ ... ]\n')
+
+ if start < next_line:
+ start = next_line
+
+ for i in range(start, event.end):
+ if i in error_lines:
+ out.write(colorize(' @R{>> %-6d%s}\n' % (i, event[i])))
+ else:
+ out.write(' %-6d%s\n' % (i, event[i]))
+
+ next_line = event.end
+
+ return out.getvalue()
diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py
index 4de3fb051e..87ccd79fd6 100644
--- a/lib/spack/spack/util/module_cmd.py
+++ b/lib/spack/spack/util/module_cmd.py
@@ -97,7 +97,7 @@ def get_module_cmd_from_bash(bashopts=''):
module_cmd = which(args[0])
if module_cmd:
for arg in args[1:]:
- if arg == 'bash':
+ if arg in ('bash', 'sh'):
module_cmd.add_default_arg('python')
break
else:
diff --git a/lib/spack/spack/util/path.py b/lib/spack/spack/util/path.py
index 0edab60f21..edfd915c65 100644
--- a/lib/spack/spack/util/path.py
+++ b/lib/spack/spack/util/path.py
@@ -65,8 +65,10 @@ def substitute_config_variables(path):
def canonicalize_path(path):
- """Substitute config vars, expand user home, take abspath."""
+ """Substitute config vars, expand environment vars,
+ expand user home, take abspath."""
path = substitute_config_variables(path)
+ path = os.path.expandvars(path)
path = os.path.expanduser(path)
path = os.path.abspath(path)
return path
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index e7e6f80ec8..3fd38c22cf 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -24,6 +24,7 @@
##############################################################################
import re
import os
+import ssl
import sys
import traceback
@@ -105,6 +106,20 @@ def _spider(url, visited, root, depth, max_depth, raise_on_error):
root = re.sub('/index.html$', '', root)
try:
+ context = None
+ if sys.version_info < (2, 7, 9) or \
+ ((3,) < sys.version_info < (3, 4, 3)):
+ if not spack.insecure:
+ tty.warn("Spack will not check SSL certificates. You need to "
+ "update your Python to enable certificate "
+ "verification.")
+ else:
+ # We explicitly create default context to avoid error described in
+ # https://blog.sucuri.net/2016/03/beware-unverified-tls-certificates-php-python.html
+ context = ssl._create_unverified_context() \
+ if spack.insecure \
+ else ssl.create_default_context()
+
# Make a HEAD request first to check the content type. This lets
# us ignore tarballs and gigantic files.
# It would be nice to do this with the HTTP Accept header to avoid
@@ -112,7 +127,7 @@ def _spider(url, visited, root, depth, max_depth, raise_on_error):
# if you ask for a tarball with Accept: text/html.
req = Request(url)
req.get_method = lambda: "HEAD"
- resp = urlopen(req, timeout=TIMEOUT)
+ resp = _urlopen(req, timeout=TIMEOUT, context=context)
if "Content-type" not in resp.headers:
tty.debug("ignoring page " + url)
@@ -125,7 +140,7 @@ def _spider(url, visited, root, depth, max_depth, raise_on_error):
# Do the real GET request when we know it's just HTML.
req.get_method = lambda: "GET"
- response = urlopen(req, timeout=TIMEOUT)
+ response = _urlopen(req, timeout=TIMEOUT, context=context)
response_url = response.geturl()
# Read the page and and stick it in the map we'll return
@@ -176,6 +191,13 @@ def _spider(url, visited, root, depth, max_depth, raise_on_error):
except URLError as e:
tty.debug(e)
+
+ if isinstance(e.reason, ssl.SSLError):
+ tty.warn("Spack was unable to fetch url list due to a certificate "
+ "verification problem. You can try running spack -k, "
+ "which will not check SSL certificates. Use this at your "
+ "own risk.")
+
if raise_on_error:
raise spack.error.NoNetworkConnectionError(str(e), url)
@@ -202,8 +224,16 @@ def _spider_wrapper(args):
return _spider(*args)
-def spider(root_url, depth=0):
+def _urlopen(*args, **kwargs):
+ """Wrapper for compatibility with old versions of Python."""
+ # We don't pass 'context' parameter to urlopen because it
+ # was introduces only starting versions 2.7.9 and 3.4.3 of Python.
+ if 'context' in kwargs and kwargs['context'] is None:
+ del kwargs['context']
+ return urlopen(*args, **kwargs)
+
+def spider(root_url, depth=0):
"""Gets web pages from a root URL.
If depth is specified (e.g., depth=2), then this will also follow
diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py
index 10fac49e9d..3414c9c8d9 100644
--- a/lib/spack/spack/version.py
+++ b/lib/spack/spack/version.py
@@ -107,10 +107,6 @@ def coerced(method):
return coercing_method
-def _numeric_lt(self0, other):
- """Compares two versions, knowing they're both numeric"""
-
-
class Version(object):
"""Class to represent versions"""
@@ -130,30 +126,90 @@ class Version(object):
self.version = tuple(int_if_int(seg) for seg in segments)
# Store the separators from the original version string as well.
- # last element of separators is ''
- self.separators = tuple(re.split(segment_regex, string)[1:-1])
+ self.separators = tuple(re.split(segment_regex, string)[1:])
@property
def dotted(self):
- return '.'.join(str(x) for x in self.version)
+ """The dotted representation of the version.
+
+ Example:
+ >>> version = Version('1-2-3b')
+ >>> version.dotted
+ Version('1.2.3b')
+
+ Returns:
+ Version: The version with separator characters replaced by dots
+ """
+ return Version(self.string.replace('-', '.').replace('_', '.'))
@property
def underscored(self):
- return '_'.join(str(x) for x in self.version)
+ """The underscored representation of the version.
+
+ Example:
+ >>> version = Version('1.2.3b')
+ >>> version.underscored
+ Version('1_2_3b')
+
+ Returns:
+ Version: The version with separator characters replaced by
+ underscores
+ """
+ return Version(self.string.replace('.', '_').replace('-', '_'))
@property
def dashed(self):
- return '-'.join(str(x) for x in self.version)
+ """The dashed representation of the version.
+
+ Example:
+ >>> version = Version('1.2.3b')
+ >>> version.dashed
+ Version('1-2-3b')
+
+ Returns:
+ Version: The version with separator characters replaced by dashes
+ """
+ return Version(self.string.replace('.', '-').replace('_', '-'))
@property
def joined(self):
- return ''.join(str(x) for x in self.version)
+ """The joined representation of the version.
+
+ Example:
+ >>> version = Version('1.2.3b')
+ >>> version.joined
+ Version('123b')
+
+ Returns:
+ Version: The version with separator characters removed
+ """
+ return Version(
+ self.string.replace('.', '').replace('-', '').replace('_', ''))
def up_to(self, index):
- """Return a version string up to the specified component, exclusive.
- e.g., if this is 10.8.2, self.up_to(2) will return '10.8'.
+ """The version up to the specified component.
+
+ Examples:
+ >>> version = Version('1.23-4b')
+ >>> version.up_to(1)
+ Version('1')
+ >>> version.up_to(2)
+ Version('1.23')
+ >>> version.up_to(3)
+ Version('1.23-4')
+ >>> version.up_to(4)
+ Version('1.23-4b')
+ >>> version.up_to(-1)
+ Version('1.23-4')
+ >>> version.up_to(-2)
+ Version('1.23')
+ >>> version.up_to(-3)
+ Version('1')
+
+ Returns:
+ Version: The first index components of the version
"""
- return '.'.join(str(x) for x in self[:index])
+ return self[:index]
def lowest(self):
return self
@@ -204,11 +260,9 @@ class Version(object):
return self.version[idx]
elif isinstance(idx, slice):
- # Currently len(self.separators) == len(self.version) - 1
- extendend_separators = self.separators + ('',)
string_arg = []
- pairs = zip(self.version[idx], extendend_separators[idx])
+ pairs = zip(self.version[idx], self.separators[idx])
for token, sep in pairs:
string_arg.append(str(token))
string_arg.append(str(sep))
diff --git a/share/spack/qa/configuration/packages.yaml b/share/spack/qa/configuration/packages.yaml
new file mode 100644
index 0000000000..fad3489d3b
--- /dev/null
+++ b/share/spack/qa/configuration/packages.yaml
@@ -0,0 +1,13 @@
+packages:
+ cmake:
+ buildable: False
+ paths:
+ cmake@2.8.12.2: /usr
+ r:
+ buildable: False
+ paths:
+ r@3.0.2: /usr
+ perl:
+ buildable: False
+ paths:
+ perl@5.18.2: /usr
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index d9ae65b8b5..4eb1c1c038 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -115,7 +115,8 @@ function _spack {
if $list_options
then
compgen -W "-h --help -d --debug -D --pdb -k --insecure -m --mock -p
- --profile -v --verbose -s --stacktrace -V --version" -- "$cur"
+ --profile -v --verbose -s --stacktrace -V --version
+ --color --color=always --color=auto --color=never" -- "$cur"
else
compgen -W "$(_subcommands)" -- "$cur"
fi
@@ -151,6 +152,50 @@ function _spack_build {
fi
}
+function _spack_buildcache {
+ if $list_options
+ then
+ compgen -W "-h --help" -- "$cur"
+ else
+ compgen -W "create install keys list" -- "$cur"
+ fi
+}
+
+function _spack_buildcache_create {
+ if $list_options
+ then
+ compgen -W "-h --help -r --rel -f --force -y --yes-to-all -k --key
+ -d --directory" -- "$cur"
+ else
+ compgen -W "$(_all_packages)" -- "$cur"
+ fi
+}
+
+function _spack_buildcache_install {
+ if $list_options
+ then
+ compgen -W "-h --help -f --force -y --yes-to-all" -- "$cur"
+ else
+ compgen -W "$(_all_packages)" -- "$cur"
+ fi
+}
+
+function _spack_buildcache_keys {
+ if $list_options
+ then
+ compgen -W "-h --help -i --install -y --yes-to-all" -- "$cur"
+ fi
+}
+
+function _spack_buildcache_list {
+ if $list_options
+ then
+ compgen -W "-h --help" -- "$cur"
+ else
+ compgen -W "$(_all_packages)" -- "$cur"
+ fi
+}
+
function _spack_cd {
if $list_options
then
@@ -174,7 +219,8 @@ function _spack_checksum {
function _spack_clean {
if $list_options
then
- compgen -W "-h --help" -- "$cur"
+ compgen -W "-h --help -s --stage -d --downloads
+ -m --misc-cache -a --all" -- "$cur"
else
compgen -W "$(_all_packages)" -- "$cur"
fi
@@ -361,9 +407,9 @@ function _spack_find {
if $list_options
then
compgen -W "-h --help -s --short -p --paths -d --deps -l --long
- -L --very-long -f --show-flags -e --explicit
- -E --implicit -u --unknown -m --missing -v --variants
- -M --only-missing -N --namespace" -- "$cur"
+ -L --very-long -f --show-flags --show-full-compiler
+ -e --explicit -E --implicit -u --unknown -m --missing
+ -v --variants -M --only-missing -N --namespace" -- "$cur"
else
compgen -W "$(_installed_packages)" -- "$cur"
fi
@@ -410,7 +456,7 @@ function _spack_install {
then
compgen -W "-h --help --only -j --jobs --keep-prefix --keep-stage
-n --no-checksum -v --verbose --fake --clean --dirty
- --run-tests --log-format --log-file" -- "$cur"
+ --run-tests --log-format --log-file --source" -- "$cur"
else
compgen -W "$(_all_packages)" -- "$cur"
fi
@@ -597,11 +643,6 @@ function _spack_providers {
fi
}
-function _spack_purge {
- compgen -W "-h --help -s --stage -d --downloads
- -m --misc-cache -a --all" -- "$cur"
-}
-
function _spack_python {
if $list_options
then
diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py
index 59d8b9e330..037b322f10 100644
--- a/var/spack/repos/builtin.mock/packages/a/package.py
+++ b/var/spack/repos/builtin.mock/packages/a/package.py
@@ -26,12 +26,13 @@ from spack import *
class A(AutotoolsPackage):
- """Simple package with no dependencies"""
+ """Simple package with one optional dependency"""
homepage = "http://www.example.com"
url = "http://www.example.com/a-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
+ version('2.0', '2.0_a_hash')
variant(
'foo',
diff --git a/var/spack/repos/builtin.mock/packages/libdwarf/package.py b/var/spack/repos/builtin.mock/packages/libdwarf/package.py
index 10d6fa8e88..0cdbaf2a33 100644
--- a/var/spack/repos/builtin.mock/packages/libdwarf/package.py
+++ b/var/spack/repos/builtin.mock/packages/libdwarf/package.py
@@ -41,4 +41,4 @@ class Libdwarf(Package):
depends_on("libelf")
def install(self, spec, prefix):
- pass
+ touch(prefix.libdwarf)
diff --git a/var/spack/repos/builtin.mock/packages/libelf/package.py b/var/spack/repos/builtin.mock/packages/libelf/package.py
index 3a2fe603ef..0390963081 100644
--- a/var/spack/repos/builtin.mock/packages/libelf/package.py
+++ b/var/spack/repos/builtin.mock/packages/libelf/package.py
@@ -34,11 +34,4 @@ class Libelf(Package):
version('0.8.10', '9db4d36c283d9790d8fa7df1f4d7b4d9')
def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--enable-shared",
- "--disable-dependency-tracking",
- "--disable-debug")
- make()
-
- # The mkdir commands in libelf's intsall can fail in parallel
- make("install", parallel=False)
+ touch(prefix.libelf)
diff --git a/var/spack/repos/builtin.mock/packages/mixedversions/package.py b/var/spack/repos/builtin.mock/packages/mixedversions/package.py
new file mode 100644
index 0000000000..5b56eb004d
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/mixedversions/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mixedversions(Package):
+ url = "http://www.fake-mixedversions.org/downloads/mixedversions-1.0.tar.gz"
+
+ version('2.0.1', 'hashc')
+ version('2.0', 'hashb')
+ version('1.0.1', 'hasha')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/multivalue_variant/package.py b/var/spack/repos/builtin.mock/packages/multivalue_variant/package.py
index f20bf7c369..946b9893d8 100644
--- a/var/spack/repos/builtin.mock/packages/multivalue_variant/package.py
+++ b/var/spack/repos/builtin.mock/packages/multivalue_variant/package.py
@@ -52,6 +52,8 @@ class MultivalueVariant(Package):
depends_on('mpi')
depends_on('callpath')
+ depends_on('a')
+ depends_on('a@1.0', when='fee=barbaz')
def install(self, spec, prefix):
pass
diff --git a/var/spack/repos/builtin.mock/packages/patchelf/package.py b/var/spack/repos/builtin.mock/packages/patchelf/package.py
new file mode 100644
index 0000000000..915f3df0c6
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/patchelf/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Patchelf(AutotoolsPackage):
+ """
+ PatchELF is a small utility to modify the
+ dynamic linker and RPATH of ELF executables.
+ """
+
+ homepage = "https://nixos.org/patchelf.html"
+ url = "http://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz"
+
+ list_url = "http://nixos.org/releases/patchelf/"
+ list_depth = 1
+
+ version('0.9', '3c265508526760f233620f35d79c79fc')
+ version('0.8', '407b229e6a681ffb0e2cdd5915cb2d01')
diff --git a/var/spack/repos/builtin.mock/packages/printing-package/package.py b/var/spack/repos/builtin.mock/packages/printing-package/package.py
new file mode 100644
index 0000000000..2396677252
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/printing-package/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PrintingPackage(Package):
+ """This package prints some output from its install method.
+
+ We use this to test whether that output is properly logged.
+ """
+ homepage = "http://www.example.com/printing_package"
+ url = "http://www.unit-test-should-replace-this-url/trivial_install-1.0.tar.gz"
+
+ version('1.0', 'foobarbaz')
+
+ def install(self, spec, prefix):
+ print("BEFORE INSTALL")
+
+ configure('--prefix=%s' % prefix)
+ make()
+ make('install')
+
+ print("AFTER INSTALL")
diff --git a/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py
new file mode 100644
index 0000000000..c6630927c7
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/singlevalue-variant-dependent/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class SinglevalueVariantDependent(Package):
+ """Simple package with one optional dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/archive-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('multivalue_variant fee=baz')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin/packages/abyss/package.py b/var/spack/repos/builtin/packages/abyss/package.py
index e8e0fb4d45..f3a9f27748 100644
--- a/var/spack/repos/builtin/packages/abyss/package.py
+++ b/var/spack/repos/builtin/packages/abyss/package.py
@@ -31,12 +31,14 @@ class Abyss(AutotoolsPackage):
is useful for assembling genomes up to 100 Mbases in size."""
homepage = "http://www.bcgsc.ca/platform/bioinfo/software/abyss"
- url = "http://www.bcgsc.ca/platform/bioinfo/software/abyss/releases/2.0.2/abyss-2.0.2.tar.gz"
+ url = "https://github.com/bcgsc/abyss/archive/2.0.2.tar.gz"
version('2.0.2', '1623f55ad7f4586e80f6e74b1f27c798')
+ version('1.5.2', '10d6d72d1a915e618d41a5cbbcf2364c')
depends_on('mpi')
- depends_on('boost@:1.50.0,1.53.0:')
+ depends_on('boost@:1.50.0,1.53.0:', when='@2.0.2:')
+ depends_on('boost@:1.50.0,1.53.0:1.59.0', when='@:1.5.2')
depends_on('sparsehash')
depends_on('sqlite')
diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py
index 609dff2fe7..ab1a4ca861 100644
--- a/var/spack/repos/builtin/packages/adept-utils/package.py
+++ b/var/spack/repos/builtin/packages/adept-utils/package.py
@@ -25,7 +25,7 @@
from spack import *
-class AdeptUtils(Package):
+class AdeptUtils(CMakePackage):
"""Utility libraries for LLNL performance tools."""
homepage = "https://github.com/llnl/adept-utils"
@@ -34,11 +34,6 @@ class AdeptUtils(Package):
version('1.0.1', '731a310717adcb004d9d195130efee7d')
version('1.0', '5c6cd9badce56c945ac8551e34804397')
- depends_on("boost")
- depends_on("mpi")
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake(*std_cmake_args)
- make()
- make("install")
+ depends_on('boost')
+ depends_on('mpi')
+ depends_on('cmake@2.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py
index 2d7b9e2997..cebd90144f 100644
--- a/var/spack/repos/builtin/packages/adios/package.py
+++ b/var/spack/repos/builtin/packages/adios/package.py
@@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-
from spack import *
@@ -34,11 +33,13 @@ class Adios(AutotoolsPackage):
"""
homepage = "http://www.olcf.ornl.gov/center-projects/adios/"
- url = "https://github.com/ornladios/ADIOS/archive/v1.11.1.tar.gz"
+ url = "https://github.com/ornladios/ADIOS/archive/v1.12.0.tar.gz"
version('develop', git='https://github.com/ornladios/ADIOS.git',
branch='master')
+ version('1.12.0', '84a1c71b6698009224f6f748c5257fc9')
version('1.11.1', '5639bfc235e50bf17ba9dafb14ea4185')
+ version('1.11.0', '5eead5b2ccf962f5e6d5f254d29d5238')
version('1.10.0', 'eff450a4c0130479417cfd63186957f3')
version('1.9.0', '310ff02388bbaa2b1c1710ee970b5678')
@@ -55,29 +56,37 @@ class Adios(AutotoolsPackage):
variant('zlib', default=True, description='Enable zlib transform support')
variant('bzip2', default=False, description='Enable bzip2 transform support')
variant('szip', default=False, description='Enable szip transform support')
- variant('zfp', default=False, description='Enable ZFP transform support')
+ variant('zfp', default=True, description='Enable ZFP transform support')
+ variant('sz', default=True, description='Enable SZ transform support')
# transports and serial file converters
variant('hdf5', default=False, description='Enable parallel HDF5 transport and serial bp2h5 converter')
-
- # Lots of setting up here for this package
- # module swap PrgEnv-intel PrgEnv-$COMP
- # module load cray-hdf5/1.8.14
- # module load python/2.7.10
+ variant('netcdf', default=False, description='Enable netcdf support')
+ variant('flexpath', default=False, description='Enable flexpath transport')
+ variant('dataspaces', default=False, description='Enable dataspaces transport')
+ variant('staging', default=False, description='Enable dataspaces and flexpath staging transports')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
- depends_on('libtool', type='build')
+ depends_on('libtool@:2.4.2', type='build')
depends_on('python', type='build')
depends_on('mpi', when='+mpi')
- depends_on('mxml@2.9:')
# optional transformations
depends_on('zlib', when='+zlib')
depends_on('bzip2', when='+bzip2')
depends_on('szip', when='+szip')
+ depends_on('sz', when='+sz')
depends_on('zfp@:0.5.0', when='+zfp')
# optional transports & file converters
depends_on('hdf5@1.8:+mpi', when='+hdf5')
+ depends_on('netcdf', when='+netcdf')
+ depends_on('libevpath', when='+flexpath')
+ depends_on('libevpath', when='+staging')
+ depends_on('dataspaces+mpi', when='+dataspaces')
+ depends_on('dataspaces+mpi', when='+staging')
+
+ for p in ['+hdf5', '+netcdf', '+flexpath', '+dataspaces', '+staging']:
+ conflicts(p, when='~mpi')
build_directory = 'spack-build'
@@ -103,19 +112,18 @@ class Adios(AutotoolsPackage):
spec = self.spec
self.validate(spec)
- extra_args = []
-
- # required, otherwise building its python bindings on ADIOS will fail
- extra_args.append("CFLAGS=-fPIC")
-
- # always build external MXML, even in ADIOS 1.10.0+
- extra_args.append('--with-mxml=%s' % spec['mxml'].prefix)
+ extra_args = [
+ # required, otherwise building its python bindings will fail
+ 'CFLAGS={0}'.format(self.compiler.pic_flag)
+ ]
if '+shared' in spec:
extra_args.append('--enable-shared')
if '+mpi' in spec:
- extra_args.append('--with-mpi')
+ extra_args.append('--with-mpi=%s' % spec['mpi'].prefix)
+ else:
+ extra_args.append('--without-mpi')
if '+infiniband' in spec:
extra_args.append('--with-infiniband')
else:
@@ -126,15 +134,47 @@ class Adios(AutotoolsPackage):
else:
extra_args.append('--disable-fortran')
+ # Transforms
if '+zlib' in spec:
extra_args.append('--with-zlib=%s' % spec['zlib'].prefix)
+ else:
+ extra_args.append('--without-zlib')
if '+bzip2' in spec:
extra_args.append('--with-bzip2=%s' % spec['bzip2'].prefix)
+ else:
+ extra_args.append('--without-bzip2')
if '+szip' in spec:
extra_args.append('--with-szip=%s' % spec['szip'].prefix)
+ else:
+ extra_args.append('--without-szip')
if '+zfp' in spec:
extra_args.append('--with-zfp=%s' % spec['zfp'].prefix)
+ else:
+ extra_args.append('--without-zfp')
+ if '+sz' in spec:
+ extra_args.append('--with-sz=%s' % spec['sz'].prefix)
+ else:
+ extra_args.append('--without-sz')
+
+ # External I/O libraries
if '+hdf5' in spec:
extra_args.append('--with-phdf5=%s' % spec['hdf5'].prefix)
+ else:
+ extra_args.append('--without-phdf5')
+ if '+netcdf' in spec:
+ extra_args.append('--with-netcdf=%s' % spec['netcdf'].prefix)
+ else:
+ extra_args.append('--without-netcdf')
+
+ # Staging transports
+ if '+flexpath' in spec or '+staging' in spec:
+ extra_args.append('--with-flexpath=%s' % spec['libevpath'].prefix)
+ else:
+ extra_args.append('--without-flexpath')
+ if '+dataspaces' in spec or '+staging' in spec:
+ extra_args.append('--with-dataspaces=%s'
+ % spec['dataspaces'].prefix)
+ else:
+ extra_args.append('--without-dataspaces')
return extra_args
diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py
new file mode 100644
index 0000000000..c5ce5ac400
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adios2/package.py
@@ -0,0 +1,119 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Adios2(CMakePackage):
+ """Next generation of ADIOS developed in the Exascale Computing Program"""
+
+ homepage = "https://www.olcf.ornl.gov/center-projects/adios/"
+ url = "https://github.com/ornladios/ADIOS2/archive/v2.0.0.tar.gz"
+
+ version('develop', branch='master',
+ git='https://github.com/ornladios/ADIOS2.git')
+
+ version('2.0.0', '019115e5c6ac28bd0f4201f590f5d994')
+
+ variant('shared', default=True,
+ description='Also build shared libraries')
+ variant('mpi', default=True,
+ description='Enable MPI')
+ # transforms (not yet implemented)
+ # variant('bzip2', default=True,
+ # description='Enable BZip2 compression')
+ # variant('zfp', default=True,
+ # description='Enable ZFP compression')
+ # transport engines
+ variant('dataman', default=True,
+ description='Enable the DataMan engine for WAN transports')
+ # currently required by DataMan, optional in the future
+ # variant('zeromq', default=False,
+ # description='Enable ZeroMQ for the DataMan engine')
+ variant('hdf5', default=False,
+ description='Enable the HDF5 engine')
+ variant('adios1', default=False,
+ description='Enable the ADIOS 1.x engine')
+ # language bindings
+ variant('python', default=True,
+ description='Enable the Python >= 2.7 bindings')
+
+ # requires mature C++11 implementations
+ conflicts('%gcc@:4.7')
+ conflicts('%intel@:15')
+ conflicts('%pgi@:14')
+
+ # DataMan needs dlopen
+ conflicts('+dataman', when='~shared')
+
+ depends_on('cmake@3.5.0:', type='build')
+
+ # contained in thirdparty/
+ # depends_on('googletest')
+ # depends_on('pugixml')
+ # depends_on('kwsys')
+ # depends_on('nlohmannjson')
+ # depends_on('pybind11@2.1.1:', when='+python')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('zeromq', when='+dataman')
+
+ depends_on('hdf5', when='+hdf5')
+ depends_on('hdf5+mpi', when='+hdf5+mpi')
+ depends_on('adios', when='+adios1')
+ depends_on('adios+mpi', when='+adios1+mpi')
+
+ depends_on('bzip2', when='+bzip2')
+ depends_on('zfp', when='+zfp')
+
+ extends('python', when='+python')
+ depends_on('python@2.7:', type=('build', 'run'), when='+python')
+ depends_on('py-numpy@1.6.1:', type=('build', 'run'), when='+python')
+ depends_on('py-mpi4py@2.0.0:', type=('build', 'run'), when='+mpi +python')
+
+ def cmake_args(self):
+ spec = self.spec
+
+ args = [
+ '-DADIOS2_BUILD_SHARED_LIBS:BOOL={0}'.format((
+ 'ON' if '+shared' in spec else 'OFF')),
+ '-DADIOS2_BUILD_TESTING=OFF',
+ '-DADIOS2_USE_MPI={0}'.format((
+ 'ON' if '+mpi' in spec else 'OFF')),
+ '-DADIOS2_USE_BZip2={0}'.format((
+ 'ON' if '+bzip2' in spec else 'OFF')),
+ '-DADIOS2_USE_ZFP={0}'.format((
+ 'ON' if '+zfp' in spec else 'OFF')),
+ '-DADIOS2_USE_DataMan={0}'.format((
+ 'ON' if '+dataman' in spec else 'OFF')),
+ '-DADIOS2_USE_ZeroMQ={0}'.format((
+ 'ON' if '+dataman' in spec else 'OFF')),
+ '-DADIOS2_USE_HDF5={0}'.format((
+ 'ON' if '+hdf5' in spec else 'OFF')),
+ '-DADIOS2_USE_ADIOS1={0}'.format((
+ 'ON' if '+adios1' in spec else 'OFF')),
+ '-DADIOS2_USE_Python={0}'.format((
+ 'ON' if '+python' in spec else 'OFF'))
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py
index 5de1a31b87..1f9850b4c8 100644
--- a/var/spack/repos/builtin/packages/adol-c/package.py
+++ b/var/spack/repos/builtin/packages/adol-c/package.py
@@ -34,6 +34,7 @@ class AdolC(AutotoolsPackage):
version('develop', git='https://gitlab.com/adol-c/adol-c.git',
branch='master')
+ version('2.6.3', 'f78f67f70d5874830a1ad1c0f54e54f7')
version('2.6.2', '0f9547584c99c0673e4f81cf64e8d865')
version('2.6.1', '1032b28427d6e399af4610e78c0f087b')
diff --git a/var/spack/repos/builtin/packages/alglib/Makefile b/var/spack/repos/builtin/packages/alglib/Makefile
new file mode 100644
index 0000000000..fbcfdb9542
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alglib/Makefile
@@ -0,0 +1,20 @@
+CC = $(SPACK_CXX)
+CFLAGS = -fPIC -Wall -O2 -g
+LDFLAGS = -shared
+RM = rm -f
+TARGET_LIB = libalglib.so
+
+SRCS = $(wildcard *.cpp)
+OBJS = $(SRCS:.cpp=.o)
+
+%.o: %.cpp
+ $(CC) -c ${CFLAGS} $<
+
+.PHONY: all
+all: $(OBJS)
+ $(CC) ${LDFLAGS} -o ${TARGET_LIB} $^
+
+# do not look for "clean", consider it always as missing
+.phony: clean
+clean:
+ ${RM} *.o
diff --git a/var/spack/repos/builtin/packages/alglib/package.py b/var/spack/repos/builtin/packages/alglib/package.py
new file mode 100644
index 0000000000..d617290e62
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alglib/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+import os
+import shutil
+
+
+class Alglib(MakefilePackage):
+ """ALGLIB is a cross-platform numerical analysis and data processing
+ library."""
+
+ homepage = "http://www.alglib.net"
+ url = "http://www.alglib.net/translator/re/alglib-3.11.0.cpp.gpl.tgz"
+
+ version('3.11.0', 'f87bb05349924d486e8809590dee9f80')
+
+ def url_for_version(self, version):
+ return 'http://www.alglib.net/translator/re/alglib-{0}.cpp.gpl.tgz'.format(version.dotted)
+
+ build_directory = 'src'
+
+ def edit(self, spec, prefix):
+ # this package has no build system!
+ make_file_src = join_path(os.path.dirname(self.module.__file__),
+ 'Makefile')
+ make_file = join_path(self.stage.source_path, 'src', 'Makefile')
+ shutil.copy(make_file_src, make_file)
+ filter_file(r'so', dso_suffix, make_file)
+
+ def install(self, spec, prefix):
+ name = 'libalglib.{0}'.format(dso_suffix)
+ with working_dir('src'):
+ mkdirp(prefix.lib)
+ install(name, prefix.lib)
+ mkdirp(prefix.include)
+ headers = glob.glob('*.h')
+ for h in headers:
+ install(h, prefix.include)
diff --git a/var/spack/repos/builtin/packages/alquimia/package.py b/var/spack/repos/builtin/packages/alquimia/package.py
index b8d3f60840..cadea3cb3c 100644
--- a/var/spack/repos/builtin/packages/alquimia/package.py
+++ b/var/spack/repos/builtin/packages/alquimia/package.py
@@ -36,8 +36,6 @@ class Alquimia(CMakePackage):
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
depends_on('mpi')
depends_on('hdf5')
@@ -52,10 +50,6 @@ class Alquimia(CMakePackage):
options = ['-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
'-DUSE_XSDK_DEFAULTS=YES',
- '-DCMAKE_BUILD_TYPE:STRING=%s' % (
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- '-DXSDK_ENABLE_DEBUG:STRING=%s' % (
- 'YES' if '+debug' in spec else 'NO'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'),
'-DTPL_ENABLE_MPI:BOOL=ON',
diff --git a/var/spack/repos/builtin/packages/alsa-lib/package.py b/var/spack/repos/builtin/packages/alsa-lib/package.py
new file mode 100644
index 0000000000..8d92b398e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/alsa-lib/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class AlsaLib(AutotoolsPackage):
+ """The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
+ functionality to the Linux operating system. alsa-lib contains the user
+ space library that developers compile ALSA applications against."""
+
+ homepage = "https://www.alsa-project.org"
+ url = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.4.1.tar.bz2"
+
+ version('1.1.4.1', '29fa3e69122d3cf3e8f0e01a0cb1d183')
diff --git a/var/spack/repos/builtin/packages/amg2013/package.py b/var/spack/repos/builtin/packages/amg2013/package.py
new file mode 100644
index 0000000000..5e1ef46df8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amg2013/package.py
@@ -0,0 +1,73 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 0s2111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Amg2013(MakefilePackage):
+ """AMG2013 is a parallel algebraic multigrid solver for linear
+ systems arising from problems on unstructured grids.
+ It has been derived directly from the BoomerAMG solver in the
+ hypre library, a large linear solver library that is being developed
+ in the Center for Applied Scientific Computing (CASC) at LLNL.
+ """
+ tags = ['proxy-app']
+ homepage = "https://codesign.llnl.gov/amg2013.php"
+ url = "https://codesign.llnl.gov/amg2013/amg2013.tgz"
+
+ version('master', '9d918d2a69528b83e6e0aba6ba601fef',
+ url='https://codesign.llnl.gov/amg2013/amg2013.tgz')
+
+ variant('openmp', default=True, description='Build with OpenMP support')
+ variant('assumepartition', default=False, description='Assumed partition (for thousands of processors)')
+
+ depends_on('mpi')
+
+ @property
+ def build_targets(self):
+ targets = []
+
+ include_cflags = ' -DTIMER_USE_MPI '
+ include_lflags = ' -lm '
+
+ if '+assumepartition' in self.spec:
+ include_cflags += ' -DHYPRE_NO_GLOBAL_PARTITION '
+
+ if '+openmp' in self.spec:
+ include_cflags += ' -DHYPRE_USING_OPENMP '
+ include_cflags += self.compiler.openmp_flag
+ include_lflags += ' ' + self.compiler.openmp_flag
+
+ targets.append('INCLUDE_CFLAGS={0}'.format(' '.join(include_cflags)))
+ targets.append('INCLUDE_LFLAGS={0}'.format(' '.join(include_lflags)))
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('test/amg2013', prefix.bin)
+ install_tree('docs', prefix.doc)
+ install('COPYRIGHT', prefix.doc)
+ install('COPYING.LESSER', prefix.doc) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/ampliconnoise/package.py b/var/spack/repos/builtin/packages/ampliconnoise/package.py
new file mode 100644
index 0000000000..7051ae0008
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ampliconnoise/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Ampliconnoise(MakefilePackage):
+ """AmpliconNoise is a collection of programs for the removal of noise
+ from 454 sequenced PCR amplicons."""
+
+ homepage = "https://code.google.com/archive/p/ampliconnoise/"
+ url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ampliconnoise/AmpliconNoiseV1.29.tar.gz"
+
+ version('1.29', 'd6723e6f9cc71d7eb6f1a65ba4643aac')
+
+ depends_on('mpi@2:')
+ depends_on('gsl')
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PATH', self.prefix.Scripts)
+ run_env.set('PYRO_LOOKUP_FILE', join_path(self.prefix, 'Data',
+ 'LookUp_E123.dat'))
+ run_env.set('SEQ_LOOKUP_FILE', join_path(self.prefix, 'Data',
+ 'Tran.dat'))
+
+ def install(self, spec, prefix):
+ make('install')
+ install_tree('bin', prefix.bin)
+ install_tree('Data', prefix.Data)
+ install_tree('FastaUnique', prefix.FastaUnique)
+ install_tree('FCluster', prefix.FCluster)
+ install_tree('NDist', prefix.NDist)
+ install_tree('Perseus', prefix.Perseus)
+ install_tree('PerseusD', prefix.PerseusD)
+ install_tree('PyroDist', prefix.PyroDist)
+ install_tree('PyroNoise', prefix.PyroNoise)
+ install_tree('PyroNoiseM', prefix.PyroNoiseM)
+ install_tree('Scripts', prefix.Scripts)
+ install_tree('SeqDist', prefix.SeqDist)
+ install_tree('SeqNoise', prefix.SeqNoise)
+ install_tree('SplitClusterClust', prefix.SplitClusterClust)
+ install_tree('SplitClusterEven', prefix.SplitClusterEven)
+ install_tree('Test', prefix.Test)
+ install_tree('TestFLX', prefix.TestFLX)
+ install_tree('TestTitanium', prefix.TestTitanium)
+ install_tree('TestTitaniumFast', prefix.TestTitaniumFast)
diff --git a/var/spack/repos/builtin/packages/amr-exp-parabolic/package.py b/var/spack/repos/builtin/packages/amr-exp-parabolic/package.py
new file mode 100644
index 0000000000..47e400e18f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/amr-exp-parabolic/package.py
@@ -0,0 +1,95 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class AmrExpParabolic(MakefilePackage):
+ """Simplified block-structured adaptive mesh refinement algorithm
+ in two and three dimensions with subcycling in time.
+ The algorithm solves a linear advection diffusion equation
+ with a simple numerical method. This proxy app is intended to
+ capture the communication pattern of an explicit AMR algorithm
+ but does not represent an accurate characterization of
+ floating point effort or
+ relative costs of communication to computation."""
+
+ homepage = "https://ccse.lbl.gov/ExaCT/index.html"
+ url = "https://ccse.lbl.gov/ExaCT/AMR_Exp_Parabolic.tgz"
+ tags = ['proxy-app']
+
+ version(
+ 'release', '330604d9cc755dad8a2cdfaa7ff8f6a4',
+ url='https://ccse.lbl.gov/ExaCT/AMR_Exp_Parabolic.tgz')
+
+ variant(
+ 'debug', default=False, description='Turn on debugging')
+ variant(
+ 'mpi', default=True, description='Build with MPI support')
+ variant(
+ 'openmp', default=False,
+ description='Build with OpenMP support')
+ variant(
+ 'prof', default=False, description='Use profiler')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('gmake', type='build')
+
+ build_directory = 'MiniApps/AMR_Adv_Diff_F90'
+
+ def edit(self, spec, prefix):
+ def_file = FileFilter('Tools/F_mk/GMakedefs.mak')
+ def_file.filter('tdir = t/.*', 'tdir := t/$(suf)')
+ def_file.filter('hdir = t/.*', 'hdir := t/html')
+ def_file.filter('include $(BOXLIB_HOME)/Tools/F_mk/GMakeMPI.mak', '#')
+
+ if '+mpi' in spec:
+ def_file.filter('FC.*:=.*', 'FC = {0}'.format(spec['mpi'].mpifc))
+ def_file.filter('F90.*:=.*', 'F90 = {0}'.format(spec['mpi'].mpifc))
+ def_file.filter(
+ 'mpi_include_dir =.*',
+ 'mpi_include_dir = {0}'.format(spec['mpi'].prefix.include))
+ def_file.filter(
+ 'mpi_lib_dir =.*',
+ 'mpi_lib_dir = {0}'.format(spec['mpi'].prefix.lib))
+
+ with working_dir(self.build_directory):
+ makefile = FileFilter('GNUmakefile')
+ if '+debug' in spec:
+ makefile.filter('NDEBUG.*:= t', '#')
+ if '~mpi' in spec:
+ makefile.filter('MPI.*:= t', '#')
+ if '+openmp' in spec:
+ makefile.filter('OMP.*:=', 'OMP := t')
+ if '+prof' in spec:
+ makefile.filter('PROF.*:=', 'PROF := t')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ files = glob.glob(join_path(self.build_directory, '*.exe'))
+ for f in files:
+ install(f, prefix.bin)
+ install('README.txt', prefix)
+ install('license.txt', prefix)
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index a13200b3e0..772bbce3a5 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -33,8 +33,9 @@ class Amrex(CMakePackage):
homepage = "https://ccse.lbl.gov/AMReX/index.html"
url = "https://github.com/AMReX-Codes/amrex.git"
- version('develop', git='https://github.com/AMReX-Codes/amrex.git', tag='master')
version('17.06', git='https://github.com/AMReX-Codes/amrex.git', commit='836d3c7')
+ version('master', git='https://github.com/AMReX-Codes/amrex.git', tag='master')
+ version('develop', git='https://github.com/AMReX-Codes/amrex.git', tag='develop')
variant('dims',
default='3',
diff --git a/var/spack/repos/builtin/packages/ant/package.py b/var/spack/repos/builtin/packages/ant/package.py
index b2fb647694..a2ba25f3ac 100644
--- a/var/spack/repos/builtin/packages/ant/package.py
+++ b/var/spack/repos/builtin/packages/ant/package.py
@@ -41,7 +41,7 @@ class Ant(Package):
version('1.9.7', 'a2fd9458c76700b7be51ef12f07d4bb1')
version('1.9.6', '29b7507c9053e301d2b85091f2aec6f0')
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
env['ANT_HOME'] = self.prefix
diff --git a/var/spack/repos/builtin/packages/antlr/gcc.patch b/var/spack/repos/builtin/packages/antlr/gcc.patch
new file mode 100644
index 0000000000..40de6b7861
--- /dev/null
+++ b/var/spack/repos/builtin/packages/antlr/gcc.patch
@@ -0,0 +1,15 @@
+Description: Adds missing includes to fix FTBFS.
+
+Index: antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp
+===================================================================
+--- antlr-2.7.7.orig/lib/cpp/antlr/CharScanner.hpp 2006-11-01 22:37:17.000000000 +0100
++++ antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp 2009-01-15 20:47:53.000000000 +0100
+@@ -17,6 +17,8 @@
+ #else
+ #include <cctype>
+ #endif
++#include <cstdio>
++#include <cstring>
+
+ #if ( _MSC_VER == 1200 )
+ // VC6 seems to need this
diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py
index e6332d20b3..b2e2b0a6a5 100644
--- a/var/spack/repos/builtin/packages/antlr/package.py
+++ b/var/spack/repos/builtin/packages/antlr/package.py
@@ -32,29 +32,20 @@ class Antlr(AutotoolsPackage):
frameworks. From a grammar, ANTLR generates a parser that can build and
walk parse trees."""
- homepage = "http://www.antlr.org"
- url = "https://github.com/antlr/antlr/tarball/v2.7.7"
+ homepage = "http://www.antlr2.org/"
+ url = "http://www.antlr2.org/download/antlr-2.7.7.tar.gz"
- # Notes from http://nco.sourceforge.net/#bld
- # The first steps to build (i.e., compile, for the most part) NCO from
- # source code are to install the pre-requisites: ANTLR version 2.7.7
- # (like this one not version 3.x or 4.x!) (required for ncap2)... ANTLR
- # binaries from major distributions are pre-built with the source patch
- # necessary to allow NCO to link to ANTLR... The ANTLR source file
- # CharScanner.hpp must include this line: #include <cstring> or else
- # ncap2 will not compile (this tarball is already patched).
- version('2.7.7', '914865e853fe8e1e61a9f23d045cb4ab',
- # Patched version as described above
- url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz')
- # Unpatched version
- # url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz')
+ version('2.7.7', '01cc9a2a454dd33dcd8c856ec89af090')
+
+ # Fixes build with recent versions of GCC
+ patch('gcc.patch')
variant('cxx', default=True, description='Enable ANTLR for C++')
variant('java', default=False, description='Enable ANTLR for Java')
variant('python', default=False, description='Enable ANTLR for Python')
extends('python', when='+python')
- depends_on('jdk', type=('build', 'run'), when='+java')
+ depends_on('java', type=('build', 'run'), when='+java')
def configure_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py
index 55e22342b1..0c04968a67 100644
--- a/var/spack/repos/builtin/packages/apex/package.py
+++ b/var/spack/repos/builtin/packages/apex/package.py
@@ -23,14 +23,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-from spack.util.environment import *
-class Apex(Package):
+class Apex(CMakePackage):
homepage = "http://github.com/khuck/xpress-apex"
url = "http://github.com/khuck/xpress-apex/archive/v0.1.tar.gz"
- version('0.1', '8b95f0c0313da1575960d3ad69f18e75')
+ version('0.1', 'e224a0b9033e23a9697ce2a3c307a0a3')
depends_on("binutils+libiberty")
depends_on("boost@1.54:")
@@ -38,19 +37,14 @@ class Apex(Package):
depends_on("activeharmony@4.5:")
depends_on("ompt-openmp")
- def install(self, spec, prefix):
-
- path = get_path("PATH")
- path.remove(spec["binutils"].prefix.bin)
- path_set("PATH", path)
- with working_dir("build", create=True):
- cmake('-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DUSE_BFD=TRUE',
- '-DBFD_ROOT=%s' % spec['binutils'].prefix,
- '-DUSE_ACTIVEHARMONY=TRUE',
- '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix,
- '-DUSE_OMPT=TRUE',
- '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix,
- '..', *std_cmake_args)
- make()
- make("install")
+ def cmake_args(self):
+ spec = self.spec
+ return [
+ '-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DUSE_BFD=TRUE',
+ '-DBFD_ROOT=%s' % spec['binutils'].prefix,
+ '-DUSE_ACTIVEHARMONY=TRUE',
+ '-DACTIVEHARMONY_ROOT=%s' % spec['activeharmony'].prefix,
+ '-DUSE_OMPT=TRUE',
+ '-DOMPT_ROOT=%s' % spec['ompt-openmp'].prefix,
+ ]
diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py
index 4b63e41600..6330daa4d7 100644
--- a/var/spack/repos/builtin/packages/apr-util/package.py
+++ b/var/spack/repos/builtin/packages/apr-util/package.py
@@ -25,23 +25,93 @@
from spack import *
-class AprUtil(Package):
+class AprUtil(AutotoolsPackage):
"""Apache Portable Runtime Utility"""
+
homepage = 'https://apr.apache.org/'
- url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz'
+ url = 'http://archive.apache.org/dist/apr/apr-util-1.6.0.tar.gz'
+
+ version('1.6.0', '3b03dbff60728a4f4c33f5d929e8b35a')
+ version('1.5.4', '866825c04da827c6e5f53daff5569f42')
- version('1.5.4', '866825c04da827c6e5f53daff5569f42')
+ variant('crypto', default=True, description='Enable crypto support')
+ variant('gdbm', default=False, description='Enable GDBM support')
+ variant('pgsql', default=False, description='Enable PostgreSQL support')
+ variant('sqlite', default=False, description='Enable sqlite DBD driver')
+ variant('odbc', default=False, description='Enalbe ODBC support')
depends_on('apr')
depends_on('expat')
+ depends_on('libiconv')
+
+ depends_on('openssl', when='+crypto')
+ depends_on('gdbm', when='+gdbm')
+ depends_on('postgresql', when='+pgsql')
+ depends_on('sqlite', when='+sqlite')
+ depends_on('unixodbc', when='+odbc')
+
+ def configure_args(self):
+ spec = self.spec
+
+ args = [
+ '--with-apr={0}'.format(spec['apr'].prefix),
+ '--with-expat={0}'.format(spec['expat'].prefix),
+ '--with-iconv={0}'.format(spec['libiconv'].prefix),
+ # TODO: Add support for the following database managers
+ '--without-ndbm',
+ '--without-berkeley-db',
+ '--without-mysql',
+ '--without-oracle',
+ ]
+
+ if '+crypto' in spec:
+ args.extend([
+ '--with-crypto',
+ '--with-openssl={0}'.format(spec['openssl'].prefix),
+ ])
+ else:
+ args.append('--without-crypto')
+
+ if '+gdbm' in spec:
+ args.append('--with-gdbm={0}'.format(spec['gdbm'].prefix))
+ else:
+ args.append('--without-gdbm')
+
+ if '+pgsql' in spec:
+ args.append('--with-pgsql={0}'.format(spec['postgresql'].prefix))
+ else:
+ args.append('--without-pgsql')
+
+ if '+sqlite' in spec:
+ if spec.satisfies('^sqlite@3.0:3.999'):
+ args.extend([
+ '--with-sqlite3={0}'.format(spec['sqlite'].prefix),
+ '--without-sqlite2',
+ ])
+ elif spec.satisfies('^sqlite@2.0:2.999'):
+ args.extend([
+ '--with-sqlite2={0}'.format(spec['sqlite'].prefix),
+ '--without-sqlite3',
+ ])
+ else:
+ args.extend([
+ '--without-sqlite2',
+ '--without-sqlite3',
+ ])
+
+ if '+odbc' in spec:
+ args.append('--with-odbc={0}'.format(spec['unixodbc'].prefix))
+ else:
+ args.append('--without-odbc')
- def install(self, spec, prefix):
+ return args
- # configure, build, install:
- options = ['--prefix=%s' % prefix]
- options.append('--with-apr=%s' % spec['apr'].prefix)
- options.append('--with-expat=%s' % spec['expat'].prefix)
+ def check(self):
+ # FIXME: Database driver tests fail, at least on macOS:
+ #
+ # Failed to load driver file apr_dbd_pgsql.so
+ # Failed to load driver file apr_dbd_sqlite3.so
+ # Failed to load driver file apr_dbd_odbc.so
- configure(*options)
- make()
- make('install')
+ # Tests occassionally fail when run in parallel
+ make('check', parallel=False)
diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py
index 53a3c1e59b..45b000854e 100644
--- a/var/spack/repos/builtin/packages/apr/package.py
+++ b/var/spack/repos/builtin/packages/apr/package.py
@@ -25,15 +25,11 @@
from spack import *
-class Apr(Package):
+class Apr(AutotoolsPackage):
"""Apache portable runtime."""
- homepage = 'https://apr.apache.org/'
- url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz'
- version('1.5.2', '98492e965963f852ab29f9e61b2ad700')
+ homepage = 'https://apr.apache.org/'
+ url = 'http://archive.apache.org/dist/apr/apr-1.6.2.tar.gz'
- def install(self, spec, prefix):
- options = ['--prefix=%s' % prefix]
- configure(*options)
- make()
- make('install')
+ version('1.6.2', '8672e78514e3fcef2643127c524bf0f9')
+ version('1.5.2', '98492e965963f852ab29f9e61b2ad700')
diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py
index 9c577e6517..f5e4fbf8c1 100644
--- a/var/spack/repos/builtin/packages/archer/package.py
+++ b/var/spack/repos/builtin/packages/archer/package.py
@@ -26,7 +26,7 @@
from spack import *
-class Archer(Package):
+class Archer(CMakePackage):
"""ARCHER, a data race detection tool for large OpenMP applications."""
homepage = "https://github.com/PRUNERS/ARCHER"
@@ -34,23 +34,16 @@ class Archer(Package):
version('1.0.0', '790bfaf00b9f57490eb609ecabfe954a')
- depends_on('cmake', type='build')
+ depends_on('cmake@3.4.3:', type='build')
depends_on('llvm')
- depends_on('ninja', type='build')
+ depends_on('ninja@1.5:', type='build')
depends_on('llvm-openmp-ompt')
- def install(self, spec, prefix):
-
- with working_dir('spack-build', create=True):
- cmake_args = std_cmake_args[:]
- cmake_args.extend([
- '-G', 'Ninja',
- '-DCMAKE_C_COMPILER=clang',
- '-DCMAKE_CXX_COMPILER=clang++',
- '-DOMP_PREFIX:PATH=%s' % spec['llvm-openmp-ompt'].prefix,
- ])
-
- cmake('..', *cmake_args)
- ninja = Executable('ninja')
- ninja()
- ninja('install')
+ generator = 'Ninja'
+
+ def cmake_args(self):
+ return [
+ '-DCMAKE_C_COMPILER=clang',
+ '-DCMAKE_CXX_COMPILER=clang++',
+ '-DOMP_PREFIX:PATH=%s' % self.spec['llvm-openmp-ompt'].prefix,
+ ]
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
index 90fc78d8c3..a3c9c2bf3f 100644
--- a/var/spack/repos/builtin/packages/armadillo/package.py
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Armadillo(Package):
+class Armadillo(CMakePackage):
"""Armadillo is a high quality linear algebra library (matrix maths)
for the C++ language, aiming towards a good balance between speed and
ease of use."""
@@ -40,19 +40,21 @@ class Armadillo(Package):
variant('hdf5', default=False, description='Include HDF5 support')
- depends_on('cmake@2.8:', type='build')
+ depends_on('cmake@2.8.12:', type='build')
depends_on('arpack-ng') # old arpack causes undefined symbols
depends_on('blas')
depends_on('lapack')
depends_on('superlu@5.2:')
depends_on('hdf5', when='+hdf5')
- def install(self, spec, prefix):
+ def cmake_args(self):
+ spec = self.spec
+
arpack = find_libraries('libarpack', root=spec[
'arpack-ng'].prefix.lib, shared=True)
superlu = find_libraries('libsuperlu', root=spec[
'superlu'].prefix, shared=False, recurse=True)
- cmake_args = [
+ return [
# ARPACK support
'-DARPACK_LIBRARY={0}'.format(arpack.joined()),
# BLAS support
@@ -65,9 +67,3 @@ class Armadillo(Package):
# HDF5 support
'-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
]
-
- cmake_args.extend(std_cmake_args)
- cmake('.', *cmake_args)
-
- make()
- make('install')
diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py
index 831a379fce..67ab050236 100644
--- a/var/spack/repos/builtin/packages/arpack/package.py
+++ b/var/spack/repos/builtin/packages/arpack/package.py
@@ -60,7 +60,9 @@ class Arpack(Package):
# Be sure to use the Spack compiler wrapper
makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77']))
- makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC')
+ makefile.filter(
+ '^FFLAGS.*', 'FFLAGS = -O2 -g {0}'.format(self.compiler.pic_flag)
+ )
if not which('ranlib'):
makefile.filter('^RANLIB.*', 'RANLIB = touch')
diff --git a/var/spack/repos/builtin/packages/aspa/package.py b/var/spack/repos/builtin/packages/aspa/package.py
new file mode 100644
index 0000000000..863c8a2980
--- /dev/null
+++ b/var/spack/repos/builtin/packages/aspa/package.py
@@ -0,0 +1,72 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class Aspa(MakefilePackage):
+ """A fundamental premise in ExMatEx is that scale-bridging performed in
+ heterogeneous MPMD materials science simulations will place important
+ demands upon the exascale ecosystem that need to be identified and
+ quantified.
+ tags = proxy-app
+ """
+ tags = ['proxy-app']
+ homepage = "http://www.exmatex.org/aspa.html"
+ url = "https://github.com/exmatex/ASPA/archive/master.tar.gz"
+
+ version('master', git='https://github.com/exmatex/ASPA.git',
+ description='master')
+ variant('mpi', default=True, description='Build with MPI Support')
+
+ depends_on('lapack')
+ depends_on('blas')
+ depends_on('mpi', when='+mpi')
+ depends_on('hdf5')
+
+ @property
+ def build_targets(self):
+ targets = [
+ '--directory=exec',
+ '--file=Makefile',
+ 'LIBS={0} {1} {2}'.format(self.spec['lapack'].libs.ld_flags,
+ self.spec['blas'].libs.ld_flags,
+ self.spec['hdf5'].libs.ld_flags),
+ 'CXX={0}'.format(self.spec['mpi'].mpicxx)
+ ]
+ return targets
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+ mkdirp(prefix.input)
+ install('exec/aspa', prefix.bin)
+ install('exec/README', prefix.doc)
+ install('exec/aspa.inp', prefix.input)
+ install('exec/kriging_model_centers.txt', prefix.input)
+ install('exec/point_data.txt', prefix.input)
+ install('exec/value_data.txt', prefix.input)
+ for files in glob.glob('doc/*.*'):
+ install(files, prefix.doc) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/astral/astral.sh b/var/spack/repos/builtin/packages/astral/astral.sh
new file mode 100644
index 0000000000..3f530d7f4e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/astral/astral.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# convenience wrapper for the astral jar file
+java $JAVA_ARGS $JAVA_OPTS -jar astral.jar "$@"
diff --git a/var/spack/repos/builtin/packages/astral/package.py b/var/spack/repos/builtin/packages/astral/package.py
new file mode 100644
index 0000000000..79feeca07a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/astral/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os.path
+
+
+class Astral(Package):
+ """ASTRAL is a tool for estimating an unrooted species tree given a set of
+ unrooted gene trees."""
+
+ homepage = "https://github.com/smirarab/ASTRAL"
+ url = "https://github.com/smirarab/ASTRAL/archive/v4.10.7.tar.gz"
+
+ version('4.10.7', '38c81020570254e3f5c75d6c3c27fc6d')
+
+ depends_on('java', type=('build', 'run'))
+
+ phases = ['build', 'install']
+
+ def build(self, spec, prefix):
+ make = Executable('./make.sh')
+ make()
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install_tree('lib', prefix.tools.lib)
+ jar_file = 'astral.{v}.jar'.format(v=self.version)
+ install(jar_file, prefix.tools)
+
+ script_sh = join_path(os.path.dirname(__file__), "astral.sh")
+ script = prefix.bin.astral
+ install(script_sh, script)
+ set_executable(script)
+
+ java = self.spec['java'].prefix.bin.java
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ filter_file('^java', java, script, **kwargs)
+ filter_file('astral.jar', join_path(prefix.tools, jar_file),
+ script, **kwargs)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('ASTRAL_HOME', self.prefix.tools)
diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py
index ccaa2f1e70..8a90de639e 100644
--- a/var/spack/repos/builtin/packages/augustus/package.py
+++ b/var/spack/repos/builtin/packages/augustus/package.py
@@ -32,6 +32,7 @@ class Augustus(MakefilePackage):
homepage = "http://bioinf.uni-greifswald.de/augustus/"
url = "http://bioinf.uni-greifswald.de/augustus/binaries/augustus-3.2.3.tar.gz"
+ version('3.3', '9ebe494df78ebf6a43091cfc8551050c')
version('3.2.3', 'b8c47ea8d0c45aa7bb9a82626c8ff830')
depends_on('bamtools')
diff --git a/var/spack/repos/builtin/packages/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py
index 1edeecf245..1d84a4f6f4 100644
--- a/var/spack/repos/builtin/packages/automaded/package.py
+++ b/var/spack/repos/builtin/packages/automaded/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Automaded(Package):
+class Automaded(CMakePackage):
"""AutomaDeD (Automata-based Debugging for Dissimilar parallel
tasks) is a tool for automatic diagnosis of performance and
correctness problems in MPI applications. It creates
@@ -45,9 +45,7 @@ class Automaded(Package):
depends_on('mpi')
depends_on('boost')
depends_on('callpath')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8:', type='build')
- def install(self, spec, prefix):
- cmake("-DSTATE_TRACKER_WITH_CALLPATH=ON", *std_cmake_args)
- make()
- make("install")
+ def cmake_args(self):
+ return ['-DSTATE_TRACKER_WITH_CALLPATH=ON']
diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py
index 17b7992a1b..a9573dbe2b 100644
--- a/var/spack/repos/builtin/packages/bazel/package.py
+++ b/var/spack/repos/builtin/packages/bazel/package.py
@@ -42,7 +42,7 @@ class Bazel(Package):
version('0.2.2b', '75081804f073cbd194da1a07b16cba5f')
version('0.2.2', '644bc4ea7f429d835e74f255dc1054e6')
- depends_on('jdk@8:')
+ depends_on('java@8:')
depends_on('zip')
patch('fix_env_handling.patch')
diff --git a/var/spack/repos/builtin/packages/bcftools/package.py b/var/spack/repos/builtin/packages/bcftools/package.py
index 6a276709ef..6555692fab 100644
--- a/var/spack/repos/builtin/packages/bcftools/package.py
+++ b/var/spack/repos/builtin/packages/bcftools/package.py
@@ -39,6 +39,8 @@ class Bcftools(Package):
depends_on('zlib')
depends_on('bzip2', when="@1.4:")
+ # build fails without xz
+ depends_on('xz', when="@1.4")
def install(self, spec, prefix):
make("prefix=%s" % prefix, "all")
diff --git a/var/spack/repos/builtin/packages/bcl2fastq2/package.py b/var/spack/repos/builtin/packages/bcl2fastq2/package.py
index 1a7fff360c..64060c2b9b 100644
--- a/var/spack/repos/builtin/packages/bcl2fastq2/package.py
+++ b/var/spack/repos/builtin/packages/bcl2fastq2/package.py
@@ -37,8 +37,8 @@ class Bcl2fastq2(Package):
files."""
homepage = "https://support.illumina.com/downloads/bcl2fastq-conversion-software-v2-18.html"
- url = "https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v2-18-0-12-tar.zip"
+ version('2.19.1.403', 'baba7a02767fd868e87cb36781d2be26')
version('2.18.0.12', 'fbe06492117f65609c41be0c27e3215c')
# 2.17.1.14 is no longer distributed. If you have a copy of the
# source tarball, you can drop it into a local mirror w/ the name
@@ -59,11 +59,18 @@ class Bcl2fastq2(Package):
# libexslt bits.
patch('cxxConfigure-cmake.patch')
- root_cmakelists_dir = '../src'
+ root_cmakelists_dir = 'src'
+ # v2.17.1.14 and v2.18.0.12 were available via HTTP.
+ # v2.19.1.403 is only available via ftp.
+ # who knows what the future will hold.
def url_for_version(self, version):
- url = "https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v{0}-tar.zip"
- return url.format(version.dashed)
+ if version.string == '2.19.1.403':
+ return "ftp://webdata2:webdata2@ussd-ftp.illumina.com/downloads/software/bcl2fastq/bcl2fastq2-v2.19.1-tar.zip"
+ else:
+ url = "https://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v{0}-tar.zip"
+ # - required to change the version from dots to dashes.
+ return url.format(version.dashed)
# Illumina tucks the source inside a gzipped tarball inside a zip
# file. We let the normal Spack expansion bit unzip the zip file,
diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py
index 7078931c59..eed95ebf89 100644
--- a/var/spack/repos/builtin/packages/bear/package.py
+++ b/var/spack/repos/builtin/packages/bear/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Bear(Package):
+class Bear(CMakePackage):
"""Bear is a tool that generates a compilation database for clang tooling
from non-cmake build systems."""
homepage = "https://github.com/rizsotto/Bear"
@@ -34,11 +34,5 @@ class Bear(Package):
version('2.2.0', '87250cc3a9a697e7d1e8972253a35259')
version('2.0.4', 'fd8afb5e8e18f8737ba06f90bd77d011')
- depends_on('cmake', type='build')
- depends_on("python")
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make("all")
- make("install")
+ depends_on('python')
+ depends_on('cmake@2.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/beast2/package.py b/var/spack/repos/builtin/packages/beast2/package.py
index ceeb94ab7f..77acaa01f3 100644
--- a/var/spack/repos/builtin/packages/beast2/package.py
+++ b/var/spack/repos/builtin/packages/beast2/package.py
@@ -38,7 +38,7 @@ class Beast2(Package):
version('2.4.6', 'b446f4ab121df9b991f7bb7ec94c8217')
- depends_on('jdk')
+ depends_on('java')
def setup_environment(self, spack_env, run_env):
run_env.set('BEAST', self.prefix)
diff --git a/var/spack/repos/builtin/packages/benchmark/package.py b/var/spack/repos/builtin/packages/benchmark/package.py
index 9e2009750d..3969781112 100644
--- a/var/spack/repos/builtin/packages/benchmark/package.py
+++ b/var/spack/repos/builtin/packages/benchmark/package.py
@@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-
from spack import *
@@ -32,5 +31,28 @@ class Benchmark(CMakePackage):
homepage = "https://github.com/google/benchmark"
url = "https://github.com/google/benchmark/archive/v1.1.0.tar.gz"
+ version('develop', branch='master',
+ git='https://github.com/google/benchmark.git')
+
+ # first properly installed CMake config packages in
+ # 1.2.0 release: https://github.com/google/benchmark/issues/363
+ version('1.2.0', '48d0b090cd7a84af2c4a28c8dc963c74')
version('1.1.0', '66b2a23076cf70739525be0092fc3ae3')
version('1.0.0', '1474ff826f8cd68067258db75a0835b8')
+
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo',
+ 'MinSizeRel', 'Coverage'))
+
+ def patch(self):
+ filter_file(
+ r'add_cxx_compiler_flag..fstrict.aliasing.',
+ r'##### add_cxx_compiler_flag(-fstrict-aliasing)',
+ 'CMakeLists.txt'
+ )
+ filter_file(
+ r'add_cxx_compiler_flag..Werror',
+ r'##### add_cxx_compiler_flag(-Werror',
+ 'CMakeLists.txt'
+ )
diff --git a/var/spack/repos/builtin/packages/binutils/binutilskrell-2.24.patch b/var/spack/repos/builtin/packages/binutils/binutilskrell-2.24.patch
deleted file mode 100644
index f48291a6c9..0000000000
--- a/var/spack/repos/builtin/packages/binutils/binutilskrell-2.24.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- binutils-2.24/libiberty/Makefile.in 2013-11-04 10:33:40.000000000 -0500
-+++ binutils-2.24-fixes/libiberty/Makefile.in 2014-10-17 16:22:31.413655000 -0400
-@@ -66,6 +66,7 @@
- MAKEOVERRIDES =
-
- TARGETLIB = ./libiberty.a
-+TARGETLIBPIC = ./libiberty_pic.a
- TESTLIB = ./testlib.a
-
- LIBOBJS = @LIBOBJS@
-@@ -355,27 +356,27 @@
- # since it will be passed the multilib flags.
- MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
- install_to_libdir: all
-- if test -n "${target_header_dir}"; then \
-- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
-- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
-- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
-- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
-- case "${target_header_dir}" in \
-- /*) thd=${target_header_dir};; \
-- *) thd=${includedir}/${target_header_dir};; \
-- esac; \
-- ${mkinstalldirs} $(DESTDIR)$${thd}; \
-- for h in ${INSTALLED_HEADERS}; do \
-- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
-- done; \
-- fi
-+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
-+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
-+ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n; \
-+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
-+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n ;$(RANLIB) $(TARGETLIBPIC)n ); \
-+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
-+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC); \
-+ ${mkinstalldirs} $(DESTDIR)$${includedir}; \
-+ for h in ${INSTALLED_HEADERS}; do \
-+ ${INSTALL_DATA} $$h $(DESTDIR)$${includedir}; \
-+ done;
- @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
- install_to_tooldir: all
- ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
-+ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n
- ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
-+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n; $(RANLIB) $(TARGETLIBPIC)n )
- mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
-+ mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)
- @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
- # required-list was used when building a shared bfd/opcodes/libiberty
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index abfe33df9c..de1f23520f 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -39,16 +39,11 @@ class Binutils(AutotoolsPackage):
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
- # Add a patch that creates binutils libiberty_pic.a which is preferred by
- # OpenSpeedShop and cbtf-krell
- variant('krellpatch', default=False,
- description="build with openspeedshop based patch.")
variant('plugins', default=False,
description="enable plugins, needed for gold linker")
variant('gold', default=True, description="build the gold linker")
variant('libiberty', default=False, description='Also install libiberty.')
- patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
patch('cr16.patch')
patch('update_symbol-2.26.patch', when='@2.26')
diff --git a/var/spack/repos/builtin/packages/bml/package.py b/var/spack/repos/builtin/packages/bml/package.py
index 87dc1c9e80..1c91b6fff2 100644
--- a/var/spack/repos/builtin/packages/bml/package.py
+++ b/var/spack/repos/builtin/packages/bml/package.py
@@ -30,20 +30,11 @@ class Bml(CMakePackage):
formats (in dense and sparse) and their associated algorithms for basic
matrix operations."""
- homepage = "https://github.com/qmmd/bml"
- url = "https://github.com/qmmd/bml"
+ homepage = "http://lanl.github.io/bml/"
+ url = "https://github.com/lanl/bml"
- version('develop', git='https://github.com/qmmd/bml', branch='master')
- version('1.1.0', git='https://github.com/qmmd/bml', tag='v1.1.0')
-
- variant('debug', default=False, description='Build debug version')
+ version('develop', git='https://github.com/lanl/bml', branch='master')
+ version('1.1.0', git='https://github.com/lanl/bml', tag='v1.1.0')
depends_on("blas")
depends_on("lapack")
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index cf63b229c0..b3dc0b396b 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -41,6 +41,14 @@ class Boost(Package):
list_url = "http://sourceforge.net/projects/boost/files/boost/"
list_depth = 1
+ version('develop',
+ git='https://github.com/boostorg/boost.git',
+ branch='develop',
+ submodules=True)
+
+ version('1.65.0', '5512d3809801b0a1b9dd58447b70915d',
+ url='https://dl.bintray.com/boostorg/release/1.65.0/source/boost_1_65_0.tar.bz2')
+
# NOTE: 1.64.0 seems fine for *most* applications, but if you need
# +python and +mpi, there seem to be errors with out-of-date
# API calls from mpi/python.
@@ -207,8 +215,21 @@ class Boost(Package):
spack_cxx))
if '+mpi' in spec:
- f.write('using mpi : %s ;\n' %
- join_path(spec['mpi'].prefix.bin, 'mpicxx'))
+
+ # Use the correct mpi compiler. If the compiler options are
+ # empty or undefined, Boost will attempt to figure out the
+ # correct options by running "${mpicxx} -show" or something
+ # similar, but that doesn't work with the Cray compiler
+ # wrappers. Since Boost doesn't use the MPI C++ bindings,
+ # that can be used as a compiler option instead.
+
+ mpi_line = 'using mpi : %s' % spec['mpi'].mpicxx
+
+ if 'platform=cray' in spec:
+ mpi_line += ' : <define>MPICH_SKIP_MPICXX'
+
+ f.write(mpi_line + ' ;\n')
+
if '+python' in spec:
f.write(self.bjam_python_line(spec))
@@ -311,7 +332,6 @@ class Boost(Package):
if not spec.satisfies('@1.43.0:'):
withLibs.remove('random')
if '+graph' in spec and '+mpi' in spec:
- withLibs.remove('graph')
withLibs.append('graph_parallel')
# to make Boost find the user-config.jam
@@ -328,7 +348,11 @@ class Boost(Package):
b2name = './b2' if spec.satisfies('@1.47:') else './bjam'
b2 = Executable(b2name)
- b2_options = ['-j', '%s' % make_jobs]
+ jobs = make_jobs
+ # in 1.59 max jobs became dynamic
+ if jobs > 64 and spec.satisfies('@:1.58'):
+ jobs = 64
+ b2_options = ['-j', '%s' % jobs]
threadingOpts = self.determine_b2_options(spec, b2_options)
diff --git a/var/spack/repos/builtin/packages/bpp-core/package.py b/var/spack/repos/builtin/packages/bpp-core/package.py
index e7cc1abf29..df2c09b3ae 100644
--- a/var/spack/repos/builtin/packages/bpp-core/package.py
+++ b/var/spack/repos/builtin/packages/bpp-core/package.py
@@ -25,7 +25,7 @@
from spack import *
-class BppCore(Package):
+class BppCore(CMakePackage):
"""Bio++ core library."""
homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation"
@@ -33,9 +33,7 @@ class BppCore(Package):
version('2.2.0', '5789ed2ae8687d13664140cd77203477')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.6:', type='build')
- def install(self, spec, prefix):
- cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args)
- make()
- make('install')
+ def cmake_args(self):
+ return ['-DBUILD_TESTING=FALSE']
diff --git a/var/spack/repos/builtin/packages/bpp-phyl/package.py b/var/spack/repos/builtin/packages/bpp-phyl/package.py
index 4d73d6bd59..1e1a2a393f 100644
--- a/var/spack/repos/builtin/packages/bpp-phyl/package.py
+++ b/var/spack/repos/builtin/packages/bpp-phyl/package.py
@@ -25,7 +25,7 @@
from spack import *
-class BppPhyl(Package):
+class BppPhyl(CMakePackage):
"""Bio++ phylogeny library."""
homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation"
@@ -33,11 +33,9 @@ class BppPhyl(Package):
version('2.2.0', '5c40667ec0bf37e0ecaba321be932770')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.6:', type='build')
depends_on('bpp-core')
depends_on('bpp-seq')
- def install(self, spec, prefix):
- cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args)
- make()
- make('install')
+ def cmake_args(self):
+ return ['-DBUILD_TESTING=FALSE']
diff --git a/var/spack/repos/builtin/packages/bpp-seq/package.py b/var/spack/repos/builtin/packages/bpp-seq/package.py
index 6e1f06a64b..d89d029d26 100644
--- a/var/spack/repos/builtin/packages/bpp-seq/package.py
+++ b/var/spack/repos/builtin/packages/bpp-seq/package.py
@@ -25,7 +25,7 @@
from spack import *
-class BppSeq(Package):
+class BppSeq(CMakePackage):
"""Bio++ seq library."""
homepage = "http://biopp.univ-montp2.fr/wiki/index.php/Installation"
@@ -33,10 +33,8 @@ class BppSeq(Package):
version('2.2.0', '44adef0ff4d5ca4e69ccf258c9270633')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.6:', type='build')
depends_on('bpp-core')
- def install(self, spec, prefix):
- cmake('-DBUILD_TESTING=FALSE', '.', *std_cmake_args)
- make()
- make('install')
+ def cmake_args(self):
+ return ['-DBUILD_TESTING=FALSE']
diff --git a/var/spack/repos/builtin/packages/bpp-suite/package.py b/var/spack/repos/builtin/packages/bpp-suite/package.py
index 8223c40275..f52f76b822 100644
--- a/var/spack/repos/builtin/packages/bpp-suite/package.py
+++ b/var/spack/repos/builtin/packages/bpp-suite/package.py
@@ -25,7 +25,7 @@
from spack import *
-class BppSuite(Package):
+class BppSuite(CMakePackage):
"""BppSuite is a suite of ready-to-use programs for phylogenetic and
sequence analysis."""
@@ -34,13 +34,8 @@ class BppSuite(Package):
version('2.2.0', 'd8b29ad7ccf5bd3a7beb701350c9e2a4')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.6:', type='build')
depends_on('texinfo', type='build')
depends_on('bpp-core')
depends_on('bpp-seq')
depends_on('bpp-phyl')
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
- make()
- make('install')
diff --git a/var/spack/repos/builtin/packages/braker/package.py b/var/spack/repos/builtin/packages/braker/package.py
new file mode 100644
index 0000000000..cfc1f16025
--- /dev/null
+++ b/var/spack/repos/builtin/packages/braker/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Braker(Package):
+ """BRAKER is a pipeline for unsupervised RNA-Seq-based genome annotation
+ that combines the advantages of GeneMark-ET and AUGUSTUS"""
+
+ homepage = "http://exon.gatech.edu/braker1.html"
+ url = "http://bioinf.uni-greifswald.de/augustus/binaries/BRAKER1_v1.11.tar.gz"
+
+ version('1.11', '297efe4cabdd239b710ac2c45d81f6a5')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('augustus')
+ depends_on('genemark-et')
+ depends_on('bamtools')
+ depends_on('samtools')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.lib)
+ install('braker.pl', prefix.bin)
+ install('filterGenemark.pl', prefix.bin)
+ install('filterIntronsFindStrand.pl', prefix.bin)
+ install('helpMod.pm', prefix.lib)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PERL5LIB', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/bsseeker2/package.py b/var/spack/repos/builtin/packages/bsseeker2/package.py
new file mode 100644
index 0000000000..aca1e70b01
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bsseeker2/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Bsseeker2(Package):
+ """A versatile aligning pipeline for bisulfite sequencing data."""
+
+ homepage = "http://pellegrini.mcdb.ucla.edu/BS_Seeker2"
+ url = "https://github.com/BSSeeker/BSseeker2/archive/v2.1.2.tar.gz"
+
+ version('2.1.2', '5f7f0ef4071711e56b59c5c16b7f34a7')
+
+ depends_on('python@2.6:2.999', type=('build', 'run'))
+ depends_on('py-pysam', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('Antisense.py', prefix.bin)
+ install_tree('bs_index', prefix.bin.bs_index)
+ install('bs_seeker2-build.py', prefix.bin)
+ install_tree('bs_utils', prefix.bin.bs_utils)
+ install_tree('galaxy', prefix.bin.galaxy)
+ install_tree('bs_align', prefix.bin.bs_align)
+ install('bs_seeker2-align.py', prefix.bin)
+ install('bs_seeker2-call_methylation.py', prefix.bin)
+ install('FilterReads.py', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/bucky/package.py b/var/spack/repos/builtin/packages/bucky/package.py
new file mode 100644
index 0000000000..d74e8784e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bucky/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Bucky(MakefilePackage):
+ """BUCKy is a free program to combine molecular data from multiple loci.
+ BUCKy estimates the dominant history of sampled individuals, and how
+ much of the genome supports each relationship, using Bayesian
+ concordance analysis."""
+
+ homepage = "http://www.stat.wisc.edu/~ane/bucky/index.html"
+ url = "http://dstats.net/download/http://www.stat.wisc.edu/~ane/bucky/v1.4/bucky-1.4.4.tgz"
+
+ version('1.4.4', 'f0c910dd1d411d112637826519943a6d')
+
+ # Compilation requires gcc
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%intel')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
+
+ build_directory = 'src'
+
+ def install(self, spec, prefix):
+ with working_dir('src'):
+ mkdirp(prefix.bin)
+ install('bucky', prefix.bin)
+ install('mbsum', prefix.bin)
+ install_tree('data', prefix.data)
+ install_tree('doc', prefix.doc)
+ install_tree('scripts', prefix.scripts)
diff --git a/var/spack/repos/builtin/packages/busco/package.py b/var/spack/repos/builtin/packages/busco/package.py
new file mode 100644
index 0000000000..ad0f06ca91
--- /dev/null
+++ b/var/spack/repos/builtin/packages/busco/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Busco(PythonPackage):
+ """Assesses genome assembly and annotation completeness with Benchmarking
+ Universal Single-Copy Orthologs"""
+
+ homepage = "http://busco.ezlab.org/"
+ url = "https://gitlab.com/ezlab/busco"
+
+ version('3.0.1', git='https://gitlab.com/ezlab/busco.git', commit='078252e00399550d7b0e8941cd4d986c8e868a83')
+ version('2.0.1', git='https://gitlab.com/ezlab/busco.git', commit='89aa1ab2527f03a87a214ca90a504ad236582a11')
+
+ depends_on('python', type=('build', 'run'))
+ depends_on('blast-plus')
+ depends_on('hmmer')
+ depends_on('augustus')
+
+ def build(self, spec, prefix):
+ if self.spec.satisfies('@2.0.1'):
+ pass
+
+ def install(self, spec, prefix):
+ if self.spec.satisfies('@3.0.1'):
+ with working_dir('scripts'):
+ mkdirp(prefix.bin)
+ install('generate_plot.py', prefix.bin)
+ install('run_BUSCO.py', prefix.bin)
+ install_tree('config', prefix.config)
+ args = self.install_args(spec, prefix)
+ self.setup_py('install', *args)
+ if self.spec.satisfies('@2.0.1'):
+ mkdirp(prefix.bin)
+ install('BUSCO.py', prefix.bin)
+ install('BUSCO_plot.py', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/butter/package.py b/var/spack/repos/builtin/packages/butter/package.py
new file mode 100644
index 0000000000..4bd1607097
--- /dev/null
+++ b/var/spack/repos/builtin/packages/butter/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Butter(Package):
+ """butter: Bowtie UTilizing iTerative placEment of Repetitive small rnas.
+ A wrapper for bowtie to produce small RNA-seq alignments where
+ multimapped small RNAs tend to be placed near regions of confidently
+ high density."""
+
+ homepage = "https://github.com/MikeAxtell/butter"
+ url = "https://github.com/MikeAxtell/butter/archive/v0.3.3.tar.gz"
+
+ version('0.3.3', '806ff3cb7afc1d8b75126404056c629d')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('samtools')
+ depends_on('bowtie')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('butter', prefix.bin)
+ install('bam2wig', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py
index 186f314f1e..636657bf8d 100644
--- a/var/spack/repos/builtin/packages/c-blosc/package.py
+++ b/var/spack/repos/builtin/packages/c-blosc/package.py
@@ -28,7 +28,7 @@ import sys
from spack import *
-class CBlosc(Package):
+class CBlosc(CMakePackage):
"""Blosc, an extremely fast, multi-threaded, meta-compressor library"""
homepage = "http://www.blosc.org"
url = "https://github.com/Blosc/c-blosc/archive/v1.11.1.tar.gz"
@@ -42,15 +42,21 @@ class CBlosc(Package):
variant('avx2', default=True, description='Enable AVX2 support')
- depends_on("cmake", type='build')
- depends_on("snappy")
- depends_on("zlib")
+ depends_on('cmake@2.8.10:', type='build')
+ depends_on('snappy')
+ depends_on('zlib')
- def install(self, spec, prefix):
- avx2 = '-DDEACTIVATE_AVX2=%s' % ('ON' if '~avx2' in spec else 'OFF')
- cmake('.', avx2, *std_cmake_args)
+ def cmake_args(self):
+ args = []
- make()
- make("install")
+ if '+avx2' in self.spec:
+ args.append('-DDEACTIVATE_AVX2=OFF')
+ else:
+ args.append('-DDEACTIVATE_AVX2=ON')
+
+ return args
+
+ @run_after('install')
+ def darwin_fix(self):
if sys.platform == 'darwin':
- fix_darwin_install_name(prefix.lib)
+ fix_darwin_install_name(self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py
index 4e2ef26dbb..021814c7fd 100644
--- a/var/spack/repos/builtin/packages/caffe/package.py
+++ b/var/spack/repos/builtin/packages/caffe/package.py
@@ -39,7 +39,7 @@ class Caffe(CMakePackage):
version('rc3', '84e39223115753b48312a8bf48c31f59')
version('rc2', 'c331932e34b5e2f5022fcc34c419080f')
- variant('gpu', default=False,
+ variant('cuda', default=False,
description='Builds with support for GPUs via CUDA and cuDNN')
variant('opencv', default=True,
description='Build with OpenCV support')
@@ -54,7 +54,7 @@ class Caffe(CMakePackage):
depends_on('boost')
depends_on('boost +python', when='+python')
- depends_on('cuda', when='+gpu')
+ depends_on('cuda', when='+cuda')
depends_on('blas')
depends_on('protobuf')
depends_on('glog')
@@ -75,8 +75,8 @@ class Caffe(CMakePackage):
spec = self.spec
args = ['-DBLAS={0}'.format('open' if spec['blas'].name == 'openblas'
else spec['blas'].name),
- '-DCPU_ONLY=%s' % ('~gpu' in spec),
- '-DUSE_CUDNN=%s' % ('+gpu' in spec),
+ '-DCPU_ONLY=%s' % ('~cuda' in spec),
+ '-DUSE_CUDNN=%s' % ('+cuda' in spec),
'-DBUILD_python=%s' % ('+python' in spec),
'-DBUILD_python_layer=%s' % ('+python' in spec),
'-DBUILD_matlab=%s' % ('+matlab' in spec),
diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py
index 9ded62e5c5..bc72bb50bd 100644
--- a/var/spack/repos/builtin/packages/callpath/package.py
+++ b/var/spack/repos/builtin/packages/callpath/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Callpath(Package):
+class Callpath(CMakePackage):
"""Library for representing callpaths consistently in
distributed-memory performance tools."""
@@ -35,18 +35,20 @@ class Callpath(Package):
version('1.0.2', 'b1994d5ee7c7db9d27586fc2dcf8f373')
version('1.0.1', '0047983d2a52c5c335f8ba7f5bab2325')
- depends_on("elf", type="link")
- depends_on("libdwarf")
- depends_on("dyninst")
- depends_on("adept-utils")
- depends_on("mpi")
- depends_on('cmake', type='build')
+ depends_on('elf', type='link')
+ depends_on('libdwarf')
+ depends_on('dyninst')
+ depends_on('adept-utils')
+ depends_on('mpi')
+ depends_on('cmake@2.8:', type='build')
- def install(self, spec, prefix):
+ def cmake_args(self):
# TODO: offer options for the walker used.
- cmake_args = std_cmake_args
- if spec.satisfies("^dyninst@9.3.0:"):
- cmake_args.append("-DCMAKE_CXX_FLAGS='-std=c++11 -fpermissive'")
- cmake('.', "-DCALLPATH_WALKER=dyninst", *cmake_args)
- make()
- make("install")
+ args = ["-DCALLPATH_WALKER=dyninst"]
+
+ if self.spec.satisfies("^dyninst@9.3.0:"):
+ std_flag = self.compiler.cxx11_flag
+ args.append("-DCMAKE_CXX_FLAGS='{0} -fpermissive'".format(
+ std_flag))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
index e92c5b5b43..36c796e45d 100644
--- a/var/spack/repos/builtin/packages/cantera/package.py
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -26,132 +26,147 @@ from spack import *
import os
-class Cantera(Package):
+class Cantera(SConsPackage):
"""Cantera is a suite of object-oriented software tools for problems
involving chemical kinetics, thermodynamics, and/or transport processes."""
homepage = "http://www.cantera.org/docs/sphinx/html/index.html"
- url = "https://github.com/Cantera/cantera/archive/v2.2.1.tar.gz"
+ url = "https://github.com/Cantera/cantera/archive/v2.3.0.tar.gz"
+ version('2.3.0', 'aebbd8d891cb1623604245398502b72e')
version('2.2.1', '9d1919bdef39ddec54485fc8a741a3aa')
- variant('lapack', default=True,
- description='Build with external BLAS/LAPACK libraries')
- variant('threadsafe', default=True,
- description='Build threadsafe, requires Boost')
- variant('sundials', default=True,
- description='Build with external Sundials')
variant('python', default=False,
description='Build the Cantera Python module')
variant('matlab', default=False,
description='Build the Cantera Matlab toolbox')
# Required dependencies
- depends_on('scons', type='build')
-
- # Recommended dependencies
- depends_on('blas', when='+lapack')
- depends_on('lapack', when='+lapack')
- depends_on('boost', when='+threadsafe')
- depends_on('sundials', when='+sundials') # must be compiled with -fPIC
+ depends_on('fmt@3.0.0:3.0.2', when='@2.3.0:')
+ depends_on('googletest', when='@2.3.0:')
+ depends_on('eigen', when='@2.3.0:')
+ depends_on('boost')
+ depends_on('sundials') # must be compiled with -fPIC
+ depends_on('blas')
+ depends_on('lapack')
# Python module dependencies
extends('python', when='+python')
+ depends_on('py-cython', when='+python', type='build')
depends_on('py-numpy', when='+python', type=('build', 'run'))
depends_on('py-scipy', when='+python', type=('build', 'run'))
- depends_on('py-cython', when='+python', type=('build', 'run'))
depends_on('py-3to2', when='+python', type=('build', 'run'))
# TODO: these "when" specs don't actually work
# depends_on('py-unittest2', when='+python^python@2.6', type=('build', 'run')) # noqa
# depends_on('py-unittest2py3k', when='+python^python@3.1', type=('build', 'run')) # noqa
# Matlab toolbox dependencies
- # TODO: add Matlab package
- # TODO: allow packages to extend multiple other packages
- # extends('matlab', when='+matlab')
+ extends('matlab', when='+matlab')
+
+ def build_args(self, spec, prefix):
+ # Valid args can be found by running `scons help`
- def install(self, spec, prefix):
- # Required options
- options = [
+ # Required args
+ args = [
+ 'build',
'prefix={0}'.format(prefix),
- 'CC={0}'.format(os.environ['CC']),
- 'CXX={0}'.format(os.environ['CXX']),
- 'F77={0}'.format(os.environ['F77']),
- 'FORTRAN={0}'.format(os.environ['FC']),
- 'cc_flags=-fPIC',
+ 'VERBOSE=yes',
+ 'CC={0}'.format(spack_cc),
+ 'CXX={0}'.format(spack_cxx),
+ 'FORTRAN={0}'.format(spack_fc),
+ 'cc_flags={0}'.format(self.compiler.pic_flag),
# Allow Spack environment variables to propagate through to SCons
'env_vars=all'
]
- # BLAS/LAPACK support
- if '+lapack' in spec:
- lapack_blas = spec['lapack'].libs + spec['blas'].libs
- options.extend([
- 'blas_lapack_libs={0}'.format(','.join(lapack_blas.names)),
- 'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib)
+ if spec.satisfies('@:2.2.1'):
+ args.append('F77={0}'.format(spack_f77))
+
+ # fmt support
+ if spec.satisfies('@2.3.0:'):
+ args.append('system_fmt=y')
+
+ # Googletest support
+ if spec.satisfies('@2.3.0:'):
+ args.append('system_googletest=y')
+
+ # Eigen support
+ if spec.satisfies('@2.3.0:'):
+ args.extend([
+ 'system_eigen=y',
+ 'extra_inc_dirs={0}'.format(
+ join_path(spec['eigen'].prefix.include, 'eigen{0}'.format(
+ spec['eigen'].version.up_to(1)))),
])
- # Threadsafe build, requires Boost
- if '+threadsafe' in spec:
- options.extend([
+ # BLAS/LAPACK support
+ lapack_blas = spec['lapack'].libs + spec['blas'].libs
+ args.extend([
+ 'blas_lapack_libs={0}'.format(','.join(lapack_blas.names)),
+ 'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib)
+ ])
+
+ # Boost support
+ if spec.satisfies('@2.3.0:'):
+ args.append('boost_inc_dir={0}'.format(
+ spec['boost'].prefix.include))
+ else:
+ args.extend([
'build_thread_safe=yes',
'boost_inc_dir={0}'.format(spec['boost'].prefix.include),
- 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib)
+ 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib),
])
- else:
- options.append('build_thread_safe=no')
# Sundials support
- if '+sundials' in spec:
- options.extend([
+ if spec.satisfies('@2.3.0:'):
+ args.append('system_sundials=y')
+ else:
+ args.extend([
'use_sundials=y',
- 'sundials_include={0}'.format(spec['sundials'].prefix.include),
- 'sundials_libdir={0}'.format(spec['sundials'].prefix.lib),
'sundials_license={0}'.format(
- join_path(spec['sundials'].prefix, 'LICENSE'))
+ spec['sundials'].prefix.LICENSE)
])
- else:
- options.append('use_sundials=n')
+
+ args.extend([
+ 'sundials_include={0}'.format(spec['sundials'].prefix.include),
+ 'sundials_libdir={0}'.format(spec['sundials'].prefix.lib),
+ ])
# Python module
if '+python' in spec:
- options.extend([
+ args.extend([
'python_package=full',
'python_cmd={0}'.format(spec['python'].command.path),
- 'python_array_home={0}'.format(spec['py-numpy'].prefix)
])
- if spec['python'].satisfies('@3'):
- options.extend([
+ if spec['python'].satisfies('@3:'):
+ args.extend([
'python3_package=y',
'python3_cmd={0}'.format(spec['python'].command.path),
- 'python3_array_home={0}'.format(spec['py-numpy'].prefix)
])
else:
- options.append('python3_package=n')
+ args.append('python3_package=n')
else:
- options.append('python_package=none')
- options.append('python3_package=n')
+ args.append('python_package=none')
+ args.append('python3_package=n')
# Matlab toolbox
if '+matlab' in spec:
- options.extend([
+ args.extend([
'matlab_toolbox=y',
'matlab_path={0}'.format(spec['matlab'].prefix)
])
else:
- options.append('matlab_toolbox=n')
+ args.append('matlab_toolbox=n')
- scons('build', *options)
+ return args
- if '+python' in spec:
+ def test(self):
+ if '+python' in self.spec:
# Tests will always fail if Python dependencies aren't built
# In addition, 3 of the tests fail when run in parallel
scons('test', parallel=False)
- scons('install')
-
- self.filter_compilers()
-
+ @run_after('install')
def filter_compilers(self):
"""Run after install to tell the Makefile and SConstruct files to use
the compilers that Spack built the package with.
diff --git a/var/spack/repos/builtin/packages/canu/package.py b/var/spack/repos/builtin/packages/canu/package.py
new file mode 100644
index 0000000000..fd6acfec0f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/canu/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Canu(MakefilePackage):
+ """A single molecule sequence assembler for genomes large and
+ small."""
+
+ homepage = "http://canu.readthedocs.io/"
+ url = "https://github.com/marbl/canu/archive/v1.5.tar.gz"
+
+ version('1.5', '65df275baa28ecf11b15dfd7343361e3')
+
+ depends_on('gnuplot', type='run')
+ depends_on('jdk', type='run')
+ depends_on('perl', type='run')
+
+ build_directory = 'src'
+
+ def patch(self):
+ # Use our perl, not whatever is in the environment
+ perl = self.spec['perl'].prefix.bin.perl
+ filter_file(r'^#!/usr/bin/env perl',
+ '#!{0}'.format(perl),
+ 'src/pipelines/canu.pl')
+
+ def install(self, spec, prefix):
+ # replicate the Makefile logic here:
+ # https://github.com/marbl/canu/blob/master/src/Makefile#L344
+ uname = which('uname')
+ ostype = uname(output=str).strip()
+ machinetype = uname('-m', output=str).strip()
+ if machinetype == 'x86_64':
+ machinetype = 'amd64'
+ target_dir = '{0}-{1}'.format(ostype, machinetype)
+ bin = join_path(target_dir, 'bin')
+
+ install_tree(bin, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cap3/package.py b/var/spack/repos/builtin/packages/cap3/package.py
new file mode 100644
index 0000000000..8f4a180cbd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cap3/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cap3(Package):
+ """CAP3 is DNA Sequence Assembly Program"""
+
+ homepage = "http://seq.cs.iastate.edu/"
+ url = "http://seq.cs.iastate.edu/CAP3/cap3.linux.x86_64.tar"
+
+ version('2015-02-11', '5393d937978ecc5f18fcb741140e1f02',
+ url='http://seq.cs.iastate.edu/CAP3/cap3.linux.x86_64.tar')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('cap3', prefix.bin)
+ install('formcon', prefix.bin)
+ mkdirp(prefix.doc)
+ install('doc', prefix.doc)
+ install('aceform', prefix.doc)
diff --git a/var/spack/repos/builtin/packages/cares/package.py b/var/spack/repos/builtin/packages/cares/package.py
new file mode 100644
index 0000000000..2c944104fd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cares/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cares(CMakePackage):
+ """c-ares: A C library for asynchronous DNS requests"""
+
+ homepage = "https://c-ares.haxx.se"
+ url = "https://github.com/c-ares/c-ares/archive/cares-1_13_0.tar.gz"
+
+ version('develop', branch='master',
+ git='https://github.com/c-ares/c-ares.git')
+
+ version('1.13.0', 'cdb21052a7eb85261da22f83c0654cfd')
+
+ def url_for_version(self, version):
+ url = "https://github.com/c-ares/c-ares/archive/cares-{0}.tar.gz"
+ return url.format(version.underscored)
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py
new file mode 100644
index 0000000000..83a44592ef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py
@@ -0,0 +1,97 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+##########################################################################
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+##########################################################################
+
+from spack import *
+
+
+class CbtfArgonavisGui(QMakePackage):
+ """CBTF Argo Navis GUI project contains the GUI that views OpenSpeedShop
+ performance information by loading in the Sqlite database files.
+ """
+ homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
+
+ version('0.8.1', branch='master',
+ git='https://github.com/OpenSpeedShop/cbtf-argonavis-gui.git')
+
+ depends_on("cmake@3.0.2", type='build')
+ depends_on("openspeedshop+cuda gui='qt4'")
+ depends_on('qt@4.8.6:')
+ depends_on("boost@1.50.0:1.59.0")
+ depends_on("cbtf")
+ depends_on("cbtf-krell")
+ depends_on("cbtf-argonavis")
+ depends_on("cuda")
+ depends_on("mrnet@5.0.1:+lwthreads")
+ depends_on("xerces-c@3.1.1:")
+ depends_on("graphviz")
+ depends_on("qtgraph")
+
+ parallel = False
+
+ def setup_environment(self, spack_env, run_env):
+ """Set up the compile and runtime environments for a package."""
+ spack_env.set('BOOSTROOT', self.spec['boost'].prefix)
+ spack_env.set('CBTF_ROOT', self.spec['cbtf'].prefix)
+ spack_env.set('CBTF_KRELL_ROOT', self.spec['cbtf-krell'].prefix)
+ spack_env.set('CBTF_ARGONAVIS_ROOT',
+ self.spec['cbtf-argonavis'].prefix)
+ spack_env.set('OSS_CBTF_ROOT', self.spec['openspeedshop'].prefix)
+ spack_env.set('GRAPHVIZ_ROOT', self.spec['graphviz'].prefix)
+ spack_env.set('QTGRAPHLIB_ROOT', self.spec['qtgraph'].prefix)
+ spack_env.set('KRELL_ROOT_MRNET', self.spec['mrnet'].prefix)
+ spack_env.set('KRELL_ROOT_XERCES', self.spec['xerces-c'].prefix)
+ spack_env.set('INSTALL_ROOT', self.spec.prefix)
+
+ # The implementor of qtgraph has set up the library and include
+ # paths in a non-conventional way. We reflect that here.
+ run_env.prepend_path(
+ 'LD_LIBRARY_PATH', join_path(
+ self.spec['qtgraph'].prefix.lib64,
+ '{0}'.format(self.spec['qt'].version.up_to(3))))
+ # The openspeedshop libraries are needed to actually load the
+ # performance information into the GUI.
+ run_env.prepend_path(
+ 'LD_LIBRARY_PATH', self.spec['openspeedshop'].prefix.lib64)
+
+ def qmake_args(self):
+ options = ['-o', 'Makefile', 'openss-gui.pro']
+ return options
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
index 9b4439f6b6..a13d79c953 100644
--- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##########################################################################
-# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -43,20 +43,19 @@
from spack import *
-class CbtfArgonavis(Package):
+class CbtfArgonavis(CMakePackage):
"""CBTF Argo Navis project contains the CUDA collector and supporting
libraries that was done as a result of a DOE SBIR grant.
"""
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
- # Mirror access template example
- # url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz"
- # version('1.6', '0fafa0008478405c2c2319450f174ed4')
-
version('1.8', branch='master',
git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
+ variant('build_type', default='None', values=('None'),
+ description='CMake build type')
+
depends_on("cmake@3.0.2:", type='build')
depends_on("boost@1.50.0:1.59.0")
depends_on("papi")
@@ -67,73 +66,27 @@ class CbtfArgonavis(Package):
parallel = False
- def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the options that will
- # enable the cbtf-krell built type settings
+ build_directory = 'build_cbtf_argonavis'
+ def cmake_args(self):
+ spec = self.spec
compile_flags = "-O2 -g"
- BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
- # stdcmakeargs
- for word in cmakeOptions[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_CXX_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_C_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'):
- cmakeOptions.remove(word)
- BuildTypeOptions.extend([
- '-DCMAKE_VERBOSE_MAKEFILE=ON',
- '-DCMAKE_BUILD_TYPE=None',
+ cmake_args = [
'-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags
- ])
-
- cmakeOptions.extend(BuildTypeOptions)
-
- def install(self, spec, prefix):
-
- # Look for package installation information in the cbtf and cbtf-krell
- # prefixes
- cmake_prefix_path = join_path(
- spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix)
-
- with working_dir('CUDA'):
- with working_dir('build', create=True):
-
- cmakeOptions = []
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DCUDA_DIR=%s' % spec['cuda'].prefix,
- '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix,
- '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix,
- '-DCUPTI_DIR=%s' % join_path(
- spec['cuda'].prefix + '/extras/CUPTI'),
- '-DCUPTI_ROOT=%s' % join_path(
- spec['cuda'].prefix + '/extras/CUPTI'),
- '-DPAPI_ROOT=%s' % spec['papi'].prefix,
- '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DBoost_DIR=%s' % spec['boost'].prefix,
- '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- '-DBoost_NO_SYSTEM_PATHS=ON'])
-
- # Add in the standard cmake arguments
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the standard cmake arguments to what we want the build
- # type, etc to be
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- # Invoke cmake
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DCUDA_DIR=%s' % spec['cuda'].prefix,
+ '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix,
+ '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix,
+ '-DCUPTI_DIR=%s' % spec['cuda'].prefix.extras.CUPTI,
+ '-DCUPTI_ROOT=%s' % spec['cuda'].prefix.extras.CUPTI,
+ '-DPAPI_ROOT=%s' % spec['papi'].prefix,
+ '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
+ '-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DBoost_DIR=%s' % spec['boost'].prefix,
+ '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
+ '-DBoost_NO_SYSTEM_PATHS=ON']
+
+ return cmake_args
diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py
index 0114ad4e4a..fce4ae62e2 100644
--- a/var/spack/repos/builtin/packages/cbtf-krell/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##########################################################################
-# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -43,7 +43,7 @@
from spack import *
-class CbtfKrell(Package):
+class CbtfKrell(CMakePackage):
"""CBTF Krell project contains the Krell Institute contributions to the
CBTF project. These contributions include many performance data
collectors and support libraries as well as some example tools
@@ -52,10 +52,6 @@ class CbtfKrell(Package):
"""
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
- # optional mirror access template
- # url = "file:/home/jeg/cbtf-krell-1.6.tar.gz"
- # version('1.6', 'edeb61cd488f16e7b124f77db9ce762d')
-
version('1.8', branch='master',
git='https://github.com/OpenSpeedShop/cbtf-krell.git')
@@ -72,16 +68,18 @@ class CbtfKrell(Package):
description="Build mpi experiment collector for mpich2 MPI.")
variant('mpich', default=False,
description="Build mpi experiment collector for mpich MPI.")
+ variant('build_type', default='None', values=('None'),
+ description='CMake build type')
# Dependencies for cbtf-krell
depends_on("cmake@3.0.2:", type='build')
# For binutils service
- depends_on("binutils@2.24+krellpatch")
+ depends_on("binutils")
# collectionTool
depends_on("boost@1.50.0:1.59.0")
- depends_on("dyninst@9.2.0")
+ depends_on("dyninst@9.3.2")
depends_on("mrnet@5.0.1:+lwthreads")
depends_on("xerces-c@3.1.1:")
@@ -104,31 +102,7 @@ class CbtfKrell(Package):
parallel = False
- def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the options that will
- # enable the cbtf-krell built type settings
-
- compile_flags = "-O2 -g"
- BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
- # stdcmakeargs
- for word in cmakeOptions[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_CXX_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_C_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'):
- cmakeOptions.remove(word)
- BuildTypeOptions.extend([
- '-DCMAKE_VERBOSE_MAKEFILE=ON',
- '-DCMAKE_BUILD_TYPE=None',
- '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags
- ])
-
- cmakeOptions.extend(BuildTypeOptions)
+ build_directory = 'build_cbtf_krell'
def set_mpi_cmakeOptions(self, spec, cmakeOptions):
# Appends to cmakeOptions the options that will enable the appropriate
@@ -157,135 +131,27 @@ class CbtfKrell(Package):
cmakeOptions.extend(MPIOptions)
- def install(self, spec, prefix):
+ def cmake_args(self):
+ spec = self.spec
+
+ compile_flags = "-O2 -g"
# Add in paths for finding package config files that tell us
# where to find these packages
- # cmake_prefix_path = \
- # join_path(spec['cbtf'].prefix) + ':' + \
- # join_path(spec['dyninst'].prefix)
- # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path
-
- # Build cbtf-krell with cmake
- with working_dir('build_cbtf_krell', create=True):
- cmakeOptions = []
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
- '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
- '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
- '-DPAPI_DIR=%s' % spec['papi'].prefix,
- '-DBOOST_DIR=%s' % spec['boost'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
- '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix])
-
- # Add any MPI implementations coming from variant settings
- self.set_mpi_cmakeOptions(spec, cmakeOptions)
-
- # Add in the standard cmake arguments
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the standard cmake arguments to what we want the build
- # type, etc to be
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- # Invoke cmake
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
-
- # if '+cray' in spec:
- # if 'cray' in self.spec.architecture:
- # if '+runtime' in spec:
- # with working_dir('build_cbtf_cray_runtime', create=True):
- # python_vers='%d.%d' % spec['python'].version[:2]
- # cmake .. \
- # -DCMAKE_BUILD_TYPE=Debug \
- # -DTARGET_OS="cray" \
- # -DRUNTIME_ONLY="true" \
- # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \
- # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \
- # -DCBTF_DIR=${CBTF_ROOT} \
- # -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \
- # -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \
- # -DBINUTILS_DIR=${KRELL_ROOT} \
- # -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \
- # -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \
- # -DPAPI_DIR=${PAPI_ROOT} \
- # -DDYNINST_DIR=${DYNINST_CN_ROOT} \
- # -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \
- # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48
- # else:
- # with working_dir('build_cbtf_cray_frontend', create=True):
- # python_vers='%d.%d' % spec['python'].version[:2]
- # cmake .. \
- # -DCMAKE_BUILD_TYPE=Debug \
- # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \
- # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \
- # -DCBTF_DIR=${CBTF_ROOT} \
- # -DRUNTIME_TARGET_OS="cray" \
- # -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \
- # -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \
- # -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \
- # -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \
- # -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \
- # -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \
- # -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \
- # -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \
- # -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \
- # -DBOOST_ROOT=/${KRELL_ROOT} \
- # -DXERCESC_DIR=/${KRELL_ROOT} \
- # -DBINUTILS_DIR=/${KRELL_ROOT} \
- # -DLIBMONITOR_DIR=${KRELL_ROOT} \
- # -DLIBUNWIND_DIR=${KRELL_ROOT} \
- # -DPAPI_DIR=${PAPI_ROOT} \
- # -DDYNINST_DIR=${KRELL_ROOT} \
- # -DMRNET_DIR=${KRELL_ROOT} \
- # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48
- # fi
-#
-# make("clean")
-# make()
-# make("install")
-#
-# elif '+mic' in spec:
-# if '+runtime' in spec:
-# with working_dir('build_cbtf_mic_runtime', create=True):
-# python_vers='%d.%d' % spec['python'].version[:2]
-# cmake .. \
-#
-# else:
-# with working_dir('build_cbtf_cray_frontend', create=True):
-# python_vers='%d.%d' % spec['python'].version[:2]
-# cmake .. \
-# fi
-#
-# else:
-# # Build cbtf-krell with cmake
-# with working_dir('build_cbtf_krell', create=True):
-# cmake('..',
-# '-DCMAKE_BUILD_TYPE=Debug',
-# '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
-# '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
-# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
-# '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
-# '-DLIBUNWIND_DIR=%s'% spec['libunwind'].prefix,
-# '-DPAPI_DIR=%s' % spec['papi'].prefix,
-# '-DBOOST_DIR=%s' % spec['boost'].prefix,
-# '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
-# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
-# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
-# '-DOPENMPI_DIR=%s' % openmpi_prefix_path,
-# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
-# *std_cmake_args)
-#
-# make("clean")
-# make()
-# make("install")
-#
-# fi
-#
+ cmake_args = [
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
+ '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
+ '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
+ '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
+ '-DPAPI_DIR=%s' % spec['papi'].prefix,
+ '-DBOOST_DIR=%s' % spec['boost'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
+ '-DDYNINST_DIR=%s' % spec['dyninst'].prefix,
+ '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix]
+
+ # Add any MPI implementations coming from variant settings
+ self.set_mpi_cmakeOptions(spec, cmake_args)
+
+ return cmake_args
diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
index a2a258be3a..b56265154c 100644
--- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##########################################################################
-# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -43,18 +43,17 @@
from spack import *
-class CbtfLanl(Package):
+class CbtfLanl(CMakePackage):
"""CBTF LANL project contains a memory tool and data center type system
command monitoring tool."""
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
- # Mirror access template example
- # url = "file:/g/g24/jeg/cbtf-lanl-1.6.tar.gz"
- # version('1.6', 'c3f78f967b0a42c6734ce4be0e602426')
-
version('1.8', branch='master',
git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
+ variant('build_type', default='None', values=('None'),
+ description='CMake build type')
+
depends_on("cmake@3.0.2:", type='build')
# Dependencies for cbtf-krell
depends_on("mrnet@5.0.1:+lwthreads")
@@ -64,61 +63,21 @@ class CbtfLanl(Package):
parallel = False
- def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the options that will
- # enable the cbtf-krell built type settings
-
- compile_flags = "-O2 -g"
- BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
- # stdcmakeargs
- for word in cmakeOptions[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_CXX_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_C_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'):
- cmakeOptions.remove(word)
- BuildTypeOptions.extend([
- '-DCMAKE_VERBOSE_MAKEFILE=ON',
- '-DCMAKE_BUILD_TYPE=None',
- '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags
- ])
-
- cmakeOptions.extend(BuildTypeOptions)
+ build_directory = 'build_cbtf_lanl'
- def install(self, spec, prefix):
+ def cmake_args(self):
- # Add in paths for finding package config files that tell us where to
- # find these packages
- cmake_prefix_path = join_path(
- spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix)
-
- with working_dir('build', create=True):
- cmakeOptions = []
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DCMAKE_MODULE_PATH=%s' % join_path(
- prefix.share, 'KrellInstitute', 'cmake')])
-
- # Add in the standard cmake arguments
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the standard cmake arguments to what we want the build
- # type, etc to be
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- # Invoke cmake
- cmake('..', *cmakeOptions)
+ spec = self.spec
+ compile_flags = "-O2 -g"
- make("clean")
- make()
- make("install")
+ cmake_args = [
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
+ '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
+ '-DCMAKE_MODULE_PATH=%s' % join_path(
+ prefix.share, 'KrellInstitute', 'cmake')]
+
+ return cmake_args
diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py
index a9b141985f..d972544f5f 100644
--- a/var/spack/repos/builtin/packages/cbtf/package.py
+++ b/var/spack/repos/builtin/packages/cbtf/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##########################################################################
-# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
@@ -43,7 +43,7 @@
from spack import *
-class Cbtf(Package):
+class Cbtf(CMakePackage):
"""CBTF project contains the base code for CBTF that supports creating
components, component networks and the support to connect these
components and component networks into sequential and distributed
@@ -52,16 +52,14 @@ class Cbtf(Package):
"""
homepage = "http://sourceforge.net/p/cbtf/wiki/Home"
- # Mirror access template example
- # url = "file:/home/jeg/cbtf-1.6.tar.gz"
- # version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987')
-
# Use when the git repository is available
version('1.8', branch='master',
git='https://github.com/OpenSpeedShop/cbtf.git')
variant('runtime', default=False,
description="build only the runtime libraries and collectors.")
+ variant('build_type', default='None', values=('None'),
+ description='CMake build type')
depends_on("cmake@3.0.2:", type='build')
depends_on("boost@1.50.0:1.59.0")
@@ -72,82 +70,42 @@ class Cbtf(Package):
parallel = False
- def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the options that will
- # enable the cbtf-krell built type settings
-
- compile_flags = "-O2 -g"
- BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the
- # stdcmakeargs
- for word in cmakeOptions[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_CXX_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_C_FLAGS'):
- cmakeOptions.remove(word)
- BuildTypeOptions.extend([
- '-DCMAKE_BUILD_TYPE=None',
- '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags
- ])
-
- cmakeOptions.extend(BuildTypeOptions)
-
- def install(self, spec, prefix):
- with working_dir('build', create=True):
-
- # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching
- # in system paths (or other locations outside of BOOST_ROOT
- # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT.
- # Defaults to OFF.
+ build_directory = 'build_cbtf'
- if '+runtime' in spec:
- # Install message tag include file for use in Intel MIC
- # cbtf-krell build
- # FIXME
- cmakeOptions = []
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- '-DCMAKE_MODULE_PATH=%s' % join_path(
- prefix.share, 'KrellInstitute', 'cmake')])
+ def cmake_args(self):
- # Add in the standard cmake arguments
- cmakeOptions.extend(std_cmake_args)
+ spec = self.spec
- # Adjust the standard cmake arguments to what we want the build
- # type, etc to be
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
+ # Boost_NO_SYSTEM_PATHS Set to TRUE to suppress searching
+ # in system paths (or other locations outside of BOOST_ROOT
+ # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT.
+ # Defaults to OFF.
- # Invoke cmake
- cmake('..', *cmakeOptions)
-
- else:
- cmakeOptions = []
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DBoost_NO_SYSTEM_PATHS=TRUE',
- '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
- '-DBOOST_ROOT=%s' % spec['boost'].prefix,
- '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
- '-DCMAKE_MODULE_PATH=%s' % join_path(
- prefix.share, 'KrellInstitute', 'cmake')])
-
- # Add in the standard cmake arguments
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the standard cmake arguments to what we want the build
- # type, etc to be
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- # Invoke cmake
- cmake('..', *cmakeOptions)
+ compile_flags = "-O2 -g"
- make("clean")
- make()
- make("install")
+ if '+runtime' in spec:
+ # Install message tag include file for use in Intel MIC
+ # cbtf-krell build
+ # FIXME
+ cmake_args = [
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DRUNTIME_ONLY=TRUE',
+ '-DBoost_NO_SYSTEM_PATHS=TRUE',
+ '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
+ '-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
+ '-DCMAKE_MODULE_PATH=%s' % join_path(
+ prefix.share, 'KrellInstitute', 'cmake')]
+ else:
+ cmake_args = [
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DBoost_NO_SYSTEM_PATHS=TRUE',
+ '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix,
+ '-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
+ '-DCMAKE_MODULE_PATH=%s' % join_path(
+ prefix.share, 'KrellInstitute', 'cmake')]
+
+ return cmake_args
diff --git a/var/spack/repos/builtin/packages/cdbfasta/package.py b/var/spack/repos/builtin/packages/cdbfasta/package.py
new file mode 100644
index 0000000000..9fa0c62442
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdbfasta/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cdbfasta(MakefilePackage):
+ """Fast indexing and retrieval of fasta records from flat file databases"""
+
+ homepage = "https://github.com/gpertea/cdbfasta"
+ url = "https://github.com/gpertea/cdbfasta"
+
+ version('2017-03-16', git='https://github.com/gpertea/cdbfasta.git', commit='b3e481fe02dfbc767a3842bcb1b687c60376a5e8')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('cdbfasta', prefix.bin)
+ install('cdbyank', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cdhit/package.py b/var/spack/repos/builtin/packages/cdhit/package.py
new file mode 100644
index 0000000000..8651466ef5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cdhit/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cdhit(MakefilePackage):
+ """CD-HIT is a very widely used program for clustering and comparing
+ protein or nucleotide sequences."""
+
+ homepage = "http://cd-hit.org/"
+ url = "https://github.com/weizhongli/cdhit/archive/V4.6.8.tar.gz"
+
+ version('4.6.8', 'bdd73ec0cceab6653aab7b31b57c5a8b')
+
+ variant('openmp', default=True, description='Compile with multi-threading support')
+
+ depends_on('perl', type=('build', 'run'))
+
+ def build(self, spec, prefix):
+ mkdirp(prefix.bin)
+ if '~openmp' in spec:
+ make('openmp=no')
+ else:
+ make()
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.set('PREFIX', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py
index 898f7ff1b8..162d18892d 100644
--- a/var/spack/repos/builtin/packages/cdo/package.py
+++ b/var/spack/repos/builtin/packages/cdo/package.py
@@ -25,19 +25,18 @@
from spack import *
-class Cdo(Package):
+class Cdo(AutotoolsPackage):
"""CDO is a collection of command line Operators to manipulate and analyse
- Climate and NWP model Data.
+ Climate and NWP model Data.
"""
- homepage = "https://code.zmaw.de/projects/cdo"
- url = "https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz"
- list_url = "https://code.zmaw.de/projects/cdo/files"
+ homepage = 'https://code.mpimet.mpg.de/projects/cdo'
+ url = 'https://code.mpimet.mpg.de/attachments/download/12760/cdo-1.7.2.tar.gz'
+ list_url = 'https://code.mpimet.mpg.de/projects/cdo/files'
- version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31',
- url='https://code.zmaw.de/attachments/download/12760/cdo-1.7.2.tar.gz')
- version('1.6.9', 'bf0997bf20e812f35e10188a930e24e2',
- url='https://code.zmaw.de/attachments/download/10198/cdo-1.6.9.tar.gz')
+ version('1.9.0', '2d88561b3b4a880df0422a62e5027e40')
+ version('1.8.2', '6a2e2f99b7c67ee9a512c40a8d4a7121')
+ version('1.7.2', 'f08e4ce8739a4f2b63fc81a24db3ee31')
variant('szip', default=True, description='Enable szip compression for GRIB1')
variant('hdf5', default=False, description='Enable HDF5 support')
@@ -46,9 +45,10 @@ class Cdo(Package):
variant('grib', default=True, description='Enable GRIB_API support')
variant('libxml2', default=True, description='Enable libxml2 support')
variant('proj', default=True, description='Enable PROJ library for cartographic projections')
- variant('curl', default=True, description='Enable curl support')
+ variant('curl', default=False, description='Enable curl support')
variant('fftw', default=True, description='Enable support for fftw3')
- variant('magics', default=True, description='Enable Magics library support')
+ variant('magics', default=False, description='Enable Magics library support')
+ variant('openmp', default=True, description='Enable OpenMP support')
depends_on('szip', when='+szip')
depends_on('netcdf', when='+netcdf')
@@ -61,62 +61,64 @@ class Cdo(Package):
depends_on('fftw', when='+fftw')
depends_on('magics', when='+magics')
- def install(self, spec, prefix):
- config_args = ["--prefix=" + prefix,
- "--enable-shared",
- "--enable-static"]
+ def configure_args(self):
+ config_args = ['--enable-shared', '--enable-static']
- if '+szip' in spec:
- config_args.append('--with-szlib=' + spec['szip'].prefix)
+ if '+szip' in self.spec:
+ config_args.append('--with-szlib=' + self.spec['szip'].prefix)
else:
config_args.append('--without-szlib')
- if '+hdf5' in spec:
- config_args.append('--with-hdf5=' + spec['hdf5'].prefix)
+ if '+hdf5' in self.spec:
+ config_args.append('--with-hdf5=' + self.spec['hdf5'].prefix)
else:
config_args.append('--without-hdf5')
- if '+netcdf' in spec:
- config_args.append('--with-netcdf=' + spec['netcdf'].prefix)
+ if '+netcdf' in self.spec:
+ config_args.append('--with-netcdf=' + self.spec['netcdf'].prefix)
else:
config_args.append('--without-netcdf')
- if '+udunits2' in spec:
- config_args.append('--with-udunits2=' + spec['udunits2'].prefix)
+ if '+udunits2' in self.spec:
+ config_args.append('--with-udunits2=' +
+ self.spec['udunits2'].prefix)
else:
config_args.append('--without-udunits2')
- if '+grib' in spec:
- config_args.append('--with-grib_api=' + spec['grib-api'].prefix)
+ if '+grib' in self.spec:
+ config_args.append('--with-grib_api=' +
+ self.spec['grib-api'].prefix)
else:
config_args.append('--without-grib_api')
- if '+libxml2' in spec:
- config_args.append('--with-libxml2=' + spec['libxml2'].prefix)
+ if '+libxml2' in self.spec:
+ config_args.append('--with-libxml2=' + self.spec['libxml2'].prefix)
else:
config_args.append('--without-libxml2')
- if '+proj' in spec:
- config_args.append('--with-proj=' + spec['proj'].prefix)
+ if '+proj' in self.spec:
+ config_args.append('--with-proj=' + self.spec['proj'].prefix)
else:
config_args.append('--without-proj')
- if '+curl' in spec:
- config_args.append('--with-curl=' + spec['curl'].prefix)
+ if '+curl' in self.spec:
+ config_args.append('--with-curl=' + self.spec['curl'].prefix)
else:
config_args.append('--without-curl')
- if '+fftw' in spec:
+ if '+fftw' in self.spec:
config_args.append('--with-fftw3')
else:
config_args.append('--without-fftw3')
- if '+magics' in spec:
- config_args.append('--with-magics=' + spec['magics'].prefix)
+ if '+magics' in self.spec:
+ config_args.append('--with-magics=' + self.spec['magics'].prefix)
else:
config_args.append('--without-magics')
- configure(*config_args)
+ if '+openmp' in self.spec:
+ config_args.append('--enable-openmp')
+ else:
+ config_args.append('--disable-openmp')
- make()
- make('install')
+ return config_args
diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py
index 22da01e789..fc7aba4955 100644
--- a/var/spack/repos/builtin/packages/cereal/package.py
+++ b/var/spack/repos/builtin/packages/cereal/package.py
@@ -23,11 +23,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
-import shutil
-class Cereal(Package):
+class Cereal(CMakePackage):
"""cereal is a header-only C++11 serialization library. cereal takes
arbitrary data types and reversibly turns them into different
representations, such as compact binary encodings, XML, or
@@ -54,25 +52,18 @@ class Cereal(Package):
depends_on('cmake@2.6.2:', type='build')
- def install(self, spec, prefix):
+ def patch(self):
# Don't use -Werror
filter_file(r'-Werror', '', 'CMakeLists.txt')
- # configure
+ def cmake_args(self):
# Boost is only used for self-tests, which we are not running (yet?)
- cmake('.',
- '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE',
- '-DSKIP_PORTABILITY_TEST=TRUE',
- *std_cmake_args)
-
- # Build
- make()
+ return [
+ '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE',
+ '-DSKIP_PORTABILITY_TEST=TRUE',
+ ]
- # Install
- shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True)
- shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True)
- shutil.rmtree(join_path(prefix, 'lib'), ignore_errors=True)
- shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True)
- shutil.copytree('include', join_path(prefix, 'include'), symlinks=True)
- # Create empty directory to avoid linker warnings later
- os.mkdir(join_path(prefix, 'lib'))
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ install_tree('doc', prefix.doc)
+ install_tree('include', prefix.include)
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
index 235d02ccde..381eb493e5 100644
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Cgal(Package):
+class Cgal(CMakePackage):
"""The Computational Geometry Algorithms Library (CGAL) is a C++ library
that aims to provide easy access to efficient and reliable algorithms in
computational geometry. CGAL is used in various areas needing geometric
@@ -42,8 +42,9 @@ class Cgal(Package):
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
# ---- See "7 CGAL Libraries" at:
# http://doc.cgal.org/latest/Manual/installation.html
@@ -58,6 +59,8 @@ class Cgal(Package):
variant('demos', default=False,
description='Build CGAL demos')
+ depends_on('cmake@2.8.11:', type='build')
+
# Essential Third Party Libraries
depends_on('boost+thread+system')
depends_on('gmp')
@@ -82,18 +85,12 @@ class Cgal(Package):
# depends_on('esbtl')
# depends_on('intel-tbb')
- # Build dependencies
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
+ def cmake_args(self):
# Installation instructions:
# http://doc.cgal.org/latest/Manual/installation.html
+ spec = self.spec
- options = std_cmake_args + [
- # CGAL supports only Release and Debug build type. Any
- # other build type will raise an error at configure time
- '-DCMAKE_BUILD_TYPE:STRING=%s' %
- ('Debug' if '+debug' in spec else 'Release'),
+ return [
'-DBUILD_SHARED_LIBS:BOOL=%s' %
('ON' if '+shared' in spec else 'OFF'),
'-DWITH_CGAL_Core:BOOL=%s' %
@@ -101,9 +98,5 @@ class Cgal(Package):
'-DWITH_CGAL_ImageIO:BOOL=%s' %
('YES' if '+imageio' in spec else 'NO'),
'-DWITH_CGAL_Qt5:BOOL=%s' %
- ('YES' if '+demos' in spec else 'NO')]
-
- with working_dir('spack-build', create=True):
- cmake('..', *options)
- make()
- make('install')
+ ('YES' if '+demos' in spec else 'NO'),
+ ]
diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py
index 24f932a8d0..e3a4f89ff6 100644
--- a/var/spack/repos/builtin/packages/cgns/package.py
+++ b/var/spack/repos/builtin/packages/cgns/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Cgns(Package):
+class Cgns(CMakePackage):
"""The CFD General Notation System (CGNS) provides a general, portable,
and extensible standard for the storage and retrieval of computational
fluid dynamics (CFD) analysis data."""
@@ -37,11 +37,12 @@ class Cgns(Package):
variant('hdf5', default=True, description='Enable HDF5 interface')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8:', type='build')
depends_on('hdf5', when='+hdf5')
- def install(self, spec, prefix):
- cmake_args = std_cmake_args[:]
+ def cmake_args(self):
+ spec = self.spec
+ cmake_args = []
if self.compiler.f77 and self.compiler.fc:
cmake_args.append('-DCGNS_ENABLE_FORTRAN=ON')
@@ -66,8 +67,4 @@ class Cgns(Package):
else:
cmake_args.append('-DCGNS_ENABLE_HDF5=OFF')
- with working_dir('spack-build', create=True):
- cmake('..', *cmake_args)
-
- make()
- make('install')
+ return cmake_args
diff --git a/var/spack/repos/builtin/packages/check/package.py b/var/spack/repos/builtin/packages/check/package.py
new file mode 100644
index 0000000000..53b03d28cd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/check/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Check(AutotoolsPackage):
+ """Check is a unit testing framework for C. It features a simple interface
+ for defining unit tests, putting little in the way of the developer. Tests
+ are run in a separate address space, so both assertion failures and code
+ errors that cause segmentation faults or other signals can be caught. Test
+ results are reportable in the following: Subunit, TAP, XML, and a generic
+ logging format."""
+
+ homepage = "https://libcheck.github.io/check/index.html"
+ url = "https://downloads.sourceforge.net/project/check/check/0.10.0/check-0.10.0.tar.gz"
+
+ version('0.10.0', '53c5e5c77d090e103a17f3ed7fd7d8b8')
diff --git a/var/spack/repos/builtin/packages/chlorop/chlorop.patch b/var/spack/repos/builtin/packages/chlorop/chlorop.patch
new file mode 100644
index 0000000000..6d49dc53d0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/chlorop/chlorop.patch
@@ -0,0 +1,36 @@
+--- a/chlorop 2006-03-20 06:24:22.000000000 -0600
++++ b/chlorop 2017-07-24 10:51:27.000366706 -0500
+@@ -9,8 +9,6 @@
+ STARTDIR=`pwd`
+
+ ### GENERAL SETTINGS, CUSTOMIZE +++++++++++++++++++++++++++++++++++++++++++++++
+-# Substitute your chosen location for ChloroP software:
+-CHLOROP=/usr/cbs/packages/chlorop/currdist/chlorop-1.1
+
+ # Substitute paste:
+ PASTE=paste
+@@ -43,7 +41,7 @@
+ # other settings:
+ #CHLOROTMPNAME=res`date '+%y%m%d%H%M%S'`.$$
+ CHLOROTMPNAME=res.$$
+-CHLOROTMP=tmp/$CHLOROTMPNAME
++CHLOROTMP=$CHLOROTMP/$CHLOROTMPNAME
+ SCRIPTS=bin
+ SYN=syn
+ ETC=etc
+@@ -80,12 +78,12 @@
+ ### get the infile ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ INFILE=$*
+
+-mkdir $CHLOROP/$CHLOROTMP || { echo Cannot create temporary directory; exit 1; }
++mkdir -p $CHLOROTMP || { echo Cannot create temporary directory; exit 1; }
+
+ ### prepare input file in HOW and fasta format ++++++++++++++++++++++++++++++++
+ $AWK -f $CHLOROP/$SCRIPTS/in2how+fasta.awk -v informat=$INFORMAT \
+- -v howout=$CHLOROP/$CHLOROTMP/infile.how \
+- -v fastaout=$CHLOROP/$CHLOROTMP/infile.fasta $INFILE
++ -v howout=$CHLOROTMP/infile.how \
++ -v fastaout=$CHLOROTMP/infile.fasta $INFILE
+ INFILE=$CHLOROTMP/infile.how
+
+ ### change to working directory +++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/var/spack/repos/builtin/packages/chlorop/package.py b/var/spack/repos/builtin/packages/chlorop/package.py
new file mode 100644
index 0000000000..bd5ceda4f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/chlorop/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import distutils.dir_util
+import os
+
+
+class Chlorop(Package):
+ """Chlorop predicts the presence of chloroplast transit peptides
+ in protein sequences and the location of potential cTP cleavage
+ sites. You will need to obtain the tarball by visiting the
+ URL and completing the form. You can then either run spack
+ install with the tarball in the directory, or add it to a
+ mirror. You will need to set the CHLOROTMP environment variable
+ to the full path of the directory you want chlorop to use as
+ a temporary directory."""
+
+ homepage = "http://www.cbs.dtu.dk/services/ChloroP/"
+ url = "file://{0}/chlorop-1.1.Linux.tar.gz".format(os.getcwd())
+
+ version('1.1', 'eb0ba6b28dfa735163ad5fc70e30139e46e33f6ae27f87666a7167a4ac5f71d9')
+
+ depends_on('awk', type='run')
+ patch('chlorop.patch')
+
+ def install(self, spec, prefix):
+ os.rename('chlorop', 'bin/chlorop')
+ distutils.dir_util.copy_tree(".", prefix)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('CHLOROP', self.prefix)
diff --git a/var/spack/repos/builtin/packages/clamr/package.py b/var/spack/repos/builtin/packages/clamr/package.py
new file mode 100644
index 0000000000..d1eee12d1c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/clamr/package.py
@@ -0,0 +1,78 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Clamr(CMakePackage):
+ """The CLAMR code is a cell-based adaptive mesh refinement (AMR)
+ mini-app developed as a testbed for hybrid algorithm development
+ using MPI and OpenCL GPU code.
+ """
+
+ homepage = "https://github.com/lanl/CLAMR"
+ url = "https://github.com/lanl/CLAMR.git"
+ tags = ['proxy-app']
+
+ version('master', git='https://github.com/lanl/CLAMR.git')
+
+ variant(
+ 'graphics', default='opengl',
+ values=('opengl', 'mpe', 'none'),
+ description='Build with specified graphics support')
+ variant(
+ 'precision', default='mixed',
+ values=('single', 'mixed', 'full'),
+ description='single, mixed, or full double precision values')
+
+ depends_on('mpi')
+ depends_on('mpe', when='graphics=mpe')
+
+ def cmake_args(self):
+ spec = self.spec
+ cmake_args = []
+ if 'graphics=none' in spec:
+ cmake_args.append('-DGRAPHICS_TYPE=None')
+ elif 'graphics=mpe' in spec:
+ cmake_args.append('-DGRAPHICS_TYPE=MPE')
+ else:
+ cmake_args.append('-DGRAPHICS_TYPE=OpenGL')
+
+ if 'precision=full' in spec:
+ cmake_args.append('-DPRECISION_TYPE=full_precision')
+ elif 'precision=single' in spec:
+ cmake_args.append('-DPRECISION_TYPE=minimum_precision')
+ else:
+ cmake_args.append('-DPRECISION_TYPE=mixed_precision')
+
+ # if MIC, then -DMIC_NATIVE=yes
+ return cmake_args
+
+ def install(self, spec, prefix):
+ install('README', prefix)
+ install('LICENSE', prefix)
+ install_tree('docs', join_path(prefix, 'docs'))
+ install_tree('tests', join_path(prefix, 'tests'))
+ with working_dir(self.build_directory):
+ make('install')
diff --git a/var/spack/repos/builtin/packages/cleaveland4/package.py b/var/spack/repos/builtin/packages/cleaveland4/package.py
new file mode 100644
index 0000000000..505f800ac7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cleaveland4/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cleaveland4(Package):
+ """CleaveLand4: Analysis of degradome data to find sliced miRNA and siRNA
+ targets"""
+
+ homepage = "https://github.com/MikeAxtell/CleaveLand4"
+ url = "https://github.com/MikeAxtell/CleaveLand4/archive/v4.4.tar.gz"
+
+ version('4.4', 'cf62a1de715a612fc8bd5a62364e69db')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('perl-math-cdf', type=('build', 'run'))
+ depends_on('bowtie')
+ depends_on('viennarna')
+ depends_on('r', type=('build', 'run'))
+ depends_on('samtools')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('CleaveLand4.pl', prefix.bin)
+ with working_dir('GSTAr_v1-0'):
+ install('GSTAr.pl', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cleverleaf/package.py b/var/spack/repos/builtin/packages/cleverleaf/package.py
index 6ce9f51111..62907533ac 100644
--- a/var/spack/repos/builtin/packages/cleverleaf/package.py
+++ b/var/spack/repos/builtin/packages/cleverleaf/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Cleverleaf(Package):
+class Cleverleaf(CMakePackage):
"""CleverLeaf is a hydrodynamics mini-app that extends CloverLeaf with
Adaptive Mesh Refinement using the SAMRAI toolkit from Lawrence
Livermore National Laboratory. The primary goal of CleverLeaf is
@@ -40,12 +40,7 @@ class Cleverleaf(Package):
version('develop', git='https://github.com/UK-MAC/CleverLeaf_ref.git',
branch='develop')
- depends_on("samrai@3.8.0:")
- depends_on("hdf5+mpi")
- depends_on("boost")
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake(*std_cmake_args)
- make()
- make("install")
+ depends_on('samrai@3.8.0:')
+ depends_on('hdf5+mpi')
+ depends_on('boost')
+ depends_on('cmake@3.1:', type='build')
diff --git a/var/spack/repos/builtin/packages/clfft/package.py b/var/spack/repos/builtin/packages/clfft/package.py
new file mode 100644
index 0000000000..5a03a3b07f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/clfft/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Clfft(CMakePackage):
+ """a software library containing FFT functions written in OpenCL"""
+
+ homepage = "https://github.com/clMathLibraries/clFFT"
+ url = "https://github.com/clMathLibraries/clFFT/archive/v2.12.2.tar.gz"
+
+ version('2.12.2', '9104d85f9f2f3c58dd8efc0e4b06496f')
+
+ variant('client', default=True,
+ description='build client and callback client')
+
+ depends_on('opencl@1.2:')
+ depends_on('boost@1.33.0:', when='+client')
+
+ root_cmakelists_dir = 'src'
+
+ def cmake_args(self):
+ spec = self.spec
+
+ args = [
+ '-DBUILD_CLIENT:BOOL={0}'.format((
+ 'ON' if '+client' in spec else 'OFF')),
+ '-DBUILD_CALLBACK_CLIENT:BOOL={0}'.format((
+ 'ON' if '+client' in spec else 'OFF'))
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py
index 4d8fd14f3b..2f4f5b1579 100644
--- a/var/spack/repos/builtin/packages/clhep/package.py
+++ b/var/spack/repos/builtin/packages/clhep/package.py
@@ -50,7 +50,6 @@ class Clhep(CMakePackage):
version('2.2.0.5', '1584e8ce6ebf395821aed377df315c7c')
version('2.2.0.4', '71d2c7c2e39d86a0262e555148de01c1')
- variant('debug', default=False, description="Switch to the debug version of CLHEP.")
variant('cxx11', default=True, description="Compile using c++11 dialect.")
variant('cxx14', default=False, description="Compile using c++14 dialect.")
@@ -63,27 +62,25 @@ class Clhep(CMakePackage):
'%s/%s/CLHEP/CMakeLists.txt'
% (self.stage.path, self.spec.version))
- root_cmakelists_dir = '../CLHEP'
-
- def build_type(self):
- spec = self.spec
-
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'MinSizeRel'
+ root_cmakelists_dir = 'CLHEP'
def cmake_args(self):
spec = self.spec
cmake_args = []
if '+cxx11' in spec:
- env['CXXFLAGS'] = self.compiler.cxx11_flag
+ if 'CXXFLAGS' in env and env['CXXFLAGS']:
+ env['CXXFLAGS'] += ' ' + self.compiler.cxx11_flag
+ else:
+ env['CXXFLAGS'] = self.compiler.cxx11_flag
cmake_args.append('-DCLHEP_BUILD_CXXSTD=' +
self.compiler.cxx11_flag)
if '+cxx14' in spec:
- env['CXXFLAGS'] = self.compiler.cxx14_flag
+ if 'CXXFLAGS' in env and env['CXXFLAGS']:
+ env['CXXFLAGS'] += ' ' + self.compiler.cxx14_flag
+ else:
+ env['CXXFLAGS'] = self.compiler.cxx14_flag
cmake_args.append('-DCLHEP_BUILD_CXXSTD=' +
self.compiler.cxx14_flag)
diff --git a/var/spack/repos/builtin/packages/cloverleaf/package.py b/var/spack/repos/builtin/packages/cloverleaf/package.py
new file mode 100644
index 0000000000..bc54ef61ea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cloverleaf/package.py
@@ -0,0 +1,110 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import glob
+
+from spack import *
+
+
+class Cloverleaf(MakefilePackage):
+ """Proxy Application. CloverLeaf is a miniapp that solves the
+ compressible Euler equations on a Cartesian grid,
+ using an explicit, second-order accurate method.
+ """
+
+ homepage = "http://uk-mac.github.io/CloverLeaf"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/CloverLeaf/CloverLeaf-1.1.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.1', '65652b30a64eb237ec844a6fdd4cd518')
+
+ variant('build', default='ref', description='Type of Parallelism Build',
+ values=('cuda', 'mpi_only', 'openacc_cray',
+ 'openmp_only', 'ref', 'serial'))
+
+ depends_on('mpi', when='build=cuda')
+ depends_on('mpi', when='build=mpi_only')
+ depends_on('mpi', when='build=openacc_cray')
+ depends_on('mpi', when='build=ref')
+ depends_on('cuda', when='build=cuda')
+
+ @property
+ def type_of_build(self):
+ build = 'ref'
+
+ if 'build=cuda' in self.spec:
+ build = 'CUDA'
+ elif 'build=mpi_only' in self.spec:
+ build = 'MPI'
+ elif 'build=openacc_cray' in self.spec:
+ build = 'OpenACC_CRAY'
+ elif 'build=openmp_only' in self.spec:
+ build = 'OpenMP'
+ elif 'build=serial' in self.spec:
+ build = 'Serial'
+
+ return build
+
+ @property
+ def build_targets(self):
+ targets = ['--directory=CloverLeaf_{0}'.format(self.type_of_build)]
+
+ if 'mpi' in self.spec:
+ targets.append('MPI_COMPILER={0}'.format(self.spec['mpi'].mpifc))
+ targets.append('C_MPI_COMPILER={0}'.format(self.spec['mpi'].mpicc))
+ else:
+ targets.append('MPI_COMPILER=f90')
+ targets.append('C_MPI_COMPILER=cc')
+
+ if '%gcc' in self.spec:
+ targets.append('COMPILER=GNU')
+ elif '%cce' in self.spec:
+ targets.append('COMPILER=CRAY')
+ elif '%intel' in self.spec:
+ targets.append('COMPILER=INTEL')
+ elif '%pgi' in self.spec:
+ targets.append('COMPILER=PGI')
+ elif '%xl' in self.spec:
+ targets.append('COMPILER=XLF')
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc.tests)
+
+ install('README.md', prefix.doc)
+ install('documentation.txt', prefix.doc)
+
+ install('CloverLeaf_{0}/clover_leaf'.format(self.type_of_build),
+ prefix.bin)
+ install('CloverLeaf_{0}/clover.in'.format(self.type_of_build),
+ prefix.bin)
+
+ for f in glob.glob(
+ 'CloverLeaf_{0}/*.in'.format(self.type_of_build)):
+ install(f, prefix.doc.tests)
diff --git a/var/spack/repos/builtin/packages/cloverleaf3d/package.py b/var/spack/repos/builtin/packages/cloverleaf3d/package.py
new file mode 100644
index 0000000000..5616912255
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cloverleaf3d/package.py
@@ -0,0 +1,93 @@
+#############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import glob
+
+from spack import *
+
+
+class Cloverleaf3d(MakefilePackage):
+ """Proxy Application. CloverLeaf3D is 3D version of the
+ CloverLeaf mini-app. CloverLeaf is a mini-app that solves
+ the compressible Euler equations on a Cartesian grid,
+ using an explicit, second-order accurate method.
+ """
+
+ homepage = "http://uk-mac.github.io/CloverLeaf3D/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/CloverLeaf3D/CloverLeaf3D-1.0.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.0', '2e86cadd7612487f9da4ddeb1a6de939')
+
+ variant('openacc', default=False, description='Enable OpenACC Support')
+
+ depends_on('mpi')
+
+ @property
+ def type_of_build(self):
+ build = 'ref'
+
+ if '+openacc' in self.spec:
+ build = 'OpenACC'
+
+ return build
+
+ @property
+ def build_targets(self):
+ targets = [
+ 'MPI_COMPILER={0}'.format(self.spec['mpi'].mpifc),
+ 'C_MPI_COMPILER={0}'.format(self.spec['mpi'].mpicc),
+ '--directory=CloverLeaf3D_{0}'.format(self.type_of_build)
+ ]
+
+ if '%gcc' in self.spec:
+ targets.append('COMPILER=GNU')
+ elif '%cce' in self.spec:
+ targets.append('COMPILER=CRAY')
+ elif '%intel' in self.spec:
+ targets.append('COMPILER=INTEL')
+ elif '%pgi' in self.spec:
+ targets.append('COMPILER=PGI')
+ elif '%xl' in self.spec:
+ targets.append('COMPILER=XLF')
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc.samples)
+
+ install('README.md', prefix.doc)
+
+ install('CloverLeaf3D_{0}/clover_leaf'.format(self.type_of_build),
+ prefix.bin)
+ install('CloverLeaf3D_{0}/clover.in'.format(self.type_of_build),
+ prefix.bin)
+
+ for f in glob.glob(
+ 'CloverLeaf3D_{0}/*.in'.format(self.type_of_build)):
+ install(f, prefix.doc.samples)
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index 05ba0e8131..079d214c4a 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -33,6 +33,8 @@ class Cmake(Package):
list_url = 'https://cmake.org/files/'
list_depth = 1
+ version('3.9.0', '180e23b4c9b55915d271b315297f6951')
+ version('3.8.2', 'b5dff61f6a7f1305271ab3f6ae261419')
version('3.8.1', 'e8ef820ddf7a650845252bca846696e7')
version('3.8.0', 'f28cba717ba38ad82a488daed8f45b5b')
version('3.7.2', '79bd7e65cd81ea3aa2619484ad6ff25a')
@@ -62,72 +64,74 @@ class Cmake(Package):
depends_on('bzip2', when='~ownlibs')
depends_on('xz', when='~ownlibs')
depends_on('libarchive', when='~ownlibs')
+ depends_on('libuv@1.0.0:', when='~ownlibs')
+ depends_on('rhash', when='@3.8.0:~ownlibs')
depends_on('qt', when='+qt')
depends_on('python@2.7.11:', when='+doc', type='build')
depends_on('py-sphinx', when='+doc', type='build')
- depends_on("openssl", when='+openssl')
- depends_on("openssl@:1.0.99", when='@:3.6.9+openssl')
+ depends_on('openssl', when='+openssl')
+ depends_on('openssl@:1.0.99', when='@:3.6.9+openssl')
depends_on('ncurses', when='+ncurses')
# Cannot build with Intel, should be fixed in 3.6.2
# https://gitlab.kitware.com/cmake/cmake/issues/16226
patch('intel-c-gnu11.patch', when='@3.6.0:3.6.1')
- def url_for_version(self, version):
- """Handle CMake's version-based custom URLs."""
- return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (
- version.up_to(2), version)
+ conflicts('+qt', when='^qt@5.4.0') # qt-5.4.0 has broken CMake modules
- def validate(self, spec):
- """
- Checks if incompatible versions of qt were specified
+ phases = ['bootstrap', 'build', 'install']
- :param spec: spec of the package
- :raises RuntimeError: in case of inconsistencies
- """
-
- if '+qt' in spec and spec.satisfies('^qt@5.4.0'):
- msg = 'qt-5.4.0 has broken CMake modules.'
- raise RuntimeError(msg)
+ def url_for_version(self, version):
+ """Handle CMake's version-based custom URLs."""
+ url = 'https://cmake.org/files/v{0}/cmake-{1}.tar.gz'
+ return url.format(version.up_to(2), version)
- def install(self, spec, prefix):
- # Consistency check
- self.validate(spec)
-
- options = [
- '--prefix={0}'.format(prefix),
- '--parallel={0}'.format(make_jobs)]
- if spec.satisfies("@3.2:"):
- options.append(
- # jsoncpp requires CMake to build
- # use CMake-provided library to avoid circular dependency
- '--no-system-jsoncpp'
- )
+ def bootstrap_args(self):
+ spec = self.spec
+ args = [
+ '--prefix={0}'.format(self.prefix),
+ '--parallel={0}'.format(make_jobs)
+ ]
if '+ownlibs' in spec:
# Build and link to the CMake-provided third-party libraries
- options.append('--no-system-libs')
+ args.append('--no-system-libs')
else:
# Build and link to the Spack-installed third-party libraries
- options.append('--system-libs')
+ args.append('--system-libs')
+
+ if spec.satisfies('@3.2:'):
+ # jsoncpp requires CMake to build
+ # use CMake-provided library to avoid circular dependency
+ args.append('--no-system-jsoncpp')
if '+qt' in spec:
- options.append('--qt-gui')
+ args.append('--qt-gui')
else:
- options.append('--no-qt-gui')
+ args.append('--no-qt-gui')
if '+doc' in spec:
- options.append('--sphinx-html')
- options.append('--sphinx-man')
+ args.append('--sphinx-html')
+ args.append('--sphinx-man')
if '+openssl' in spec:
- options.append('--')
- options.append('-DCMAKE_USE_OPENSSL=ON')
+ args.append('--')
+ args.append('-DCMAKE_USE_OPENSSL=ON')
+
+ return args
+ def bootstrap(self, spec, prefix):
bootstrap = Executable('./bootstrap')
- bootstrap(*options)
+ bootstrap(*self.bootstrap_args())
+ def build(self, spec, prefix):
make()
- if self.run_tests:
- make('test') # some tests fail, takes forever
+
+ @run_after('build')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ # Some tests fail, takes forever
+ make('test')
+
+ def install(self, spec, prefix):
make('install')
diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py
index b0d9414ac6..944295a036 100644
--- a/var/spack/repos/builtin/packages/cmocka/package.py
+++ b/var/spack/repos/builtin/packages/cmocka/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Cmocka(Package):
+class Cmocka(CMakePackage):
"""Unit-testing framework in pure C"""
homepage = "https://cmocka.org/"
url = "https://cmocka.org/files/1.1/cmocka-1.1.1.tar.xz"
@@ -33,13 +33,7 @@ class Cmocka(Package):
version('1.1.1', '6fbff4e42589566eda558db98b97623e')
version('1.1.0', '59c9aa5735d9387fb591925ec53523ec')
version('1.0.1', 'ed861e501a21a92b2af63e466df2015e')
- parallel = False
-
- depends_on('cmake', type='build')
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
+ depends_on('cmake@2.6.0:', type='build')
- make()
- make("install")
+ parallel = False
diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py
index cdbd0c86d4..fc4df89e09 100644
--- a/var/spack/repos/builtin/packages/cnmem/package.py
+++ b/var/spack/repos/builtin/packages/cnmem/package.py
@@ -25,13 +25,10 @@
from spack import *
-class Cnmem(Package):
+class Cnmem(CMakePackage):
"""CNMem mempool for CUDA devices"""
homepage = "https://github.com/NVIDIA/cnmem"
version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master")
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
- make()
- make('install')
+ depends_on('cmake@2.8.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/cnpy/package.py b/var/spack/repos/builtin/packages/cnpy/package.py
new file mode 100644
index 0000000000..b62df10c2e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cnpy/package.py
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cnpy(CMakePackage):
+ """cnpy: library to read/write .npy and .npz files in C/C++."""
+
+ homepage = "https://github.com/rogersce/cnpy"
+ url = "https://github.com/rogersce/cnpy"
+
+ version('master', git='https://github.com/rogersce/cnpy.git', branch="master")
diff --git a/var/spack/repos/builtin/packages/cns-nospec/package.py b/var/spack/repos/builtin/packages/cns-nospec/package.py
new file mode 100644
index 0000000000..30b760ff80
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cns-nospec/package.py
@@ -0,0 +1,109 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class CnsNospec(MakefilePackage):
+ """A simple, explicit, stencil-based test code for integrating
+ the compressible Navier-Stokes equations. The code uses
+ 8th order finite differences in space and a 3rd order,
+ low-storage TVD RK algorithm in time."""
+
+ homepage = "https://ccse.lbl.gov/ExaCT/index.html"
+ url = "https://ccse.lbl.gov/ExaCT/CNS_Nospec.tgz"
+ tags = ['proxy-app']
+
+ version('master', '14ff5be62539d829b30b17281688ee3f')
+
+ variant('mpi', default=True, description='Build with MPI support')
+ variant('debug', default=False, description='Build with debugging')
+ variant('omp', default=False, description='Build with OpenMP support')
+ variant('prof', default=False, description='Build with profiling')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('gmake', type='build')
+
+ build_directory = 'MiniApps/CNS_NoSpec'
+
+ def edit(self, spec, prefix):
+ def_file = FileFilter('Tools/F_mk/GMakedefs.mak')
+ def_file.filter('tdir = t/.*', 'tdir := t/$(suf)')
+ def_file.filter('hdir = t/.*', 'hdir := t/html')
+ def_file.filter('include $(BOXLIB_HOME)/Tools/F_mk/GMakeMPI.mak', '#')
+
+ if '+mpi' in spec:
+ def_file.filter('FC.*:=.*', 'FC = {0}'.format(spec['mpi'].mpifc))
+ def_file.filter('F90.*:=.*', 'F90 = {0}'.format(spec['mpi'].mpifc))
+ def_file.filter(
+ 'mpi_include_dir =.*',
+ 'mpi_include_dir = {0}'.format(spec['mpi'].prefix.include))
+ def_file.filter(
+ 'mpi_lib_dir =.*',
+ 'mpi_lib_dir = {0}'.format(spec['mpi'].prefix.lib))
+
+ with working_dir(self.build_directory):
+ makefile = FileFilter('GNUmakefile')
+ if '+mpi' in spec:
+ makefile.filter('MPI .*', 'MPI := t')
+ if '+debug' in spec:
+ makefile.filter('NDEBUG.*', '#')
+ if '+omp' in spec:
+ makefile.filter('OMP.*', 'OMP := t')
+ if '+prof' in spec:
+ makefile.filter('PROF.*', 'PROF := t')
+
+ if self.compiler.name == 'gcc':
+ makefile.filter('COMP .*', 'COMP = gfortran')
+ if self.compiler.name == 'intel':
+ makefile.filter('COMP .*', 'COMP = Intel')
+ if self.compiler.name == 'pgi':
+ makefile.filter('COMP .*', 'COMP = PGI')
+ if self.compiler.name == 'xl':
+ makefile.filter('COMP .*', 'COMP = IBM')
+ if self.compiler.name == 'cce':
+ makefile.filter('COMP .*', 'COMP = Cray')
+
+ @property
+ def build_targets(self):
+ spec = self.spec
+ if '+mpi' in spec:
+ return ['CC = {0}'.format(spec['mpi'].mpicc),
+ 'CXX = {0}'.format(spec['mpi'].mpicxx)]
+ else:
+ return []
+
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ gmake()
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ files = glob.glob(join_path(self.build_directory, '*.exe'))
+ for f in files:
+ install(f, prefix.bin)
+ install('README.txt', prefix)
+ install('license.txt', prefix)
+ install(join_path(self.build_directory, 'README'), prefix)
diff --git a/var/spack/repos/builtin/packages/cntk/lock-file.patch b/var/spack/repos/builtin/packages/cntk/lock-file.patch
new file mode 100644
index 0000000000..0e0a7811e7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cntk/lock-file.patch
@@ -0,0 +1,20 @@
+diff --git a/Source/Common/CrossProcessMutex.h b/Source/Common/CrossProcessMutex.h
+index 2f3ce70..f0fcd42 100644
+--- a/Source/Common/CrossProcessMutex.h
++++ b/Source/Common/CrossProcessMutex.h
+@@ -127,9 +127,13 @@ class CrossProcessMutex
+
+ public:
+ CrossProcessMutex(const std::string& name)
+- : m_fd(-1),
+- m_fileName("/var/lock/" + name)
++ : m_fd(-1)
+ {
++ const char * const envLockDir = getenv("CNTK_LOCK_DIR");
++ if (envLockDir != NULL)
++ m_fileName = envLockDir + ('/' + name);
++ else
++ m_fileName = "/var/lock/" + name;
+ }
+
+ // Acquires the mutex. If 'wait' is true and mutex is acquired by someone else then
diff --git a/var/spack/repos/builtin/packages/cntk/package.py b/var/spack/repos/builtin/packages/cntk/package.py
index d58165379c..dfc515730b 100644
--- a/var/spack/repos/builtin/packages/cntk/package.py
+++ b/var/spack/repos/builtin/packages/cntk/package.py
@@ -64,6 +64,8 @@ class Cntk(Package):
patch('build.patch')
# Patch to fix BLAS inconsistency between CNTK and KaldiReader
patch('kaldireader-openblas.patch')
+ # Patch to change behaviour of lock file - https://github.com/Microsoft/CNTK/issues/62
+ patch('lock-file.patch')
def install(self, spec, prefix):
args = []
diff --git a/var/spack/repos/builtin/packages/codar-cheetah/package.py b/var/spack/repos/builtin/packages/codar-cheetah/package.py
new file mode 100644
index 0000000000..b70c929ca8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/codar-cheetah/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+from distutils.dir_util import copy_tree
+
+
+class CodarCheetah(Package):
+ """CODAR Cheetah:
+ The CODAR Experiment Harness for Exascale science applications.
+ """
+
+ homepage = "https://github.com/CODARcode/cheetah"
+ url = "https://github.com/CODARcode/cheetah/archive/v0.1.tar.gz"
+
+ version('0.1', '6918021f74fa7a2f1de26c0bb31a63ef')
+ version('develop', git='https://github.com/CODARcode/cheetah.git',
+ branch='master')
+
+ depends_on('python@3:', type=('build', 'run'))
+ depends_on('savanna')
+
+ def install(self, spec, prefix):
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/cohmm/package.py b/var/spack/repos/builtin/packages/cohmm/package.py
new file mode 100644
index 0000000000..2e033c4594
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cohmm/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class Cohmm(MakefilePackage):
+ """An anticipated important use-case for next-generation supercomputing
+ is multiscale modeling, in which continuum equations for large-scale
+ material deformation are augmented with high-fidelity, fine-scale
+ simulations that provide constitutive data on demand.
+ """
+ tags = ['proxy-app']
+
+ homepage = "http://www.exmatex.org/cohmm.html"
+ url = "https://github.com/exmatex/CoHMM/archive/sad.tar.gz"
+
+ version('develop', git='https://github.com/exmatex/CoHMM.git',
+ branch='sad')
+
+ variant('openmp', default=True, description='Build with OpenMP Support')
+ variant('gnuplot', default=True, description='Enable gnu plot Support')
+ depends_on('gnuplot', when='+gnuplot')
+
+ def edit(self, spec, prefix):
+ if '+openmp' in spec:
+ filter_file('DO_OPENMP = O.*', 'DO_OPENMP = ON', 'Makefile')
+ if '+gnuplot' in spec:
+ filter_file('DO_GNUPLOT = O.*', 'DO_GNUPLOT = ON', 'Makefile')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.input)
+ mkdirp(prefix.doc)
+ install('cohmm', prefix.bin)
+ install('README.md', prefix.doc)
+ install('LICENSE.md', prefix.doc)
+ for files in glob.glob('input/*.*'):
+ install(files, prefix.input) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/comd/package.py b/var/spack/repos/builtin/packages/comd/package.py
new file mode 100644
index 0000000000..4a4c1133c6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/comd/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Comd(MakefilePackage):
+ """CoMD is a reference implementation of classical molecular dynamics
+ algorithms and workloads as used in materials science. It is created and
+ maintained by The Exascale Co-Design Center for Materials in Extreme
+ Environments (ExMatEx). The code is intended to serve as a vehicle for
+ co-design by allowing others to extend and/or reimplement it as needed to
+ test performance of new architectures, programming models, etc. New
+ versions of CoMD will be released to incorporate the lessons learned from
+ the co-design process."""
+
+ homepage = "http://exmatex.github.io/CoMD/"
+
+ version('master', git='https://github.com/exmatex/CoMD.git',
+ branch='master')
+
+ depends_on('mpi')
+
+ build_directory = 'src-mpi'
+
+ def edit(self, spec, prefix):
+ with working_dir('src-mpi'):
+ filter_file(r'^CC\s*=.*', 'CC = %s' % self.spec['mpi'].mpicc,
+ 'Makefile.vanilla')
+ install('Makefile.vanilla', 'Makefile')
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/corset/package.py b/var/spack/repos/builtin/packages/corset/package.py
new file mode 100644
index 0000000000..b09a062b35
--- /dev/null
+++ b/var/spack/repos/builtin/packages/corset/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Corset(Package):
+ """Corset is a command-line software program to go from a de novo
+ transcriptome assembly to gene-level counts."""
+
+ homepage = "https://github.com/Oshlack/Corset/wiki"
+ url = "https://github.com/Oshlack/Corset/releases/download/version-1.06/corset-1.06-linux64.tar.gz"
+
+ version('1.06', '0a6d0bb1f2d1bdbcb8b47656a7f12f23')
+
+ def url_for_version(self, version):
+ url = 'https://github.com/Oshlack/Corset/releases/download/version-{0}/corset-{0}-linux64.tar.gz'
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('corset', prefix.bin)
+ install('corset_fasta_ID_changer', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cosp2/package.py b/var/spack/repos/builtin/packages/cosp2/package.py
new file mode 100644
index 0000000000..3ed89d5a19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cosp2/package.py
@@ -0,0 +1,74 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import shutil
+
+
+class Cosp2(MakefilePackage):
+ """Proxy Application. CoSP2 represents a sparse linear algebra
+ parallel algorithm for calculating the density matrix in electronic
+ tructure theory. The algorithm is based on a recursive second-order
+ Fermi-Operator expansion method (SP2) and is tailored for density
+ functional based tight-binding calculations of non-metallic systems.
+ """
+
+ tags = ['proxy-app']
+
+ homepage = "http://www.exmatex.org/cosp2.html"
+ url = "https://github.com/exmatex/CoSP2/archive/master.tar.gz"
+
+ version('master', git='https://github.com/exmatex/CoSP2.git',
+ description='master')
+
+ variant('double', default=True,
+ description='Build with double precision.')
+ variant('mpi', default=True, description='Build with MPI Support')
+
+ depends_on('mpi', when='+mpi')
+
+ build_directory = 'src-mpi'
+
+ def edit(self, spec, prefix):
+ cc = spack_cc
+
+ if '+mpi' in spec:
+ cc = spec['mpi'].mpicc
+
+ with working_dir(self.build_directory):
+ makefile = FileFilter('Makefile.vanilla')
+ makefile.filter(r'^CC\s*=.*', 'CC = {0}'.format(cc))
+
+ if '+double' in spec:
+ filter_file('DOUBLE_PRECISION = O.*', 'DOUBLE_PRECISION = OFF',
+ 'Makefile.vanilla')
+ shutil.copy('Makefile.vanilla', 'Makefile')
+
+ def install(self, spec, prefix):
+ install_tree('bin/', prefix.bin)
+ install_tree('examples/', prefix.examples)
+ install_tree('doc/', prefix.doc)
+ install('src-mpi/Doxyfile', prefix.doc)
+ install('README.md', prefix.doc)
+ install('LICENSE.md', prefix.doc) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/cpprestsdk/package.py b/var/spack/repos/builtin/packages/cpprestsdk/package.py
index 6cb378a2f3..b5d96ff480 100644
--- a/var/spack/repos/builtin/packages/cpprestsdk/package.py
+++ b/var/spack/repos/builtin/packages/cpprestsdk/package.py
@@ -38,4 +38,4 @@ class Cpprestsdk(CMakePackage):
depends_on('boost')
- root_cmakelists_dir = '../Release'
+ root_cmakelists_dir = 'Release'
diff --git a/var/spack/repos/builtin/packages/cppzmq/package.py b/var/spack/repos/builtin/packages/cppzmq/package.py
new file mode 100644
index 0000000000..3a51038b50
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cppzmq/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cppzmq(CMakePackage):
+ """C++ binding for 0MQ"""
+
+ homepage = "http://www.zeromq.org"
+ url = "https://github.com/zeromq/cppzmq/archive/v4.2.2.tar.gz"
+
+ version('develop', branch='master',
+ git='https://github.com/zeromq/cppzmq.git')
+
+ version('4.2.2', 'bd809b47296e77fe9f192bd9dafd5cc3')
+
+ depends_on('cmake@3.0.0:', type='build')
+ depends_on('zeromq@4.2.2')
diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py
index f0c33ae2c6..25427292cb 100644
--- a/var/spack/repos/builtin/packages/cram/package.py
+++ b/var/spack/repos/builtin/packages/cram/package.py
@@ -25,18 +25,13 @@
from spack import *
-class Cram(Package):
+class Cram(CMakePackage):
"""Cram runs many small MPI jobs inside one large MPI job."""
homepage = "https://github.com/llnl/cram"
url = "http://github.com/llnl/cram/archive/v1.0.1.tar.gz"
version('1.0.1', 'c73711e945cf5dc603e44395f6647f5e')
- extends('python')
- depends_on("mpi")
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake(".", *std_cmake_args)
- make()
- make("install")
+ extends('python@2.7:')
+ depends_on('mpi')
+ depends_on('cmake@2.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/csdp/package.py b/var/spack/repos/builtin/packages/csdp/package.py
new file mode 100644
index 0000000000..e459df0054
--- /dev/null
+++ b/var/spack/repos/builtin/packages/csdp/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Csdp(MakefilePackage):
+ """CSDP is a library of routines that implements a predictor corrector
+ variant of the semidefinite programming algorithm of Helmberg, Rendl,
+ Vanderbei, and Wolkowicz"""
+
+ homepage = "https://projects.coin-or.org/Csdp"
+ url = "http://www.coin-or.org/download/source/Csdp/Csdp-6.1.1.tgz"
+
+ version('6.1.1', '8388e8988e337bb5c1291068828de801')
+
+ depends_on('atlas')
+
+ def edit(self, spec, prefix):
+ mkdirp(prefix.bin)
+ makefile = FileFilter('Makefile')
+ makefile.filter('/usr/local/bin', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cub/package.py b/var/spack/repos/builtin/packages/cub/package.py
index b868410587..7460bc799b 100644
--- a/var/spack/repos/builtin/packages/cub/package.py
+++ b/var/spack/repos/builtin/packages/cub/package.py
@@ -32,6 +32,7 @@ class Cub(Package):
homepage = "https://nvlabs.github.com/cub"
url = "https://github.com/NVlabs/cub/archive/1.6.4.zip"
+ version('1.7.1', '028ac43922a4538596338ad5aef0f0c4')
version('1.6.4', '924fc12c0efb17264c3ad2d611ed1c51')
version('1.4.1', '74a36eb84e5b5f0bf54aa3df39f660b2')
diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py
index f1533a9bd3..841f737e41 100644
--- a/var/spack/repos/builtin/packages/cube/package.py
+++ b/var/spack/repos/builtin/packages/cube/package.py
@@ -36,9 +36,6 @@ class Cube(AutotoolsPackage):
homepage = "http://www.scalasca.org/software/cube-4.x/download.html"
url = "http://apps.fz-juelich.de/scalasca/releases/cube/4.2/dist/cube-4.2.3.tar.gz"
- # Some versions fail with parallel builds/installs
- parallel = False
-
version('4.3.5', 'e5dce986e3c6381ea3a5fcb66c553adc')
version('4.3.4', '50f73060f55311cb12c5b3cb354d59fa')
version('4.3.3', '07e109248ed8ffc7bdcce614264a2909')
@@ -64,3 +61,6 @@ class Cube(AutotoolsPackage):
configure_args.append('--without-gui')
return configure_args
+
+ def install(self, spec, prefix):
+ make('install', parallel=False)
diff --git a/var/spack/repos/builtin/packages/cufflinks/package.py b/var/spack/repos/builtin/packages/cufflinks/package.py
new file mode 100644
index 0000000000..c0d331439b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cufflinks/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cufflinks(Package):
+ """Cufflinks assembles transcripts, estimates their abundances, and tests
+ for differential expression and regulation in RNA-Seq samples."""
+
+ homepage = "http://cole-trapnell-lab.github.io/cufflinks"
+ url = "http://cole-trapnell-lab.github.io/cufflinks/assets/downloads/cufflinks-2.2.1.Linux_x86_64.tar.gz"
+
+ version('2.2.1', '7e693d182dcfda8aeef8523219ea9ea7')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('cuffcompare', prefix.bin)
+ install('cuffdiff', prefix.bin)
+ install('cufflinks', prefix.bin)
+ install('cuffmerge', prefix.bin)
+ install('cuffnorm', prefix.bin)
+ install('cuffquant', prefix.bin)
+ install('gffread', prefix.bin)
+ install('gtf_to_sam', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/cups/package.py b/var/spack/repos/builtin/packages/cups/package.py
new file mode 100644
index 0000000000..311e779b8c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/cups/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Cups(AutotoolsPackage):
+ """CUPS is the standards-based, open source printing system developed by
+ Apple Inc. for macOS and other UNIX-like operating systems. CUPS uses the
+ Internet Printing Protocol (IPP) to support printing to local and network
+ printers. This provides the core CUPS libraries, not a complete CUPS
+ install."""
+
+ homepage = "https://www.cups.org/"
+ url = "https://github.com/apple/cups/releases/download/v2.2.3/cups-2.2.3-source.tar.gz"
+
+ version('2.2.3', '006a8156680a516e43c59034e31df8bf')
+
+ depends_on('gnutls')
+
+ def configure_args(self):
+ args = ['--enable-gnutls', '--with-components=core']
+ return args
diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py
index fc8f478bf3..ebc303a193 100644
--- a/var/spack/repos/builtin/packages/dakota/package.py
+++ b/var/spack/repos/builtin/packages/dakota/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Dakota(Package):
+class Dakota(CMakePackage):
"""The Dakota toolkit provides a flexible, extensible interface between
analysis codes and iterative systems analysis methods. Dakota
contains algorithms for:
@@ -49,8 +49,6 @@ class Dakota(Package):
version('6.3', '05a58d209fae604af234c894c3f73f6d')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('shared', default=True,
description='Enables the build of shared libraries')
variant('mpi', default=True, description='Activates MPI support')
@@ -61,28 +59,20 @@ class Dakota(Package):
depends_on('python')
depends_on('boost')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8.9:', type='build')
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
+ def cmake_args(self):
+ spec = self.spec
- options.extend([
- '-DCMAKE_BUILD_TYPE:STRING=%s' % (
- 'Debug' if '+debug' in spec else 'Release'),
+ args = [
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
- 'ON' if '+shared' in spec else 'OFF')])
+ 'ON' if '+shared' in spec else 'OFF'),
+ ]
if '+mpi' in spec:
- options.extend([
+ args.extend([
'-DDAKOTA_HAVE_MPI:BOOL=ON',
- '-DMPI_CXX_COMPILER:STRING=%s' % join_path(
- spec['mpi'].prefix.bin, 'mpicxx')])
+ '-DMPI_CXX_COMPILER:STRING=%s' % join_path(spec['mpi'].mpicxx),
+ ])
- build_directory = join_path(self.stage.path, 'spack-build')
- source_directory = self.stage.source_path
-
- with working_dir(build_directory, create=True):
- cmake(source_directory, *options)
- make()
- make("install")
+ return args
diff --git a/var/spack/repos/builtin/packages/daligner/package.py b/var/spack/repos/builtin/packages/daligner/package.py
new file mode 100644
index 0000000000..e6be60264c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/daligner/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Daligner(MakefilePackage):
+ """Daligner: The Dazzler "Overlap" Module."""
+
+ homepage = "https://github.com/thegenemyers/DALIGNER"
+ url = "https://github.com/thegenemyers/DALIGNER/archive/V1.0.tar.gz"
+
+ version('1.0', 'f1b4c396ae062caa4c0e6423ba0725ef')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('Makefile')
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
+ makefile.filter('cp $(ALL) ~/bin',
+ 'cp $(ALL) {0}'.format(prefix.bin),
+ **kwargs)
+ # He changed the Makefile in commit dae119.
+ # You'll need this instead if/when he cuts a new release
+ # or if you try to build from the tip of master.
+ # makefile.filter('DEST_DIR = .*',
+ # 'DEST_DIR = {0}'.format(prefix.bin))
+ # or pass DEST_DIR in to the make
+
+ @run_before('install')
+ def make_prefix_dot_bin(self):
+ mkdir(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py
index e78bb21f44..05cbee4a4e 100644
--- a/var/spack/repos/builtin/packages/damselfly/package.py
+++ b/var/spack/repos/builtin/packages/damselfly/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Damselfly(Package):
+class Damselfly(CMakePackage):
"""Damselfly is a model-based parallel network simulator."""
homepage = "https://github.com/llnl/damselfly"
url = "https://github.com/llnl/damselfly"
@@ -33,10 +33,4 @@ class Damselfly(Package):
version('1.0', '05cf7e2d8ece4408c0f2abb7ab63fd74c0d62895',
git='https://github.com/llnl/damselfly.git', tag='v1.0')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('-DCMAKE_BUILD_TYPE=release', '..', *std_cmake_args)
- make()
- make('install')
+ depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/dataspaces/package.py b/var/spack/repos/builtin/packages/dataspaces/package.py
new file mode 100644
index 0000000000..860866f81e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dataspaces/package.py
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+import six
+
+
+def is_string(x):
+ """validate a string"""
+ try:
+ return isinstance(x, six.string_types)
+ except ValueError:
+ return False
+
+
+class Dataspaces(AutotoolsPackage):
+ """an extreme scale data management framework."""
+
+ homepage = "http://www.dataspaces.org"
+ url = "http://personal.cac.rutgers.edu/TASSL/projects/data/downloads/dataspaces-1.6.2.tar.gz"
+
+ version('develop', git='https://github.com/melrom/dataspaces.git',
+ branch='master')
+ version('1.6.2', '73caa4920b6f2c0c6d6cb87640ff04be')
+
+ variant('dimes',
+ default=False,
+ description='enabled DIMES transport mode')
+ variant('cray-drc',
+ default=False,
+ description='using Cray Dynamic Credentials library')
+ variant('gni-cookie',
+ default='0x5420000',
+ description='Cray UGNI communication token',
+ values=is_string)
+ variant('ptag',
+ default='250',
+ description='Cray UGNI protection tag',
+ values=is_string)
+ variant('mpi',
+ default=True,
+ description='Use MPI for collective communication')
+
+ depends_on('m4', type='build')
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool', type='build')
+ depends_on('mpi', when='+mpi')
+
+ def autoreconf(spec, prefix, self):
+ bash = which('bash')
+ bash('./autogen.sh')
+
+ def configure_args(self):
+ args = []
+ cookie = self.spec.variants['gni-cookie'].value
+ ptag = self.spec.variants['ptag'].value
+ if self.spec.satisfies('+dimes'):
+ args.append('--enable-dimes')
+ if self.spec.satisfies('+cray-drc'):
+ args.append('--enable-drc')
+ else:
+ args.append('--with-gni-cookie=%s' % cookie)
+ args.append('--with-gni-ptag=%s' % ptag)
+ if self.spec.satisfies('+mpi'):
+ args.append('CC=%s' % self.spec['mpi'].mpicc)
+ args.append('FC=%s' % self.spec['mpi'].mpifc)
+ return args
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 51d851b9b1..c4e999afe9 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -32,10 +32,13 @@ class Dealii(CMakePackage):
homepage = "https://www.dealii.org"
url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz"
+ maintainers = ['davydden', 'jppelteret']
+
# Don't add RPATHs to this package for the full build DAG.
# only add for immediate deps.
transitive_rpaths = False
+ version('8.5.1', '39b9ebd6ab083d63cfc9044319aaa2ee')
version('8.5.0', 'ef999cc310b007559a6343bf5b1759bc')
version('8.4.2', '84c6bd3f250d3e0681b645d24cb987a7')
version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d')
@@ -48,12 +51,15 @@ class Dealii(CMakePackage):
variant('mpi', default=True, description='Compile with MPI')
variant('arpack', default=True,
description='Compile with Arpack and PArpack (only with MPI)')
+ variant('adol-c', default=False,
+ description='Compile with Adol-c')
variant('doc', default=False,
description='Compile with documentation')
variant('gsl', default=True, description='Compile with GSL')
variant('hdf5', default=True,
description='Compile with HDF5 (only with MPI)')
variant('metis', default=True, description='Compile with Metis')
+ variant('nanoflann', default=False, description='Compile with Nanoflann')
variant('netcdf', default=True,
description='Compile with Netcdf (only with MPI)')
variant('oce', default=True, description='Compile with OCE')
@@ -61,6 +67,8 @@ class Dealii(CMakePackage):
description='Compile with P4est (only with MPI)')
variant('petsc', default=True,
description='Compile with Petsc (only with MPI)')
+ variant('sundials', default=False,
+ description='Compile with Sundials')
variant('slepc', default=True,
description='Compile with Slepc (only with Petsc and MPI)')
variant('trilinos', default=True,
@@ -71,6 +79,9 @@ class Dealii(CMakePackage):
description='Compile with 64 bit indices support')
variant('optflags', default=False,
description='Compile using additional optimization flags')
+ variant('build_type', default='DebugRelease',
+ description='The build type to build',
+ values=('Debug', 'Release', 'DebugRelease'))
# required dependencies, light version
depends_on("blas")
@@ -106,6 +117,7 @@ class Dealii(CMakePackage):
# optional dependencies
depends_on("mpi", when="+mpi")
+ depends_on("adol-c@2.6.4:", when='@9.0:+adol-c')
depends_on("arpack-ng+mpi", when='+arpack+mpi')
depends_on("doxygen+graphviz", when='+doc')
depends_on("graphviz", when='+doc')
@@ -113,8 +125,9 @@ class Dealii(CMakePackage):
depends_on("hdf5+mpi", when='+hdf5+mpi')
# FIXME: concretizer bug. The two lines mimic what comes from PETSc
# but we should not need it
- depends_on("metis@5:+int64", when='+metis+int64')
- depends_on("metis@5:~int64", when='+metis~int64')
+ depends_on("metis@5:+int64+real64", when='+metis+int64')
+ depends_on("metis@5:~int64+real64", when='+metis~int64')
+ depends_on("nanoflann", when="@9.0:+nanoflann")
depends_on("netcdf+mpi", when="+netcdf+mpi")
depends_on("netcdf-cxx", when='+netcdf+mpi')
depends_on("oce", when='+oce')
@@ -126,20 +139,20 @@ class Dealii(CMakePackage):
depends_on("slepc", when='+slepc+petsc+mpi')
depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi')
depends_on("slepc~arpack", when='+slepc+petsc+mpi+int64')
+ depends_on("sundials", when='@9.0:+sundials')
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos", when='+trilinos+mpi~int64')
depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre", when="+trilinos+mpi+int64")
# check that the combination of variants makes sense
+ conflicts('+nanoflann', when='@:8.5.1')
+ conflicts('+sundials', when='@:8.5.1')
+ conflicts('+adol-c', when='@:8.5.1')
conflicts('+gsl', when='@:8.4.2')
conflicts('+python', when='@:8.4.2')
for p in ['+arpack', '+hdf5', '+netcdf', '+p4est', '+petsc',
'+slepc', '+trilinos']:
conflicts(p, when='~mpi')
- def build_type(self):
- # CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release
- return 'DebugRelease'
-
def cmake_args(self):
spec = self.spec
options = []
@@ -212,7 +225,8 @@ class Dealii(CMakePackage):
# Optional dependencies for which library names are the same as CMake
# variables:
for library in (
- 'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis'):
+ 'gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis',
+ 'sundials', 'nanoflann'):
if library in spec:
options.extend([
'-D%s_DIR=%s' % (library.upper(), spec[library].prefix),
@@ -223,6 +237,17 @@ class Dealii(CMakePackage):
'-DDEAL_II_WITH_%s:BOOL=OFF' % library.upper()
])
+ # adol-c
+ if '+adol-c' in spec:
+ options.extend([
+ '-DADOLC_DIR=%s' % spec['adol-c'].prefix,
+ '-DDEAL_II_WITH_ADOLC=ON'
+ ])
+ else:
+ options.extend([
+ '-DDEAL_II_WITH_ADOLC=OFF'
+ ])
+
# doxygen
options.extend([
'-DDEAL_II_COMPONENT_DOCUMENTATION=%s' %
diff --git a/var/spack/repos/builtin/packages/dialign-tx/package.py b/var/spack/repos/builtin/packages/dialign-tx/package.py
new file mode 100644
index 0000000000..29a0c800da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dialign-tx/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class DialignTx(MakefilePackage):
+ """DIALIGN-TX: greedy and progressive approaches for segment-based
+ multiple sequence alignment"""
+
+ homepage = "http://dialign-tx.gobics.de/"
+ url = "http://dialign-tx.gobics.de/DIALIGN-TX_1.0.2.tar.gz"
+
+ version('1.0.2', '8ccfb1d91136157324d1e513f184ca29')
+
+ build_directory = 'source'
+
+ conflicts('%gcc@6:')
+
+ def edit(self, spec, prefix):
+ with working_dir(self.build_directory):
+ makefile = FileFilter('Makefile')
+ makefile.filter(' -march=i686 ', ' ')
+ makefile.filter('CC=gcc', 'CC=%s' % spack_cc)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir(self.build_directory):
+ install('dialign-tx', prefix.bin)
+ # t-coffee recognizes as dialign-t
+ install('dialign-tx', join_path(prefix.bin, 'dialign-t'))
diff --git a/var/spack/repos/builtin/packages/discovar/package.py b/var/spack/repos/builtin/packages/discovar/package.py
new file mode 100644
index 0000000000..fcce9263cc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/discovar/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Discovar(AutotoolsPackage):
+ """DISCOVAR is a variant caller and small genome assembler."""
+
+ homepage = "https://software.broadinstitute.org/software/discovar/blog/"
+ url = "ftp://ftp.broadinstitute.org/pub/crd/Discovar/latest_source_code/discovar-52488.tar.gz"
+
+ version('52488', 'e72a0b9363e25c99d8e8729c0be98364')
+
+ conflicts('%gcc@6:')
diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py
index 61740fe91a..7817c2a8d8 100644
--- a/var/spack/repos/builtin/packages/doxygen/package.py
+++ b/var/spack/repos/builtin/packages/doxygen/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Doxygen(Package):
+class Doxygen(CMakePackage):
"""Doxygen is the de facto standard tool for generating documentation
from annotated C++ sources, but it also supports other popular programming
languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba,
@@ -49,9 +49,3 @@ class Doxygen(Package):
# optional dependencies
depends_on("graphviz", when="+graphviz", type='run')
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 752c01787e..fa6a31a7c0 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -33,6 +33,7 @@ class Dyninst(Package):
url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz"
list_url = "http://www.dyninst.org/downloads/dyninst-8.x"
+ version('9.3.2', 'a2bf03b6d1d424853e80d39b13e9c229')
version('9.3.0', 'edde7847dc673ca69bd59412af572450')
version('9.2.0', 'ad023f85e8e57837ed9de073b59d6bab',
url="https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz")
diff --git a/var/spack/repos/builtin/packages/ea-utils/package.py b/var/spack/repos/builtin/packages/ea-utils/package.py
new file mode 100644
index 0000000000..296b05eaf2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ea-utils/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class EaUtils(MakefilePackage):
+ """Command-line tools for processing biological sequencing data. Barcode
+ demultiplexing, adapter trimming, etc. Primarily written to support an
+ Illumina based pipeline - but should work with any FASTQs."""
+
+ homepage = "http://expressionanalysis.github.io/ea-utils/"
+ url = "https://github.com/ExpressionAnalysis/ea-utils/archive/1.04.807.tar.gz"
+
+ version('1.04.807', '5972b9f712920603b7527f46c0063a09')
+
+ depends_on('subversion')
+ depends_on('zlib')
+ depends_on('gsl')
+ depends_on('bamtools')
+ # perl module required for make check, which is included in the default
+ # target
+ depends_on('perl', type='build')
+
+ build_directory = 'clipper'
+
+ def edit(self, spec, prefix):
+ with working_dir('clipper'):
+ makefile = FileFilter('Makefile')
+ makefile.filter('/usr', prefix)
diff --git a/var/spack/repos/builtin/packages/ebms/package.py b/var/spack/repos/builtin/packages/ebms/package.py
new file mode 100644
index 0000000000..db3970814f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ebms/package.py
@@ -0,0 +1,69 @@
+#############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Ebms(MakefilePackage):
+ """This is a miniapp for the Energy Banding Monte Carlo (EBMC)
+ neutron transportation simulation code. It is adapted from a
+ similar miniapp provided by Andrew Siegel, whose algorithm is
+ described in [1], where only one process in a compute node
+ is used, and the compute nodes are divided into memory nodes
+ and tracking nodes. Memory nodes do not participate in particle
+ tracking. Obviously, there is a lot of resource waste in this design.
+ """
+
+ homepage = "https://github.com/ANL-CESAR/EBMS"
+ url = "https://github.com/ANL-CESAR/EBMS/archive/master.tar.gz"
+
+ version('develop', git='https://github.com/ANL-CESAR/EBMS.git')
+
+ variant('mpi', default=True, description='Build with MPI support')
+
+ depends_on('mpi', when='+mpi')
+
+ tags = ['proxy-app']
+
+ @property
+ def build_targets(self):
+
+ targets = []
+
+ cflags = '-g -O3 -std=gnu99'
+
+ if '+mpi' in self.spec:
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+
+ targets.append('CFLAGS={0}'.format(cflags))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('ebmc-iallgather', prefix.bin)
+ install('ebmc-rget', prefix.bin)
+ install_tree('run', join_path(prefix, 'run'))
+ install_tree('inputs', join_path(prefix, 'inputs'))
diff --git a/var/spack/repos/builtin/packages/eccodes/package.py b/var/spack/repos/builtin/packages/eccodes/package.py
index 137f445c69..40539e19c9 100644
--- a/var/spack/repos/builtin/packages/eccodes/package.py
+++ b/var/spack/repos/builtin/packages/eccodes/package.py
@@ -50,6 +50,9 @@ class Eccodes(CMakePackage):
description="Enable OpenMP threads")
variant('memfs', default=False,
description="Memory based access to definitions/samples")
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'Production'))
depends_on('netcdf', when='+netcdf')
depends_on('openjpeg', when='+jpeg')
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index 0aefe416e3..569af17c61 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -40,9 +40,6 @@ class Eigen(CMakePackage):
version('3.2.8', '64f4aef8012a424c7e079eaf0be71793ab9bc6e0')
version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184')
- variant('debug', default=False,
- description='Builds the library in debug mode')
-
variant('metis', default=True, description='Enables metis backend')
variant('scotch', default=True, description='Enables scotch backend')
variant('fftw', default=True, description='Enables FFTW backend')
@@ -50,6 +47,9 @@ class Eigen(CMakePackage):
description='Enables SuiteSparse support')
variant('mpfr', default=True,
description='Enables support for multi-precisions FP via mpfr')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo'))
# TODO : dependency on googlehash, superlu, adolc missing
depends_on('metis@5:', when='+metis')
@@ -58,9 +58,3 @@ class Eigen(CMakePackage):
depends_on('suite-sparse', when='+suitesparse')
depends_on('mpfr@2.3.0:', when='+mpfr')
depends_on('gmp', when='+mpfr')
-
- def build_type(self):
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/elemental/elemental_cublas.patch b/var/spack/repos/builtin/packages/elemental/elemental_cublas.patch
new file mode 100644
index 0000000000..9cf9b6e6b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/elemental/elemental_cublas.patch
@@ -0,0 +1,668 @@
+diff -Naur a/include/El/blas_like/level3.hpp b/include/El/blas_like/level3.hpp
+--- a/include/El/blas_like/level3.hpp 2017-06-08 07:30:43.180249917 -0700
++++ b/include/El/blas_like/level3.hpp 2017-06-08 07:35:27.325434602 -0700
+@@ -31,6 +31,10 @@
+ }
+ using namespace GemmAlgorithmNS;
+
++void GemmUseGPU(int min_M, int min_N, int min_K);
++
++void GemmUseCPU();
++
+ template<typename T>
+ void Gemm
+ ( Orientation orientA, Orientation orientB,
+diff -Naur a/include/El/core/imports/blas.hpp b/include/El/core/imports/blas.hpp
+--- a/include/El/core/imports/blas.hpp 2017-06-08 07:30:43.522016908 -0700
++++ b/include/El/core/imports/blas.hpp 2017-06-08 07:35:06.834030908 -0700
+@@ -916,4 +916,63 @@
+ } // namespace blas
+ } // namespace El
+
++
++#if defined(EL_USE_CUBLAS)
++
++namespace El {
++
++#ifdef EL_USE_64BIT_BLAS_INTS
++typedef long long int BlasInt;
++#else
++typedef int BlasInt;
++#endif
++
++namespace cublas {
++
++// NOTE: templated routines are custom and not wrappers
++
++// Level 3 BLAS
++// ============
++template<typename T>
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const T& alpha,
++ const T* A, BlasInt ALDim,
++ const T* B, BlasInt BLDim,
++ const T& beta,
++ T* C, BlasInt CLDim );
++
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const float& alpha,
++ const float* A, BlasInt ALDim,
++ const float* B, BlasInt BLDim,
++ const float& beta,
++ float* C, BlasInt CLDim );
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const double& alpha,
++ const double* A, BlasInt ALDim,
++ const double* B, BlasInt BLDim,
++ const double& beta,
++ double* C, BlasInt CLDim );
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const scomplex& alpha,
++ const scomplex* A, BlasInt ALDim,
++ const scomplex* B, BlasInt BLDim,
++ const scomplex& beta,
++ scomplex* C, BlasInt CLDim );
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const dcomplex& alpha,
++ const dcomplex* A, BlasInt ALDim,
++ const dcomplex* B, BlasInt BLDim,
++ const dcomplex& beta,
++ dcomplex* C, BlasInt CLDim );
++
++} // namespace cublas
++} // namespace El
++#endif
++
+ #endif // ifndef EL_IMPORTS_BLAS_DECL_HPP
+diff -Naur a/src/blas_like/level3/Gemm.cpp b/src/blas_like/level3/Gemm.cpp
+--- a/src/blas_like/level3/Gemm.cpp 2017-06-08 07:30:44.307096427 -0700
++++ b/src/blas_like/level3/Gemm.cpp 2017-06-08 07:34:23.062863489 -0700
+@@ -16,6 +16,20 @@
+
+ namespace El {
+
++char gemm_cpu_gpu_switch = 'c';
++int min_M = 0, min_N = 0, min_K = 0;
++
++void GemmUseGPU(int _min_M, int _min_N, int _min_K) {
++ gemm_cpu_gpu_switch = 'g';
++ min_M = _min_M;
++ min_N = _min_N;
++ min_K = _min_K;
++}
++
++void GemmUseCPU() {
++ gemm_cpu_gpu_switch = 'c';
++}
++
+ template<typename T>
+ void Gemm
+ ( Orientation orientA, Orientation orientB,
+@@ -59,11 +73,30 @@
+ const Int k = ( orientA == NORMAL ? A.Width() : A.Height() );
+ if( k != 0 )
+ {
++#if defined(EL_USE_CUBLAS)
++ if (gemm_cpu_gpu_switch == 'g' &&
++ m >= min_M &&
++ n >= min_N &&
++ k >= min_K) {
++ cublas::Gemm
++ ( transA, transB, m, n, k,
++ alpha, A.LockedBuffer(), A.LDim(),
++ B.LockedBuffer(), B.LDim(),
++ beta, C.Buffer(), C.LDim() );
++ } else {
++ blas::Gemm
++ ( transA, transB, m, n, k,
++ alpha, A.LockedBuffer(), A.LDim(),
++ B.LockedBuffer(), B.LDim(),
++ beta, C.Buffer(), C.LDim() );
++ }
++#else
+ blas::Gemm
+ ( transA, transB, m, n, k,
+ alpha, A.LockedBuffer(), A.LDim(),
+ B.LockedBuffer(), B.LDim(),
+ beta, C.Buffer(), C.LDim() );
++#endif
+ }
+ else
+ {
+diff -Naur a/src/core/imports/blas/Gemm.hpp b/src/core/imports/blas/Gemm.hpp
+--- a/src/core/imports/blas/Gemm.hpp 2017-06-08 07:30:45.090529967 -0700
++++ b/src/core/imports/blas/Gemm.hpp 2017-06-08 07:34:46.503009958 -0700
+@@ -41,6 +41,12 @@
+
+ } // extern "C"
+
++
++#if defined(EL_USE_CUBLAS)
++#include <cublas.h>
++#include <cub/util_allocator.cuh>
++#endif
++
+ namespace El {
+ namespace blas {
+
+@@ -515,3 +521,515 @@
+
+ } // namespace blas
+ } // namespace El
++
++
++#if EL_USE_CUBLAS
++
++#define USE_CUB 1
++
++namespace El {
++namespace cublas {
++
++#if USE_CUB
++cub::CachingDeviceAllocator g_allocator(true); // Caching allocator for device memory
++#endif
++
++template<typename T>
++void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const T& alpha,
++ const T* A, BlasInt ALDim,
++ const T* B, BlasInt BLDim,
++ const T& beta,
++ T* C, BlasInt CLDim )
++{
++ // put something here
++ printf("integer version \n");
++}
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Int& alpha,
++ const Int* A, BlasInt ALDim,
++ const Int* B, BlasInt BLDim,
++ const Int& beta,
++ Int* C, BlasInt CLDim );
++#ifdef EL_HAVE_QD
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const DoubleDouble& alpha,
++ const DoubleDouble* A, BlasInt ALDim,
++ const DoubleDouble* B, BlasInt BLDim,
++ const DoubleDouble& beta,
++ DoubleDouble* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const QuadDouble& alpha,
++ const QuadDouble* A, BlasInt ALDim,
++ const QuadDouble* B, BlasInt BLDim,
++ const QuadDouble& beta,
++ QuadDouble* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Complex<DoubleDouble>& alpha,
++ const Complex<DoubleDouble>* A, BlasInt ALDim,
++ const Complex<DoubleDouble>* B, BlasInt BLDim,
++ const Complex<DoubleDouble>& beta,
++ Complex<DoubleDouble>* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Complex<QuadDouble>& alpha,
++ const Complex<QuadDouble>* A, BlasInt ALDim,
++ const Complex<QuadDouble>* B, BlasInt BLDim,
++ const Complex<QuadDouble>& beta,
++ Complex<QuadDouble>* C, BlasInt CLDim );
++#endif
++#ifdef EL_HAVE_QUAD
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Quad& alpha,
++ const Quad* A, BlasInt ALDim,
++ const Quad* B, BlasInt BLDim,
++ const Quad& beta,
++ Quad* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Complex<Quad>& alpha,
++ const Complex<Quad>* A, BlasInt ALDim,
++ const Complex<Quad>* B, BlasInt BLDim,
++ const Complex<Quad>& beta,
++ Complex<Quad>* C, BlasInt CLDim );
++#endif
++#ifdef EL_HAVE_MPC
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const BigInt& alpha,
++ const BigInt* A, BlasInt ALDim,
++ const BigInt* B, BlasInt BLDim,
++ const BigInt& beta,
++ BigInt* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const BigFloat& alpha,
++ const BigFloat* A, BlasInt ALDim,
++ const BigFloat* B, BlasInt BLDim,
++ const BigFloat& beta,
++ BigFloat* C, BlasInt CLDim );
++template void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const Complex<BigFloat>& alpha,
++ const Complex<BigFloat>* A, BlasInt ALDim,
++ const Complex<BigFloat>* B, BlasInt BLDim,
++ const Complex<BigFloat>& beta,
++ Complex<BigFloat>* C, BlasInt CLDim );
++#endif
++
++void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const float& alpha,
++ const float* A, BlasInt ALDim,
++ const float* B, BlasInt BLDim,
++ const float& beta,
++ float* C, BlasInt CLDim )
++{
++ EL_DEBUG_CSE
++ EL_DEBUG_ONLY(
++ if( std::toupper(transA) == 'N' )
++ {
++ if( ALDim < Max(m,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
++ }
++ else
++ {
++ if( ALDim < Max(k,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
++ }
++
++ if( std::toupper(transB) == 'N' )
++ {
++ if( BLDim < Max(k,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
++ }
++ else
++ {
++ if( BLDim < Max(n,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
++ }
++
++ if( CLDim < Max(m,1) )
++ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
++ )
++ const char fixedTransA = ( std::toupper(transA) == 'C' ? 'T' : transA );
++ const char fixedTransB = ( std::toupper(transB) == 'C' ? 'T' : transB );
++
++ const mpi::Comm comm;
++ const Int commRank = mpi::Rank( comm );
++ if (commRank == 0) {
++ //printf("calling cublas Sgemm: m %d n %d k %d\n", m, n, k);
++ }
++
++ BlasInt rowA, colA, rowB, colB, rowC, colC;
++ // device memory size for A, B and C
++ BlasInt sizeA, sizeB, sizeC;
++ float *devA=NULL, *devB=NULL, *devC=NULL;
++
++ rowA = fixedTransA == 'T' ? k : m;
++ colA = fixedTransA == 'T' ? m : k;
++ rowB = fixedTransB == 'T' ? n : k;
++ colB = fixedTransB == 'T' ? k : n;
++ rowC = m;
++ colC = n;
++ sizeA = rowA * colA;
++ sizeB = rowB * colB;
++ sizeC = rowC * colC;
++
++ cublasStatus stat;
++
++#if USE_CUB
++ CubDebugExit(g_allocator.DeviceAllocate((void**)&devA,
++ sizeof(float) * (sizeA+sizeB+sizeC) ));
++#else
++ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(float), (void **) &devA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
++#endif
++
++ devB = devA + sizeA;
++ devC = devB + sizeB;
++
++ // copy matrix A, B and C to device
++ stat = cublasSetMatrix(rowA, colA, sizeof(float), A, ALDim, devA, rowA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
++
++ stat = cublasSetMatrix(rowB, colB, sizeof(float), B, BLDim, devB, rowB);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
++
++ if (beta != 0.0)
++ {
++ stat = cublasSetMatrix(rowC, colC, sizeof(float), C, CLDim, devC, rowC);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
++ }
++
++ // cublas<t>gemm
++ cublasSgemm
++ ( fixedTransA, fixedTransB, m, n, k,
++ alpha, devA, rowA, devB, rowB, beta, devC, rowC );
++
++ // copy matrix C to host
++ stat = cublasGetMatrix(rowC, colC, sizeof(float), devC, rowC, C, CLDim);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
++
++ // free
++#if USE_CUB
++ CubDebugExit(g_allocator.DeviceFree(devA));
++#else
++ cublasFree(devA);
++#endif
++ //printf("CUBLAS float done ...\n");
++}
++
++void Gemm
++( char transA, char transB,
++ BlasInt m, BlasInt n, BlasInt k,
++ const double& alpha,
++ const double* A, BlasInt ALDim,
++ const double* B, BlasInt BLDim,
++ const double& beta,
++ double* C, BlasInt CLDim )
++{
++ EL_DEBUG_CSE
++ EL_DEBUG_ONLY(
++ if( std::toupper(transA) == 'N' )
++ {
++ if( ALDim < Max(m,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
++ }
++ else
++ {
++ if( ALDim < Max(k,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
++ }
++
++ if( std::toupper(transB) == 'N' )
++ {
++ if( BLDim < Max(k,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
++ }
++ else
++ {
++ if( BLDim < Max(n,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
++ }
++
++ if( CLDim < Max(m,1) )
++ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
++ )
++ const char fixedTransA = ( std::toupper(transA) == 'C' ? 'T' : transA );
++ const char fixedTransB = ( std::toupper(transB) == 'C' ? 'T' : transB );
++
++ const mpi::Comm comm;
++ const Int commRank = mpi::Rank( comm );
++ if (commRank == 0) {
++ //printf("calling cublas Dgemm: m %d n %d k %d\n", m, n, k);
++ }
++
++ BlasInt rowA, colA, rowB, colB, rowC, colC;
++ // device memory size for A, B and C
++ BlasInt sizeA, sizeB, sizeC;
++ double *devA=NULL, *devB=NULL, *devC=NULL;
++
++ rowA = fixedTransA == 'T' ? k : m;
++ colA = fixedTransA == 'T' ? m : k;
++ rowB = fixedTransB == 'T' ? n : k;
++ colB = fixedTransB == 'T' ? k : n;
++ rowC = m;
++ colC = n;
++ sizeA = rowA * colA;
++ sizeB = rowB * colB;
++ sizeC = rowC * colC;
++
++ cublasStatus stat;
++
++#if USE_CUB
++ CubDebugExit(g_allocator.DeviceAllocate((void**)&devA,
++ sizeof(double) * (sizeA+sizeB+sizeC) ));
++#else
++ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(double), (void **) &devA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
++#endif
++
++ devB = devA + sizeA;
++ devC = devB + sizeB;
++
++ // copy matrix A, B and C to device
++ stat = cublasSetMatrix(rowA, colA, sizeof(double), A, ALDim, devA, rowA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
++
++ stat = cublasSetMatrix(rowB, colB, sizeof(double), B, BLDim, devB, rowB);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
++
++ if (beta != 0.0)
++ {
++ stat = cublasSetMatrix(rowC, colC, sizeof(double), C, CLDim, devC, rowC);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
++ }
++
++ // cublas<t>gemm
++ cublasDgemm
++ ( fixedTransA, fixedTransB, m, n, k,
++ alpha, devA, rowA, devB, rowB, beta, devC, rowC );
++
++ // copy matrix C to host
++ stat = cublasGetMatrix(rowC, colC, sizeof(double), devC, rowC, C, CLDim);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
++
++ // free
++#if USE_CUB
++ CubDebugExit(g_allocator.DeviceFree(devA));
++#else
++ cublasFree(devA);
++#endif
++ //printf("CUBLAS double done ...\n");
++}
++
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const scomplex& alpha,
++ const scomplex* A, BlasInt ALDim,
++ const scomplex* B, BlasInt BLDim,
++ const scomplex& beta,
++ scomplex* C, BlasInt CLDim )
++{
++ EL_DEBUG_CSE
++ EL_DEBUG_ONLY(
++ if( std::toupper(transA) == 'N' )
++ {
++ if( ALDim < Max(m,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
++ }
++ else
++ {
++ if( ALDim < Max(k,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
++ }
++
++ if( std::toupper(transB) == 'N' )
++ {
++ if( BLDim < Max(k,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
++ }
++ else
++ {
++ if( BLDim < Max(n,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
++ }
++
++ if( CLDim < Max(m,1) )
++ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
++ )
++
++ const char fixedTransA = transA;
++ const char fixedTransB = transB;
++
++ const mpi::Comm comm;
++ const Int commRank = mpi::Rank( comm );
++ if (commRank == 0) {
++ //printf("calling cublas Cgemm: m %d n %d k %d\n", m, n, k);
++ }
++
++ BlasInt rowA, colA, rowB, colB, rowC, colC;
++ // device memory size for A, B and C
++ BlasInt sizeA, sizeB, sizeC;
++ cuComplex *devA=NULL, *devB=NULL, *devC=NULL;
++
++ rowA = fixedTransA == 'T' ? k : m;
++ colA = fixedTransA == 'T' ? m : k;
++ rowB = fixedTransB == 'T' ? n : k;
++ colB = fixedTransB == 'T' ? k : n;
++ rowC = m;
++ colC = n;
++ sizeA = rowA * colA;
++ sizeB = rowB * colB;
++ sizeC = rowC * colC;
++
++ cublasStatus stat;
++ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(cuComplex), (void **) &devA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
++
++ devB = devA + sizeA;
++ devC = devB + sizeB;
++
++ // copy matrix A, B and C to device
++ stat = cublasSetMatrix(rowA, colA, sizeof(cuComplex), A, ALDim, devA, rowA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
++
++ stat = cublasSetMatrix(rowB, colB, sizeof(cuComplex), B, BLDim, devB, rowB);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
++
++ if (beta.real() != 0.0 || beta.imag() != 0.0)
++ {
++ stat = cublasSetMatrix(rowC, colC, sizeof(cuComplex), C, CLDim, devC, rowC);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
++ }
++
++ // cublas<t>gemm
++ cublasCgemm
++ ( fixedTransA, fixedTransB, m, n, k,
++ *((cuComplex*) &alpha), devA, rowA, devB, rowB, *((cuComplex*) &beta), devC, rowC );
++
++ // copy matrix C to host
++ stat = cublasGetMatrix(rowC, colC, sizeof(cuComplex), devC, rowC, C, CLDim);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
++
++ // free
++ cublasFree(devA);
++}
++
++void Gemm
++( char transA, char transB, BlasInt m, BlasInt n, BlasInt k,
++ const dcomplex& alpha,
++ const dcomplex* A, BlasInt ALDim,
++ const dcomplex* B, BlasInt BLDim,
++ const dcomplex& beta,
++ dcomplex* C, BlasInt CLDim )
++{
++ EL_DEBUG_CSE
++ EL_DEBUG_ONLY(
++ if( std::toupper(transA) == 'N' )
++ {
++ if( ALDim < Max(m,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",m=",m);
++ }
++ else
++ {
++ if( ALDim < Max(k,1) )
++ LogicError("ALDim was too small: ALDim=",ALDim,",k=",k);
++ }
++
++ if( std::toupper(transB) == 'N' )
++ {
++ if( BLDim < Max(k,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",k=",k);
++ }
++ else
++ {
++ if( BLDim < Max(n,1) )
++ LogicError("BLDim was too small: BLDim=",BLDim,",n=",n);
++ }
++
++ if( CLDim < Max(m,1) )
++ LogicError("CLDim was too small: CLDim=",CLDim,",m=",m);
++ )
++
++ const char fixedTransA = transA;
++ const char fixedTransB = transB;
++
++ const mpi::Comm comm;
++ const Int commRank = mpi::Rank( comm );
++ if (commRank == 0) {
++ //printf("calling cublas Zgemm: m %d n %d k %d\n", m, n, k);
++ }
++
++ BlasInt rowA, colA, rowB, colB, rowC, colC;
++ // device memory size for A, B and C
++ BlasInt sizeA, sizeB, sizeC;
++ cuDoubleComplex *devA=NULL, *devB=NULL, *devC=NULL;
++
++ rowA = fixedTransA == 'T' ? k : m;
++ colA = fixedTransA == 'T' ? m : k;
++ rowB = fixedTransB == 'T' ? n : k;
++ colB = fixedTransB == 'T' ? k : n;
++ rowC = m;
++ colC = n;
++ sizeA = rowA * colA;
++ sizeB = rowB * colB;
++ sizeC = rowC * colC;
++
++ cublasStatus stat;
++ stat = cublasAlloc(sizeA+sizeB+sizeC, sizeof(cuDoubleComplex), (void **) &devA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("Alloc A,B,C error\n"); }
++
++ devB = devA + sizeA;
++ devC = devB + sizeB;
++
++ // copy matrix A, B and C to device
++ stat = cublasSetMatrix(rowA, colA, sizeof(cuDoubleComplex), A, ALDim, devA, rowA);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix A error\n"); }
++
++ stat = cublasSetMatrix(rowB, colB, sizeof(cuDoubleComplex), B, BLDim, devB, rowB);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix B error\n"); }
++
++ if (beta.real() != 0.0 || beta.imag() != 0.0)
++ {
++ stat = cublasSetMatrix(rowC, colC, sizeof(cuDoubleComplex), C, CLDim, devC, rowC);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("SetMatrix C error\n"); }
++ }
++
++ cublasZgemm
++ ( fixedTransA, fixedTransB, m, n, k,
++ *((cuDoubleComplex*) &alpha), devA, rowA, devB, rowB, *((cuDoubleComplex*) &beta),
++ devC, rowC );
++
++ // copy matrix C to host
++ stat = cublasGetMatrix(rowC, colC, sizeof(cuDoubleComplex), devC, rowC, C, CLDim);
++ if (stat != CUBLAS_STATUS_SUCCESS) { RuntimeError("GetMatrix C error\n"); }
++
++ // free
++ cublasFree(devA);
++}
++
++} // namespace cublas
++} // namespace El
++
++#endif
++
diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py
index d86ee985f7..87317bd909 100644
--- a/var/spack/repos/builtin/packages/elemental/package.py
+++ b/var/spack/repos/builtin/packages/elemental/package.py
@@ -33,11 +33,10 @@ class Elemental(CMakePackage):
homepage = "http://libelemental.org"
url = "https://github.com/elemental/Elemental/archive/v0.87.6.tar.gz"
+ version('master', git='https://github.com/elemental/Elemental.git', branch='master')
version('0.87.7', '6c1e7442021c59a36049e37ea69b8075')
version('0.87.6', '9fd29783d45b0a0e27c0df85f548abe9')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('shared', default=True,
description='Enables the build of shared libraries')
variant('hybrid', default=True,
@@ -54,6 +53,8 @@ class Elemental(CMakePackage):
description='Enable quad precision')
variant('int64', default=False,
description='Use 64bit integers')
+ variant('cublas', default=False,
+ description='Enable cuBLAS for local BLAS operations')
# When this variant is set remove the normal dependencies since
# Elemental has to build BLAS and ScaLAPACK internally
variant('int64_blas', default=False,
@@ -61,15 +62,24 @@ class Elemental(CMakePackage):
' Requires local build of BLAS library.')
variant('scalapack', default=False,
description='Build with ScaLAPACK library')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
+ variant('blas', default='openblas', values=('openblas', 'mkl'),
+ description='Enable the use of OpenBlas/MKL')
- # Note that this forces us to use OpenBLAS until #1712 is fixed
+ # Note that #1712 forces us to enumerate the different blas variants
depends_on('blas', when='~openmp_blas ~int64_blas')
# Hack to forward variant to openblas package
# Allow Elemental to build internally when using 8-byte ints
- depends_on('openblas +openmp', when='+openmp_blas ~int64_blas')
+ depends_on('openblas +openmp', when='blas=openblas +openmp_blas ~int64_blas')
+
+ depends_on('intel-mkl', when="blas=mkl ~openmp_blas ~int64_blas")
+ depends_on('intel-mkl +openmp', when='blas=mkl +openmp_blas ~int64_blas')
+ depends_on('intel-mkl@2017.1 +openmp +ilp64', when='blas=mkl +openmp_blas +int64_blas')
# Note that this forces us to use OpenBLAS until #1712 is fixed
- depends_on('lapack', when='~openmp_blas')
+ depends_on('lapack', when='blas=openblas ~openmp_blas')
depends_on('metis')
depends_on('metis +int64', when='+int64')
depends_on('mpi')
@@ -77,6 +87,11 @@ class Elemental(CMakePackage):
depends_on('scalapack', when='+scalapack ~int64_blas')
extends('python', when='+python')
depends_on('python@:2.8', when='+python')
+ depends_on('gmp')
+ depends_on('mpc')
+ depends_on('mpfr')
+
+ patch('elemental_cublas.patch', when='+cublas')
@property
def libs(self):
@@ -85,15 +100,6 @@ class Elemental(CMakePackage):
'libEl', root=self.prefix, shared=shared, recurse=True
)
- def build_type(self):
- """Returns the correct value for the ``CMAKE_BUILD_TYPE`` variable
- :return: value for ``CMAKE_BUILD_TYPE``
- """
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
spec = self.spec
@@ -134,8 +140,7 @@ class Elemental(CMakePackage):
math_libs = spec['scalapack'].libs + math_libs
args.extend([
- '-DMATH_LIBS:STRING={0}'.format(math_libs.search_flags),
- '-DMATH_LIBS:STRING={0}'.format(math_libs.link_flags)])
+ '-DMATH_LIBS:STRING={0}'.format(math_libs.ld_flags)])
if '+python' in spec:
args.extend([
diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py
index b49ac4a53b..c7e614cad5 100644
--- a/var/spack/repos/builtin/packages/elfutils/package.py
+++ b/var/spack/repos/builtin/packages/elfutils/package.py
@@ -35,14 +35,22 @@ class Elfutils(AutotoolsPackage):
homepage = "https://fedorahosted.org/elfutils/"
- url = "https://sourceware.org/elfutils/ftp/0.168/elfutils-0.168.tar.bz2"
+ url = "https://sourceware.org/elfutils/ftp/0.168/elfutils-0.168.tar.bz2"
list_url = "https://sourceware.org/elfutils/ftp"
list_depth = 1
+ version('0.170', '03599aee98c9b726c7a732a2dd0245d5')
version('0.168', '52adfa40758d0d39e5d5c57689bf38d6')
version('0.163', '77ce87f259987d2e54e4d87b86cbee41', preferred=True)
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
+ depends_on('gettext')
+
provides('elf@1')
def configure_args(self):
- return ['--enable-maintainer-mode']
+ # configure doesn't use LIBS correctly
+ return [
+ 'LDFLAGS=-L%s -lintl' % self.spec['gettext'].prefix.lib,
+ '--enable-maintainer-mode']
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py
index 85d1706b2b..61e957c0c9 100644
--- a/var/spack/repos/builtin/packages/elpa/package.py
+++ b/var/spack/repos/builtin/packages/elpa/package.py
@@ -71,8 +71,8 @@ class Elpa(AutotoolsPackage):
spack_env.set('FC', spec['mpi'].mpifc)
spack_env.set('CXX', spec['mpi'].mpicxx)
- spack_env.set('LDFLAGS', spec['lapack'].libs.search_flags)
- spack_env.set('LIBS', spec['lapack'].libs.link_flags)
+ spack_env.append_flags('LDFLAGS', spec['lapack'].libs.search_flags)
+ spack_env.append_flags('LIBS', spec['lapack'].libs.link_flags)
spack_env.set('SCALAPACK_LDFLAGS', spec['scalapack'].libs.joined())
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/emboss/package.py b/var/spack/repos/builtin/packages/emboss/package.py
new file mode 100644
index 0000000000..d21f86a7b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/emboss/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Emboss(AutotoolsPackage):
+ """EMBOSS is a free Open Source software analysis package specially
+ developed for the needs of the molecular biology (e.g. EMBnet) user
+ community"""
+
+ homepage = "http://emboss.sourceforge.net/"
+ url = "ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.6.0.tar.gz"
+
+ version('6.6.0', 'cc3fca80cb0618deb10fa0d29fe90e4b')
+
+ depends_on('libxpm')
+ depends_on('libgd')
+ depends_on('postgresql')
diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py
index b77e14ec76..26cbf8fd88 100644
--- a/var/spack/repos/builtin/packages/espresso/package.py
+++ b/var/spack/repos/builtin/packages/espresso/package.py
@@ -75,8 +75,17 @@ class Espresso(Package):
patch('dspev_drv_elpa.patch', when='@6.1 ^elpa@2016.05.003')
# We can't ask for scalapack or elpa if we don't want MPI
- conflicts('+scalapack', when='~mpi')
- conflicts('+elpa', when='~mpi')
+ conflicts(
+ '+scalapack',
+ when='~mpi',
+ msg='scalapack is a parallel library and needs MPI support'
+ )
+
+ conflicts(
+ '+elpa',
+ when='~mpi',
+ msg='elpa is a parallel library and needs MPI support'
+ )
# Elpa is formally supported by @:5.4.0, but QE configure searches
# for it in the wrong folders (or tries to download it within
diff --git a/var/spack/repos/builtin/packages/espressopp/package.py b/var/spack/repos/builtin/packages/espressopp/package.py
index e71291bec8..f1752b3b5e 100644
--- a/var/spack/repos/builtin/packages/espressopp/package.py
+++ b/var/spack/repos/builtin/packages/espressopp/package.py
@@ -39,7 +39,6 @@ class Espressopp(CMakePackage):
version('1.9.4.1', '0da74a6d4e1bfa6a2a24fca354245a4f')
version('1.9.4', 'f2a27993a83547ad014335006eea74ea')
- variant('debug', default=False, description='Build debug version')
variant('ug', default=False, description='Build user guide')
variant('pdf', default=False, description='Build user guide in pdf format')
variant('dg', default=False, description='Build developer guide')
@@ -60,13 +59,6 @@ class Espressopp(CMakePackage):
depends_on("texlive", when="+pdf", type='build')
depends_on("doxygen", when="+dg", type='build')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
return ['-DEXTERNAL_MPI4PY=ON', '-DEXTERNAL_BOOST=ON']
diff --git a/var/spack/repos/builtin/packages/exabayes/package.py b/var/spack/repos/builtin/packages/exabayes/package.py
new file mode 100644
index 0000000000..85148474a2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/exabayes/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Exabayes(AutotoolsPackage):
+ """ExaBayes is a software package for Bayesian tree inference. It is
+ particularly suitable for large-scale analyses on computer clusters."""
+
+ homepage = "https://sco.h-its.org/exelixis/web/software/exabayes/"
+ url = "https://sco.h-its.org/exelixis/resource/download/software/exabayes-1.5.tar.gz"
+
+ version('1.5', '6a734777b8f8eff0a520306500c8c419')
+
+ variant('mpi', default=True, description='Enable MPI parallel support')
+
+ depends_on('mpi', when='+mpi')
+
+ # ExaBayes manual states the program succesfully compiles with GCC, version
+ # 4.6 or greater, and Clang, version 3.2 or greater. The build fails when
+ # GCC 7.1.0 is used.
+ conflicts('%gcc@:4.5.4, 7.1.0:')
+ conflicts('%clang@:3.1')
+ conflicts('^intel-mpi', when='+mpi')
+ conflicts('^intel-parallel-studio+mpi', when='+mpi')
+ conflicts('^mvapich2', when='+mpi')
+ conflicts('^spectrum-mpi', when='+mpi')
+
+ def configure_args(self):
+ args = []
+ if '+mpi' in self.spec:
+ args.append('--enable-mpi')
+ else:
+ args.append('--disable-mpi')
+ return args
diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py
index 8f85c2914b..68e8ed4c08 100644
--- a/var/spack/repos/builtin/packages/expat/package.py
+++ b/var/spack/repos/builtin/packages/expat/package.py
@@ -23,11 +23,33 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class Expat(AutotoolsPackage):
"""Expat is an XML parser library written in C."""
+
homepage = "http://expat.sourceforge.net/"
- url = "http://downloads.sourceforge.net/project/expat/expat/2.2.0/expat-2.2.0.tar.bz2"
+ url = "https://sourceforge.net/projects/expat/files/expat/2.2.2/expat-2.2.2.tar.bz2"
+
+ # Version 2.2.2 introduced a requirement for a high quality
+ # entropy source. "Older" linux systems (aka CentOS 7) do not
+ # support get_random so we'll provide a high quality source via
+ # libbsd.
+ # There's no need for it in earlier versions, so 'conflict' if
+ # someone's asking for an older version and also libbsd.
+ # In order to install an older version, you'll need to add
+ # `~libbsd`.
+ variant('libbsd', default=sys.platform != 'darwin',
+ description="Use libbsd (for high quality randomness)")
+ depends_on('libbsd', when="@2.2.1:+libbsd")
+ version('2.2.2', '1ede9a41223c78528b8c5d23e69a2667')
version('2.2.0', '2f47841c829facb346eb6e3fab5212e2')
+
+ def configure_args(self):
+ spec = self.spec
+ args = []
+ if '+libbsd' in spec and '@2.2.1:' in spec:
+ args = ['--with-libbsd']
+ return args
diff --git a/var/spack/repos/builtin/packages/falcon/package.py b/var/spack/repos/builtin/packages/falcon/package.py
new file mode 100644
index 0000000000..7532e6e8b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/falcon/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Falcon(PythonPackage):
+ """Falcon: a set of tools for fast aligning long reads for consensus
+ and assembly.
+
+ The Falcon tool kit is a set of simple code collection which I use
+ for studying efficient assembly algorithm for haploid and diploid genomes.
+ It has some back-end code implemented in C for speed and some simple
+ front-end written in Python for convenience."""
+
+ homepage = "https://github.com/PacificBiosciences/FALCON"
+ url = "https://github.com/PacificBiosciences/FALCON.git"
+
+ version('2017-05-30',
+ git='https://github.com/PacificBiosciences/FALCON.git',
+ commit='86cec6157291679095ea6080b0cde6561eccc041')
+
+ depends_on('py-setuptools', type='run')
+ depends_on('py-pypeflow', type='run')
+ depends_on('py-networkx@1.7:1.10', type=['build', 'run'])
+ depends_on('pacbio-dazz-db', type='run')
+ depends_on('pacbio-daligner', type='run')
+ depends_on('pacbio-dextractor', type='run')
+ depends_on('pacbio-damasker', type='run')
diff --git a/var/spack/repos/builtin/packages/fastjar/package.py b/var/spack/repos/builtin/packages/fastjar/package.py
new file mode 100644
index 0000000000..86ad4b2d68
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fastjar/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fastjar(AutotoolsPackage):
+ """Fastjar is a version of Sun's 'jar' utility, written entirely in C."""
+
+ homepage = "http://savannah.nongnu.org/projects/fastjar/"
+ url = "http://download.savannah.gnu.org/releases/fastjar/fastjar-0.98.tar.gz"
+
+ version('0.98', 'd2d264d343d4d0e1575832cc1023c3bf')
+
+ depends_on('zlib')
diff --git a/var/spack/repos/builtin/packages/fastphase/package.py b/var/spack/repos/builtin/packages/fastphase/package.py
new file mode 100644
index 0000000000..69ba89022c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fastphase/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fastphase(Package):
+ """Software for haplotype reconstruction, and estimating missing genotypes
+ from population data."""
+
+ homepage = "http://stephenslab.uchicago.edu/software.html"
+ url = "http://scheet.org/code/Linuxfp.tar.gz"
+
+ version('2016-03-30', 'b48731eed9b8d0a5a321f970c5c20d8c')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('fastPHASE', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/fastqc/package.py b/var/spack/repos/builtin/packages/fastqc/package.py
index ae06252fc1..d4abd8aceb 100644
--- a/var/spack/repos/builtin/packages/fastqc/package.py
+++ b/var/spack/repos/builtin/packages/fastqc/package.py
@@ -36,7 +36,7 @@ class Fastqc(Package):
version('0.11.5', '3524f101c0ab0bae77c7595983170a76')
version('0.11.4', '104ff2e0e9aebf5bee1f6b068a059b0d')
- depends_on('jdk', type='run')
+ depends_on('java', type='run')
depends_on('perl') # for fastqc "script", any perl will do
patch('fastqc.patch', level=0)
@@ -58,4 +58,5 @@ class Fastqc(Package):
"""Add <prefix> to the path; the package has a script at the
top level.
"""
- run_env.prepend_path('PATH', join_path(self.spec['jdk'].prefix, 'bin'))
+ run_env.prepend_path('PATH', join_path(self.spec['java'].prefix,
+ 'bin'))
diff --git a/var/spack/repos/builtin/packages/fastx-toolkit/package.py b/var/spack/repos/builtin/packages/fastx-toolkit/package.py
index 7e06ba89ea..4f40ffe64e 100644
--- a/var/spack/repos/builtin/packages/fastx-toolkit/package.py
+++ b/var/spack/repos/builtin/packages/fastx-toolkit/package.py
@@ -35,3 +35,5 @@ class FastxToolkit(AutotoolsPackage):
version('0.0.14', 'bf1993c898626bb147de3d6695c20b40')
depends_on('libgtextutils')
+
+ conflicts('%gcc@7.1.0:')
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
index 34afa0d609..5aa3b17d73 100644
--- a/var/spack/repos/builtin/packages/fenics/package.py
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -55,10 +55,12 @@ class Fenics(CMakePackage):
description='Enables the shared memory support')
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('doc', default=False,
description='Builds the documentation')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo',
+ 'MinSizeRel', 'Developer'))
# not part of spack list for now
# variant('petsc4py', default=True, description='Uses PETSc4py')
@@ -144,11 +146,7 @@ class Fenics(CMakePackage):
return 'ON' if option in self.spec else 'OFF'
def cmake_args(self):
- spec = self.spec
-
return [
- '-DCMAKE_BUILD_TYPE:STRING={0}'.format(
- 'Debug' if '+debug' in spec else 'RelWithDebInfo'),
'-DDOLFIN_ENABLE_DOCS:BOOL={0}'.format(
self.cmake_is_on('+doc')),
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py
index f2a32fdd70..6a4c0902f6 100644
--- a/var/spack/repos/builtin/packages/ferret/package.py
+++ b/var/spack/repos/builtin/packages/ferret/package.py
@@ -98,7 +98,12 @@ class Ferret(Package):
ln('-sf',
libz_prefix + '/lib',
libz_prefix + '/lib64')
- os.environ['LDFLAGS'] = '-lquadmath'
+
+ if 'LDFLAGS' in env and env['LDFLAGS']:
+ env['LDFLAGS'] += ' ' + '-lquadmath'
+ else:
+ env['LDFLAGS'] = '-lquadmath'
+
with working_dir('FERRET', create=False):
os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11'
os.environ['HOSTTYPE'] = 'x86_64-linux'
diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py
index 80017f5eb6..9a6f6c18ad 100644
--- a/var/spack/repos/builtin/packages/ffmpeg/package.py
+++ b/var/spack/repos/builtin/packages/ffmpeg/package.py
@@ -37,6 +37,8 @@ class Ffmpeg(AutotoolsPackage):
variant('shared', default=True,
description='build shared libraries')
+ depends_on('yasm@1.2.0:')
+
def configure_args(self):
spec = self.spec
config_args = ['--enable-pic']
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 82f49e7ca2..19e818028a 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -70,6 +70,11 @@ class Fftw(AutotoolsPackage):
depends_on('autoconf', type='build', when='+pfft_patches')
depends_on('libtool', type='build', when='+pfft_patches')
+ @property
+ def libs(self):
+ result = find_libraries(['libfftw3'], root=self.prefix, recurse=True)
+ return result
+
def autoreconf(self, spec, prefix):
if '+pfft_patches' in spec:
autoreconf = which('autoreconf')
diff --git a/var/spack/repos/builtin/packages/fimpute/package.py b/var/spack/repos/builtin/packages/fimpute/package.py
new file mode 100644
index 0000000000..bc18419923
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fimpute/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fimpute(Package):
+ """FImpute uses an overlapping sliding window approach to efficiently
+ exploit relationships or haplotype similarities between target and
+ reference individuals."""
+
+ homepage = "http://www.aps.uoguelph.ca/~msargol/fimpute/"
+ url = "http://www.aps.uoguelph.ca/~msargol/fimpute/FImpute_Linux.zip"
+
+ version('2014-01', 'df934a25c76dabef7d7afcb5b8058d98')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('FImpute', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/flecsale/package.py b/var/spack/repos/builtin/packages/flecsale/package.py
index b22c553d2a..828ff47d2f 100644
--- a/var/spack/repos/builtin/packages/flecsale/package.py
+++ b/var/spack/repos/builtin/packages/flecsale/package.py
@@ -33,7 +33,6 @@ class Flecsale(CMakePackage):
version('develop', git='https://github.com/laristra/flecsale', branch='master', submodules=True)
- variant('debug', default=False, description='Build debug version')
variant('mpi', default=True,
description='Build on top of mpi conduit for mpi inoperability')
@@ -43,13 +42,6 @@ class Flecsale(CMakePackage):
depends_on("python")
depends_on("openssl")
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = [
'-DENABLE_UNIT_TESTS=ON'
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py
index 5c0f51b2d1..3b079565cb 100644
--- a/var/spack/repos/builtin/packages/flecsi/package.py
+++ b/var/spack/repos/builtin/packages/flecsi/package.py
@@ -41,7 +41,6 @@ class Flecsi(CMakePackage):
version('develop', git='https://github.com/laristra/flecsi', branch='master', submodules=True)
- variant('debug', default=False, description='Build debug version')
variant('mpi', default=True,
description='Build on top of mpi conduit for mpi inoperability')
@@ -49,13 +48,6 @@ class Flecsi(CMakePackage):
depends_on("legion+shared", when='~mpi')
depends_on("legion+shared+mpi", when='+mpi')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = ['-DENABLE_UNIT_TESTS=ON']
diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py
new file mode 100644
index 0000000000..eea62f2a6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fmt/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fmt(CMakePackage):
+ """fmt (formerly cppformat) is an open-source formatting library.
+ It can be used as a safe alternative to printf or as a fast alternative
+ to C++ IOStreams."""
+
+ homepage = "http://fmtlib.net/latest/index.html"
+ url = "https://github.com/fmtlib/fmt/releases/download/4.0.0/fmt-4.0.0.zip"
+
+ version('4.0.0', '605b5abee11b83195191234f4f414cf1')
+ version('3.0.2', 'b190a7b8f2a5e522ee70cf339a53d3b2')
+ version('3.0.1', '14505463b838befe1513b09cae112715')
+ version('3.0.0', 'c099561e70fa194bb03b3fd5de2d3fd0')
+
+ depends_on('cmake@2.8.12:', type='build')
+
+ def cmake_args(self):
+ return [
+ '-DCMAKE_C_FLAGS={0}'.format(self.compiler.pic_flag),
+ '-DCMAKE_CXX_FLAGS={0}'.format(self.compiler.pic_flag),
+ ]
diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py
index a6776b182f..9e4a6c4d0b 100644
--- a/var/spack/repos/builtin/packages/foam-extend/package.py
+++ b/var/spack/repos/builtin/packages/foam-extend/package.py
@@ -143,7 +143,6 @@ class FoamExtend(Package):
run_env.set('WM_PROJECT_DIR', self.projectdir)
for d in ['wmake', self.archbin]: # bin already added automatically
run_env.prepend_path('PATH', join_path(self.projectdir, d))
- run_env.set('MPI_BUFFER_SIZE', "20000000")
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""Provide location of the OpenFOAM project.
diff --git a/var/spack/repos/builtin/packages/folly/package.py b/var/spack/repos/builtin/packages/folly/package.py
index 13b03de39b..1be879ee80 100644
--- a/var/spack/repos/builtin/packages/folly/package.py
+++ b/var/spack/repos/builtin/packages/folly/package.py
@@ -40,6 +40,11 @@ class Folly(AutotoolsPackage):
url = "https://github.com/facebook/folly/archive/v2017.06.05.00.tar.gz"
version('2017.06.05.00', 'a25e8d646702c3e0c1400f591e485a33')
+ version('2016.11.14.00', '88550acdb4d4b331c0ca9922039c8727')
+ version('2016.11.07.00', '2f605b20ad539bccdbfd361daa92081e')
+ version('2016.10.31.00', 'ab3049302792f8470cef64f3a29eedec')
+ version('2016.10.24.00', '0445efb7c16b5c32dfbb173157e54866')
+ version('2016.10.17.00', 'b7e01934a45c5036fab8fdc70e9eaf4d')
depends_on('m4', type='build')
depends_on('autoconf', type='build')
diff --git a/var/spack/repos/builtin/packages/freebayes/package.py b/var/spack/repos/builtin/packages/freebayes/package.py
new file mode 100644
index 0000000000..9fb7fd1161
--- /dev/null
+++ b/var/spack/repos/builtin/packages/freebayes/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Freebayes(MakefilePackage):
+ """Bayesian haplotype-based genetic polymorphism discovery and
+ genotyping."""
+
+ homepage = "https://github.com/ekg/freebayes"
+
+ version('1.1.0', git='https://github.com/ekg/freebayes.git',
+ commit='39e5e4bcb801556141f2da36aba1df5c5c60701f',
+ submodules=True)
+
+ depends_on('cmake', type='build')
+ depends_on('zlib')
+
+ parallel = False
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('Makefile')
+ b = prefix.bin
+ makefile.filter('cp bin/freebayes bin/bamleftalign /usr/local/bin/',
+ 'cp bin/freebayes bin/bamleftalign {0}'.format(b))
+
+ @run_before('install')
+ def make_prefix_dot_bin(self):
+ mkdir(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/fseq/package.py b/var/spack/repos/builtin/packages/fseq/package.py
new file mode 100644
index 0000000000..71f450ec42
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fseq/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Fseq(Package):
+ """F-Seq: A Feature Density Estimator for High-Throughput Sequence Tags"""
+
+ homepage = "http://fureylab.web.unc.edu/software/fseq/"
+ url = "http://fureylab.med.unc.edu/fseq/fseq_1.84.tgz"
+
+ version('1.84', 'f9124ad0f45c60f3a7eb74dde8c945b9')
+
+ depends_on('java', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
+ install_tree('lib', prefix.lib)
+ install('mapviewToBed.pl', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/gapcloser/package.py b/var/spack/repos/builtin/packages/gapcloser/package.py
new file mode 100644
index 0000000000..4505234756
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gapcloser/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Gapcloser(Package):
+ """The GapCloser is designed to close the gaps emerging during the
+ scaffolding process"""
+
+ homepage = "https://sourceforge.net/projects/soapdenovo2/files/GapCloser/"
+ url = "https://downloads.sourceforge.net/project/soapdenovo2/GapCloser/bin/r6/GapCloser-bin-v1.12-r6.tgz"
+
+ version('1.12-r6', '42b4e4256bdc9f9f31a391a359256209')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('GapCloser', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/gapfiller/package.py b/var/spack/repos/builtin/packages/gapfiller/package.py
new file mode 100644
index 0000000000..766c51d42d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gapfiller/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Gapfiller(Package):
+ """GapFiller is a stand-alone program for closing gaps within
+ pre-assembled scaffolds.
+
+ Note: A manual download is required for GapFiller.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.baseclear.com/genomics/bioinformatics/basetools/gapfiller"
+
+ version('1.10', '54d5e2ada131a1305a66e41c0d380382')
+
+ def url_for_version(self, version):
+ return "file://{0}/39GapFiller_v{1}_linux-x86_64.tar.gz".format(
+ os.getcwd(), version.dashed)
+
+ depends_on('perl', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ install_tree('bowtie', prefix.bowtie)
+ install_tree('bwa', prefix.bwa)
+ install('GapFiller.pl', prefix)
diff --git a/var/spack/repos/builtin/packages/gaussian/package.py b/var/spack/repos/builtin/packages/gaussian/package.py
new file mode 100644
index 0000000000..d2fcee438f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gaussian/package.py
@@ -0,0 +1,71 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+import shutil
+
+
+class Gaussian(Package):
+ """Gaussian is a computer program for computational chemistry"""
+
+ homepage = "http://www.gaussian.com/"
+ url = "file://{0}/g09.tgz".format(os.getcwd())
+
+ version('09', '7d4c95b535e68e48af183920df427e4e')
+
+ def install(self, spec, prefix):
+ shutil.copytree(os.getcwd(), prefix.bin)
+ patch_install_files = ['flc',
+ 'linda8.2/opteron-linux/bin/flc',
+ 'linda8.2/opteron-linux/bin/LindaLauncher',
+ 'linda8.2/opteron-linux/bin/ntsnet',
+ 'linda8.2/opteron-linux/bin/pmbuild',
+ 'linda8.2/opteron-linux/bin/vntsnet',
+ 'ntsnet'
+ ]
+ for filename in patch_install_files:
+ if os.path.isfile(filename):
+ filter_file('/mf/frisch/g09', prefix.bin, join_path(prefix.bin,
+ filename), string='True')
+ patch_install_files = ['linda8.2/opteron-linux/bin/ntsnet',
+ 'linda8.2/opteron-linux/bin/vntsnet',
+ ]
+ for filename in patch_install_files:
+ if os.path.isfile(filename):
+ filter_file('/usr/bin/linda', prefix.bin, join_path(prefix.bin,
+ filename), string='True')
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('g09root', self.prefix)
+ run_env.set('GAUSSIANHOME', self.prefix)
+ run_env.set('GAUSS_EXEDIR', self.prefix.bin)
+ run_env.set('G09_BASIS', join_path(self.prefix.bin, 'basis'))
+ run_env.set('GAUSS_LEXEDIR', join_path(self.prefix.bin,
+ 'linda-exe'))
+ run_env.set('GAUSS_ARCHDIR', join_path(self.prefix.bin, 'arch'))
+ run_env.set('GAUSS_BSDDIR', join_path(self.prefix.bin, 'bsd'))
+ run_env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix.bin,
+ 'linda8.2/opteron-linux/lib'))
+ run_env.prepend_path('LD_LIBRARY_PATH', self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/gblocks/package.py b/var/spack/repos/builtin/packages/gblocks/package.py
new file mode 100644
index 0000000000..a03fc81509
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gblocks/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Gblocks(Package):
+ """Gblocks is a computer program written in ANSI C language that eliminates
+ poorly aligned positions and divergent regions of an alignment of DNA or
+ protein sequences"""
+
+ homepage = "http://molevol.cmima.csic.es/castresana/Gblocks.html"
+ url = "http://molevol.cmima.csic.es/castresana/Gblocks/Gblocks_Linux64_0.91b.tar.Z"
+
+ version('0.91b', 'c2c752ae4cbfda0b8bf09e6662585252')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('Gblocks', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 7fa9b81dde..aef1158971 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -40,7 +40,9 @@ class Gcc(AutotoolsPackage):
list_url = 'http://ftp.gnu.org/gnu/gcc/'
list_depth = 1
+ version('7.2.0', 'ff370482573133a7fcdd96cd2f552292')
version('7.1.0', '6bf56a2bca9dac9dbbf8e8d1036964a8')
+ version('6.4.0', '11ba51a0cfb8471927f387c8895fe232')
version('6.3.0', '677a7623c7ef6ab99881bc4e048debb6')
version('6.2.0', '9768625159663b300ae4de2f4745fcc4')
version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1')
@@ -68,11 +70,14 @@ class Gcc(AutotoolsPackage):
multi=True,
description='Compilers and runtime libraries to build')
variant('binutils',
- default=sys.platform != 'darwin',
+ default=False,
description='Build via binutils')
variant('piclibs',
default=False,
description='Build PIC versions of libgfortran.a and libstdc++.a')
+ variant('strip',
+ default=False,
+ description='Strip executables to reduce installation size')
# https://gcc.gnu.org/install/prerequisites.html
depends_on('gmp@4.3.2:')
@@ -153,6 +158,15 @@ class Gcc(AutotoolsPackage):
build_directory = 'spack-build'
+ def url_for_version(self, version):
+ url = 'http://ftp.gnu.org/gnu/gcc/gcc-{0}/gcc-{0}.tar.{1}'
+ suffix = 'xz'
+
+ if version < Version('6.4.0') or version == Version('7.1.0'):
+ suffix = 'bz2'
+
+ return url.format(version, suffix)
+
def patch(self):
spec = self.spec
prefix = self.spec.prefix
@@ -237,6 +251,12 @@ class Gcc(AutotoolsPackage):
return []
@property
+ def install_targets(self):
+ if '+strip' in self.spec:
+ return ['install-strip']
+ return ['install']
+
+ @property
def spec_dir(self):
# e.g. lib/gcc/x86_64-unknown-linux-gnu/4.9.2
spec_dir = glob.glob('{0}/gcc/*/*'.format(self.prefix.lib))
diff --git a/var/spack/repos/builtin/packages/gdbm/package.py b/var/spack/repos/builtin/packages/gdbm/package.py
index 488ca4702b..fea4aa4b15 100644
--- a/var/spack/repos/builtin/packages/gdbm/package.py
+++ b/var/spack/repos/builtin/packages/gdbm/package.py
@@ -33,7 +33,7 @@ class Gdbm(AutotoolsPackage):
manipulate a hashed database."""
homepage = "http://www.gnu.org.ua/software/gdbm/gdbm.html"
- url = "ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.13.tar.gz"
+ url = "http://ftp.gnu.org/gnu/gdbm/gdbm-1.13.tar.gz"
version('1.13', '8929dcda2a8de3fd2367bdbf66769376')
version('1.12', '9ce96ff4c99e74295ea19040931c8fb9')
diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py
index cb04d67481..95d3eb9d55 100644
--- a/var/spack/repos/builtin/packages/geant4/package.py
+++ b/var/spack/repos/builtin/packages/geant4/package.py
@@ -41,7 +41,6 @@ class Geant4(CMakePackage):
version('10.01.p03', '4fb4175cc0dabcd517443fbdccd97439')
variant('qt', default=True, description='Enable Qt support')
- variant('debug', default=False, description='Build debug version')
depends_on('cmake@3.5:', type='build')
@@ -54,13 +53,6 @@ class Geant4(CMakePackage):
depends_on("xerces-c")
depends_on("qt@4.8:", when="+qt")
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/gearshifft/package.py b/var/spack/repos/builtin/packages/gearshifft/package.py
new file mode 100644
index 0000000000..b68be4a7db
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gearshifft/package.py
@@ -0,0 +1,74 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Gearshifft(CMakePackage):
+ """Benchmark Suite for Heterogenuous FFT Implementations"""
+
+ homepage = "https://github.com/mpicbg-scicomp/gearshifft"
+ url = "https://github.com/mpicbg-scicomp/gearshifft/archive/v0.2.0.tar.gz"
+
+ version('0.2.1-lw', 'c3208b767b24255b488a83e5d9e517ea')
+
+ variant('cufft', default=True,
+ description='Compile gearshifft_cufft')
+ # variant('clfft', default=True,
+ # description='Compile gearshifft_clfft')
+ variant('fftw', default=True,
+ description='Compile gearshifft_fftw')
+ variant('openmp', default=True,
+ description='use OpenMP parallel fftw libraries')
+ # variant('hcfft', default=True,
+ # description='Not implemented yet')
+
+ # depends_on C++14 compiler, e.g. GCC 5.0+
+ depends_on('cmake@2.8.0:', type='build')
+ depends_on('boost@1.56.0:')
+ depends_on('cuda@8.0:', when='+cufft')
+ # depends_on('opencl@1.2:', when='+clfft')
+ # depends_on('clfft@2.12.0:', when='+clfft')
+ depends_on('fftw@3.3.4:~mpi~openmp', when='+fftw~openmp')
+ depends_on('fftw@3.3.4:~mpi+openmp', when='+fftw+openmp')
+
+ def cmake_args(self):
+ spec = self.spec
+
+ args = [
+ '-DGEARSHIFFT_HCFFT:BOOL=OFF',
+ '-DGEARSHIFFT_FFTW_PTHREADS:BOOL=ON',
+ '-DGEARSHIFFT_CLFFT:BOOL=OFF'
+ ]
+ args.extend([
+ '-DGEARSHIFFT_FFTW:BOOL={0}'.format((
+ 'ON' if '+fftw' in spec else 'OFF')),
+ '-DGEARSHIFFT_FFTW_OPENMP:BOOL={0}'.format((
+ 'ON' if '+openmp' in spec else 'OFF')),
+ '-DGEARSHIFFT_CUFFT:BOOL={0}'.format((
+ 'ON' if '+cufft' in spec else 'OFF'))
+ # '-DGEARSHIFFT_CLFFT:BOOL={0}'.format((
+ # 'ON' if '+clfft' in spec else 'OFF'))
+ ])
+ return args
diff --git a/var/spack/repos/builtin/packages/genemark-et/package.py b/var/spack/repos/builtin/packages/genemark-et/package.py
new file mode 100644
index 0000000000..352f728290
--- /dev/null
+++ b/var/spack/repos/builtin/packages/genemark-et/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+import glob
+
+
+class GenemarkEt(Package):
+ """Gene Prediction in Bacteria, archaea, Metagenomes and
+ Metatranscriptomes."""
+
+ homepage = "http://topaz.gatech.edu/GeneMark"
+
+ version('4.33', '4ab7d7d3277a685dfb49e11bc5b493c3')
+
+ depends_on('perl', type=('build', 'run'))
+
+ def url_for_version(self, version):
+ return "file://{0}/gm_et_linux_64.tar.gz".format(os.getcwd())
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir('gmes_petap'):
+ install_tree('lib', prefix.lib)
+ files = glob.iglob('*')
+ for file in files:
+ if os.path.isfile(file):
+ install(file, prefix.bin)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PERL5LIB', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/genometools/package.py b/var/spack/repos/builtin/packages/genometools/package.py
new file mode 100644
index 0000000000..afb45bdd84
--- /dev/null
+++ b/var/spack/repos/builtin/packages/genometools/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#############################################################################
+from spack import *
+
+
+class Genometools(MakefilePackage):
+ """genometools is a free collection of bioinformatics tools (in the realm
+ of genome informatics) combined into a single binary named gt."""
+
+ homepage = "http://genometools.org/"
+ url = "http://genometools.org/pub/genometools-1.5.9.tar.gz"
+
+ version('1.5.9', 'e400d69092f9f13db09b33f9dea39d2e')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('cairo')
+ depends_on('pango')
+
+ # build fails with gcc 7"
+ conflicts('%gcc@7.1.0:')
+
+ def install(self, spec, prefix):
+ make('install', 'prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py
index 57a01f8c78..b96ee7a706 100644
--- a/var/spack/repos/builtin/packages/gflags/package.py
+++ b/var/spack/repos/builtin/packages/gflags/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Gflags(Package):
+class Gflags(CMakePackage):
"""The gflags package contains a C++ library that implements
commandline flags processing. It includes built-in support for
standard types such as string and the ability to define flags
@@ -37,11 +37,7 @@ class Gflags(Package):
version('2.1.2', 'ac432de923f9de1e9780b5254884599f')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8.12:', type='build')
- def install(self, spec, prefix):
- cmake("-DCMAKE_INSTALL_PREFIX=" + prefix,
- "-DBUILD_SHARED_LIBS=ON")
- make()
- make("test")
- make("install")
+ def cmake_args(self):
+ return ['-DBUILD_SHARED_LIBS=ON']
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index f01cc37d7b..9dc9e460af 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -155,7 +155,7 @@ class Git(AutotoolsPackage):
depends_on('m4', type='build')
def setup_environment(self, spack_env, run_env):
- spack_env.set('LDFLAGS', '-L{0} -lintl'.format(
+ spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
self.spec['gettext'].prefix.lib))
def configure_args(self):
diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py
index 9825cbdb94..507c9606e3 100644
--- a/var/spack/repos/builtin/packages/glm/package.py
+++ b/var/spack/repos/builtin/packages/glm/package.py
@@ -25,11 +25,9 @@
from spack import *
-class Glm(Package):
+class Glm(CMakePackage):
"""OpenGL Mathematics (GLM) is a header only C++ mathematics library for
- graphics software based on the OpenGL Shading Language (GLSL)
- specification.
-
+ graphics software based on the OpenGL Shading Language (GLSL) specification
"""
homepage = "https://github.com/g-truc/glm"
@@ -37,10 +35,4 @@ class Glm(Package):
version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make("install")
+ depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py
index 5bb4fdb2aa..0c215a4e82 100644
--- a/var/spack/repos/builtin/packages/gmake/package.py
+++ b/var/spack/repos/builtin/packages/gmake/package.py
@@ -25,18 +25,33 @@
from spack import *
-class Gmake(Package):
- """GNU Make."""
+class Gmake(AutotoolsPackage):
+ """GNU Make is a tool which controls the generation of executables and
+ other non-source files of a program from the program's source files."""
- homepage = "http://gnu.org/gnu/make"
- url = "https://ftp.gnu.org/gnu/make/make-4.0.tar.gz"
+ homepage = "https://www.gnu.org/software/make/"
+ url = "https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz"
- version('4.0', 'b5e558f981326d9ca1bfdb841640721a')
+ version('4.2.1', '7d0dcb6c474b258aab4d54098f2cf5a7')
+ version('4.0', 'b5e558f981326d9ca1bfdb841640721a')
- def install(self, spec, prefix):
- configure('--prefix={0}'.format(prefix))
+ variant('guile', default=False, description='Support GNU Guile for embedded scripting')
- make()
- make('install')
- with working_dir(prefix.bin):
+ depends_on('guile', when='+guile')
+
+ build_directory = 'spack-build'
+
+ def configure_args(self):
+ args = []
+
+ if '+guile' in self.spec:
+ args.append('--with-guile')
+ else:
+ args.append('--without-guile')
+
+ return args
+
+ @run_after('install')
+ def symlink_gmake(self):
+ with working_dir(self.prefix.bin):
symlink('make', 'gmake')
diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py
index 3c9eff5619..977bf6c3d6 100644
--- a/var/spack/repos/builtin/packages/gmsh/package.py
+++ b/var/spack/repos/builtin/packages/gmsh/package.py
@@ -46,8 +46,6 @@ class Gmsh(CMakePackage):
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds the library in debug mode')
variant('mpi', default=True,
description='Builds MPI support for parser and solver')
variant('fltk', default=False,
@@ -128,9 +126,6 @@ class Gmsh(CMakePackage):
# Builds and installs static library
options.append('-DENABLE_BUILD_LIB:BOOL=ON')
- if '+debug' in spec:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
-
if '+mpi' in spec:
options.append('-DENABLE_MPI:BOOL=ON')
diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py
index 7a35308616..74cdbf348d 100644
--- a/var/spack/repos/builtin/packages/go-bootstrap/package.py
+++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py
@@ -46,10 +46,12 @@ class GoBootstrap(Package):
# See: https://golang.org/doc/install/source#go14 and
# https://github.com/golang/go/issues/17545 and
# https://github.com/golang/go/issues/16352
+ version('1.4-bootstrap-20170531', 'd2cc61cb9f829b3510ee39c0c5568014',
+ url='https://storage.googleapis.com/golang/go1.4-bootstrap-20170531.tar.gz')
version('1.4-bootstrap-20161024', '76e42c8152e8560ded880a6d1d1f53cb',
url='https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz')
- provides('golang@:1.4-bootstrap-20161024')
+ provides('golang@:1.4-bootstrap-20170531')
depends_on('git', type=('build', 'link', 'run'))
@@ -65,10 +67,6 @@ class GoBootstrap(Package):
r'# \1\2\3',
)
- @when('@1.5.0:') # noqa: F811
- def patch(self):
- pass
-
def install(self, spec, prefix):
env['CGO_ENABLED'] = '0'
bash = which('bash')
diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py
index 9d6ea49dd8..77f6470693 100644
--- a/var/spack/repos/builtin/packages/go/package.py
+++ b/var/spack/repos/builtin/packages/go/package.py
@@ -56,6 +56,8 @@ class Go(Package):
extendable = True
+ version('1.9', 'da2d44ea384076efec43ee1f8b7d45d2')
+ version('1.8.3', '64e9380e07bba907e26a00cf5fcbe77e')
version('1.8.1', '409dd21e7347dd1ea9efe64a700073cc')
version('1.8', '7743960c968760437b6e39093cfe6f67')
version('1.7.5', '506de2d870409e9003e1440bcfeb3a65')
@@ -105,6 +107,10 @@ class Go(Package):
def setup_environment(self, spack_env, run_env):
spack_env.set('GOROOT_FINAL', self.spec.prefix)
+ # We need to set CC/CXX_FOR_TARGET, otherwise cgo will use the
+ # internal Spack wrappers and fail.
+ spack_env.set('CC_FOR_TARGET', self.compiler.cc)
+ spack_env.set('CXX_FOR_TARGET', self.compiler.cxx)
def setup_dependent_package(self, module, dependent_spec):
"""Called before go modules' install() methods.
diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py
index 44078d059e..26e5da3d56 100644
--- a/var/spack/repos/builtin/packages/gobject-introspection/package.py
+++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py
@@ -46,6 +46,9 @@ class GobjectIntrospection(Package):
depends_on("flex", type="build")
depends_on("pkg-config@0.9.0:", type="build")
+ # GobjectIntrospection does not build with sed from darwin:
+ depends_on('sed', when='platform=darwin', type='build')
+
# This package creates several scripts from
# toosl/g-ir-tool-template.in. In their original form these
# scripts end up with a sbang line like
diff --git a/var/spack/repos/builtin/packages/gradle/package.py b/var/spack/repos/builtin/packages/gradle/package.py
index d39ba5e685..1eef10463e 100644
--- a/var/spack/repos/builtin/packages/gradle/package.py
+++ b/var/spack/repos/builtin/packages/gradle/package.py
@@ -77,7 +77,7 @@ class Gradle(Package):
version('0.8', '73a0ed51b6ec00a7d3a9d242d51aae60')
version('0.7', 'a8417dbbd62f7013002cb55a44f12cc3')
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py
index 0ed50001f6..5d4582c365 100644
--- a/var/spack/repos/builtin/packages/graphlib/package.py
+++ b/var/spack/repos/builtin/packages/graphlib/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Graphlib(Package):
+class Graphlib(CMakePackage):
"""Library to create, manipulate, and export graphs Graphlib."""
homepage = "https://github.com/LLNL/graphlib"
url = "https://github.com/LLNL/graphlib/archive/v2.0.0.tar.gz"
@@ -33,10 +33,4 @@ class Graphlib(Package):
version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70')
version('3.0.0', '625d199f97ab1b84cbc8daabcaee5e2a')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake(".", *std_cmake_args)
-
- make()
- make("install")
+ depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/graphmap/package.py b/var/spack/repos/builtin/packages/graphmap/package.py
new file mode 100644
index 0000000000..954fc7622a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/graphmap/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Graphmap(MakefilePackage):
+ """A highly sensitive and accurate mapper for long, error-prone reads"""
+
+ homepage = "https://github.com/isovic/graphmap"
+ url = "https://github.com/isovic/graphmap/archive/v0.3.0.tar.gz"
+
+ version('0.3.0', git='https://github.com/isovic/graphmap.git', commit='eb8c75d68b03be95464318afa69b645a59f8f6b7')
+
+ def edit(self, spec, prefix):
+ mkdirp(prefix.bin)
+ makefile = FileFilter('Makefile')
+ makefile.filter('/usr/bin/graphmap', prefix.bin.graphmap)
+
+ def build(self, spec, prefix):
+ make('modules')
+ make()
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 9efbc85789..2f39c8ce1f 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -104,7 +104,7 @@ class Graphviz(AutotoolsPackage):
depends_on('libtool')
depends_on('pkg-config', type='build')
- depends_on('jdk', when='+java')
+ depends_on('java', when='+java')
depends_on('python@2:2.8', when='+python')
def patch(self):
diff --git a/var/spack/repos/builtin/packages/grib-api/package.py b/var/spack/repos/builtin/packages/grib-api/package.py
index 9597964c94..d3f971d737 100644
--- a/var/spack/repos/builtin/packages/grib-api/package.py
+++ b/var/spack/repos/builtin/packages/grib-api/package.py
@@ -25,7 +25,7 @@
from spack import *
-class GribApi(Package):
+class GribApi(CMakePackage):
"""The ECMWF GRIB API is an application program interface accessible from
C, FORTRAN and Python programs developed for encoding and decoding WMO
FM-92 GRIB edition 1 and edition 2 messages."""
@@ -40,42 +40,41 @@ class GribApi(Package):
variant('netcdf', default=False, description='Enable netcdf encoding/decoding using netcdf library')
variant('jpeg', default=True, description='Enable jpeg 2000 for grib 2 decoding/encoding')
variant('png', default=False, description='Enable png for decoding/encoding')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'Production'))
- depends_on('cmake', type='build')
depends_on('libpng', when='+png')
depends_on('netcdf', when='+netcdf')
depends_on('jasper', when='+jpeg')
+ depends_on('cmake@2.8.11:', type='build')
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
- options.append('-DBUILD_SHARED_LIBS=BOTH')
+ def cmake_args(self):
+ spec = self.spec
+ args = ['-DBUILD_SHARED_LIBS=BOTH']
# We will add python support later.
- options.append('-DENABLE_PYTHON=OFF')
+ args.append('-DENABLE_PYTHON=OFF')
# Disable FORTRAN interface if we don't have it.
if (self.compiler.f77 is None) or (self.compiler.fc is None):
- options.append('-DENABLE_FORTRAN=OFF')
+ args.append('-DENABLE_FORTRAN=OFF')
if '+netcdf' in spec:
- options.append('-DENABLE_NETCDF=ON')
- options.append('-DNETCDF_PATH=%s' % spec['netcdf'].prefix)
+ args.append('-DENABLE_NETCDF=ON')
+ args.append('-DNETCDF_PATH=%s' % spec['netcdf'].prefix)
else:
- options.append('-DENABLE_NETCDF=OFF')
+ args.append('-DENABLE_NETCDF=OFF')
if '+jpeg' in spec:
- options.append('-DENABLE_JPG=ON')
- options.append('-DJASPER_PATH=%s' % spec['jasper'].prefix)
+ args.append('-DENABLE_JPG=ON')
+ args.append('-DJASPER_PATH=%s' % spec['jasper'].prefix)
else:
- options.append('-DENABLE_JPG=OFF')
+ args.append('-DENABLE_JPG=OFF')
if '+png' in spec:
- options.append('-DENABLE_PNG=ON')
+ args.append('-DENABLE_PNG=ON')
else:
- options.append('-DENABLE_PNG=OFF')
+ args.append('-DENABLE_PNG=OFF')
- with working_dir('spack-build', create=True):
- cmake('..', *options)
- make()
- make('install')
+ return args
diff --git a/var/spack/repos/builtin/packages/groff/gropdf.patch b/var/spack/repos/builtin/packages/groff/gropdf.patch
new file mode 100644
index 0000000000..9044c64aa3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/groff/gropdf.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index bc156ce..70c6f85 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -896,6 +896,8 @@ $(GNULIBDIRS): FORCE
+ $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \
+ esac
+
++$(SHPROGDIRS): $(PROGDEPDIRS)
++
+ $(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS) $(SHPROGDIRS)
+
+ $(INCDIRS) $(PROGDEPDIRS) $(SHPROGDIRS) $(OTHERDIRS): FORCE
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py
new file mode 100644
index 0000000000..1cef3040e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/groff/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Groff(AutotoolsPackage):
+ """Groff (GNU troff) is a typesetting system that reads
+ plain text mixed with formatting commands and produces
+ formatted output. Output may be PostScript or PDF, html, or
+ ASCII/UTF8 for display at the terminal."""
+
+ homepage = "https://www.gnu.org/software/groff/"
+ url = "http://ftp.gnu.org/gnu/groff/groff-1.22.3.tar.gz"
+
+ # TODO: add html variant, spack doesn't have netpbm and its too
+ # complicated for me to find out at this point in time.
+ # See brew scripts for groff for guidance:
+ # https://github.com/Homebrew/homebrew-core/blob/master/Formula/groff.rb
+ # Seems troublesome...netpbm requires groff?
+ variant('pdf', default=True, description='Build the `gropdf` executable.')
+
+ depends_on('gawk', type='build')
+ depends_on('gmake', type='build')
+ depends_on('sed', type='build')
+ depends_on('ghostscript', when='+pdf')
+
+ version('1.22.3', 'cc825fa64bc7306a885f2fb2268d3ec5')
+
+ # https://savannah.gnu.org/bugs/index.php?43581
+ # TODO: figure out why this patch does not actually work for parallel
+ # builds reliably.
+ # patch('gropdf.patch')
+ parallel = False
+
+ def configure_args(self):
+ args = [
+ "--without-x"
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index 97fd569d1f..ae17193139 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -48,12 +48,15 @@ class Gromacs(CMakePackage):
variant('mpi', default=True, description='Activate MPI support')
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False, description='Enables debug mode')
variant(
'double', default=False,
description='Produces a double precision version of the executables')
variant('plumed', default=False, description='Enable PLUMED support')
variant('cuda', default=False, description='Enable CUDA support')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel',
+ 'Reference', 'RelWithAssert', 'Profile'))
depends_on('mpi', when='+mpi')
depends_on('plumed+mpi', when='+plumed+mpi')
@@ -79,11 +82,6 @@ class Gromacs(CMakePackage):
if '~shared' in self.spec:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
- if '+debug' in self.spec:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
- else:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
-
if '+cuda' in self.spec:
options.append('-DGMX_GPU:BOOL=ON')
options.append('-DCUDA_TOOLKIT_ROOT_DIR:STRING=' +
diff --git a/var/spack/repos/builtin/packages/gtkorvo-atl/package.py b/var/spack/repos/builtin/packages/gtkorvo-atl/package.py
new file mode 100644
index 0000000000..2dc96ca1f1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gtkorvo-atl/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class GtkorvoAtl(CMakePackage):
+ """Libatl provides a library for the creation and manipulation of
+ lists of name/value pairs using an efficient binary representation.
+ """
+
+ homepage = "https://github.com/GTkorvo/atl"
+ url = "https://github.com/GTkorvo/atl/archive/v2.1.tar.gz"
+
+ version('develop', git='https://github.com/GTkorvo/atl.git',
+ branch='master')
+ version('2.1', 'b2324ff041bccba127330a0e1b241978')
+
+ depends_on('gtkorvo-cercs-env')
+
+ def cmake_args(self):
+ args = ["-DENABLE_TESTING=0", "-DENABLE_BUILD_STATIC=STATIC"]
+ return args
diff --git a/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py b/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py
new file mode 100644
index 0000000000..1287c1f91d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gtkorvo-cercs-env/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class GtkorvoCercsEnv(CMakePackage):
+ """A utility library used by some GTkorvo packages.
+ """
+
+ homepage = "https://github.com/GTkorvo/cercs_env"
+ url = "https://github.com/GTkorvo/cercs_env/archive/v1.0.tar.gz"
+
+ version('develop', git='https://github.com/GTkorvo/cercs_env.git',
+ branch='master')
+ version('1.0', '08f0532d0c2f7bc9b53dfa7a1c40ea4d')
+
+ def cmake_args(self):
+ args = ["-DENABLE_TESTING=0", "-DENABLE_SHARED_STATIC=STATIC"]
+ return args
diff --git a/var/spack/repos/builtin/packages/gtkorvo-dill/package.py b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py
new file mode 100644
index 0000000000..f32539e43e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class GtkorvoDill(CMakePackage):
+ """DILL provides instruction-level code generation,
+ register allocation and simple optimizations for generating
+ executable code directly into memory regions for immediate use.
+ """
+
+ homepage = "https://github.com/GTkorvo/dill"
+ url = "https://github.com/GTkorvo/dill/archive/v2.1.tar.gz"
+
+ version('develop', git='https://github.com/GTkorvo/dill.git',
+ branch='master')
+ version('2.1', '14c835e79b66c9acd2beee01d56e6200')
+
+ def cmake_args(self):
+ args = ["-DENABLE_TESTING=0", "-DBUILD_SHARED_STATIC=STATIC"]
+ return args
diff --git a/var/spack/repos/builtin/packages/gtkorvo-enet/package.py b/var/spack/repos/builtin/packages/gtkorvo-enet/package.py
new file mode 100644
index 0000000000..5c63a5ab23
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gtkorvo-enet/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class GtkorvoEnet(AutotoolsPackage):
+ """ENet reliable UDP networking library.
+ This is a downstream branch of lsalzman's ENet.
+ This version has expanded the client ID to handle more clients.
+ The original is at http://github.com/lsalzman/enet.
+ """
+
+ homepage = "http://www.github.com/GTkorvo/enet"
+ url = "https://github.com/GTkorvo/enet/archive/v1.3.13.tar.gz"
+
+ version('1.3.13', '3490f924a4d421e4832e45850e6ec142')
diff --git a/var/spack/repos/builtin/packages/h5z-zfp/package.py b/var/spack/repos/builtin/packages/h5z-zfp/package.py
index 0063c2fd37..ddb03c64e0 100644
--- a/var/spack/repos/builtin/packages/h5z-zfp/package.py
+++ b/var/spack/repos/builtin/packages/h5z-zfp/package.py
@@ -38,8 +38,7 @@ class H5zZfp(MakefilePackage):
variant('fortran', default=True, description='Enable Fortran support')
depends_on('hdf5')
-# depends_on('zfp bsws=8')
- depends_on('zfp')
+ depends_on('zfp bsws=8')
@property
def make_defs(self):
diff --git a/var/spack/repos/builtin/packages/hadoop/package.py b/var/spack/repos/builtin/packages/hadoop/package.py
index 4981a0bb58..3aa632b9df 100644
--- a/var/spack/repos/builtin/packages/hadoop/package.py
+++ b/var/spack/repos/builtin/packages/hadoop/package.py
@@ -36,7 +36,7 @@ class Hadoop(Package):
version('2.6.4', '37019f13d7dcd819727be158440b9442')
- depends_on('jdk', type='run')
+ depends_on('java', type='run')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/hapcut2/package.py b/var/spack/repos/builtin/packages/hapcut2/package.py
new file mode 100644
index 0000000000..1e91d1d541
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hapcut2/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Hapcut2(MakefilePackage):
+ """HapCUT2 is a maximum-likelihood-based tool for assembling haplotypes
+ from DNA sequence reads, designed to 'just work' with excellent speed
+ and accuracy."""
+
+ homepage = "https://github.com/vibansal/HapCUT2"
+ url = "https://github.com/vibansal/HapCUT2"
+
+ version('2017-07-10', git='https://github.com/vibansal/HapCUT2.git',
+ commit='2966b94c2c2f97813b757d4999b7a6471df1160e', submodules=True)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir('build'):
+ install('extractFOSMID', prefix.bin)
+ install('extractHAIRS', prefix.bin)
+ install('HAPCUT2', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/haploview/haploview.sh b/var/spack/repos/builtin/packages/haploview/haploview.sh
new file mode 100644
index 0000000000..0f6c60139c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/haploview/haploview.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# convenience wrapper for the haploview.jar file
+java $JAVA_ARGS $JAVA_OPTS -jar haploview.jar "$@"
diff --git a/var/spack/repos/builtin/packages/haploview/package.py b/var/spack/repos/builtin/packages/haploview/package.py
new file mode 100644
index 0000000000..9ffe6898b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/haploview/package.py
@@ -0,0 +1,54 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os.path
+
+
+class Haploview(Package):
+ """Haploview is designed to simplify and expedite the process of haplotype
+ analysis."""
+
+ homepage = "http://www.broadinstitute.org/haploview/haploview"
+ url = "https://downloads.sourceforge.net/project/haploview/release/Haploview4.1.jar"
+
+ version('4.1', 'f7aa4accda5fad1be74c9c1969c6ee7d', expand=False)
+
+ depends_on('java', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ jar_file = 'Haploview{v}.jar'.format(v=self.version)
+ install(jar_file, prefix.bin)
+
+ script_sh = join_path(os.path.dirname(__file__), "haploview.sh")
+ script = prefix.bin.haploview
+ install(script_sh, script)
+ set_executable(script)
+
+ java = self.spec['java'].prefix.bin.java
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ filter_file('^java', java, script, **kwargs)
+ filter_file('haploview.jar', join_path(prefix.bin, jar_file),
+ script, **kwargs)
diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py
index 3944f91124..87309ed65e 100644
--- a/var/spack/repos/builtin/packages/hdf/package.py
+++ b/var/spack/repos/builtin/packages/hdf/package.py
@@ -25,15 +25,16 @@
from spack import *
-class Hdf(Package):
+class Hdf(AutotoolsPackage):
"""HDF4 (also known as HDF) is a library and multi-object
file format for storing and managing data between machines."""
- homepage = "https://www.hdfgroup.org/products/hdf4/"
- url = "https://www.hdfgroup.org/ftp/HDF/releases/HDF4.2.11/src/hdf-4.2.11.tar.gz"
- list_url = "https://www.hdfgroup.org/ftp/HDF/releases/"
- list_depth = 3
+ homepage = "https://support.hdfgroup.org/products/hdf4/"
+ url = "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.13/src/hdf-4.2.13.tar.gz"
+ list_url = "https://support.hdfgroup.org/ftp/HDF/releases"
+ list_depth = 2
+ version('4.2.13', 'a6aa950b3fce5162b96496d8ea0b82bf')
version('4.2.12', '79fd1454c899c05e34a3da0456ab0c1c')
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
@@ -46,10 +47,11 @@ class Hdf(Package):
depends_on('bison', type='build')
depends_on('flex', type='build')
- def install(self, spec, prefix):
+ def configure_args(self):
+ spec = self.spec
+
config_args = [
- 'CFLAGS=-fPIC',
- '--prefix={0}'.format(prefix),
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
'--with-jpeg={0}'.format(spec['jpeg'].prefix),
'--with-zlib={0}'.format(spec['zlib'].prefix),
'--disable-netcdf', # must be disabled to build NetCDF with HDF4
@@ -65,11 +67,4 @@ class Hdf(Package):
else:
config_args.append('--without-szlib')
- configure(*config_args)
-
- make()
-
- if self.run_tests:
- make('check')
-
- make('install')
+ return config_args
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
index 95d37cc02f..f8b1c5e363 100644
--- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -22,7 +22,6 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from __future__ import print_function
import os
import shutil
import sys
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 782b7c32cf..cf8f00d797 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -32,19 +32,16 @@ class Hdf5(AutotoolsPackage):
flexible and efficient I/O and for high volume and complex data.
"""
- homepage = "http://www.hdfgroup.org/HDF5/"
- url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz"
- list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
+ homepage = "https://support.hdfgroup.org/HDF5/"
+ url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1.tar.gz"
+ list_url = "https://support.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
version('1.10.1', '43a2f9466702fb1db31df98ae6677f15')
version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295')
version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199')
- version('1.8.18', 'dd2148b740713ca0295442ec683d7b1c',
- # The link for the latest version differs from the links for
- # the previous releases. Do not forget to remove this once
- # the version 1.8.18 is not the latest one for the 1.8.* branch.
- url='http://hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar.gz')
+ version('1.8.19', '7f568e2464d4ab0a74d16b23956d900b')
+ version('1.8.18', 'dd2148b740713ca0295442ec683d7b1c')
version('1.8.17', '7d572f8f3b798a628b8245af0391a0ca')
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618')
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
@@ -77,6 +74,10 @@ class Hdf5(AutotoolsPackage):
conflicts('+threadsafe', when='+cxx')
conflicts('+threadsafe', when='+fortran')
+ def url_for_version(self, version):
+ url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{0}/hdf5-{1}/src/hdf5-{1}.tar.gz"
+ return url.format(version.up_to(2), version)
+
@property
def libs(self):
"""HDF5 can be queried for the following parameters:
@@ -279,26 +280,3 @@ HDF5 version {version} {version}
print('-' * 80)
raise RuntimeError("HDF5 install check failed")
shutil.rmtree(checkdir)
-
- def url_for_version(self, version):
- # If we have a specific URL for this version, return it.
- version_urls = self.version_urls()
- if version in version_urls:
- return version_urls[version]
-
- base_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
-
- if version == Version("1.2.2"):
- return "{0}/hdf5-{1}.tar.gz".format(base_url, version)
- elif version < Version("1.6.6"):
- return "{0}/hdf5-{1}/hdf5-{2}.tar.gz".format(
- base_url, version.up_to(2), version)
- elif version < Version("1.7"):
- return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format(
- base_url, version.up_to(2), version)
- elif version < Version("1.10"):
- return "{0}/hdf5-{1}/src/hdf5-{1}.tar.gz".format(
- base_url, version)
- else:
- return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format(
- base_url, version.up_to(2), version)
diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py
index dfad9adb48..711daa88f8 100644
--- a/var/spack/repos/builtin/packages/hepmc/package.py
+++ b/var/spack/repos/builtin/packages/hepmc/package.py
@@ -26,7 +26,7 @@
from spack import *
-class Hepmc(Package):
+class Hepmc(CMakePackage):
"""The HepMC package is an object oriented, C++ event record for
High Energy Physics Monte Carlo generators and simulation."""
@@ -39,17 +39,10 @@ class Hepmc(Package):
version('2.06.06', '102e5503537a3ecd6ea6f466aa5bc4ae')
version('2.06.05', '2a4a2a945adf26474b8bdccf4f881d9c')
- depends_on("cmake", type='build')
+ depends_on('cmake@2.6:', type='build')
- def install(self, spec, prefix):
- build_directory = join_path(self.stage.path, 'spack-build')
- source_directory = self.stage.source_path
- options = [source_directory]
- options.append('-Dmomentum:STRING=GEV')
- options.append('-Dlength:STRING=MM')
- options.extend(std_cmake_args)
-
- with working_dir(build_directory, create=True):
- cmake(*options)
- make()
- make('install')
+ def cmake_args(self):
+ return [
+ '-Dmomentum:STRING=GEV',
+ '-Dlength:STRING=MM',
+ ]
diff --git a/var/spack/repos/builtin/packages/hpccg/package.py b/var/spack/repos/builtin/packages/hpccg/package.py
new file mode 100644
index 0000000000..7e9514ce0b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpccg/package.py
@@ -0,0 +1,77 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Hpccg(MakefilePackage):
+ """Proxy Application. Intended to be the 'best approximation
+ to an unstructured implicit finite element or finite volume
+ application in 800 lines or fewer.'
+ """
+
+ homepage = "https://mantevo.org/about/applications/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/HPCCG/HPCCG-1.0.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.0', '2e99da1a89de5ef0844da5e6ffbf39dc')
+
+ variant('mpi', default=True, description='Build with MPI support')
+ variant('openmp', default=True, description='Build with OpenMP support')
+
+ # Optional dependencies
+ depends_on('mpi', when='+mpi')
+
+ @property
+ def build_targets(self):
+ targets = []
+
+ if '+mpi' in self.spec:
+ targets.append('CXX={0}'.format(self.spec['mpi'].mpicxx))
+ targets.append('LINKER={0}'.format(self.spec['mpi'].mpicxx))
+ targets.append('USE_MPI=-DUSING_MPI')
+ else:
+ targets.append('CXX=c++')
+ targets.append('LINKER=c++')
+
+ if '+openmp' in self.spec:
+ targets.append('USE_OMP=-DUSING_OMP')
+ targets.append('OMP_FLAGS={0}'.format(self.compiler.openmp_flag))
+
+ # Remove Compiler Specific Optimization Flags
+ if '%gcc' not in self.spec:
+ targets.append('CPP_OPT_FLAGS=')
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('test_HPCCG', prefix.bin)
+ install('README', prefix.doc)
+ install('weakScalingRunScript', prefix.bin)
+ install('strongScalingRunScript', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py
new file mode 100644
index 0000000000..58644db11e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hpx/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2017, Los Alamos National Security, LLC
+# Produced at the Los Alamos National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Hpx(CMakePackage):
+ """C++ runtime system for parallel and distributed applications."""
+
+ homepage = "http://stellar.cct.lsu.edu/tag/hpx/"
+ url = "http://stellar.cct.lsu.edu/files/hpx_1.0.0.tar.gz"
+
+ version('1.0.0', '4983e7c6402417ec794d40343e36e417')
+
+ depends_on('boost@1.55.0:')
+ depends_on('hwloc@1.6:')
+
+ def cmake_args(self):
+ args = ['-DHPX_BUILD_EXAMPLES=OFF', '-DHPX_MALLOC=system']
+ return args
diff --git a/var/spack/repos/builtin/packages/hybpiper/package.py b/var/spack/repos/builtin/packages/hybpiper/package.py
new file mode 100644
index 0000000000..a9e49cef90
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hybpiper/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+import os
+
+
+class Hybpiper(Package):
+ """HybPiper was designed for targeted sequence capture, in which DNA
+ sequencing libraries are enriched for gene regions of interest,
+ especially for phylogenetics. HybPiper is a suite of Python scripts
+ that wrap and connect bioinformatics tools in order to extract target
+ sequences from high-throughput DNA sequencing reads"""
+
+ homepage = "https://github.com/mossmatters/HybPiper"
+ url = "https://github.com/mossmatters/HybPiper/archive/v1.2.0.tar.gz"
+
+ version('1.2.0', '0ad78e9ca5e3f23ae0eb6236b07e1780')
+
+ depends_on('python@2.7:', type=('build', 'run'))
+ depends_on('py-biopython', type=('build', 'run'))
+ depends_on('exonerate')
+ depends_on('blast-plus')
+ depends_on('spades')
+ depends_on('parallel')
+ depends_on('bwa')
+ depends_on('samtools')
+
+ def setup_envionment(self, spack_env, run_env):
+ run_env.set('HYBPIPER_HOME', prefix)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ files = glob.iglob("*.py")
+ for file in files:
+ if os.path.isfile(file):
+ install(file, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/icedtea/package.py b/var/spack/repos/builtin/packages/icedtea/package.py
new file mode 100644
index 0000000000..7fd096cc77
--- /dev/null
+++ b/var/spack/repos/builtin/packages/icedtea/package.py
@@ -0,0 +1,181 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Icedtea(AutotoolsPackage):
+ """The IcedTea project provides a harness to build the source code from
+ http://openjdk.java.net using Free Software build tools and adds a number
+ of key features to the upstream OpenJDK codebase. IcedTea requires an
+ existing IcedTea or OpenJDK install to build."""
+
+ homepage = "http://icedtea.classpath.org/wiki/Main_Page"
+ url = "http://icedtea.wildebeest.org/download/source/icedtea-3.4.0.tar.gz"
+
+ version('3.4.0', 'eba66765b92794495e16b83f23640872')
+
+ provides('java@8', when='@3.4.0:3.99.99')
+ variant('X', default=False, description="Build with GUI support.")
+ variant('shenandoah', default=False,
+ description="Build with the shenandoah gc. Only for version 3+")
+
+ depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('gmake', type='build')
+ depends_on('cups')
+ depends_on('jdk', type='build')
+ # X11 deps required for building even when headless
+ depends_on('libx11', when='~X', type='build')
+ depends_on('xproto', when='~X', type='build')
+ depends_on('libxext', when='~X', type='build')
+ depends_on('libxtst', when='~X', type='build')
+ depends_on('libxi', when='~X', type='build')
+ depends_on('libxt', when='~X', type='build')
+ depends_on('libxinerama', when='~X', type='build')
+ depends_on('libxrender', when='~X', type='build')
+ depends_on('libxcomposite', when='~X', type='build')
+ depends_on('libxau', when='~X', type='build')
+ depends_on('libxdmcp', when='~X', type='build')
+ depends_on('gtkplus+X', when='~X', type='build')
+
+ depends_on('libx11', when='+X')
+ depends_on('xproto', when='+X')
+ depends_on('libxext', when='+X')
+ depends_on('libxtst', when='+X')
+ depends_on('libxi', when='+X')
+ depends_on('libxt', when='+X')
+ depends_on('libxinerama', when='+X')
+ depends_on('libxrender', when='+X')
+ depends_on('libxcomposite', when='+X')
+ depends_on('libxau', when='+X')
+ depends_on('libxdmcp', when='+X')
+ depends_on('gtkplus+X', when='+X')
+
+ depends_on('freetype@2:')
+ depends_on('wget', type='build')
+ depends_on('giflib')
+ depends_on('libpng')
+ depends_on('jpeg')
+ depends_on('lcms')
+ depends_on('zlib')
+ depends_on('alsa-lib')
+
+ force_autoreconf = True
+
+ resource(name='corba', placement='corba_src',
+ sha512=('f0579608ab1342df231c4542dab1c40e648cda8e9780ea584fd476'
+ '79b07c93508cbfa85f0406d8aa8b9d528fc5bd99c9d41469568fbec'
+ '41a6456a13d914ac71c'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/corba.tar.xz',
+ when='@3.4.0')
+ resource(name='hotspot', placement='hotspot_src',
+ sha512=('29bc953d283f0a0a464fa150e2c4d71b0adaa29da67246843d230f3'
+ '70b5a20227fb40ef6a7e3b93f10b0cdec18b0cd2bbbceeaea3c9db4'
+ 'd64c158cc23babbad2'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/hotspot.tar.xz',
+ when='@3.4.0')
+ resource(name='jaxp', placement='jaxp_src',
+ sha512=('ef3ed47815e6d15f40c5947fee1058c252ac673f70b6bf7c30505fa'
+ 'a12fa5cbab8168d816abe7791dc88acec457744883db4c0af23fb21'
+ '66bbb709e870685bcd'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/jaxp.tar.xz',
+ when='@3.4.0')
+ resource(name='jaxws', placement='jaxws_src',
+ sha512=('867cac2919e715190596ae4f73fa42c6cba839ba48ae940adcef20a'
+ 'bfb23ffeeaa2501c4aedc214b3595bc4e2a4eea9fa7e7cac62a3420'
+ 'a11fb30a1f7edc9254'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/jaxws.tar.xz',
+ when='@3.4.0')
+ resource(name='jdk', placement='jdk_src',
+ sha512=('180d7b4435e465d68ed0b420b42dddc598c872075e225b8885ae183'
+ '3fa4ab5034ce5083c4dfba516a21b2d472321b37a01ba92793e17c7'
+ '8e9fddb1e254f12065'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/jdk.tar.xz',
+ when='@3.4.0')
+ resource(name='langtools', placement='langtools_src',
+ sha512=('0663f40b07de88cd7939557bf7fdb92077d7ca2132e369caefa82db'
+ '887261ea02102864d33ec0fef3b2c80dd366d25dbc1a95144139498'
+ 'be581dfabe913e4312'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/langtools.tar.xz',
+ when='@3.4.0')
+ resource(name='openjdk', placement='openjdk_src',
+ sha512=('f3cca223bd39c0202dd1a65a38ca17024b6cb5c82d833946ec1b7d2'
+ '8d205833b4dd2dadde505a1c2384e3b28ff0d21a4f175e064b8ac82'
+ 'aa8a07508e53cdc722'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/openjdk.tar.xz',
+ when='@3.4.0')
+ resource(name='nashorn', placement='nashorn_src',
+ sha512=('79b5095bab447d1911696bc1e328fb72c08764c0139cab14a28c0f6'
+ 'c2e49a2d96bb06fbbb85523b2586672cb0f13709c3158823d5ac3f3'
+ 'fe3f0f88402d3cb246'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/nashorn.tar.xz',
+ when='@3.4.0')
+ resource(name='shenandoah', placement='shenandoah_src',
+ sha512=('0f085e87c63679314ef322b3f4b854792d46539d5530dd75a7fd45b'
+ '8b6d663f58469be2808ea5fb4bf31f6c5369cb78f28e1599f748e19'
+ '31ba7040136306eb20'),
+ url='http://icedtea.wildebeest.org/download/drops/icedtea8/3.4.0/shenandoah.tar.xz',
+ when='@3.4.0')
+
+ def configure_args(self):
+ os.environ['POTENTIAL_CXX'] = os.environ['CXX']
+ os.environ['POTENTIAL_CC'] = os.environ['CC']
+ os.environ['WGET'] = self.spec['wget'].command.path
+ args = []
+ if '~X' in self.spec:
+ args.append('--enable-headless')
+ if '+shenandoah' in self.spec:
+ args.append('--with-hotspot-build=shenandoah')
+ args.append('--with-hotspot-src-zip=' + self.stage[9].archive_file)
+ args.append('--with-hotspot-checksum=no')
+ else:
+ args.append('--with-hotspot-src-zip=' + self.stage[2].archive_file)
+ args.append('--with-hotspot-checksum=no')
+ args += [
+ '--with-corba-src-zip=' + self.stage[1].archive_file,
+ '--with-cobra-checksum=no',
+ '--with-jaxp-src-zip=' + self.stage[3].archive_file,
+ '--with-jaxp-checksum=no',
+ '--with-jaxws-src-zip=' + self.stage[4].archive_file,
+ '--with-jaxws-checksum=no',
+ '--with-jdk-src-zip=' + self.stage[5].archive_file,
+ '--with-jdk-checksum=no',
+ '--with-langtools-src-zip=' + self.stage[6].archive_file,
+ '--with-langtools-checksum=no',
+ '--with-openjdk-src-zip=' + self.stage[7].archive_file,
+ '--with-openjdk-checksum=no',
+ '--with-nashorn-src-zip=' + self.stage[8].archive_file,
+ '--with-nashorn-checksum=no', '--disable-maintainer-mode'
+ '--disable-downloading', '--disable-system-pcsc',
+ '--disable-system-sctp', '--disable-system-kerberos',
+ '--with-jdk-home=' + self.spec['jdk'].prefix
+ ]
+ return args
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('JAVA_HOME', self.spec.prefix)
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.set('JAVA_HOME', self.prefix)
diff --git a/var/spack/repos/builtin/packages/icet/package.py b/var/spack/repos/builtin/packages/icet/package.py
index 126375c6c2..b2ff89ac69 100644
--- a/var/spack/repos/builtin/packages/icet/package.py
+++ b/var/spack/repos/builtin/packages/icet/package.py
@@ -40,3 +40,7 @@ class Icet(CMakePackage):
def cmake_args(self):
return ['-DICET_USE_OPENGL:BOOL=OFF']
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ """Work-around for ill-placed CMake modules"""
+ spack_env.prepend_path('CMAKE_PREFIX_PATH', self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/idba/package.py b/var/spack/repos/builtin/packages/idba/package.py
new file mode 100644
index 0000000000..25a3e029aa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/idba/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Idba(AutotoolsPackage):
+ """IDBA is a practical iterative De Bruijn Graph De Novo Assembler for
+ sequence assembly in bioinfomatics."""
+
+ homepage = "http://i.cs.hku.hk/~alse/hkubrg/projects/idba/"
+ url = "https://github.com/loneknightpy/idba/archive/1.1.3.tar.gz"
+
+ version('1.1.3', '303d9b4af7a7498b56ac9698028b4e15')
+
+ depends_on('m4', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%intel')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
diff --git a/var/spack/repos/builtin/packages/igraph/package.py b/var/spack/repos/builtin/packages/igraph/package.py
new file mode 100644
index 0000000000..030ef1f604
--- /dev/null
+++ b/var/spack/repos/builtin/packages/igraph/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Igraph(AutotoolsPackage):
+ """igraph is a library for creating and manipulating graphs."""
+
+ homepage = "http://igraph.org/"
+ url = "https://github.com/igraph/igraph/releases/download/0.7.1/igraph-0.7.1.tar.gz"
+
+ version('0.7.1', '4f6e7c16b45fce8ed423516a9786e4e8')
+
+ depends_on('libxml2')
diff --git a/var/spack/repos/builtin/packages/impute2/package.py b/var/spack/repos/builtin/packages/impute2/package.py
new file mode 100644
index 0000000000..b4b0cb20d2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/impute2/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Impute2(Package):
+ """IMPUTE2 is a genotype imputation and haplotype phasing program based on
+ ideas from Howie et al. 2009."""
+
+ homepage = "https://mathgen.stats.ox.ac.uk/impute/impute_v2.html#home"
+ url = "https://mathgen.stats.ox.ac.uk/impute/impute_v2.3.2_x86_64_dynamic.tgz"
+
+ version('2.3.2', '0e1bafb8f63eb5cf9ae02ab761af58aa')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('impute2', prefix.bin)
diff --git a/lib/spack/spack/cmd/purge.py b/var/spack/repos/builtin/packages/infernal/package.py
index ac2aa1c21f..8719d0a227 100644
--- a/lib/spack/spack/cmd/purge.py
+++ b/var/spack/repos/builtin/packages/infernal/package.py
@@ -22,39 +22,28 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import spack
-import spack.stage as stage
+from spack import *
-description = "remove temporary build files and/or downloaded archives"
-section = "admin"
-level = "long"
+class Infernal(AutotoolsPackage):
+ """Infernal (INFERence of RNA ALignment) is for searching DNA sequence
+ databases for RNA structure and sequence similarities. It is an
+ implementation of a special case of profile stochastic context-free
+ grammars called covariance models (CMs)."""
-def setup_parser(subparser):
- subparser.add_argument(
- '-s', '--stage', action='store_true', default=True,
- help="remove all temporary build stages (default)")
- subparser.add_argument(
- '-d', '--downloads', action='store_true',
- help="remove cached downloads")
- subparser.add_argument(
- '-m', '--misc-cache', action='store_true',
- help="remove long-lived caches, like the virtual package index")
- subparser.add_argument(
- '-a', '--all', action='store_true',
- help="remove all of the above")
+ homepage = "http://eddylab.org/infernal/"
+ url = "http://eddylab.org/infernal/infernal-1.1.2.tar.gz"
+ version('1.1.2', 'a73e6bbab0c4b79af2cc4c0aabb8accc')
-def purge(parser, args):
- # Special case: no flags.
- if not any((args.stage, args.downloads, args.misc_cache, args.all)):
- stage.purge()
- return
+ variant('mpi', default=False, description='Enable MPI parallel support')
- # handle other flags with fall through.
- if args.stage or args.all:
- stage.purge()
- if args.downloads or args.all:
- spack.fetch_cache.destroy()
- if args.misc_cache or args.all:
- spack.misc_cache.destroy()
+ depends_on('mpi', when='+mpi')
+
+ def configure_args(self):
+ args = []
+ if '+mpi' in self.spec:
+ args.append('--enable-mpi')
+ else:
+ args.append('--disable-mpi')
+ return args
diff --git a/var/spack/repos/builtin/packages/intel-daal/package.py b/var/spack/repos/builtin/packages/intel-daal/package.py
index 7fb6371e7e..1713218ad3 100644
--- a/var/spack/repos/builtin/packages/intel-daal/package.py
+++ b/var/spack/repos/builtin/packages/intel-daal/package.py
@@ -22,18 +22,14 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
import os
-from spack.pkg.builtin.intel import IntelInstaller
-
+from spack import *
+from spack.environment import EnvironmentModifications
-class IntelDaal(IntelInstaller):
- """Intel Data Analytics Acceleration Library.
- Note: You will have to add the download file to a
- mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
+class IntelDaal(IntelPackage):
+ """Intel Data Analytics Acceleration Library."""
homepage = "https://software.intel.com/en-us/daal"
@@ -52,11 +48,35 @@ class IntelDaal(IntelInstaller):
provides('daal')
- def install(self, spec, prefix):
+ @property
+ def license_required(self):
+ # The Intel libraries are provided without requiring a license as of
+ # version 2017.2. Trying to specify the license will fail. See:
+ # https://software.intel.com/en-us/articles/free-ipsxe-tools-and-libraries
+ if self.version >= Version('2017.2'):
+ return False
+ else:
+ return True
+
+ def setup_environment(self, spack_env, run_env):
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
- self.intel_prefix = os.path.join(prefix, "pkg")
- IntelInstaller.install(self, spec, prefix)
+ $ source daal/bin/daalvars.sh intel64
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ daalvars = os.path.join(self.prefix.daal.bin, 'daalvars.sh')
- daal_dir = os.path.join(self.intel_prefix, "daal")
- for f in os.listdir(daal_dir):
- os.symlink(os.path.join(daal_dir, f), os.path.join(self.prefix, f))
+ if os.path.isfile(daalvars):
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ daalvars, 'intel64'))
diff --git a/var/spack/repos/builtin/packages/intel-ipp/package.py b/var/spack/repos/builtin/packages/intel-ipp/package.py
index c9cfa609c8..4ca20a9906 100644
--- a/var/spack/repos/builtin/packages/intel-ipp/package.py
+++ b/var/spack/repos/builtin/packages/intel-ipp/package.py
@@ -22,18 +22,14 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
import os
-from spack.pkg.builtin.intel import IntelInstaller
-
+from spack import *
+from spack.environment import EnvironmentModifications
-class IntelIpp(IntelInstaller):
- """Intel Integrated Performance Primitives.
- Note: You will have to add the download file to a
- mirror so that Spack can find it. For instructions on how to set up a
- mirror, see http://spack.readthedocs.io/en/latest/mirrors.html"""
+class IntelIpp(IntelPackage):
+ """Intel Integrated Performance Primitives."""
homepage = "https://software.intel.com/en-us/intel-ipp"
@@ -50,11 +46,35 @@ class IntelIpp(IntelInstaller):
provides('ipp')
- def install(self, spec, prefix):
+ @property
+ def license_required(self):
+ # The Intel libraries are provided without requiring a license as of
+ # version 2017.2. Trying to specify the license will fail. See:
+ # https://software.intel.com/en-us/articles/free-ipsxe-tools-and-libraries
+ if self.version >= Version('2017.2'):
+ return False
+ else:
+ return True
+
+ def setup_environment(self, spack_env, run_env):
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
- self.intel_prefix = os.path.join(prefix, "pkg")
- IntelInstaller.install(self, spec, prefix)
+ $ source ipp/bin/ippvars.sh intel64
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ ippvars = os.path.join(self.prefix.ipp.bin, 'ippvars.sh')
- ipp_dir = os.path.join(self.intel_prefix, "ipp")
- for f in os.listdir(ipp_dir):
- os.symlink(os.path.join(ipp_dir, f), os.path.join(self.prefix, f))
+ if os.path.isfile(ippvars):
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ ippvars, 'intel64'))
diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py
index 4eaf50dea5..1cc3c00af2 100644
--- a/var/spack/repos/builtin/packages/intel-mkl/package.py
+++ b/var/spack/repos/builtin/packages/intel-mkl/package.py
@@ -22,13 +22,13 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
import os
-from spack.pkg.builtin.intel import IntelInstaller
+from spack import *
+from spack.environment import EnvironmentModifications
-class IntelMkl(IntelInstaller):
+class IntelMkl(IntelPackage):
"""Intel Math Kernel Library."""
homepage = "https://software.intel.com/en-us/intel-mkl"
@@ -50,13 +50,22 @@ class IntelMkl(IntelInstaller):
variant('ilp64', default=False, description='64 bit integers')
variant('openmp', default=False, description='OpenMP multithreading layer')
- # virtual dependency
provides('blas')
provides('lapack')
provides('scalapack')
provides('mkl')
@property
+ def license_required(self):
+ # The Intel libraries are provided without requiring a license as of
+ # version 2017.2. Trying to specify the license will fail. See:
+ # https://software.intel.com/en-us/articles/free-ipsxe-tools-and-libraries
+ if self.version >= Version('2017.2'):
+ return False
+ else:
+ return True
+
+ @property
def blas_libs(self):
spec = self.spec
prefix = self.prefix
@@ -69,15 +78,27 @@ class IntelMkl(IntelInstaller):
mkl_threading = ['libmkl_sequential']
+ omp_libs = LibraryList([])
+
if '+openmp' in spec:
if '%intel' in spec:
- mkl_threading = ['libmkl_intel_thread', 'libiomp5']
- else:
+ mkl_threading = ['libmkl_intel_thread']
+ omp_threading = ['libiomp5']
+
+ omp_root = prefix.compilers_and_libraries.linux.lib.intel64
+ omp_libs = find_libraries(
+ omp_threading, root=omp_root, shared=shared)
+ elif '%gcc' in spec:
mkl_threading = ['libmkl_gnu_thread']
+ gcc = Executable(self.compiler.cc)
+ libgomp = gcc('--print-file-name', 'libgomp.{0}'.format(
+ dso_suffix), output=str)
+ omp_libs = LibraryList(libgomp)
+
# TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
- mkl_root = join_path(prefix.lib, 'intel64')
+ mkl_root = prefix.compilers_and_libraries.linux.mkl.lib.intel64
mkl_libs = find_libraries(
mkl_integer + ['libmkl_core'] + mkl_threading,
@@ -91,7 +112,7 @@ class IntelMkl(IntelInstaller):
shared=shared
)
- return mkl_libs + system_libs
+ return mkl_libs + omp_libs + system_libs
@property
def lapack_libs(self):
@@ -120,30 +141,46 @@ class IntelMkl(IntelInstaller):
elif '^intel-mpi' in root:
libnames.append('libmkl_blacs_intelmpi')
else:
- raise InstallError("No MPI found for scalapack")
+ raise InstallError('No MPI found for scalapack')
- shared = True if '+shared' in self.spec else False
integer = 'ilp64' if '+ilp64' in self.spec else 'lp64'
+ mkl_root = self.prefix.compilers_and_libraries.linux.mkl.lib.intel64
+ shared = True if '+shared' in self.spec else False
+
libs = find_libraries(
['{0}_{1}'.format(l, integer) for l in libnames],
- root=join_path(self.prefix.lib, 'intel64'),
+ root=mkl_root,
shared=shared
)
- return libs
-
- def install(self, spec, prefix):
- self.intel_prefix = os.path.join(prefix, "pkg")
- IntelInstaller.install(self, spec, prefix)
- mkl_dir = os.path.join(self.intel_prefix, "mkl")
- for f in os.listdir(mkl_dir):
- os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f))
+ return libs
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up MKLROOT for everyone using MKL package
+ mkl_root = self.prefix.compilers_and_libraries.linux.mkl.lib.intel64
+
spack_env.set('MKLROOT', self.prefix)
- spack_env.append_path('SPACK_COMPILER_EXTRA_RPATHS',
- join_path(self.prefix.lib, 'intel64'))
+ spack_env.append_path('SPACK_COMPILER_EXTRA_RPATHS', mkl_root)
def setup_environment(self, spack_env, run_env):
- run_env.set('MKLROOT', self.prefix)
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
+
+ $ source mkl/bin/mklvars.sh intel64
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ mklvars = os.path.join(self.prefix.mkl.bin, 'mklvars.sh')
+
+ if os.path.isfile(mklvars):
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ mklvars, 'intel64'))
diff --git a/var/spack/repos/builtin/packages/intel-mpi/package.py b/var/spack/repos/builtin/packages/intel-mpi/package.py
index d0167552b0..b9aaf12c1c 100644
--- a/var/spack/repos/builtin/packages/intel-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi/package.py
@@ -22,30 +22,41 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
import os
-from spack.pkg.builtin.intel import IntelInstaller
+from spack import *
+from spack.environment import EnvironmentModifications
-class IntelMpi(IntelInstaller):
+class IntelMpi(IntelPackage):
"""Intel MPI"""
homepage = "https://software.intel.com/en-us/intel-mpi-library"
- version('2017.3', '721ecd5f6afa385e038777e5b5361dfb',
+ version('2017.3.196', '721ecd5f6afa385e038777e5b5361dfb',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11595/l_mpi_2017.3.196.tgz')
- version('2017.2', 'b6c2e62c3fb9b1558ede72ccf72cf1d6',
+ version('2017.2.174', 'b6c2e62c3fb9b1558ede72ccf72cf1d6',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11334/l_mpi_2017.2.174.tgz')
- version('2017.1', 'd5e941ac2bcf7c5576f85f6bcfee4c18',
+ version('2017.1.132', 'd5e941ac2bcf7c5576f85f6bcfee4c18',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11014/l_mpi_2017.1.132.tgz')
- version('5.1.3', '4316e78533a932081b1a86368e890800',
+ version('5.1.3.223', '4316e78533a932081b1a86368e890800',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9278/l_mpi_p_5.1.3.223.tgz')
provides('mpi')
@property
+ def license_required(self):
+ # The Intel libraries are provided without requiring a license as of
+ # version 2017.2. Trying to specify the license will fail. See:
+ # https://software.intel.com/en-us/articles/free-ipsxe-tools-and-libraries
+ if self.version >= Version('2017.2'):
+ return False
+ else:
+ return True
+
+ @property
def mpi_libs(self):
+ mpi_root = self.prefix.compilers_and_libraries.linux.mpi.lib64
query_parameters = self.spec.last_query.extra_parameters
libraries = ['libmpifort', 'libmpi']
@@ -53,19 +64,15 @@ class IntelMpi(IntelInstaller):
libraries = ['libmpicxx'] + libraries
return find_libraries(
- libraries, root=self.prefix.lib64, shared=True, recurse=True
+ libraries, root=mpi_root, shared=True, recurse=True
)
@property
def mpi_headers(self):
# recurse from self.prefix will find too many things for all the
# supported sub-architectures like 'mic'
- return find_headers(
- 'mpi', root=self.prefix.include64, recurse=False)
-
- def install(self, spec, prefix):
- self.intel_prefix = prefix
- IntelInstaller.install(self, spec, prefix)
+ mpi_root = self.prefix.compilers_and_libraries.linux.mpi.include64
+ return find_headers('mpi', root=mpi_root, recurse=False)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.set('I_MPI_CC', spack_cc)
@@ -75,15 +82,52 @@ class IntelMpi(IntelInstaller):
spack_env.set('I_MPI_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
- # Check for presence of bin64 or bin directory
- if os.path.isdir(self.prefix.bin):
- bindir = self.prefix.bin
- elif os.path.isdir(self.prefix.bin64):
- bindir = self.prefix.bin64
+ # Intel comes with 2 different flavors of MPI wrappers:
+ #
+ # * mpiicc, mpiicpc, and mpifort are hardcoded to wrap around
+ # the Intel compilers.
+ # * mpicc, mpicxx, mpif90, and mpif77 allow you to set which
+ # compilers to wrap using I_MPI_CC and friends. By default,
+ # wraps around the GCC compilers.
+ #
+ # In theory, these should be equivalent as long as I_MPI_CC
+ # and friends are set to point to the Intel compilers, but in
+ # practice, mpicc fails to compile some applications while
+ # mpiicc works.
+ bindir = self.prefix.compilers_and_libraries.linux.mpi.intel64.bin
+
+ if self.compiler.name == 'intel':
+ self.spec.mpicc = bindir.mpiicc
+ self.spec.mpicxx = bindir.mpiicpc
+ self.spec.mpifc = bindir.mpiifort
+ self.spec.mpif77 = bindir.mpiifort
else:
- raise RuntimeError('No suitable bindir found')
+ self.spec.mpicc = bindir.mpicc
+ self.spec.mpicxx = bindir.mpicxx
+ self.spec.mpifc = bindir.mpif90
+ self.spec.mpif77 = bindir.mpif77
+
+ def setup_environment(self, spack_env, run_env):
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
+
+ $ source compilers_and_libraries/linux/mpi/intel64/bin/mpivars.sh
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ mpivars = os.path.join(
+ self.prefix.compilers_and_libraries.linux.mpi.intel64.bin,
+ 'mpivars.sh')
- self.spec.mpicc = join_path(bindir, 'mpicc')
- self.spec.mpicxx = join_path(bindir, 'mpicxx')
- self.spec.mpifc = join_path(bindir, 'mpif90')
- self.spec.mpif77 = join_path(bindir, 'mpif77')
+ if os.path.isfile(mpivars):
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ mpivars))
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index 531b29b986..12a3f15f26 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -22,30 +22,29 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
+import glob
import os
-import re
-from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \
- get_all_components
+from spack import *
+from spack.environment import EnvironmentModifications
-class IntelParallelStudio(IntelInstaller):
+class IntelParallelStudio(IntelPackage):
"""Intel Parallel Studio."""
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
version('professional.2017.4', '27398416078e1e4005afced3e9a6df7e',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11537/parallel_studio_xe_2017_update4.tgz')
- version('cluster.2017.4', '27398416078e1e4005afced3e9a6df7e',
+ version('cluster.2017.4', '27398416078e1e4005afced3e9a6df7e',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11537/parallel_studio_xe_2017_update4.tgz')
- version('composer.2017.4', 'd03d351809e182c481dc65e07376d9a2',
+ version('composer.2017.4', 'd03d351809e182c481dc65e07376d9a2',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz')
version('professional.2017.3', '691874735458d3e88fe0bcca4438b2a9',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11460/parallel_studio_xe_2017_update3.tgz')
- version('cluster.2017.3', '691874735458d3e88fe0bcca4438b2a9',
+ version('cluster.2017.3', '691874735458d3e88fe0bcca4438b2a9',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11460/parallel_studio_xe_2017_update3.tgz')
- version('composer.2017.3', '52344df122c17ddff3687f84ceb21623',
+ version('composer.2017.3', '52344df122c17ddff3687f84ceb21623',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz')
version('professional.2017.2', '70e54b33d940a1609ff1d35d3c56e3b3',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11298/parallel_studio_xe_2017_update2.tgz')
@@ -90,34 +89,64 @@ class IntelParallelStudio(IntelInstaller):
version('composer.2015.6', 'da9f8600c18d43d58fba0488844f79c9',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8432/l_compxe_2015.6.233.tgz')
- variant('rpath', default=True, description="Add rpath to .cfg files")
+ # Generic Variants
+ variant('rpath', default=True,
+ description='Add rpath to .cfg files')
variant('newdtags', default=False,
- description="Allow use of --enable-new-dtags in MPI wrappers")
- variant('all', default=False,
- description="Install all files with the requested edition")
- variant('mpi', default=True,
- description="Install the Intel MPI library and ITAC tool")
- variant('mkl', default=True, description="Install the Intel MKL library")
- variant('daal',
- default=True, description="Install the Intel DAAL libraries")
- variant('ipp', default=True, description="Install the Intel IPP libraries")
- variant('tools', default=True, description="Install the Intel Advisor, "
- "VTune Amplifier, and Inspector tools")
-
- variant('shared', default=True, description='Builds shared library')
- variant('ilp64', default=False, description='64 bit integers')
- variant('openmp', default=False, description='OpenMP multithreading layer')
-
- provides('mpi', when='@cluster.0:cluster.9999+mpi')
- provides('mkl', when='+mkl')
+ description='Allow use of --enable-new-dtags in MPI wrappers')
+ variant('shared', default=True,
+ description='Builds shared library')
+ variant('ilp64', default=False,
+ description='64 bit integers')
+ variant('openmp', default=False,
+ description='OpenMP multithreading layer')
+
+ # Components available in all editions
+ variant('daal', default=True,
+ description='Install the Intel DAAL libraries')
+ variant('gdb', default=False,
+ description='Install the Intel Debugger for Heterogeneous Compute')
+ variant('ipp', default=True,
+ description='Install the Intel IPP libraries')
+ variant('mkl', default=True,
+ description='Install the Intel MKL library')
+ variant('mpi', default=True,
+ description='Install the Intel MPI library')
+ variant('tbb', default=True,
+ description='Install the Intel TBB libraries')
+
+ # Components only available in the Professional and Cluster Editions
+ variant('advisor', default=False,
+ description='Install the Intel Advisor')
+ variant('clck', default=False,
+ description='Install the Intel Cluster Checker')
+ variant('inspector', default=False,
+ description='Install the Intel Inspector')
+ variant('itac', default=False,
+ description='Install the Intel Trace Analyzer and Collector')
+ variant('vtune', default=False,
+ description='Install the Intel VTune Amplifier XE')
+
provides('daal', when='+daal')
+
provides('ipp', when='+ipp')
- # virtual dependency
- provides('blas', when='+mkl')
- provides('lapack', when='+mkl')
+ provides('mkl', when='+mkl')
+ provides('blas', when='+mkl')
+ provides('lapack', when='+mkl')
provides('scalapack', when='+mkl')
+ provides('mpi', when='+mpi')
+
+ provides('tbb', when='+tbb')
+
+ # The following components are not available in the Composer Edition
+ conflicts('+advisor', when='@composer.0:composer.9999')
+ conflicts('+clck', when='@composer.0:composer.9999')
+ conflicts('+inspector', when='@composer.0:composer.9999')
+ conflicts('+itac', when='@composer.0:composer.9999')
+ conflicts('+vtune', when='@composer.0:composer.9999')
+
@property
def blas_libs(self):
spec = self.spec
@@ -131,15 +160,27 @@ class IntelParallelStudio(IntelInstaller):
mkl_threading = ['libmkl_sequential']
+ omp_libs = LibraryList([])
+
if '+openmp' in spec:
if '%intel' in spec:
- mkl_threading = ['libmkl_intel_thread', 'libiomp5']
- else:
+ mkl_threading = ['libmkl_intel_thread']
+ omp_threading = ['libiomp5']
+
+ omp_root = prefix.compilers_and_libraries.linux.lib.intel64
+ omp_libs = find_libraries(
+ omp_threading, root=omp_root, shared=shared)
+ elif '%gcc' in spec:
mkl_threading = ['libmkl_gnu_thread']
+ gcc = Executable(self.compiler.cc)
+ omp_libs = gcc('--print-file-name', 'libgomp.{0}'.format(
+ dso_suffix), output=str)
+ omp_libs = LibraryList(omp_libs)
+
# TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
- mkl_root = join_path(prefix, 'mkl', 'lib', 'intel64')
+ mkl_root = prefix.compilers_and_libraries.linux.mkl.lib.intel64
mkl_libs = find_libraries(
mkl_integer + ['libmkl_core'] + mkl_threading,
@@ -153,7 +194,7 @@ class IntelParallelStudio(IntelInstaller):
shared=shared
)
- return mkl_libs + system_libs
+ return mkl_libs + omp_libs + system_libs
@property
def lapack_libs(self):
@@ -176,109 +217,182 @@ class IntelParallelStudio(IntelInstaller):
# elif self.spec.satisfies('^intel-parallel-studio'):
# libnames.append('libmkl_blacs_intelmpi')
else:
- raise InstallError("No MPI found for scalapack")
+ raise InstallError('No MPI found for scalapack')
- shared = True if '+shared' in self.spec else False
integer = 'ilp64' if '+ilp64' in self.spec else 'lp64'
+ mkl_root = self.prefix.compilers_and_libraries.linux.mkl.lib.intel64
+ shared = True if '+shared' in self.spec else False
+
libs = find_libraries(
['{0}_{1}'.format(l, integer) for l in libnames],
- root=join_path(self.prefix, 'mkl', 'lib', 'intel64'),
+ root=mkl_root,
shared=shared
)
return libs
- def install(self, spec, prefix):
- base_components = "ALL" # when in doubt, install everything
- mpi_components = ""
- mkl_components = ""
- daal_components = ""
- ipp_components = ""
-
- if not spec.satisfies('+all'):
- all_components = get_all_components()
- regex = '(comp|openmp|intel-tbb|icc|ifort|psxe)'
- base_components = \
- filter_pick(all_components, re.compile(regex).search)
- regex = '(icsxe|imb|mpi|itac|intel-ta|intel-tc|clck)'
- mpi_components = \
- filter_pick(all_components, re.compile(regex).search)
- mkl_components = \
- filter_pick(all_components, re.compile('(mkl)').search)
- daal_components = \
- filter_pick(all_components, re.compile('(daal)').search)
- ipp_components = \
- filter_pick(all_components, re.compile('(ipp)').search)
- regex = '(gdb|vtune|inspector|advisor)'
- tool_components = \
- filter_pick(all_components, re.compile(regex).search)
- components = base_components
-
- if not spec.satisfies('+all'):
- if spec.satisfies('+mpi'):
- components += mpi_components
- if spec.satisfies('+mkl'):
- components += mkl_components
- if spec.satisfies('+daal'):
- components += daal_components
- if spec.satisfies('+ipp'):
- components += ipp_components
- if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
- spec.satisfies('@professional')):
- components += tool_components
-
- if spec.satisfies('+all'):
- self.intel_components = 'ALL'
- else:
- self.intel_components = ';'.join(components)
- IntelInstaller.install(self, spec, prefix)
-
- absbindir = os.path.dirname(
- os.path.realpath(os.path.join(self.prefix.bin, "icc")))
- abslibdir = os.path.dirname(
- os.path.realpath(os.path.join(
- self.prefix.lib, "intel64", "libimf.a")))
-
- os.symlink(self.global_license_file, os.path.join(absbindir,
- "license.lic"))
- if spec.satisfies('+tools') and (spec.satisfies('@cluster') or
- spec.satisfies('@professional')):
- inspector_dir = "inspector_xe/licenses"
- advisor_dir = "advisor_xe/licenses"
- vtune_amplifier_dir = "vtune_amplifier_xe/licenses"
-
- year = int(str(self.version).split('.')[1])
+ @property
+ def mpi_libs(self):
+ mpi_root = self.prefix.compilers_and_libraries.linux.mpi.lib64
+ query_parameters = self.spec.last_query.extra_parameters
+ libraries = ['libmpifort', 'libmpi']
+
+ if 'cxx' in query_parameters:
+ libraries = ['libmpicxx'] + libraries
+
+ return find_libraries(
+ libraries, root=mpi_root, shared=True, recurse=True
+ )
+
+ @property
+ def mpi_headers(self):
+ # recurse from self.prefix will find too many things for all the
+ # supported sub-architectures like 'mic'
+ mpi_root = self.prefix.compilers_and_libraries.linux.mpi.include64
+ return find_headers('mpi', root=mpi_root, recurse=False)
+
+ @property
+ def components(self):
+ spec = self.spec
+ edition = self.version[0]
+
+ # Intel(R) Compilers
+ components = [
+ # Common files
+ 'intel-comp-',
+ 'intel-openmp',
+
+ # C/C++
+ 'intel-icc',
+
+ # Fortran
+ 'intel-ifort',
+
+ # Parallel Studio Documentation and Licensing Files
+ 'intel-psxe',
+ ]
+
+ # Intel(R) Parallel Studio XE Suite Files and Documentation
+ if edition == 'cluster':
+ components.append('intel-icsxe')
+ elif edition == 'professional':
+ components.extend(['intel-ips', 'intel-ipsc', 'intel-ipsf'])
+ elif edition == 'composer':
+ components.extend([
+ 'intel-compxe', 'intel-ccompxe', 'intel-fcompxe'
+ ])
+
+ # Intel(R) Data Analytics Acceleration Library
+ if '+daal' in spec:
+ components.append('intel-daal')
+
+ # Intel(R) Debugger for Heterogeneous Compute
+ if '+gdb' in spec:
+ components.append('intel-gdb')
+
+ # Intel(R) Integrated Performance Primitives
+ if '+ipp' in spec:
+ components.extend(['intel-ipp', 'intel-crypto-ipp'])
+
+ # Intel(R) Math Kernel Library
+ if '+mkl' in spec:
+ components.append('intel-mkl')
+
+ # Intel(R) MPI Library
+ if '+mpi' in spec:
+ components.extend(['intel-mpi', 'intel-mpirt', 'intel-imb'])
+
+ # Intel(R) Threading Building Blocks
+ if '+tbb' in spec:
+ components.append('intel-tbb')
+
+ # Intel(R) Advisor
+ if '+advisor' in spec:
+ components.append('intel-advisor')
+
+ # Intel(R) Cluster Checker
+ if '+clck' in spec:
+ components.append('intel_clck')
+
+ # Intel(R) Inspector
+ if '+inspector' in spec:
+ components.append('intel-inspector')
+
+ # Intel(R) Trace Analyzer and Collector
+ if '+itac' in spec:
+ components.extend(['intel-itac', 'intel-ta', 'intel-tc'])
+
+ # Intel(R) VTune(TM) Amplifier XE
+ if '+vtune' in spec:
+ components.append('intel-vtune-amplifier-xe')
+
+ return components
+
+ @property
+ def bin_dir(self):
+ """The relative path to the bin directory with symlinks resolved."""
+
+ bin_path = os.path.join(self.prefix.bin, 'icc')
+ absolute_path = os.path.realpath(bin_path) # resolve symlinks
+ relative_path = os.path.relpath(absolute_path, self.prefix)
+ return os.path.dirname(relative_path)
+
+ @property
+ def lib_dir(self):
+ """The relative path to the lib directory with symlinks resolved."""
+
+ lib_path = os.path.join(self.prefix.lib, 'intel64', 'libimf.a')
+ absolute_path = os.path.realpath(lib_path) # resolve symlinks
+ relative_path = os.path.relpath(absolute_path, self.prefix)
+ return os.path.dirname(relative_path)
+
+ @property
+ def license_files(self):
+ spec = self.spec
+ year = self.version[1]
+
+ directories = [
+ 'Licenses',
+ self.bin_dir
+ ]
+
+ if '+advisor' in spec:
+ advisor_dir = 'advisor_xe/licenses'
+
+ if year >= 2017:
+ advisor_dir = 'advisor/licenses'
+
+ directories.append(advisor_dir)
+
+ if '+inspector' in spec:
+ inspector_dir = 'inspector_xe/licenses'
+
if year >= 2017:
- inspector_dir = "inspector/licenses"
- advisor_dir = "advisor/licenses"
-
- os.mkdir(os.path.join(self.prefix, inspector_dir))
- os.symlink(self.global_license_file, os.path.join(
- self.prefix, inspector_dir, "license.lic"))
- os.mkdir(os.path.join(self.prefix, advisor_dir))
- os.symlink(self.global_license_file, os.path.join(
- self.prefix, advisor_dir, "license.lic"))
- os.mkdir(os.path.join(self.prefix, vtune_amplifier_dir))
- os.symlink(self.global_license_file, os.path.join(
- self.prefix, vtune_amplifier_dir, "license.lic"))
-
- if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
- spec.satisfies('@cluster'):
- for ifile in os.listdir(os.path.join(self.prefix, "itac")):
- if os.path.isdir(os.path.join(self.prefix, "itac", ifile)):
- os.symlink(self.global_license_file,
- os.path.join(self.prefix, "itac", ifile,
- "license.lic"))
- if os.path.isdir(os.path.join(self.prefix, "itac",
- ifile, "intel64")):
- os.symlink(self.global_license_file,
- os.path.join(self.prefix, "itac",
- ifile, "intel64",
- "license.lic"))
- if spec.satisfies('~newdtags'):
- wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
- "mpigcc", "mpigcc", "mpigxx", "mpigxx",
- "mpiicc", "mpiicc", "mpiicpc", "mpiicpc",
- "mpiifort", "mpiifort"]
+ inspector_dir = 'inspector/licenses'
+
+ directories.append(inspector_dir)
+
+ if '+itac' in spec:
+ itac_dir = 'itac_{0}'.format(year)
+
+ directories.append(itac_dir)
+
+ if '+vtune' in spec:
+ vtune_dir = 'vtune_amplifier_xe/licenses'
+
+ directories.append(vtune_dir)
+
+ return [os.path.join(dir, 'license.lic') for dir in directories]
+
+ @run_after('install')
+ def filter_compiler_wrappers(self):
+ spec = self.spec
+
+ if '+mpi' in spec:
+ if '~newdtags' in spec:
+ wrappers = [
+ 'mpif77', 'mpif90', 'mpigcc', 'mpigxx',
+ 'mpiicc', 'mpiicpc', 'mpiifort'
+ ]
wrapper_paths = []
for root, dirs, files in os.walk(spec.prefix):
for name in files:
@@ -286,153 +400,95 @@ class IntelParallelStudio(IntelInstaller):
wrapper_paths.append(os.path.join(spec.prefix,
root, name))
for wrapper in wrapper_paths:
- filter_file(r'-Xlinker --enable-new-dtags', r' ',
- wrapper)
+ filter_file('-Xlinker --enable-new-dtags', ' ',
+ wrapper, string=True)
- if spec.satisfies('+rpath'):
- for compiler_command in ["icc", "icpc", "ifort"]:
- cfgfilename = os.path.join(absbindir, "%s.cfg" %
- compiler_command)
- with open(cfgfilename, "w") as f:
- f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
+ @run_after('install')
+ def rpath_configuration(self):
+ spec = self.spec
- os.symlink(os.path.join(self.prefix.man, "common", "man1"),
- os.path.join(self.prefix.man, "man1"))
+ if '+rpath' in spec:
+ lib_dir = os.path.join(self.prefix, self.lib_dir)
+ for compiler in ['icc', 'icpc', 'ifort']:
+ cfgfilename = os.path.join(
+ self.prefix, self.bin_dir, '{0}.cfg'.format(compiler))
+ with open(cfgfilename, 'w') as f:
+ f.write('-Xlinker -rpath -Xlinker {0}\n'.format(lib_dir))
- def setup_environment(self, spack_env, run_env):
- # TODO: Determine variables needed for the professional edition.
-
- major_ver = self.version[1]
-
- # Remove paths that were guessed but are incorrect for this package.
- run_env.remove_path('LIBRARY_PATH',
- join_path(self.prefix, 'lib'))
- run_env.remove_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib'))
- run_env.remove_path('CPATH',
- join_path(self.prefix, 'include'))
-
- # Add the default set of variables
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'intel64'))
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'intel64'))
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib',
- 'intel64', 'gcc4.4'))
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib',
- 'intel64', 'gcc4.4'))
- run_env.prepend_path('CPATH',
- join_path(self.prefix, 'tbb', 'include'))
- run_env.prepend_path('MIC_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'mic'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'mic'))
- run_env.prepend_path('MIC_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib', 'mic'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib', 'mic'))
-
- if self.spec.satisfies('+all'):
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix,
- 'debugger_{0}'.format(major_ver),
- 'libipt', 'intel64', 'lib'))
- run_env.set('GDBSERVER_MIC',
- join_path(self.prefix,
- 'debugger_{0}'.format(major_ver), 'gdb',
- 'targets', 'mic', 'bin', 'gdbserver'))
- run_env.set('GDB_CROSS',
- join_path(self.prefix,
- 'debugger_{0}'.format(major_ver),
- 'gdb', 'intel64_mic', 'bin', 'gdb-mic'))
- run_env.set('MPM_LAUNCHER',
- join_path(self.prefix,
- 'debugger_{0}'.format(major_ver), 'mpm',
- 'mic',
- 'bin', 'start_mpm.sh'))
- run_env.set('INTEL_PYTHONHOME',
- join_path(self.prefix,
- 'debugger_{0}'.format(major_ver), 'python',
- 'intel64'))
-
- if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')):
- # Only I_MPI_ROOT is set here because setting the various PATH
- # variables will potentially be in conflict with other MPI
- # environment modules. The I_MPI_ROOT environment variable can be
- # used as a base to set necessary PATH variables for using Intel
- # MPI. It is also possible to set the variables in the modules.yaml
- # file if Intel MPI is the dominant, or only, MPI on a system.
- run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
-
- if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
- spack_env.set('MKLROOT', join_path(self.prefix, 'mkl'))
-
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'mkl', 'lib',
- 'intel64'))
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'mkl', 'lib',
- 'intel64'))
- run_env.prepend_path('CPATH',
- join_path(self.prefix, 'mkl', 'include'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'mkl', 'lib', 'mic'))
- run_env.set('MKLROOT', join_path(self.prefix, 'mkl'))
-
- if self.spec.satisfies('+all') or self.spec.satisfies('+daal'):
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'daal', 'lib',
- 'intel64_lin'))
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'daal', 'lib',
- 'intel64_lin'))
- run_env.prepend_path('CPATH',
- join_path(self.prefix, 'daal', 'include'))
- run_env.prepend_path('CLASSPATH',
- join_path(self.prefix, 'daal', 'lib',
- 'daal.jar'))
- run_env.set('DAALROOT', join_path(self.prefix, 'daal'))
-
- if self.spec.satisfies('+all') or self.spec.satisfies('+ipp'):
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'ipp', 'lib',
- 'intel64'))
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'ipp', 'lib',
- 'intel64'))
- run_env.prepend_path('CPATH',
- join_path(self.prefix, 'ipp', 'include'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'ipp', 'lib', 'mic'))
- run_env.set('IPPROOT', join_path(self.prefix, 'ipp'))
-
- if self.spec.satisfies('+all') or self.spec.satisfies('+tools'):
- run_env.prepend_path('PATH',
- join_path(self.prefix, 'vtune_amplifier_xe',
- 'bin64'))
- run_env.prepend_path('VTUNE_AMPLIFIER_XE_{0}_DIR'.format(
- major_ver),
- join_path(self.prefix, 'vtune_amplifier_xe'))
+ @run_after('install')
+ def fix_psxevars(self):
+ """Newer versions of Intel Parallel Studio have a bug in the
+ ``psxevars.sh`` script."""
+
+ bindir = glob.glob(join_path(
+ self.prefix, 'parallel_studio*', 'bin'))[0]
+
+ filter_file('^SCRIPTPATH=.*', 'SCRIPTPATH={0}'.format(self.prefix),
+ os.path.join(bindir, 'psxevars.sh'),
+ os.path.join(bindir, 'psxevars.csh'))
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
- spack_env.set('I_MPI_CC', spack_cc)
- spack_env.set('I_MPI_CXX', spack_cxx)
- spack_env.set('I_MPI_F77', spack_fc)
- spack_env.set('I_MPI_F90', spack_f77)
- spack_env.set('I_MPI_FC', spack_fc)
+ if '+mpi' in self.spec:
+ spack_env.set('I_MPI_CC', spack_cc)
+ spack_env.set('I_MPI_CXX', spack_cxx)
+ spack_env.set('I_MPI_F77', spack_fc)
+ spack_env.set('I_MPI_F90', spack_f77)
+ spack_env.set('I_MPI_FC', spack_fc)
+
+ # set up MKLROOT for everyone using MKL package
+ if '+mkl' in self.spec:
+ mkl_root = self.prefix.compilers_and_libraries.linux.mkl.lib.intel64 # noqa
+
+ spack_env.set('MKLROOT', self.prefix)
+ spack_env.append_path('SPACK_COMPILER_EXTRA_RPATHS', mkl_root)
def setup_dependent_package(self, module, dep_spec):
- # Check for presence of bin64 or bin directory
- if os.path.isdir(self.prefix.bin):
- bindir = self.prefix.bin
- elif os.path.isdir(self.prefix.bin64):
- bindir = self.prefix.bin64
- else:
- raise RuntimeError('No suitable bindir found')
+ if '+mpi' in self.spec:
+ # Intel comes with 2 different flavors of MPI wrappers:
+ #
+ # * mpiicc, mpiicpc, and mpifort are hardcoded to wrap around
+ # the Intel compilers.
+ # * mpicc, mpicxx, mpif90, and mpif77 allow you to set which
+ # compilers to wrap using I_MPI_CC and friends. By default,
+ # wraps around the GCC compilers.
+ #
+ # In theory, these should be equivalent as long as I_MPI_CC
+ # and friends are set to point to the Intel compilers, but in
+ # practice, mpicc fails to compile some applications while
+ # mpiicc works.
+ bindir = self.prefix.compilers_and_libraries.linux.mpi.intel64.bin
+
+ if self.compiler.name == 'intel':
+ self.spec.mpicc = bindir.mpiicc
+ self.spec.mpicxx = bindir.mpiicpc
+ self.spec.mpifc = bindir.mpiifort
+ self.spec.mpif77 = bindir.mpiifort
+ else:
+ self.spec.mpicc = bindir.mpicc
+ self.spec.mpicxx = bindir.mpicxx
+ self.spec.mpifc = bindir.mpif90
+ self.spec.mpif77 = bindir.mpif77
- self.spec.mpicc = join_path(bindir, 'mpicc')
- self.spec.mpicxx = join_path(bindir, 'mpic++')
- self.spec.mpifc = join_path(bindir, 'mpif90')
- self.spec.mpif77 = join_path(bindir, 'mpif77')
+ def setup_environment(self, spack_env, run_env):
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
+
+ $ source parallel_studio_xe_2017/bin/psxevars.sh intel64
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ psxevars = glob.glob(join_path(
+ self.prefix, 'parallel_studio*', 'bin', 'psxevars.sh'))
+
+ if psxevars:
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ psxevars[0], 'intel64'))
diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py
index a23ac23983..6d5c2bbbb0 100644
--- a/var/spack/repos/builtin/packages/tbb/package.py
+++ b/var/spack/repos/builtin/packages/intel-tbb/package.py
@@ -26,7 +26,7 @@ from spack import *
import glob
-class Tbb(Package):
+class IntelTbb(Package):
"""Widely used C++ template library for task parallelism.
Intel Threading Building Blocks (Intel TBB) lets you easily write parallel
C++ programs that take full advantage of multicore performance, that are
@@ -47,6 +47,8 @@ class Tbb(Package):
version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1',
url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz')
+ provides('tbb')
+
def coerce_to_spack(self, tbb_build_subdir):
for compiler in ["icc", "gcc", "clang"]:
fs = glob.glob(join_path(tbb_build_subdir,
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
index 70c8453d49..8024a5ebea 100644
--- a/var/spack/repos/builtin/packages/intel/package.py
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -22,102 +22,13 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-from spack import *
import os
-import re
-
-
-def filter_pick(input_list, regex_filter):
- """Returns the items in input_list that are found in the regex_filter"""
- return [l for l in input_list for m in (regex_filter(l),) if m]
-
-
-def unfilter_pick(input_list, regex_filter):
- """Returns the items in input_list that are not found in the
- regex_filter"""
- return [l for l in input_list for m in (regex_filter(l),) if not m]
-
-
-def get_all_components():
- """Returns a list of all the components associated with the downloaded
- Intel package"""
- all_components = []
- with open("pset/mediaconfig.xml", "r") as f:
- lines = f.readlines()
- for line in lines:
- if line.find('<Abbr>') != -1:
- component = line[line.find('<Abbr>') + 6:line.find('</Abbr>')]
- all_components.append(component)
- return all_components
-
-class IntelInstaller(Package):
- """Base package containing common methods for installing Intel software"""
-
- homepage = "https://software.intel.com/en-us"
- intel_components = "ALL"
- license_comment = '#'
- license_files = ['Licenses/license.lic']
- license_vars = ['INTEL_LICENSE_FILE']
- license_url = \
- 'https://software.intel.com/en-us/articles/intel-license-manager-faq'
+from spack import *
+from spack.environment import EnvironmentModifications
- @property
- def license_required(self):
- # The Intel libraries are provided without requiring a license as of
- # version 2017.2. Trying to specify the license will fail. See
- # https://software.intel.com/en-us/articles/free-mkl
- if (self.spec.satisfies("intel-mkl@2017.2:") or
- self.spec.satisfies("intel-daal@2017.2:") or
- self.spec.satisfies("intel-mpi@2017.2:") or
- self.spec.satisfies("intel-ipp@2017.2:")):
- return False
- return True
- @property
- def global_license_file(self):
- """Returns the path where a global license file should be stored."""
- if not self.license_files:
- return
- return join_path(self.global_license_dir, "intel",
- os.path.basename(self.license_files[0]))
-
- def install(self, spec, prefix):
-
- if not hasattr(self, "intel_prefix"):
- self.intel_prefix = self.prefix
-
- silent_config_filename = 'silent.cfg'
- with open(silent_config_filename, 'w') as f:
- f.write("""
-ACCEPT_EULA=accept
-PSET_MODE=install
-CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
-PSET_INSTALL_DIR=%s
-NONRPM_DB_DIR=%s
-CONTINUE_WITH_OPTIONAL_ERROR=yes
-COMPONENTS=%s
-""" % (self.intel_prefix, self.intel_prefix, self.intel_components))
-
- # The Intel libraries are provided without requiring a license as of
- # version 2017.2. Trying to specify the license will fail. See
- # https://software.intel.com/en-us/articles/free-mkl
- if not (spec.satisfies("intel-mkl@2017.2:") or
- spec.satisfies("intel-daal@2017.2:") or
- spec.satisfies("intel-mpi@2017.2:") or
- spec.satisfies("intel-ipp@2017.2:")):
- with open(silent_config_filename, 'a') as f:
- f.write("""
-ACTIVATION_LICENSE_FILE=%s
-ACTIVATION_TYPE=license_file
-PHONEHOME_SEND_USAGE_DATA=no
-""" % (self.global_license_file))
-
- install_script = Executable("./install.sh")
- install_script('--silent', silent_config_filename)
-
-
-class Intel(IntelInstaller):
+class Intel(IntelPackage):
"""Intel Compilers."""
homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe"
@@ -126,77 +37,72 @@ class Intel(IntelInstaller):
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11541/parallel_studio_xe_2017_update4_composer_edition.tgz')
version('17.0.3', '52344df122c17ddff3687f84ceb21623',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11464/parallel_studio_xe_2017_update3_composer_edition.tgz')
- version('17.0.2', '2891ab1ece43eb61b6ab892f07c47f01',
+ version('17.0.2', '2891ab1ece43eb61b6ab892f07c47f01',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11302/parallel_studio_xe_2017_update2_composer_edition.tgz')
- version('17.0.1', '1f31976931ed8ec424ac7c3ef56f5e85',
+ version('17.0.1', '1f31976931ed8ec424ac7c3ef56f5e85',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/10978/parallel_studio_xe_2017_update1_composer_edition.tgz')
- version('17.0.0', 'b67da0065a17a05f110ed1d15c3c6312',
+ version('17.0.0', 'b67da0065a17a05f110ed1d15c3c6312',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9656/parallel_studio_xe_2017_composer_edition.tgz')
- version('16.0.4', '2bc9bfc9be9c1968a6e42efb4378f40e',
+ version('16.0.4', '2bc9bfc9be9c1968a6e42efb4378f40e',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9785/parallel_studio_xe_2016_composer_edition_update4.tgz')
- version('16.0.3', '3208eeabee951fc27579177b593cefe9',
+ version('16.0.3', '3208eeabee951fc27579177b593cefe9',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9063/parallel_studio_xe_2016_composer_edition_update3.tgz')
- version('16.0.2', '1133fb831312eb519f7da897fec223fa',
+ version('16.0.2', '1133fb831312eb519f7da897fec223fa',
url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/8680/parallel_studio_xe_2016_composer_edition_update2.tgz')
- variant('rpath', default=True, description="Add rpath to .cfg files")
+ variant('rpath', default=True, description='Add rpath to .cfg files')
- def install(self, spec, prefix):
- components = []
- all_components = get_all_components()
- regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)'
- components = filter_pick(all_components, re.compile(regex).search)
+ components = [
+ # Common files
+ 'intel-comp-',
+ 'intel-openmp',
- self.intel_components = ';'.join(components)
- IntelInstaller.install(self, spec, prefix)
+ # C/C++
+ 'intel-icc',
- absbindir = os.path.split(os.path.realpath(os.path.join(
- self.prefix.bin, "icc")))[0]
- abslibdir = os.path.split(os.path.realpath(os.path.join(
- self.prefix.lib, "intel64", "libimf.a")))[0]
+ # Fortran
+ 'intel-ifort',
+ ]
- # symlink or copy?
- os.symlink(self.global_license_file,
- os.path.join(absbindir, "license.lic"))
-
- if spec.satisfies('+rpath'):
- for compiler_command in ["icc", "icpc", "ifort"]:
- cfgfilename = os.path.join(absbindir, "%s.cfg" %
- compiler_command)
- with open(cfgfilename, "w") as f:
- f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir)
-
- os.symlink(os.path.join(self.prefix.man, "common", "man1"),
- os.path.join(self.prefix.man, "man1"))
+ @property
+ def license_files(self):
+ return [
+ 'Licenses/license.lic',
+ join_path('compilers_and_libraries', 'linux', 'bin',
+ 'intel64', 'license.lic')
+ ]
+
+ @run_after('install')
+ def rpath_configuration(self):
+ if '+rpath' in self.spec:
+ bin_dir = join_path(self.prefix, 'compilers_and_libraries',
+ 'linux', 'bin', 'intel64')
+ lib_dir = join_path(self.prefix, 'compilers_and_libraries',
+ 'linux', 'compiler', 'lib', 'intel64_lin')
+ for compiler in ['icc', 'icpc', 'ifort']:
+ cfgfilename = join_path(bin_dir, '{0}.cfg'.format(compiler))
+ with open(cfgfilename, 'w') as f:
+ f.write('-Xlinker -rpath -Xlinker {0}\n'.format(lib_dir))
def setup_environment(self, spack_env, run_env):
-
- # Remove paths that were guessed but are incorrect for this package.
- run_env.remove_path('LIBRARY_PATH',
- join_path(self.prefix, 'lib'))
- run_env.remove_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib'))
- run_env.remove_path('CPATH',
- join_path(self.prefix, 'include'))
-
- # Add the default set of variables
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'intel64'))
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'intel64'))
- run_env.prepend_path('LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib',
- 'intel64', 'gcc4.4'))
- run_env.prepend_path('LD_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib',
- 'intel64', 'gcc4.4'))
- run_env.prepend_path('CPATH',
- join_path(self.prefix, 'tbb', 'include'))
- run_env.prepend_path('MIC_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'mic'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'lib', 'mic'))
- run_env.prepend_path('MIC_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib', 'mic'))
- run_env.prepend_path('MIC_LD_LIBRARY_PATH',
- join_path(self.prefix, 'tbb', 'lib', 'mic'))
+ """Adds environment variables to the generated module file.
+
+ These environment variables come from running:
+
+ .. code-block:: console
+
+ $ source bin/compilervars.sh intel64
+ """
+ # NOTE: Spack runs setup_environment twice, once pre-build to set up
+ # the build environment, and once post-installation to determine
+ # the environment variables needed at run-time to add to the module
+ # file. The script we need to source is only present post-installation,
+ # so check for its existence before sourcing.
+ # TODO: At some point we should split setup_environment into
+ # setup_build_environment and setup_run_environment to get around
+ # this problem.
+ compilervars = os.path.join(self.prefix.bin, 'compilervars.sh')
+
+ if os.path.isfile(compilervars):
+ run_env.extend(EnvironmentModifications.from_sourcing_file(
+ compilervars, 'intel64'))
diff --git a/var/spack/repos/builtin/packages/isaac-server/jpeg.patch b/var/spack/repos/builtin/packages/isaac-server/jpeg.patch
new file mode 100644
index 0000000000..ee0a74e769
--- /dev/null
+++ b/var/spack/repos/builtin/packages/isaac-server/jpeg.patch
@@ -0,0 +1,34 @@
+diff --git a/server/src/Broker.cpp b/server/src/Broker.cpp
+index 03d60f4..aab449f 100644
+--- a/server/src/Broker.cpp
++++ b/server/src/Broker.cpp
+@@ -108,14 +108,14 @@ MetaDataClient* Broker::addDataClient()
+ }
+ boolean isaac_jpeg_fill_input_buffer(j_decompress_ptr cinfo)
+ {
+- return true;
++ return TRUE;
+ }
+ void isaac_jpeg_skip_input_data(j_decompress_ptr cinfo,long num_bytes)
+ {
+ }
+ boolean isaac_jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired)
+ {
+- return true;
++ return TRUE;
+ }
+ void isaac_jpeg_term_source(j_decompress_ptr cinfo)
+ {
+diff --git a/server/src/URIImageConnector.cpp b/server/src/URIImageConnector.cpp
+index 0b11800..e843aa4 100644
+--- a/server/src/URIImageConnector.cpp
++++ b/server/src/URIImageConnector.cpp
+@@ -40,7 +40,7 @@ void isaac_init_destination(j_compress_ptr cinfo)
+ }
+ boolean isaac_jpeg_empty_output_buffer(j_compress_ptr cinfo)
+ {
+- return true;
++ return TRUE;
+ }
+ void isaac_jpeg_term_destination(j_compress_ptr cinfo)
+ {
diff --git a/var/spack/repos/builtin/packages/isaac-server/package.py b/var/spack/repos/builtin/packages/isaac-server/package.py
index 75e80959ac..38d96c406e 100644
--- a/var/spack/repos/builtin/packages/isaac-server/package.py
+++ b/var/spack/repos/builtin/packages/isaac-server/package.py
@@ -31,22 +31,24 @@ class IsaacServer(CMakePackage):
homepage = "http://computationalradiationphysics.github.io/isaac/"
url = "https://github.com/ComputationalRadiationPhysics/isaac/archive/v1.3.0.tar.gz"
- @property
- def root_cmakelists_dir(self):
- return join_path(self.stage.source_path, 'server')
-
version('develop', branch='dev',
git='https://github.com/ComputationalRadiationPhysics/isaac.git')
version('master', branch='master',
git='https://github.com/ComputationalRadiationPhysics/isaac.git')
+ version('1.3.1', '7fe075f9af68d05355eaba0e224f20ca')
version('1.3.0', 'c8a794da9bb998ef0e75449bfece1a12')
# variant('gstreamer', default=False, description= \
# 'Support for RTP streams, e.g. to Twitch or Youtube')
depends_on('cmake@3.3:', type='build')
- depends_on('libjpeg-turbo', type='link')
+ depends_on('jpeg', type='link')
depends_on('jansson', type='link')
depends_on('boost@1.56:', type='link')
- depends_on('libwebsockets', type='link')
+ depends_on('libwebsockets@2.1.1:', type='link')
# depends_on('gstreamer@1.0', when='+gstreamer')
+
+ # Until the pull request is merged: https://github.com/ComputationalRadiationPhysics/isaac/pull/70
+ patch('jpeg.patch')
+
+ root_cmakelists_dir = 'server'
diff --git a/var/spack/repos/builtin/packages/isaac/package.py b/var/spack/repos/builtin/packages/isaac/package.py
index e54e00630b..77069e47f4 100644
--- a/var/spack/repos/builtin/packages/isaac/package.py
+++ b/var/spack/repos/builtin/packages/isaac/package.py
@@ -31,14 +31,11 @@ class Isaac(CMakePackage):
homepage = "http://computationalradiationphysics.github.io/isaac/"
url = "https://github.com/ComputationalRadiationPhysics/isaac/archive/v1.3.0.tar.gz"
- @property
- def root_cmakelists_dir(self):
- return join_path(self.stage.source_path, 'lib')
-
version('develop', branch='dev',
git='https://github.com/ComputationalRadiationPhysics/isaac.git')
version('master', branch='master',
git='https://github.com/ComputationalRadiationPhysics/isaac.git')
+ version('1.3.1', '7fe075f9af68d05355eaba0e224f20ca')
version('1.3.0', 'c8a794da9bb998ef0e75449bfece1a12')
variant('cuda', default=True,
@@ -47,10 +44,12 @@ class Isaac(CMakePackage):
# description='Generate kernels via Alpaka, for CPUs or GPUs')
depends_on('cmake@3.3:', type='build')
- depends_on('libjpeg-turbo', type='link')
+ depends_on('jpeg', type='link')
depends_on('jansson', type='link')
depends_on('boost@1.56:', type='link')
depends_on('cuda@7.0:', type='link', when='+cuda')
# depends_on('alpaka', when='+alpaka')
depends_on('icet', type='link')
depends_on('mpi', type='link')
+
+ root_cmakelists_dir = 'lib'
diff --git a/var/spack/repos/builtin/packages/itsx/package.py b/var/spack/repos/builtin/packages/itsx/package.py
new file mode 100644
index 0000000000..41b0d9a6a2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/itsx/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Itsx(Package):
+ """Improved software detection and extraction of ITS1 and ITS2 from
+ ribosomal ITS sequences of fungi and other eukaryotes for use in
+ environmental sequencing"""
+
+ homepage = "http://microbiology.se/software/itsx/"
+ url = "http://microbiology.se/sw/ITSx_1.0.11.tar.gz"
+
+ version('1.0.11', '1bff12f1d5742f19be6ca585e9bf81fa')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('hmmer')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('ITSx', prefix.bin)
+ install_tree('ITSx_db', prefix.bin.ITSx_db)
diff --git a/var/spack/repos/builtin/packages/jasper/package.py b/var/spack/repos/builtin/packages/jasper/package.py
index ed188ca922..bf7bf91995 100644
--- a/var/spack/repos/builtin/packages/jasper/package.py
+++ b/var/spack/repos/builtin/packages/jasper/package.py
@@ -38,7 +38,7 @@ class Jasper(AutotoolsPackage):
variant('debug', default=False,
description='Builds debug versions of the libraries')
- depends_on('libjpeg-turbo')
+ depends_on('jpeg')
# Fixes a bug (still in upstream as of v.1.900.1) where an assertion fails
# when certain JPEG-2000 files with an alpha channel are processed
diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py
index a018529bae..65dad76ce2 100644
--- a/var/spack/repos/builtin/packages/jdk/package.py
+++ b/var/spack/repos/builtin/packages/jdk/package.py
@@ -48,6 +48,8 @@ class Jdk(Package):
# For instructions on how to find the magic URL, see:
# https://gist.github.com/P7h/9741922
# https://linuxconfig.org/how-to-install-java-se-development-kit-on-debian-linux
+ version('8u141-b15', '8cf4c4e00744bfafc023d770cb65328c', curl_options=curl_options,
+ url='http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz')
version('8u131-b11', '75b2cb2249710d822a60f83e28860053', curl_options=curl_options,
url='http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz')
version('8u92-b14', '65a1cc17ea362453a6e0eb4f13be76e4', curl_options=curl_options)
@@ -58,6 +60,9 @@ class Jdk(Package):
# away you go.
version('7u80-b0', '6152f8a7561acf795ca4701daa10a965')
+ provides('java@8', when='@8u0:8u999')
+ provides('java@7', when='@7u0:7u999')
+
def url_for_version(self, version):
url = "http://download.oracle.com/otn-pub/java/jdk/{0}/jdk-{1}-linux-x64.tar.gz"
version = str(version)
diff --git a/var/spack/repos/builtin/packages/jmol/package.py b/var/spack/repos/builtin/packages/jmol/package.py
index 3529515d3f..f07e07f866 100644
--- a/var/spack/repos/builtin/packages/jmol/package.py
+++ b/var/spack/repos/builtin/packages/jmol/package.py
@@ -35,7 +35,7 @@ class Jmol(Package):
version('14.8.0', '3c9f4004b9e617ea3ea0b78ab32397ea')
- depends_on('jdk', type='run')
+ depends_on('java', type='run')
def install(self, spec, prefix):
copy_tree('jmol-{0}'.format(self.version), prefix)
diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py
index d21b948264..1889bffc1e 100644
--- a/var/spack/repos/builtin/packages/jsoncpp/package.py
+++ b/var/spack/repos/builtin/packages/jsoncpp/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Jsoncpp(Package):
+class Jsoncpp(CMakePackage):
"""JsonCpp is a C++ library that allows manipulating JSON values,
including serialization and deserialization to and from strings.
It can also preserve existing comment in unserialization/serialization
@@ -36,14 +36,14 @@ class Jsoncpp(Package):
version('1.7.3', 'aff6bfb5b81d9a28785429faa45839c5')
- depends_on('cmake', type='build')
- # depends_on('python', type='test')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo',
+ 'MinSizeRel', 'Coverage'))
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', '-DBUILD_SHARED_LIBS=ON', *std_cmake_args)
+ depends_on('cmake@3.1:', type='build')
+ # TODO: Add a 'test' deptype
+ # depends_on('python', type='test')
- make()
- if self.run_tests:
- make('test') # Python needed to run tests
- make('install')
+ def cmake_args(self):
+ return ['-DBUILD_SHARED_LIBS=ON']
diff --git a/var/spack/repos/builtin/packages/kahip/package.py b/var/spack/repos/builtin/packages/kahip/package.py
index 2bc127a4c2..b02e6de8f4 100644
--- a/var/spack/repos/builtin/packages/kahip/package.py
+++ b/var/spack/repos/builtin/packages/kahip/package.py
@@ -29,7 +29,7 @@ import os
import re
-class Kahip(Package):
+class Kahip(SConsPackage):
"""KaHIP - Karlsruhe High Quality Partitioning - is a family of graph
partitioning programs. It includes KaFFPa (Karlsruhe Fast Flow
Partitioner), which is a multilevel graph partitioning algorithm,
@@ -46,17 +46,25 @@ class Kahip(Package):
url = 'http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.00.tar.gz'
version('develop', git='https://github.com/schulzchristian/KaHIP.git')
- version('2.00', '9daeda32f43c90570ed436d5d93c8a872b1a14d8')
+ version('2.00', '0a66b0a604ad72cfb7e3dce00e2c9fdfac82b855')
depends_on('argtable')
depends_on('mpi') # Note: upstream package only tested on openmpi
- depends_on('scons', type='build')
- phases = ['build', 'install']
+ conflicts('%clang')
- #
- # - End of definitions / setup -
- #
+ def patch(self):
+ """Internal compile.sh scripts hardcode number of cores to build with.
+ Filter these out so Spack can control it."""
+
+ files = [
+ 'compile.sh',
+ 'parallel/modified_kahip/compile.sh',
+ 'parallel/parallel_src/compile.sh',
+ ]
+
+ for f in files:
+ filter_file('NCORES=.*', 'NCORES={0}'.format(make_jobs), f)
def build(self, spec, prefix):
"""Build using the KaHIP compile.sh script. Uses scons internally."""
diff --git a/var/spack/repos/builtin/packages/kallisto/package.py b/var/spack/repos/builtin/packages/kallisto/package.py
new file mode 100644
index 0000000000..c0f70aa1c0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kallisto/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Kallisto(CMakePackage):
+ """kallisto is a program for quantifying abundances of transcripts from
+ RNA-Seq data."""
+
+ homepage = "http://pachterlab.github.io/kallisto"
+ url = "https://github.com/pachterlab/kallisto/archive/v0.43.1.tar.gz"
+
+ version('0.43.1', '54fc9b70ca44e4633f02c962cbc59737')
+
+ depends_on('zlib')
+ depends_on('hdf5')
+ depends_on('mpich')
diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py
index b417c6be78..296090ef28 100644
--- a/var/spack/repos/builtin/packages/kealib/package.py
+++ b/var/spack/repos/builtin/packages/kealib/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Kealib(Package):
+class Kealib(CMakePackage):
"""An HDF5 Based Raster File Format
KEALib provides an implementation of the GDAL data model.
@@ -46,16 +46,13 @@ class Kealib(Package):
version('1.4.5', '112e9c42d980b2d2987a3c15d0833a5d')
- depends_on("hdf5")
+ depends_on('hdf5')
+ depends_on('cmake@2.8.10:', type='build')
- def install(self, spec, prefix):
- with working_dir('trunk', create=False):
- cmake_args = []
- cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix)
- cmake_args.append("-DHDF5_INCLUDE_DIR=%s" %
- spec['hdf5'].prefix.include)
- cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib)
- cmake('.', *cmake_args)
+ root_cmakelists_dir = 'trunk'
- make()
- make("install")
+ def cmake_args(self):
+ return [
+ '-DHDF5_INCLUDE_DIR=%s' % self.spec['hdf5'].prefix.include,
+ '-DHDF5_LIB_PATH=%s' % self.spec['hdf5'].prefix.lib,
+ ]
diff --git a/var/spack/repos/builtin/packages/kentutils/package.py b/var/spack/repos/builtin/packages/kentutils/package.py
new file mode 100644
index 0000000000..65d46f563d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/kentutils/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Kentutils(MakefilePackage):
+ """Jim Kent command line bioinformatic utilities"""
+
+ homepage = "https://github.com/ENCODE-DCC/kentUtils"
+ url = "https://github.com/ENCODE-DCC/kentUtils"
+
+ version('302.1', git='https://github.com/ENCODE-DCC/kentUtils.git', commit='d8376c5d52a161f2267346ed3dc94b5dce74c2f9')
+
+ depends_on('libpng')
+ depends_on('openssl')
+
+ # Actually depends on mysql, but mariadb works for now until mysql is
+ # available
+ depends_on('mariadb')
+
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%intel')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py
index 1be19448a9..e8b63476da 100644
--- a/var/spack/repos/builtin/packages/kripke/package.py
+++ b/var/spack/repos/builtin/packages/kripke/package.py
@@ -25,33 +25,33 @@
from spack import *
-class Kripke(Package):
+class Kripke(CMakePackage):
"""Kripke is a simple, scalable, 3D Sn deterministic particle
transport proxy/mini app.
"""
homepage = "https://codesign.llnl.gov/kripke.php"
url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz"
+ tags = ['proxy-app']
version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf')
variant('mpi', default=True, description='Build with MPI.')
variant('openmp', default=True, description='Build with OpenMP enabled.')
- depends_on('mpi', when="+mpi")
+ depends_on('mpi', when='+mpi')
+ depends_on('cmake@3.0:', type='build')
+
+ def cmake_args(self):
+ def enabled(variant):
+ return (1 if variant in self.spec else 0)
+
+ return [
+ '-DENABLE_OPENMP=%d' % enabled('+openmp'),
+ '-DENABLE_MPI=%d' % enabled('+mpi'),
+ ]
def install(self, spec, prefix):
- with working_dir('build', create=True):
- def enabled(variant):
- return (1 if variant in spec else 0)
-
- cmake('-DCMAKE_INSTALL_PREFIX:PATH=.',
- '-DENABLE_OPENMP=%d' % enabled('+openmp'),
- '-DENABLE_MPI=%d' % enabled('+mpi'),
- '..',
- *std_cmake_args)
- make()
-
- # Kripke does not provide install target, so we have to copy
- # things into place.
- mkdirp(prefix.bin)
- install('kripke', prefix.bin)
+ # Kripke does not provide install target, so we have to copy
+ # things into place.
+ mkdirp(prefix.bin)
+ install('spack-build/kripke', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index c1909451d1..b66712d02e 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -74,7 +74,7 @@ class Lammps(MakefilePackage):
config.append('CCFLAGS = -fopenmp')
config.append('LINKFLAGS = -fopenmp $(OPTFLAGS)')
- config.append('SHFLAGS = -fPIC')
+ config.append('SHFLAGS = {0}'.format(self.compiler.pic_flag))
config.append('DEPFLAGS = -M')
config.append('LINK = c++')
@@ -202,5 +202,5 @@ class Lammps(MakefilePackage):
install('liblammps_{0}.{1}'.format(self.target_name,
dso_suffix), prefix.lib)
- # TODO: install the necessary headers
- mkdirp(prefix.include)
+ mkdirp(prefix.include.lammps)
+ install('library.h', prefix.include.lammps)
diff --git a/var/spack/repos/builtin/packages/last/package.py b/var/spack/repos/builtin/packages/last/package.py
new file mode 100644
index 0000000000..49d561f89b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/last/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Last(MakefilePackage):
+ """LAST finds similar regions between sequences, and aligns them. It is
+ designed for comparing large datasets to each other (e.g. vertebrate
+ genomes and/or large numbers of DNA reads)."""
+
+ homepage = "http://last.cbrc.jp/"
+ url = "http://last.cbrc.jp/last-869.zip"
+
+ version('869', '12dced14418fb924a1b0604593274973')
+
+ def install(self, spec, prefix):
+ make('install', 'prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py
index b79f9244c9..9b0e249314 100644
--- a/var/spack/repos/builtin/packages/lbann/package.py
+++ b/var/spack/repos/builtin/packages/lbann/package.py
@@ -36,48 +36,53 @@ class Lbann(CMakePackage):
version('develop', git='https://github.com/LLNL/lbann.git', branch="develop")
version('0.91', '83b0ec9cd0b7625d41dfb06d2abd4134')
- variant('debug', default=False, description='Builds a debug version of the libraries')
variant('gpu', default=False, description='Builds with support for GPUs via CUDA and cuDNN')
variant('opencv', default=True, description='Builds with support for image processing routines with OpenCV')
variant('seq_init', default=False, description='Force serial initialization of weight matrices.')
+ variant('dtype', default=4, description='Size (bits) of floating point representation for weights')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
- depends_on('elemental +openmp_blas +scalapack +shared +int64')
- depends_on('elemental +openmp_blas +scalapack +shared +int64 +debug', when='+debug')
+ depends_on('elemental +openmp_blas +shared +int64')
+ depends_on('elemental +openmp_blas +shared +int64 build_type=Debug',
+ when=('build_type=Debug'))
depends_on('cuda', when='+gpu')
depends_on('mpi')
- depends_on('opencv@3.2.0', when='+opencv')
+ depends_on('hwloc')
+ depends_on('opencv@3.2.0: +openmp +core +highgui +imgproc +jpeg +png +tiff +zlib', when='+opencv')
depends_on('protobuf@3.0.2:')
-
- def build_type(self):
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
+ depends_on('cnpy')
def cmake_args(self):
spec = self.spec
# Environment variables
CPPFLAGS = []
CPPFLAGS.append('-DLBANN_SET_EL_RNG')
- if '~seq_init' in spec:
- CPPFLAGS.append('-DLBANN_PARALLEL_RANDOM_MATRICES')
+
+ CPPFLAGS.append('-DLBANN_DATATYPE={0}'.format(
+ int(spec.variants['dtype'].value)))
args = [
'-DCMAKE_INSTALL_MESSAGE=LAZY',
'-DCMAKE_CXX_FLAGS=%s' % ' '.join(CPPFLAGS),
'-DWITH_CUDA:BOOL=%s' % ('+gpu' in spec),
'-DWITH_CUDNN:BOOL=%s' % ('+gpu' in spec),
+ '-DELEMENTAL_USE_CUBLAS:BOOL=%s' % (
+ '+cublas' in spec['elemental']),
'-DWITH_TBINF=OFF',
'-DWITH_VTUNE=OFF',
- '-DElemental_DIR={0}'.format(self.spec['elemental'].prefix),
+ '-DElemental_DIR={0}'.format(spec['elemental'].prefix),
+ '-DCNPY_DIR={0}'.format(spec['cnpy'].prefix),
'-DELEMENTAL_MATH_LIBS={0}'.format(
- self.spec['elemental'].libs),
+ spec['elemental'].libs),
+ '-DSEQ_INIT:BOOL=%s' % ('+seq_init' in spec),
'-DVERBOSE=0',
'-DLBANN_HOME=.',
'-DLBANN_VER=spack']
- if '+opencv' in self.spec:
+ if '+opencv' in spec:
args.extend(['-DOpenCV_DIR:STRING={0}'.format(
- self.spec['opencv'].prefix)])
+ spec['opencv'].prefix)])
return args
diff --git a/var/spack/repos/builtin/packages/lcals/package.py b/var/spack/repos/builtin/packages/lcals/package.py
new file mode 100644
index 0000000000..c34907472a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/lcals/package.py
@@ -0,0 +1,122 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+import platform
+
+
+class Lcals(MakefilePackage):
+ """LCALS ("Livermore Compiler Analysis Loop Suite") is a collection of loop
+ kernels based, in part, on historical "Livermore Loops" benchmarks
+ (See the 1986 technical report: "The Livermore Fortran Kernels:
+ A Computer Test of the Numerical Performance Range",
+ by Frank H. McMahon, UCRL-53745.). The suite contains facilities to
+ generate timing statistics and reports."""
+
+ homepage = "https://codesign.llnl.gov/LCALS-downloads/"
+ url = "https://codesign.llnl.gov/LCALS-downloads/lcals-v1.0.2.tgz"
+
+ tags = ['proxy-app']
+
+ version('1.0.2', '40c65a88f1df1436a2f72b7d3c986a21')
+
+ variant(
+ 'microarch',
+ description='Micro arch: SSE, AVX, MIC.',
+ default='sse',
+ values=('sse', 'avx', 'MIC'),
+ )
+
+ @property
+ def build_targets(self):
+
+ targets = []
+
+ cxxflags = '-std=c++0x '
+ cxx_compile = ''
+
+ microarch = self.spec.variants['microarch'].value
+
+ arch = platform.machine()
+
+ if microarch == 'MIC':
+ arch = 'MIC'
+ elif arch == 'x86_64' or arch == 'x86_32':
+ arch = 'x86'
+ elif arch != 'bgq':
+ raise InstallError('unknown architecture.')
+
+ if self.compiler.name == 'intel':
+ if arch == 'MIC':
+ cxxflags += '-DLCALS_PLATFORM_X86_SSE -DLCALS_COMPILER_ICC '
+ cxx_compile += '-g -O3 -mmic -vec-report3 '
+ ' -inline-max-total-size=10000 -inline-forceinline -ansi-alias'
+ elif microarch == 'sse' and arch == 'x86':
+ cxxflags += '-DLCALS_PLATFORM_X86_SSE -DLCALS_COMPILER_ICC '
+ cxx_compile += '-O3 -msse4.1 -inline-max-total-size=10000'
+ ' -inline-forceinline -ansi-alias -std=c++0x '
+ elif microarch == 'avx' and arch == 'x86':
+ cxxflags += '-DLCALS_PLATFORM_X86_AVX -DLCALS_COMPILER_ICC '
+ cxx_compile += '-O3 -mavx -inline-max-total-size=10000'
+ ' -inline-forceinline -ansi-alias -std=c++0x'
+ cxxflags += self.compiler.openmp_flag
+ elif self.compiler.name == 'gcc':
+ if arch == 'MIC' or (microarch == 'sse' and arch == 'x86'):
+ cxxflags += '-DLCALS_PLATFORM_X86_SSE -DLCALS_COMPILER_GNU '
+ cxx_compile += '-Ofast -msse4.1 -finline-functions'
+ ' -finline-limit=10000 -std=c++11 '
+ elif microarch == 'avx' and arch == 'x86':
+ cxxflags += '-DLCALS_PLATFORM_X86_AVX -DLCALS_COMPILER_GNU '
+ cxx_compile += '-Ofast -mavx -finline-functions'
+ ' -finline-limit=10000 -std=c++11'
+ elif arch == 'bgq':
+ cxxflags += '-DLCALS_PLATFORM_BGQ -DLCALS_COMPILER_GNU '
+ cxx_compile += '-O3 -finline-functions -finline-limit=10000'
+ ' -std=c++0x'
+ cxxflags += self.compiler.openmp_flag
+ elif self.compiler.name == 'xl' and arch == 'bgp':
+ if self.compiler.version == Version('9') and arch == 'bgp':
+ cxxflags += '-DLCALS_PLATFORM_BGP -DLCALS_COMPILER_XLC9 '
+ cxx_compile += 'O3 -qarch=450d -qtune=450 -qalias=allp -qhot'
+ ' -qsmp=omp '
+ elif self.compiler.version == Version('12') and arch == 'bgq':
+ cxxflags += '-DLCALS_PLATFORM_BGQ -DLCALS_COMPILER_XLC12 '
+ cxx_compile += '-O3 -qarch=qp -qhot=novector -qsimd=auto'
+ ' -qlanglvl=extended0x -qnostrict -qinline=10000 -qsmp=omp '
+ elif self.compiler.name == 'clang':
+ if arch == 'bgq':
+ cxxflags += '-DLCALS_PLATFORM_BGQ -DLCALS_COMPILER_CLANG '
+ cxx_compile += '-O3 -finline-functions -ffast-math -std=c++0x'
+
+ targets.append('LCALS_ARCH=')
+ cxx_compile += ' ' + cxxflags
+ targets.append('CXX_COMPILE={0} {1}'.format(spack_cxx, cxx_compile))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('lcals.exe', prefix.bin)
+ install('lcalsversioninfo.txt', prefix)
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index 79a1ee533d..3bcd37e306 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -46,7 +46,6 @@ class Legion(CMakePackage):
version('develop', git='https://github.com/StanfordLegion/legion', branch='master')
version('17.02.0', '31ac3004e2fb0996764362d2b6f6844a')
- variant('debug', default=False, description='Build debug version')
variant('mpi', default=True,
description='Build on top of mpi conduit for mpi inoperability')
variant('shared', default=True, description='Build shared libraries')
@@ -55,13 +54,6 @@ class Legion(CMakePackage):
depends_on("gasnet", when='~mpi')
depends_on("gasnet+mpi", when='+mpi')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = [
'-DLegion_USE_GASNet=ON',
diff --git a/var/spack/repos/builtin/packages/libaec/package.py b/var/spack/repos/builtin/packages/libaec/package.py
new file mode 100644
index 0000000000..87bca8d54a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libaec/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libaec(CMakePackage):
+ """Libaec provides fast lossless compression of 1 up to 32 bit wide signed
+ or unsigned integers (samples). It implements Golomb-Rice compression
+ method under the BSD license and includes a free drop-in replacement for
+ the SZIP library.
+ """
+
+ homepage = 'https://gitlab.dkrz.de/k202009/libaec'
+ url = 'https://gitlab.dkrz.de/k202009/libaec/uploads/631e85bcf877c2dcaca9b2e6d6526339/libaec-1.0.0.tar.gz'
+ list_url = 'https://gitlab.dkrz.de/k202009/libaec/tags'
+
+ provides('szip')
+
+ version('1.0.1', 'cdf70e2b8f9153ee644710bb441f9e1e')
+ version('1.0.0', 'a848b4e397ed210313183a5e92592e42')
diff --git a/var/spack/repos/builtin/packages/libbeagle/package.py b/var/spack/repos/builtin/packages/libbeagle/package.py
new file mode 100644
index 0000000000..f459c5f738
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libbeagle/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libbeagle(AutotoolsPackage):
+ """Beagle performs genotype calling, genotype phasing, imputation of
+ ungenotyped markers, and identity-by-descent segment detection."""
+
+ homepage = "https://github.com/beagle-dev/beagle-lib"
+ url = "https://github.com/beagle-dev/beagle-lib/archive/beagle_release_2_1_2.tar.gz"
+
+ version('2.1.2', '1107614e86f652f8ee45c1c92f2af3d4')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+
+ depends_on('subversion', type='build')
+ depends_on('pkg-config', type='build')
+
+ def url_for_version(self, version):
+ url = "https://github.com/beagle-dev/beagle-lib/archive/beagle_release_{0}.tar.gz"
+ return url.format(version.underscored)
diff --git a/var/spack/repos/builtin/packages/libbsd/cdefs.h.patch b/var/spack/repos/builtin/packages/libbsd/cdefs.h.patch
new file mode 100644
index 0000000000..acd3843a06
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libbsd/cdefs.h.patch
@@ -0,0 +1,15 @@
+--- a/nclude/bsd/sys/cdefs.h.orig 2017-08-04 16:34:56.404995800 -0700
++++ b/include/bsd/sys/cdefs.h 2017-08-04 16:35:19.345043883 -0700
+@@ -25,10 +25,10 @@
+ */
+
+ #ifndef __has_include
+-#define __has_include 1
++#define __has_include(X) 1
+ #endif
+ #ifndef __has_include_next
+-#define __has_include_next 1
++#define __has_include_next(X) 1
+ #endif
+
+ #ifdef LIBBSD_OVERLAY
diff --git a/var/spack/repos/builtin/packages/libbsd/package.py b/var/spack/repos/builtin/packages/libbsd/package.py
new file mode 100644
index 0000000000..1f0edc090b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libbsd/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libbsd(AutotoolsPackage):
+ """This library provides useful functions commonly found on BSD
+ systems, and lacking on others like GNU systems, thus making it easier
+ to port projects with strong BSD origins, without needing to embed the
+ same code over and over again on each project.
+ """
+
+ homepage = "https://libbsd.freedesktop.org/wiki/"
+ url = "https://libbsd.freedesktop.org/releases/libbsd-0.8.6.tar.xz"
+
+ version('0.8.6', '4ab7bec639af17d0aacb50222b479110')
+
+ patch('cdefs.h.patch', when='%gcc@:4')
diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py
index 00422b4417..b0715e2dba 100644
--- a/var/spack/repos/builtin/packages/libdrm/package.py
+++ b/var/spack/repos/builtin/packages/libdrm/package.py
@@ -27,13 +27,13 @@ import sys
class Libdrm(Package):
- """A userspace library for accessing the DRM, direct
- rendering manager, on Linux, BSD and other operating
- systems that support the ioctl interface."""
+ """A userspace library for accessing the DRM, direct rendering manager,
+ on Linux, BSD and other systems supporting the ioctl interface."""
homepage = "http://dri.freedesktop.org/libdrm/"
url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz"
+ version('2.4.81', 'dc575dd661a082390e9f1366ca5734b0')
version('2.4.75', '743c16109d91a2539dfc9cc56130d695')
version('2.4.70', 'a8c275bce5f3d71a5ca25e8fb60df084')
version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6')
diff --git a/var/spack/repos/builtin/packages/libemos/package.py b/var/spack/repos/builtin/packages/libemos/package.py
index 371a8437b7..b8840e526d 100644
--- a/var/spack/repos/builtin/packages/libemos/package.py
+++ b/var/spack/repos/builtin/packages/libemos/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Libemos(Package):
+class Libemos(CMakePackage):
"""The Interpolation library (EMOSLIB) includes Interpolation software and
BUFR & CREX encoding/decoding routines."""
@@ -37,27 +37,27 @@ class Libemos(Package):
variant('eccodes', default=False,
description="Use eccodes instead of grib-api for GRIB decoding")
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'Production'))
- depends_on('cmake', type='build')
depends_on('eccodes', when='+eccodes')
depends_on('grib-api', when='~eccodes')
depends_on('fftw+float+double')
+ depends_on('cmake@2.8.11:', type='build')
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
+ def cmake_args(self):
+ spec = self.spec
+ args = []
if spec.satisfies('+eccodes'):
- options.append('-DENABLE_ECCODES=ON')
- options.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
+ args.append('-DENABLE_ECCODES=ON')
+ args.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
else:
- options.append('-DENABLE_ECCODES=OFF')
- options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
+ args.append('-DENABLE_ECCODES=OFF')
+ args.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
# To support long pathnames that spack generates
- options.append('-DCMAKE_Fortran_FLAGS=-ffree-line-length-none')
+ args.append('-DCMAKE_Fortran_FLAGS=-ffree-line-length-none')
- with working_dir('spack-build', create=True):
- cmake('..', *options)
- make()
- make('install')
+ return args
diff --git a/var/spack/repos/builtin/packages/libevpath/package.py b/var/spack/repos/builtin/packages/libevpath/package.py
new file mode 100644
index 0000000000..40ed3eeb99
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libevpath/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libevpath(CMakePackage):
+ """EVpath is an event transport middleware layer designed to allow
+ for the easy implementation of overlay networks, with
+ active data processing, routing and management at all points
+ in the overlay. EVPath is designed for high performance systems.
+ """
+
+ homepage = "https://github.com/GTkorvo/evpath"
+ url = "https://github.com/GTkorvo/evpath/archive/v4.1.1.tar.gz"
+
+ version('develop', git='https://github.com/GTkorvo/evpath.git',
+ branch='master')
+ version('4.2.1', 'f928dc0dee41668afc91634c7051ce1a')
+ version('4.1.2', '1a187f55431c991ae7040e3ff041d75c')
+ version('4.1.1', '65a8db820f396ff2926e3d31908d123d')
+
+ depends_on('libffs')
+
+ def cmake_args(self):
+ args = ["-DENABLE_TESTING=0", "-DTARGET_CNL=1",
+ "-DBUILD_SHARED_STATIC=STATIC"]
+ return args
diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py
new file mode 100644
index 0000000000..b90e2fa262
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libfabric/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libfabric(AutotoolsPackage):
+ """The Open Fabrics Interfaces (OFI) is a framework focused on exporting
+ fabric communication services to applications."""
+
+ homepage = "https://libfabric.org/"
+ url = "https://github.com/ofiwg/libfabric/releases/download/v1.5.0/libfabric-1.5.0.tar.gz"
+
+ version('1.5.0', 'fda3e9b31ebe184f5157288d059672d6')
+
+ fabrics = ('psm',
+ 'psm2',
+ 'sockets',
+ 'verbs',
+ 'usnic',
+ 'mxm',
+ 'gni',
+ 'xpmem',
+ 'udp',
+ 'rxm',
+ 'rxd')
+
+ variant(
+ 'fabrics',
+ default='sockets',
+ description='A list of enabled fabrics',
+ values=fabrics,
+ multi=True
+ )
+
+ def configure_args(self):
+ args = []
+
+ args.extend(['--enable-%s=%s' %
+ (f, 'yes' if 'fabrics=%s' % f in self.spec else 'no')
+ for f in self.fabrics])
+
+ return args
diff --git a/var/spack/repos/builtin/packages/libffs/package.py b/var/spack/repos/builtin/packages/libffs/package.py
new file mode 100644
index 0000000000..9513e146bc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libffs/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libffs(CMakePackage):
+ """FFS is a middleware library for data communication,
+ including representation, processing and marshaling
+ that preserves the performance of traditional approaches
+ while relaxing the requirement of a priori knowledge
+ and providing complex run-time flexibility.
+ """
+
+ homepage = "http://www.cc.gatech.edu/systems/projects/FFS"
+ url = "https://github.com/GTkorvo/ffs/archive/v1.1.tar.gz"
+
+ version('develop', git='https://github.com/GTkorvo/ffs.git',
+ branch='master')
+ version('1.1.1', 'aa1c8ad5cf35e8cf76735e3a60891509')
+ version('1.1', '561c6b3abc53e12b3c01192e8ef2ffbc')
+
+ depends_on('gtkorvo-atl')
+ depends_on('gtkorvo-dill')
+ depends_on('gtkorvo-cercs-env')
+
+ def cmake_args(self):
+ args = ["-DENABLE_TESTING=0", "-DTARGET_CNL=1",
+ "-DBUILD_SHARED_STATIC=STATIC"]
+ return args
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 3853d2c57f..34600e742a 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -61,19 +61,32 @@ class Libint(AutotoolsPackage):
aclocal('-I', 'lib/autoconf')
autoconf()
+ @property
+ def optflags(self):
+ flags = '-O2'
+
+ # Optimizations for the Intel compiler, suggested by CP2K
+ if '%intel' in self.spec:
+ # -xSSE2 will make it usable on old architecture
+ flags += ' -xSSE2 -xAVX -axCORE-AVX2 -ipo'
+
+ return flags
+
+ def setup_environment(self, build_env, run_env):
+ # Set optimization flags
+ build_env.set('CFLAGS', self.optflags)
+ build_env.set('CXXFLAGS', self.optflags)
+
+ # Change AR to xiar if we compile with Intel and we
+ # find the executable
+ if '%intel' in self.spec and which('xiar'):
+ build_env.set('AR', 'xiar')
+
def configure_args(self):
config_args = ['--enable-shared']
- # Optimizations for the Intel compiler, suggested by CP2K
- optflags = '-O2'
- if self.compiler.name == 'intel':
- optflags += ' -xAVX -axCORE-AVX2 -ipo'
- if which('xiar'):
- env['AR'] = 'xiar'
-
- env['CFLAGS'] = optflags
- env['CXXFLAGS'] = optflags
+ optflags = self.optflags
# Optimization flag names have changed in libint 2
if self.version < Version('2.0.0'):
diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
index 3573390b7d..e0eca52a41 100644
--- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
@@ -37,6 +37,8 @@ class LibjpegTurbo(AutotoolsPackage):
version('1.5.0', '3fc5d9b6a8bce96161659ae7a9939257')
version('1.3.1', '2c3a68129dac443a72815ff5bb374b05')
+ provides('jpeg')
+
# Can use either of these. But in the current version of the package
# only nasm is used. In order to use yasm an environmental variable
# NASM must be set.
diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/libjpeg/package.py
index babb6e5f82..9829b30547 100644
--- a/var/spack/repos/builtin/packages/jpeg/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Jpeg(AutotoolsPackage):
+class Libjpeg(AutotoolsPackage):
"""libjpeg is a widely used free library with functions for handling the
JPEG image data format. It implements a JPEG codec (encoding and decoding)
alongside various utilities for handling JPEG data."""
@@ -35,3 +35,5 @@ class Jpeg(AutotoolsPackage):
version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb')
version('9a', '3353992aecaee1805ef4109aadd433e7')
+
+ provides('jpeg')
diff --git a/var/spack/repos/builtin/packages/libpipeline/package.py b/var/spack/repos/builtin/packages/libpipeline/package.py
new file mode 100644
index 0000000000..2d51755633
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libpipeline/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libpipeline(AutotoolsPackage):
+ """libpipeline is a C library for manipulating pipelines of subprocesses
+ in a flexible and convenient way."""
+
+ homepage = "http://libpipeline.nongnu.org/"
+ url = "http://git.savannah.nongnu.org/cgit/libpipeline.git/snapshot/libpipeline-1.4.2.tar.gz"
+
+ version('1.4.2', '30cec7bcd6fee723adea6a54389f3da2')
+
+ depends_on('pkg-config', type='build')
+ # TODO: Add a 'test' deptype
+ # See https://github.com/LLNL/spack/issues/1279
+ # depends_on('check', type='test')
diff --git a/var/spack/repos/builtin/packages/libsplash/package.py b/var/spack/repos/builtin/packages/libsplash/package.py
index 2a0d2dfb09..c2d8bc1881 100644
--- a/var/spack/repos/builtin/packages/libsplash/package.py
+++ b/var/spack/repos/builtin/packages/libsplash/package.py
@@ -37,7 +37,7 @@ class Libsplash(CMakePackage):
homepage = "https://github.com/ComputationalRadiationPhysics/libSplash"
url = "https://github.com/ComputationalRadiationPhysics/libSplash/archive/v1.4.0.tar.gz"
- version('dev', branch='dev',
+ version('develop', branch='dev',
git='https://github.com/ComputationalRadiationPhysics/libSplash.git')
version('master', branch='master',
git='https://github.com/ComputationalRadiationPhysics/libSplash.git')
diff --git a/var/spack/repos/builtin/packages/libsvm/package.py b/var/spack/repos/builtin/packages/libsvm/package.py
new file mode 100644
index 0000000000..3a52d4f3ef
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsvm/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libsvm(MakefilePackage):
+ """Libsvm is a simple, easy-to-use, and efficient software for SVM
+ classification and regression."""
+
+ homepage = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/"
+ url = "https://github.com/cjlin1/libsvm/archive/v322.tar.gz"
+
+ version('322', 'd9617d29efad013573f63ca9a517f490')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.lib)
+ install('svm-predict', prefix.bin)
+ install('svm-scale', prefix.bin)
+ install('svm-train', prefix.bin)
+ install('svm.o', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/szip/package.py b/var/spack/repos/builtin/packages/libszip/package.py
index 176006e70f..838b81b63b 100644
--- a/var/spack/repos/builtin/packages/szip/package.py
+++ b/var/spack/repos/builtin/packages/libszip/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Szip(AutotoolsPackage):
+class Libszip(AutotoolsPackage):
"""Szip is an implementation of the extended-Rice lossless
compression algorithm.
@@ -33,13 +33,20 @@ class Szip(AutotoolsPackage):
provided with HDF software products.
"""
- homepage = "https://www.hdfgroup.org/doc_resource/SZIP/"
- url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
+ homepage = "https://support.hdfgroup.org/doc_resource/SZIP/"
+ url = "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz"
+ list_url = "https://support.hdfgroup.org/ftp/lib-external/szip"
+ list_depth = 2
- version('2.1', '902f831bcefb69c6b635374424acbead')
+ provides('szip')
+
+ version('2.1.1', 'dd579cf0f26d44afd10a0ad7291fc282')
+ version('2.1', '902f831bcefb69c6b635374424acbead')
def configure_args(self):
- return ['--enable-production',
- '--enable-shared',
- '--enable-static',
- '--enable-encoding']
+ return [
+ '--enable-production',
+ '--enable-shared',
+ '--enable-static',
+ '--enable-encoding',
+ ]
diff --git a/var/spack/repos/builtin/packages/libwebsockets/package.py b/var/spack/repos/builtin/packages/libwebsockets/package.py
index d74ff72273..b840c9d0f0 100644
--- a/var/spack/repos/builtin/packages/libwebsockets/package.py
+++ b/var/spack/repos/builtin/packages/libwebsockets/package.py
@@ -31,6 +31,8 @@ class Libwebsockets(CMakePackage):
homepage = "https://github.com/warmcat/libwebsockets"
url = "https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz"
+ version('2.2.1', '1f641cde2ab3687db3d553f68fe0f620')
+ version('2.1.1', '674684ffb90d4a0bcf7a075eb7b90192')
version('2.1.0', '4df3be57dee43aeebd54a3ed56568f50')
version('2.0.3', 'a025156d606d90579e65d53ccd062a94')
version('1.7.9', '7b3692ead5ae00fd0e1d56c080170f07')
diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py
index f018bacfa3..e2fe25c455 100644
--- a/var/spack/repos/builtin/packages/libxc/package.py
+++ b/var/spack/repos/builtin/packages/libxc/package.py
@@ -71,8 +71,15 @@ class Libxc(Package):
if which('xiar'):
env['AR'] = 'xiar'
- env['CFLAGS'] = optflags
- env['FCFLAGS'] = optflags
+ if 'CFLAGS' in env and env['CFLAGS']:
+ env['CFLAGS'] += ' ' + optflags
+ else:
+ env['CFLAGS'] = optflags
+
+ if 'FCFLAGS' in env and env['FCFLAGS']:
+ env['FCFLAGS'] += ' ' + optflags
+ else:
+ env['FCFLAGS'] = optflags
configure('--prefix={0}'.format(prefix),
'--enable-shared')
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py
index 09d0b0ec61..40234b1b2d 100644
--- a/var/spack/repos/builtin/packages/libxpm/package.py
+++ b/var/spack/repos/builtin/packages/libxpm/package.py
@@ -46,5 +46,5 @@ class Libxpm(AutotoolsPackage):
depends_on('util-macros', type='build')
def setup_environment(self, spack_env, run_env):
- spack_env.set('LDFLAGS', '-L{0} -lintl'.format(
+ spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
self.spec['gettext'].prefix.lib))
diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py
index 53c0438508..a87ae7ffee 100644
--- a/var/spack/repos/builtin/packages/libxslt/package.py
+++ b/var/spack/repos/builtin/packages/libxslt/package.py
@@ -43,6 +43,7 @@ class Libxslt(AutotoolsPackage):
variant('crypto', default=True,
description='Build libexslt with crypto support')
+ depends_on("libiconv")
depends_on("libxml2")
depends_on("xz")
depends_on("zlib")
diff --git a/var/spack/repos/builtin/packages/libyogrt/package.py b/var/spack/repos/builtin/packages/libyogrt/package.py
new file mode 100644
index 0000000000..1ad98ebaa0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libyogrt/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Libyogrt(AutotoolsPackage):
+ """Your One Get Remaining Time Library."""
+
+ homepage = "https://github.com/LLNL/libyogrt"
+ url = "https://github.com/LLNL/libyogrt/archive/1.20-6.tar.gz"
+
+ version('1.20-6', '478f27512842cc5f2b74a0c22b851f60')
+ version('1.20-5', 'd0fa6526fcd1f56ddb3d93f602ec72f7')
+ version('1.20-4', '092bea10de22c505ce92aa07001decbb')
+ version('1.20-3', 'd0507717009a5f8e2009e3b63594738f')
+ version('1.20-2', '780bda03268324f6b5f72631fff6e6cb')
diff --git a/var/spack/repos/builtin/packages/llvm-lld/package.py b/var/spack/repos/builtin/packages/llvm-lld/package.py
index 4624451e69..5619f1132d 100644
--- a/var/spack/repos/builtin/packages/llvm-lld/package.py
+++ b/var/spack/repos/builtin/packages/llvm-lld/package.py
@@ -25,25 +25,24 @@
from spack import *
-class LlvmLld(Package):
+class LlvmLld(CMakePackage):
"""lld - The LLVM Linker
lld is a new set of modular code for creating linker tools."""
homepage = "http://lld.llvm.org"
url = "http://llvm.org/releases/3.4/lld-3.4.src.tar.gz"
- depends_on('llvm')
-
version('3.4', '3b6a17e58c8416c869c14dd37682f78e')
- depends_on('cmake', type='build')
+ depends_on('llvm')
+ depends_on('cmake@2.8:', type='build')
- def install(self, spec, prefix):
- env['CXXFLAGS'] = self.compiler.cxx11_flag
+ def cmake_args(self):
+ if 'CXXFLAGS' in env and env['CXXFLAGS']:
+ env['CXXFLAGS'] += ' ' + self.compiler.cxx11_flag
+ else:
+ env['CXXFLAGS'] = self.compiler.cxx11_flag
- with working_dir('spack-build', create=True):
- cmake('..',
- '-DLLD_PATH_TO_LLVM_BUILD=%s' % spec['llvm'].prefix,
- '-DLLVM_MAIN_SRC_DIR=%s' % spec['llvm'].prefix,
- *std_cmake_args)
- make()
- make("install")
+ return [
+ '-DLLD_PATH_TO_LLVM_BUILD=%s' % self.spec['llvm'].prefix,
+ '-DLLVM_MAIN_SRC_DIR=%s' % self.spec['llvm'].prefix,
+ ]
diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
index 3479b08bc5..edbd9f04e1 100644
--- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
+++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
@@ -26,7 +26,7 @@
from spack import *
-class LlvmOpenmpOmpt(Package):
+class LlvmOpenmpOmpt(CMakePackage):
"""The OpenMP subproject provides an OpenMP runtime for use with the
OpenMP implementation in Clang. This branch includes experimental
changes for OMPT, the OpenMP Tools interface"""
@@ -42,25 +42,17 @@ class LlvmOpenmpOmpt(Package):
git='https://github.com/OpenMPToolsInterface/LLVM-openmp.git',
commit='982a08bcf3df9fb5afc04ac3bada47f19cc4e3d3')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8:', type='build')
depends_on('llvm')
- depends_on('ninja', type='build')
-
- def install(self, spec, prefix):
-
- with working_dir('spack-build', create=True):
- cmake_args = std_cmake_args[:]
- cmake_args.extend([
- '-G', 'Ninja',
- '-DCMAKE_C_COMPILER=clang',
- '-DCMAKE_CXX_COMPILER=clang++',
- '-DCMAKE_BUILD_TYPE=Release',
- '-DLIBOMP_OMPT_SUPPORT=on',
- '-DLIBOMP_OMPT_BLAME=on',
- '-DLIBOMP_OMPT_TRACE=on'
- ])
-
- cmake('..', *cmake_args)
- ninja = Executable('ninja')
- ninja()
- ninja('install')
+ depends_on('ninja@1.5:', type='build')
+
+ generator = 'Ninja'
+
+ def cmake_args(self):
+ return [
+ '-DCMAKE_C_COMPILER=clang',
+ '-DCMAKE_CXX_COMPILER=clang++',
+ '-DLIBOMP_OMPT_SUPPORT=on',
+ '-DLIBOMP_OMPT_BLAME=on',
+ '-DLIBOMP_OMPT_TRACE=on'
+ ]
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 1f88d94882..64e50f0cfb 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -43,10 +43,10 @@ class Llvm(CMakePackage):
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005',
url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz')
- variant('debug', default=False,
- description="Build a debug version of LLVM, this increases "
- "binary size by an order of magnitude, make sure you have "
- "20-30gb of space available to build this")
+ # NOTE: The debug version of LLVM is an order of magnitude larger than
+ # the release version, and may take up 20-30 GB of space. If you want
+ # to save space, build with `build_type=Release`.
+
variant('clang', default=True,
description="Build the LLVM C/C++/Objective-C compiler frontend")
variant('lldb', default=True, description="Build the LLVM debugger")
@@ -325,13 +325,7 @@ class Llvm(CMakePackage):
conflicts('+lldb', when='~clang')
def setup_environment(self, spack_env, run_env):
- spack_env.set('CXXFLAGS', self.compiler.cxx11_flag)
-
- def build_type(self):
- if '+debug' in self.spec:
- return 'RelWithDebInfo'
- else:
- return 'Release'
+ spack_env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)
def cmake_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/lmdb/package.py b/var/spack/repos/builtin/packages/lmdb/package.py
index 5a0aef35a4..aae962db15 100644
--- a/var/spack/repos/builtin/packages/lmdb/package.py
+++ b/var/spack/repos/builtin/packages/lmdb/package.py
@@ -22,42 +22,40 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-import os
from spack import *
-class Lmdb(Package):
- """Read-only mirror of official repo on openldap.org. Issues and
- pull requests here are ignored. Use OpenLDAP ITS for issues.
- http://www.openldap.org/software/repo.html"""
+class Lmdb(MakefilePackage):
+ """Symas LMDB is an extraordinarily fast, memory-efficient database we
+ developed for the Symas OpenLDAP Project. With memory-mapped files, it
+ has the read performance of a pure in-memory database while retaining
+ the persistence of standard disk-based databases."""
- homepage = "http://www.openldap.org/software/repo.html"
- url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz"
+ homepage = "https://lmdb.tech/"
+ url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.21.tar.gz"
+ version('0.9.21', '41a4f7b63212a00e53fabd8159008201')
version('0.9.16', '0de89730b8f3f5711c2b3a4ba517b648')
- def install(self, spec, prefix):
- os.chdir('libraries/liblmdb')
-
- make()
-
- mkdirp(prefix.bin)
- mkdirp(prefix + '/man/man1')
- mkdirp(prefix.lib)
- mkdirp(prefix.include)
-
- bins = ['mdb_stat', 'mdb_copy', 'mdb_dump', 'mdb_load']
- for f in bins:
- install(f, prefix.bin)
-
- mans = ['mdb_stat.1', 'mdb_copy.1', 'mdb_dump.1', 'mdb_load.1']
- for f in mans:
- install(f, prefix + '/man/man1')
-
- libs = ['liblmdb.a', 'liblmdb.so']
- for f in libs:
- install(f, prefix.lib)
-
- includes = ['lmdb.h']
- for f in includes:
- install(f, prefix.include)
+ build_directory = 'libraries/liblmdb'
+
+ @property
+ def install_targets(self):
+ return ['prefix={0}'.format(self.prefix), 'install']
+
+ @run_after('install')
+ def install_pkgconfig(self):
+ mkdirp(self.prefix.lib.pkgconfig)
+
+ with open(join_path(self.prefix.lib.pkgconfig, 'lmdb.pc'), 'w') as f:
+ f.write('prefix={0}\n'.format(self.prefix))
+ f.write('exec_prefix=${prefix}\n')
+ f.write('libdir={0}\n'.format(self.prefix.lib))
+ f.write('includedir={0}\n'.format(self.prefix.include))
+ f.write('\n')
+ f.write('Name: LMDB\n')
+ f.write('Description: Symas LMDB is an extraordinarily fast, '
+ 'memory-efficient database.\n')
+ f.write('Version: {0}\n'.format(self.spec.version))
+ f.write('Cflags: -I${includedir}\n')
+ f.write('Libs: -L${libdir} -llmdb\n')
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py
index 0680e1a3b5..ecb2a8b543 100644
--- a/var/spack/repos/builtin/packages/lua/package.py
+++ b/var/spack/repos/builtin/packages/lua/package.py
@@ -145,11 +145,11 @@ class Lua(Package):
@property
def lua_lib_dir(self):
- return os.path.join('lib', 'lua', self.version.up_to(2))
+ return os.path.join('lib', 'lua', str(self.version.up_to(2)))
@property
def lua_share_dir(self):
- return os.path.join('share', 'lua', self.version.up_to(2))
+ return os.path.join('share', 'lua', str(self.version.up_to(2)))
def setup_dependent_package(self, module, dependent_spec):
"""
diff --git a/var/spack/repos/builtin/packages/lulesh/package.py b/var/spack/repos/builtin/packages/lulesh/package.py
index 6a07976377..2dd4a4edd2 100644
--- a/var/spack/repos/builtin/packages/lulesh/package.py
+++ b/var/spack/repos/builtin/packages/lulesh/package.py
@@ -23,33 +23,62 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
-class Lulesh(Package):
- """Livermore Unstructured Lagrangian Explicit Shock Hydrodynamics (LULESH)
+class Lulesh(MakefilePackage):
+ """LULESH is a highly simplified application, hard-coded to only
+ style typical in scientific C or C++ based applications. Hard
+ code to only solve a Sedov blast problem with analytic answer
"""
-
+ tags = ['proxy-app']
homepage = "https://codesign.llnl.gov/lulesh.php"
url = "https://codesign.llnl.gov/lulesh/lulesh2.0.3.tgz"
- version("2.0.3", "336644a8750f71c7c6b9d2960976e7aa")
+ version('2.0.3', '336644a8750f71c7c6b9d2960976e7aa')
- patch("remove_defaults.patch")
+ variant('mpi', default=True, description='Build with MPI support')
+ variant('openmp', default=True, description='Build with OpenMP support')
+ variant('visual', default=False,
+ description='Build with Visualization support (Silo, hdf5)')
- variant('mpip', default=False)
+ depends_on('mpi', when='+mpi')
+ depends_on('silo', when='+visual')
+ depends_on('hdf5', when='+visual')
- depends_on("mpi", type="build")
- depends_on("mpip", when="+mpip")
+ @property
+ def build_targets(self):
+ targets = []
+ cxxflag = ' -g -O3 -I. '
+ ldflags = ' -g -O3 '
+ if '~mpi' in self.spec:
+ targets.append('CXX = {0} {1}'.format(spack_cxx, ' -DUSE_MPI=0 '))
+ else:
+ targets.append(
+ 'CXX = {0} {1}'.format(self.spec['mpi'].mpicxx,
+ ' -DUSE_MPI=1'))
+ targets.append(
+ 'MPI_INC = {0}'.format(self.spec['mpi'].prefix.include))
+ targets.append('MPI_LIB = {0}'.format(self.spec['mpi'].prefix.lib))
+ if '+visual' in self.spec:
+ targets.append(
+ 'SILO_INCDIR = {0}'.format(self.spec['silo'].prefix.include))
+ targets.append(
+ 'SILO_LIBDIR = {0}'.format(self.spec['silo'].prefix.lib))
+ cxxflag = ' -g -DVIZ_MESH -I${SILO_INCDIR} '
+ ldflags = ' -g -L${SILO_LIBDIR} -Wl,-rpath -Wl, '
+ ldflags += '${SILO_LIBDIR} -lsiloh5 -lhdf5 '
- def install(self, spec, prefix):
- if '+mpip' in spec:
- os.environ["LDFLAGS"] = " -lmpiP -ldwarf -lelf"
+ if '+openmp' in self.spec:
+ cxxflag += self.compiler.openmp_flag
+ ldflags += self.compiler.openmp_flag
- if os.uname()[4] == "x86_64":
- os.environ["LDFLAGS"] += " -lunwind"
+ targets.append('CXXFLAGS = {0}'.format(cxxflag))
+ targets.append('LDFLAGS = {0}'.format(ldflags))
+ return targets
- os.environ["CXX"] = spec['mpi'].mpicxx + " -DUSE_MPI=1"
- os.environ["PREFIX"] = prefix
- make()
- make("install")
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('lulesh{0}'.format(self.version.up_to(2)), prefix.bin)
+ mkdirp(prefix.doc)
+ install('README', prefix.doc)
+ install('TODO', prefix.doc) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch b/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch
deleted file mode 100644
index 36cce25ba1..0000000000
--- a/var/spack/repos/builtin/packages/lulesh/remove_defaults.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,17 +1,9 @@
- #default build suggestion of MPI + OPENMP with gcc on Livermore machines you might have to change the compiler name
-
--SHELL = /bin/sh
- .SUFFIXES: .cc .o
-
- LULESH_EXEC = lulesh2.0
-
--MPI_INC = /opt/local/include/openmpi
--MPI_LIB = /opt/local/lib
--
--SERCXX = g++ -DUSE_MPI=0
--MPICXX = mpig++ -DUSE_MPI=1
--CXX = $(MPICXX)
--
- SOURCES2.0 = \
- lulesh.cc \
- lulesh-comm.cc \
-@@ -20,28 +12,6 @@
- lulesh-init.cc
- OBJECTS2.0 = $(SOURCES2.0:.cc=.o)
-
--#Default build suggestions with OpenMP for g++
--CXXFLAGS = -g -O3 -fopenmp -I. -Wall
--LDFLAGS = -g -O3 -fopenmp
--
--#Below are reasonable default flags for a serial build
--#CXXFLAGS = -g -O3 -I. -Wall
--#LDFLAGS = -g -O3
--
--#common places you might find silo on the Livermore machines.
--#SILO_INCDIR = /opt/local/include
--#SILO_LIBDIR = /opt/local/lib
--#SILO_INCDIR = ./silo/4.9/1.8.10.1/include
--#SILO_LIBDIR = ./silo/4.9/1.8.10.1/lib
--
--#If you do not have silo and visit you can get them at:
--#silo: https://wci.llnl.gov/codes/silo/downloads.html
--#visit: https://wci.llnl.gov/codes/visit/download.html
--
--#below is and example of how to make with silo, hdf5 to get vizulization by default all this is turned off. All paths are Livermore specific.
--#CXXFLAGS = -g -DVIZ_MESH -I${SILO_INCDIR} -Wall -Wno-pragmas
--#LDFLAGS = -g -L${SILO_LIBDIR} -Wl,-rpath -Wl,${SILO_LIBDIR} -lsiloh5 -lhdf5
--
- .cc.o: lulesh.h
- @echo "Building $<"
- $(CXX) -c $(CXXFLAGS) -o $@ $<
-@@ -56,6 +26,7 @@
- /bin/rm -f *.o *~ $(OBJECTS) $(LULESH_EXEC)
- /bin/rm -rf *.dSYM
-
--tar: clean
-- cd .. ; tar cvf lulesh-2.0.tar LULESH-2.0 ; mv lulesh-2.0.tar LULESH-2.0
--
-+install: lulesh2.0
-+ @echo "Installing"
-+ mkdir -p $(PREFIX)/bin
-+ install --mode=755 lulesh2.0 $(PREFIX)/bin/
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py
index c01828d720..550e306712 100644
--- a/var/spack/repos/builtin/packages/m4/package.py
+++ b/var/spack/repos/builtin/packages/m4/package.py
@@ -48,6 +48,9 @@ class M4(AutotoolsPackage):
spec = self.spec
args = ['--enable-c++']
+ if spec.satisfies('%clang') and not spec.satisfies('platform=darwin'):
+ args.append('CFLAGS=-rtlib=compiler-rt')
+
if '+sigsegv' in spec:
args.append('--with-libsigsegv-prefix={0}'.format(
spec['libsigsegv'].prefix))
diff --git a/var/spack/repos/builtin/packages/mad-numdiff/package.py b/var/spack/repos/builtin/packages/mad-numdiff/package.py
index 4d0c9c1ef7..574ddf2be3 100644
--- a/var/spack/repos/builtin/packages/mad-numdiff/package.py
+++ b/var/spack/repos/builtin/packages/mad-numdiff/package.py
@@ -34,12 +34,3 @@ class MadNumdiff(CMakePackage):
version('develop', git='https://github.com/quinoacomputing/ndiff', branch='master')
version('20150724', '7723c0f2499aea8fd960377c5bed28d8')
-
- variant('debug', default=False, description='Build debug version')
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py
index d69dedf3ea..426695a3dd 100644
--- a/var/spack/repos/builtin/packages/magics/package.py
+++ b/var/spack/repos/builtin/packages/magics/package.py
@@ -26,7 +26,7 @@ from spack import *
import glob
-class Magics(Package):
+class Magics(CMakePackage):
"""Magics is the latest generation of the ECMWF's Meteorological plotting
software MAGICS. Although completely redesigned in C++, it is intended
to be as backwards-compatible as possible with the Fortran interface."""
@@ -52,8 +52,11 @@ class Magics(Package):
variant('metview', default=False, description='Enable metview support')
variant('qt', default=False, description='Enable metview support with qt')
variant('eccodes', default=False, description='Use eccodes instead of grib-api')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'Production'))
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8.11:', type='build')
depends_on('pkg-config', type='build')
# Currently python is only necessary to run
@@ -80,53 +83,51 @@ class Magics(Package):
for pyfile in glob.glob('*/*.py'):
filter_file('#!/usr/bin/python', '#!/usr/bin/env python', pyfile)
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
- options.append('-DENABLE_ODB=OFF')
- options.append('-DENABLE_PYTHON=OFF')
- options.append('-DBOOST_ROOT=%s' % spec['boost'].prefix)
- options.append('-DPROJ4_PATH=%s' % spec['proj'].prefix)
- options.append('-DENABLE_TESTS=OFF')
+ def cmake_args(self):
+ spec = self.spec
+ args = [
+ '-DENABLE_ODB=OFF',
+ '-DENABLE_PYTHON=OFF',
+ '-DBOOST_ROOT=%s' % spec['boost'].prefix,
+ '-DPROJ4_PATH=%s' % spec['proj'].prefix,
+ '-DENABLE_TESTS=OFF',
+ ]
if '+bufr' in spec:
- options.append('-DENABLE_BUFR=ON')
- options.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix)
+ args.append('-DENABLE_BUFR=ON')
+ args.append('-DLIBEMOS_PATH=%s' % spec['libemos'].prefix)
else:
- options.append('-DENABLE_BUFR=OFF')
+ args.append('-DENABLE_BUFR=OFF')
if '+netcdf' in spec:
- options.append('-DENABLE_NETCDF=ON')
- options.append('-DNETCDF_PATH=%s' % spec['netcdf-cxx'].prefix)
+ args.append('-DENABLE_NETCDF=ON')
+ args.append('-DNETCDF_PATH=%s' % spec['netcdf-cxx'].prefix)
else:
- options.append('-DENABLE_NETCDF=OFF')
+ args.append('-DENABLE_NETCDF=OFF')
if '+cairo' in spec:
- options.append('-DENABLE_CAIRO=ON')
+ args.append('-DENABLE_CAIRO=ON')
else:
- options.append('-DENABLE_CAIRO=OFF')
+ args.append('-DENABLE_CAIRO=OFF')
if '+metview' in spec:
if '+qt' in spec:
- options.append('-DENABLE_METVIEW=ON')
- if spec['qt'].version.up_to(1) == '5':
- options.append('-DENABLE_QT5=ON')
+ args.append('-DENABLE_METVIEW=ON')
+ if spec['qt'].version[0] == 5:
+ args.append('-DENABLE_QT5=ON')
else:
- options.append('-DENABLE_METVIEW_NO_QT=ON')
+ args.append('-DENABLE_METVIEW_NO_QT=ON')
else:
- options.append('-DENABLE_METVIEW=OFF')
+ args.append('-DENABLE_METVIEW=OFF')
if '+eccodes' in spec:
- options.append('-DENABLE_ECCODES=ON')
- options.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
+ args.append('-DENABLE_ECCODES=ON')
+ args.append('-DECCODES_PATH=%s' % spec['eccodes'].prefix)
else:
- options.append('-DENABLE_ECCODES=OFF')
- options.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
+ args.append('-DENABLE_ECCODES=OFF')
+ args.append('-DGRIB_API_PATH=%s' % spec['grib-api'].prefix)
if (self.compiler.f77 is None) or (self.compiler.fc is None):
- options.append('-DENABLE_FORTRAN=OFF')
+ args.append('-DENABLE_FORTRAN=OFF')
- with working_dir('spack-build', create=True):
- cmake('..', *options)
- make()
- make('install')
+ return args
diff --git a/var/spack/repos/builtin/packages/mallocmc/package.py b/var/spack/repos/builtin/packages/mallocmc/package.py
index 3134a3c1e6..333aea2034 100644
--- a/var/spack/repos/builtin/packages/mallocmc/package.py
+++ b/var/spack/repos/builtin/packages/mallocmc/package.py
@@ -40,7 +40,7 @@ class Mallocmc(CMakePackage):
homepage = "https://github.com/ComputationalRadiationPhysics/mallocMC"
url = "https://github.com/ComputationalRadiationPhysics/mallocMC/archive/2.2.0crp.tar.gz"
- version('dev', branch='dev',
+ version('develop', branch='dev',
git='https://github.com/ComputationalRadiationPhysics/mallocMC.git')
version('master', branch='master',
git='https://github.com/ComputationalRadiationPhysics/mallocMC.git')
diff --git a/var/spack/repos/builtin/packages/man-db/package.py b/var/spack/repos/builtin/packages/man-db/package.py
new file mode 100644
index 0000000000..9c038d03e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/man-db/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class ManDb(AutotoolsPackage):
+ """man-db is an implementation of the standard Unix
+ documentation system accessed using the man command. It uses
+ a Berkeley DB database in place of the traditional
+ flat-text whatis databases."""
+
+ homepage = "http://www.nongnu.org/man-db/"
+ url = "http://git.savannah.nongnu.org/cgit/man-db.git/snapshot/man-db-2.7.6.1.tar.gz"
+
+ version('2.7.6.1', '312761baade811db2b956af3432c285e')
+
+ depends_on('autoconf')
+ depends_on('automake')
+ depends_on('gettext')
+ depends_on('libpipeline')
+ depends_on('flex')
+ depends_on('groff', type=('build', 'link', 'run'))
+
+ # TODO: add gzip support via a new package.
+ # man pages are typically compressed, include all available
+ # compression libraries
+ depends_on('bzip2', type=('build', 'link', 'run'))
+ depends_on('lzma', type=('build', 'link', 'run'))
+ depends_on('xz', type=('build', 'link', 'run'))
+
+ def configure_args(self):
+ args = [
+ '--disable-setuid',
+ # defaults to a location that needs root privs to write in
+ '--with-systemdtmpfilesdir={0}/tmp'.format(self.prefix)
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/mariadb/package.py b/var/spack/repos/builtin/packages/mariadb/package.py
index 6374fdb8d3..78332a05b4 100644
--- a/var/spack/repos/builtin/packages/mariadb/package.py
+++ b/var/spack/repos/builtin/packages/mariadb/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Mariadb(Package):
+class Mariadb(CMakePackage):
"""MariaDB turns data into structured information in a wide array of
applications, ranging from banking to websites. It is an enhanced, drop-in
replacement for MySQL. MariaDB is used because it is fast, scalable and
@@ -45,18 +45,10 @@ class Mariadb(Package):
'operations in the mariadb client library.')
depends_on('boost')
- depends_on('cmake')
+ depends_on('cmake@2.6:', type='build')
depends_on('jemalloc')
depends_on('libaio')
depends_on('libedit')
depends_on('libevent', when='+nonblocking')
depends_on('ncurses')
depends_on('zlib')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
-
- cmake('..', *std_cmake_args)
-
- make()
- make('install')
diff --git a/var/spack/repos/builtin/packages/matlab/package.py b/var/spack/repos/builtin/packages/matlab/package.py
index 4d2b91546e..fbd272393e 100644
--- a/var/spack/repos/builtin/packages/matlab/package.py
+++ b/var/spack/repos/builtin/packages/matlab/package.py
@@ -66,6 +66,8 @@ class Matlab(Package):
license_vars = ['LM_LICENSE_FILE']
license_url = 'https://www.mathworks.com/help/install/index.html'
+ extendable = True
+
def url_for_version(self, version):
return "file://{0}/matlab_{1}_glnxa64.zip".format(os.getcwd(), version)
diff --git a/var/spack/repos/builtin/packages/maven/package.py b/var/spack/repos/builtin/packages/maven/package.py
index 347f05a764..550ce467e2 100644
--- a/var/spack/repos/builtin/packages/maven/package.py
+++ b/var/spack/repos/builtin/packages/maven/package.py
@@ -34,7 +34,7 @@ class Maven(Package):
version('3.3.9', '516923b3955b6035ba6b0a5b031fbd8b')
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
# install pre-built distribution
diff --git a/var/spack/repos/builtin/packages/maverick/package.py b/var/spack/repos/builtin/packages/maverick/package.py
new file mode 100644
index 0000000000..b480e5fc48
--- /dev/null
+++ b/var/spack/repos/builtin/packages/maverick/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Maverick(MakefilePackage):
+ """MavericK is a program for inferring population structure on the basis
+ of genetic information."""
+
+ homepage = "https://github.com/bobverity/MavericK"
+ url = "https://github.com/bobverity/MavericK/archive/v1.0.4.tar.gz"
+
+ version('1.0.4', '0c17c9a73fd0ac0aef17339173ddedc2')
+
+ conflicts('%gcc@:6.0')
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%intel')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('MavericK', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py
index b93b82abd0..09820321de 100644
--- a/var/spack/repos/builtin/packages/mbedtls/package.py
+++ b/var/spack/repos/builtin/packages/mbedtls/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Mbedtls(Package):
+class Mbedtls(CMakePackage):
"""mbed TLS (formerly known as PolarSSL) makes it trivially easy for
developers to include cryptographic and SSL/TLS capabilities in
their (embedded) products, facilitating this functionality with a
@@ -42,10 +42,9 @@ class Mbedtls(Package):
version('2.1.3', '7eb4cf1dfa68578a2c8dbd0b6fa752dd')
version('1.3.16', '4144d7320c691f721aeb9e67a1bc38e0')
- depends_on('cmake', type='build')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release', 'Coverage', 'ASan', 'ASanDbg',
+ 'MemSan', 'MemSanDbg', 'Check', 'CheckFull'))
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make()
- make("install")
+ depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/mcl/package.py b/var/spack/repos/builtin/packages/mcl/package.py
new file mode 100644
index 0000000000..af3116313e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mcl/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mcl(AutotoolsPackage):
+ """The MCL algorithm is short for the Markov Cluster Algorithm, a fast
+ and scalable unsupervised cluster algorithm for graphs (also known
+ as networks) based on simulation of (stochastic) flow in graphs."""
+
+ homepage = "https://www.micans.org/mcl/index.html"
+ url = "https://www.micans.org/mcl/src/mcl-14-137.tar.gz"
+
+ version('14-137', 'bc8740456cf51019d0a9ac5eba665bb5')
diff --git a/var/spack/repos/builtin/packages/mesa-glu/package.py b/var/spack/repos/builtin/packages/mesa-glu/package.py
index cb2f12ad43..54ad8992ec 100644
--- a/var/spack/repos/builtin/packages/mesa-glu/package.py
+++ b/var/spack/repos/builtin/packages/mesa-glu/package.py
@@ -30,7 +30,7 @@ class MesaGlu(AutotoolsPackage):
"""This package provides the Mesa OpenGL Utility library."""
homepage = "https://www.mesa3d.org"
- url = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.gz"
+ url = "https://www.mesa3d.org/archive/glu/glu-9.0.0.tar.gz"
version('9.0.0', 'bbc57d4fe3bd3fb095bdbef6fcb977c4')
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index 22439c46d3..de36acbb73 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -26,36 +26,87 @@ from spack import *
class Mesa(AutotoolsPackage):
- """Mesa is an open-source implementation of the OpenGL
- specification - a system for rendering interactive 3D graphics."""
+ """Mesa is an open-source implementation of the OpenGL specification
+ - a system for rendering interactive 3D graphics."""
homepage = "http://www.mesa3d.org"
- url = "http://ftp.iij.ad.jp/pub/X11/x.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz"
+ url = "https://mesa.freedesktop.org/archive/13.0.6/mesa-13.0.6.tar.xz"
+ list_url = "https://mesa.freedesktop.org/archive"
+ list_depth = 2
- version('12.0.3', '60c5f9897ddc38b46f8144c7366e84ad')
+ version('17.1.3', '1946a93d543bc219427e2bebe2ac4752')
+ version('13.0.6', '1e5a769bc6cfd839cf3febcb179c27cc')
+ version('12.0.6', '1a3d4fea0656c208db59289e4ed33b3f')
+ version('12.0.3', '1113699c714042d8c4df4766be8c57d8')
+
+ variant('swrender', default=False,
+ description="Build with (gallium) software rendering.")
+
+ variant('llvm', default=False,
+ description="Use llvm for rendering pipes.")
# General dependencies
depends_on('python@2.6.4:')
depends_on('py-mako@0.3.4:', type=('build', 'run'))
depends_on('flex@2.5.35:', type='build')
depends_on('bison@2.4.1:', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
+
+ # Off-screen with llvmpipe
+ # Note: there must be a better way of selecting the preferred llvm
+ depends_on('llvm+link_dylib', when='+llvm')
# For DRI and hardware acceleration
depends_on('libpthread-stubs')
depends_on('libdrm')
depends_on('openssl')
depends_on('libxcb@1.9.3:')
- depends_on('libxshmfence@1.1:')
- depends_on('libx11')
- depends_on('libxext')
- depends_on('libxdamage')
+ depends_on('libxshmfence@1.1:', when='~swrender')
+ depends_on('libx11', when='~swrender')
+ depends_on('libxext', when='~swrender')
+ depends_on('libxdamage', when='~swrender')
depends_on('libxfixes')
+ # depends_on('expat', when='~swrender')
+ depends_on('libelf', when='+llvm~swrender')
- depends_on('glproto@1.4.14:', type='build')
- depends_on('dri2proto@2.6:', type='build')
- depends_on('dri3proto@1.0:', type='build')
- depends_on('presentproto@1.0:', type='build')
- depends_on('pkg-config@0.9.0:', type='build')
+ depends_on('glproto@1.4.14:', type='build', when='~swrender')
+ depends_on('dri2proto@2.6:', type='build', when='~swrender')
+ depends_on('dri3proto@1.0:', type='build', when='~swrender')
+ depends_on('presentproto@1.0:', type='build', when='~swrender')
# TODO: Add package for systemd, provides libudev
# Using the system package manager to install systemd didn't work for me
+
+ def configure_args(self):
+ spec = self.spec
+ args = []
+ drivers = []
+ if '+swrender' in spec:
+ drivers = ['swrast']
+ # Needs +llvm, but also C++14? -> drivers.append('swr')
+ args.extend([
+ '--disable-dri',
+ '--disable-egl',
+ '--disable-gbm',
+ '--disable-gles1',
+ '--disable-glx',
+ '--disable-xvmc',
+ '--enable-texture-float',
+ '--enable-gallium-osmesa',
+ ])
+
+ if '+llvm' in spec:
+ if self.spec.version < Version('17'):
+ args.append('--enable-gallium-llvm')
+ else:
+ args.append('--enable-llvm')
+ if '+link_dylib' in self.spec['llvm']:
+ args.append('--enable-llvm-shared-libs')
+ else:
+ args.append('--disable-llvm-shared-libs')
+ args.append('--with-llvm-prefix=%s' % spec['llvm'].prefix)
+
+ if drivers:
+ args.append('--with-gallium-drivers=' + ','.join(drivers))
+
+ return args
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 2f450951e3..43feace931 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -91,7 +91,7 @@ class Metis(Package):
raise InstallError('METIS@:4 does not support the following '
'variants: gdb, int64, real64.')
- options = ['COPTIONS=-fPIC']
+ options = ['COPTIONS={0}'.format(self.compiler.pic_flag)]
if '+debug' in spec:
options.append('OPTFLAGS=-g -O0')
make(*options)
@@ -119,7 +119,7 @@ class Metis(Package):
install(sharefile, prefix.share)
if '+shared' in spec:
- shared_flags = ['-fPIC', '-shared']
+ shared_flags = [self.compiler.pic_flag, '-shared']
if sys.platform == 'darwin':
shared_suffix = 'dylib'
shared_flags.extend(['-Wl,-all_load', 'libmetis.a'])
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index 2848d77887..ffd3233a9f 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import re
class Mfem(Package):
@@ -62,132 +63,194 @@ class Mfem(Package):
'841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57',
url='http://goo.gl/xrScXn', extension='.tar.gz')
- variant('metis', default=False, description='Activate support for metis')
- variant('hypre', default=False, description='Activate support for hypre')
- variant('suite-sparse', default=False,
- description='Activate support for SuiteSparse')
- variant('mpi', default=True, description='Activate support for MPI')
+ variant('mpi', default=True,
+ description='Enable MPI parallelism')
+ variant('hypre', default=True,
+ description='Required for MPI parallelism')
+ variant('openmp', default=False,
+ description='Enable OpenMP parallelism')
+ variant('threadsafe', default=False,
+ description=('Enable thread safe features.'
+ ' Required for OpenMP.'
+ ' May cause minor performance issues.'))
variant('superlu-dist', default=False,
- description='Activate support for SuperLU_Dist')
- variant('lapack', default=False, description='Activate support for LAPACK')
- variant('debug', default=False, description='Build debug version')
- variant('netcdf', default=False, description='Activate NetCDF support')
+ description='Enable MPI parallel, sparse direct solvers')
+ variant('suite-sparse', default=False,
+ description='Enable serial, sparse direct solvers')
+ variant('petsc', default=False,
+ description='Enable PETSc solvers, preconditioners, etc..')
+ variant('sundials', default=False,
+ description='Enable Sundials time integrators')
+ variant('mpfr', default=False,
+ description='Enable precise, 1D quadrature rules')
+ variant('lapack', default=False,
+ description='Use external blas/lapack routines')
+ variant('debug', default=False,
+ description='Build debug instead of optimized version')
+ variant('netcdf', default=False,
+ description='Enable Cubit/Genesis reader')
+ variant('gzstream', default=True,
+ description='Support zip\'d streams for I/O')
+ variant('examples', default=False,
+ description='Build and install examples')
+ variant('miniapps', default=False,
+ description='Build and install miniapps')
+
+ conflicts('+mpi', when='~hypre')
+ conflicts('+suite-sparse', when='~lapack')
+ conflicts('+superlu-dist', when='@:3.1')
+ conflicts('+netcdf', when='@:3.1')
depends_on('blas', when='+lapack')
+ depends_on('blas', when='+suite-sparse')
depends_on('lapack', when='+lapack')
+ depends_on('lapack', when='+suite-sparse')
depends_on('mpi', when='+mpi')
- depends_on('metis', when='+mpi')
- depends_on('hypre', when='+mpi')
-
- depends_on('hypre', when='+hypre')
-
- depends_on('metis@4:', when='+metis')
-
- depends_on('suite-sparse', when='+suite-sparse')
- depends_on('blas', when='+suite-sparse')
- depends_on('lapack', when='+suite-sparse')
+ depends_on('metis')
+ depends_on('parmetis', when='+superlu-dist')
+ depends_on('metis@5:', when='+superlu-dist')
depends_on('metis@5:', when='+suite-sparse ^suite-sparse@4.5:')
- depends_on('cmake', when='^metis@5:', type='build')
+ depends_on('hypre~internal-superlu', when='+mpi')
+ depends_on('hypre@develop~internal-superlu', when='+petsc +hypre')
+ depends_on('sundials@2.7:+hypre', when='+sundials')
+ depends_on('suite-sparse', when='+suite-sparse')
depends_on('superlu-dist', when='@3.2: +superlu-dist')
+ depends_on('petsc@develop', when='+petsc')
+ depends_on('mpfr', when='+mpfr')
+ depends_on('cmake', when='^metis@5:', type='build')
depends_on('netcdf', when='@3.2: +netcdf')
depends_on('zlib', when='@3.2: +netcdf')
depends_on('hdf5', when='@3.2: +netcdf')
+ depends_on('libunwind', when='+debug')
+ depends_on('zlib', when='+gzstream')
patch('mfem_ppc_build.patch', when='@3.2:3.3 arch=ppc64le')
def check_variants(self, spec):
- if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec):
- raise InstallError('mfem+mpi must be built with +hypre ' +
- 'and +metis!')
- if '+suite-sparse' in spec and ('+metis' not in spec or
- '+lapack' not in spec):
- raise InstallError('mfem+suite-sparse must be built with ' +
- '+metis and +lapack!')
if 'metis@5:' in spec and '%clang' in spec and (
'^cmake %gcc' not in spec):
raise InstallError('To work around CMake bug with clang, must ' +
'build mfem with mfem[+variants] %clang ' +
'^cmake %gcc to force CMake to build with gcc')
- if '@:3.1' in spec and '+superlu-dist' in spec:
- raise InstallError('MFEM does not support SuperLU_DIST for ' +
- 'versions 3.1 and earlier')
- if '@:3.1' in spec and '+netcdf' in spec:
- raise InstallError('MFEM does not support NetCDF for versions' +
- '3.1 and earlier')
return
+ #
+ # Note: Although MFEM does support CMake configuration, MFEM
+ # development team indicates that vanilla GNU Make is the
+ # preferred mode of configuration of MFEM and the mode most
+ # likely to be up to date in supporting *all* of MFEM's
+ # configuration options. So, don't use CMake
+ #
def install(self, spec, prefix):
self.check_variants(spec)
- options = ['PREFIX=%s' % prefix]
-
- if '+lapack' in spec:
- lapack_lib = (spec['lapack'].libs + spec['blas'].libs).ld_flags # NOQA: ignore=E501
- options.extend([
- 'MFEM_USE_LAPACK=YES',
- 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include,
- 'LAPACK_LIB=%s' % lapack_lib])
+ def yes_no(varstr):
+ return 'YES' if varstr in self.spec else 'NO'
+
+ metis5_str = 'NO'
+ if '+superlu-dist' in spec or \
+ spec.satisfies('+suite-sparse ^suite-sparse@4.5:') or \
+ spec['metis'].satisfies('@5:'):
+ metis5_str = 'YES'
+
+ threadsafe_str = 'NO'
+ if '+openmp' in spec or '+threadsafe' in spec:
+ threadsafe_str = 'YES'
+
+ options = [
+ 'PREFIX=%s' % prefix,
+ 'MFEM_USE_MEMALLOC=YES',
+ 'MFEM_DEBUG=%s' % yes_no('+debug'),
+ 'MFEM_USE_LIBUNWIND=%s' % yes_no('+debug'),
+ 'MFEM_USE_GZSTREAM=%s' % yes_no('+gzstream'),
+ 'MFEM_USE_METIS_5=%s' % metis5_str,
+ 'MFEM_THREAD_SAFE=%s' % threadsafe_str,
+ 'MFEM_USE_MPI=%s' % yes_no('+mpi'),
+ 'MFEM_USE_LAPACK=%s' % yes_no('+lapack'),
+ 'MFEM_USE_SUPERLU=%s' % yes_no('+superlu-dist'),
+ 'MFEM_USE_SUITESPARSE=%s' % yes_no('+suite-sparse'),
+ 'MFEM_USE_SUNDIALS=%s' % yes_no('+sundials'),
+ 'MFEM_USE_PETSC=%s' % yes_no('+petsc'),
+ 'MFEM_USE_NETCDF=%s' % yes_no('+netcdf'),
+ 'MFEM_USE_MPFR=%s' % yes_no('+mpfr'),
+ 'MFEM_USE_OPENMP=%s' % yes_no('+openmp')]
if '+hypre' in spec:
- options.extend([
+ options += [
'HYPRE_DIR=%s' % spec['hypre'].prefix,
'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include,
- 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib +
- ' -lHYPRE'])
+ 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + ' -lHYPRE']
- if 'parmetis' in spec:
- metis_lib = '-L%s -lparmetis -lmetis' % spec['parmetis'].prefix.lib
- metis_str = 'MFEM_USE_METIS_5=YES'
- options.extend([metis_str,
- 'METIS_DIR=%s' % spec['parmetis'].prefix,
- 'METIS_OPT=-I%s' % spec['parmetis'].prefix.include,
- 'METIS_LIB=%s' % metis_lib])
- elif 'metis' in spec:
- metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib
- if spec['metis'].satisfies('@5:'):
- metis_str = 'MFEM_USE_METIS_5=YES'
- else:
- metis_str = 'MFEM_USE_METIS_5=NO'
- options.extend([
- metis_str,
- 'METIS_DIR=%s' % spec['metis'].prefix,
- 'METIS_OPT=-I%s' % spec['metis'].prefix.include,
- 'METIS_LIB=%s' % metis_lib])
-
- if 'mpi' in spec:
- options.extend(['MFEM_USE_MPI=YES'])
+ if '+lapack' in spec:
+ lapack_lib = (spec['lapack'].libs + spec['blas'].libs).ld_flags # NOQA: ignore=E501
+ options += [
+ 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include,
+ 'LAPACK_LIB=%s' % lapack_lib]
if '+superlu-dist' in spec:
+ metis_lib = '-L%s -lparmetis -lmetis' % spec['parmetis'].prefix.lib
+ options += [
+ 'METIS_DIR=%s' % spec['parmetis'].prefix,
+ 'METIS_OPT=-I%s' % spec['parmetis'].prefix.include,
+ 'METIS_LIB=%s' % metis_lib]
superlu_lib = '-L%s' % spec['superlu-dist'].prefix.lib
superlu_lib += ' -lsuperlu_dist'
- sl_inc = 'SUPERLU_OPT=-I%s' % spec['superlu-dist'].prefix.include
- options.extend(['MFEM_USE_SUPERLU=YES',
- 'SUPERLU_DIR=%s' % spec['superlu-dist'].prefix,
- sl_inc,
- 'SUPERLU_LIB=%s' % superlu_lib])
+ options += [
+ 'SUPERLU_DIR=%s' % spec['superlu-dist'].prefix,
+ 'SUPERLU_OPT=-I%s' % spec['superlu-dist'].prefix.include,
+ 'SUPERLU_LIB=%s' % superlu_lib]
+ else:
+ metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib
+ options += [
+ 'METIS_DIR=%s' % spec['metis'].prefix,
+ 'METIS_OPT=-I%s' % spec['metis'].prefix.include,
+ 'METIS_LIB=%s' % metis_lib]
if '+suite-sparse' in spec:
ssp = spec['suite-sparse'].prefix
ss_lib = '-L%s' % ssp.lib
-
if '@3.2:' in spec:
ss_lib += ' -lklu -lbtf'
-
ss_lib += (' -lumfpack -lcholmod -lcolamd' +
' -lamd -lcamd -lccolamd -lsuitesparseconfig')
-
no_rt = spec.satisfies('platform=darwin')
if not no_rt:
ss_lib += ' -lrt'
ss_lib += (' ' + metis_lib + ' ' + lapack_lib)
-
- options.extend(['MFEM_USE_SUITESPARSE=YES',
- 'SUITESPARSE_DIR=%s' % ssp,
- 'SUITESPARSE_OPT=-I%s' % ssp.include,
- 'SUITESPARSE_LIB=%s' % ss_lib])
+ options += [
+ 'SUITESPARSE_DIR=%s' % ssp,
+ 'SUITESPARSE_OPT=-I%s' % ssp.include,
+ 'SUITESPARSE_LIB=%s' % ss_lib]
+
+ if '+sundials' in spec:
+ sundials_libs = (
+ '-lsundials_arkode -lsundials_cvode'
+ ' -lsundials_nvecserial -lsundials_kinsol')
+ if '+mpi' in spec:
+ sundials_libs += (
+ ' -lsundials_nvecparhyp -lsundials_nvecparallel')
+ options += [
+ 'SUNDIALS_DIR=%s' % spec['sundials'].prefix,
+ 'SUNDIALS_OPT=-I%s' % spec['sundials'].prefix.include,
+ 'SUNDIALS_LIB=-L%s %s' % (spec['sundials'].prefix.lib,
+ sundials_libs)]
+
+ if '+petsc' in spec:
+ f = open('%s/lib/pkgconfig/PETSc.pc' % spec['petsc'].prefix, 'r')
+ for line in f:
+ if re.search('^\s*Cflags: ', line):
+ petsc_opts = re.sub('^\s*Cflags: (.*)', '\\1', line)
+ elif re.search('^\s*Libs.*: ', line):
+ petsc_libs = re.sub('^\s*Libs.*: (.*)', '\\1', line)
+ f.close()
+ options += [
+ 'PETSC_DIR=%s' % spec['petsc'].prefix,
+ 'PETSC_OPT=%s' % petsc_opts,
+ 'PETSC_LIB=-L%s -lpetsc %s' %
+ (spec['petsc'].prefix.lib, petsc_libs)]
if '+netcdf' in spec:
np = spec['netcdf'].prefix
@@ -196,28 +259,31 @@ class Mfem(Package):
nlib = '-L%s -lnetcdf ' % np.lib
nlib += '-L%s -lhdf5_hl -lhdf5 ' % h5p.lib
nlib += '-L%s -lz' % zp.lib
- options.extend(['MFEM_USE_NETCDF=YES',
- 'NETCDF_DIR=%s' % np,
- 'HDF5_DIR=%s' % h5p,
- 'ZLIB_DIR=%s' % zp,
- 'NETCDF_OPT=-I%s' % np.include,
- 'NETCDF_LIB=%s' % nlib])
+ options += [
+ 'NETCDF_DIR=%s' % np,
+ 'HDF5_DIR=%s' % h5p,
+ 'ZLIB_DIR=%s' % zp,
+ 'NETCDF_OPT=-I%s' % np.include,
+ 'NETCDF_LIB=%s' % nlib]
- if '+debug' in spec:
- options.extend(['MFEM_DEBUG=YES'])
+ if '+mpfr' in spec:
+ options += ['MPFR_LIB=-L%s -lmpfr' % spec['mpfr'].prefix.lib]
+
+ if '+openmp' in spec:
+ options += ['OPENMP_OPT = %s' % self.compiler.openmp_flag]
make('config', *options)
- make('all')
-
- # Run a small test before installation
- args = ['-m', join_path('data', 'star.mesh'), '--no-visualization']
- if '+mpi' in spec:
- Executable(join_path(spec['mpi'].prefix.bin,
- 'mpirun'))('-np',
- '4',
- join_path('examples', 'ex1p'),
- *args)
- else:
- Executable(join_path('examples', 'ex1'))(*args)
+ make('lib')
+
+ if self.run_tests:
+ make('check')
make('install')
+
+ if '+examples' in spec:
+ make('examples')
+ install_tree('examples', join_path(prefix, 'examples'))
+
+ if '+miniapps' in spec:
+ make('miniapps')
+ install_tree('miniapps', join_path(prefix, 'miniapps'))
diff --git a/var/spack/repos/builtin/packages/microbiomeutil/package.py b/var/spack/repos/builtin/packages/microbiomeutil/package.py
new file mode 100644
index 0000000000..7be7a4ac0d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/microbiomeutil/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Microbiomeutil(MakefilePackage):
+ """Microbiome analysis utilities"""
+
+ homepage = "http://microbiomeutil.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/microbiomeutil/microbiomeutil-r20110519.tgz"
+
+ version('20110519', '11eaac4b0468c05297ba88ec27bd4b56')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('blast-plus')
+ depends_on('cdbfasta')
+
+ def install(self, spec, prefix):
+ install_tree('ChimeraSlayer', prefix.ChimeraSlayer)
+ install_tree('NAST-iEr', join_path(prefix, 'NAST-iEr'))
+ install_tree('TreeChopper', prefix.TreeChopper)
+ install_tree('WigeoN', prefix.WigeoN)
+ install_tree('docs', prefix.docs)
+ install_tree('RESOURCES', prefix.resources)
+ install_tree('AmosCmp16Spipeline', prefix.AmosCmp16Spipeline)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PATH', self.prefix.ChimeraSlayer)
+ run_env.prepend_path('PATH', join_path(self.prefix, 'NAST-iEr'))
+ run_env.prepend_path('PATH', self.prefix.TreeChopper)
+ run_env.prepend_path('PATH', self.prefix.WigeoN)
diff --git a/var/spack/repos/builtin/packages/miniaero/package.py b/var/spack/repos/builtin/packages/miniaero/package.py
new file mode 100644
index 0000000000..471ecb9d0f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miniaero/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Miniaero(MakefilePackage):
+ """Proxy Application. MiniAero is a mini-application for the evaulation
+ of programming models and hardware for next generation platforms.
+ """
+
+ homepage = "http://mantevo.org"
+ url = "https://github.com/Mantevo/miniAero.git"
+
+ tags = ['proxy-app']
+
+ version('2016-11-11', git='https://github.com/Mantevo/miniAero.git',
+ commit='f46d135479a5be19ec5d146ccaf0e581aeff4596')
+
+ depends_on('kokkos')
+
+ @property
+ def build_targets(self):
+ targets = [
+ '--directory=kokkos',
+ 'CXX=c++',
+ 'KOKKOS_PATH={0}'.format(self.spec['kokkos'].prefix)
+ ]
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('kokkos/miniAero.host', prefix.bin)
+ install('kokkos/README', prefix.doc)
+ install('kokkos/tests/3D_Sod_Serial/miniaero.inp', prefix.bin)
+ install_tree('kokkos/tests', prefix.doc.tests)
diff --git a/var/spack/repos/builtin/packages/miniamr/package.py b/var/spack/repos/builtin/packages/miniamr/package.py
new file mode 100644
index 0000000000..7dc138ed44
--- /dev/null
+++ b/var/spack/repos/builtin/packages/miniamr/package.py
@@ -0,0 +1,70 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Miniamr(MakefilePackage):
+ """Proxy Application. 3D stencil calculation with
+ Adaptive Mesh Refinement (AMR)
+ """
+
+ homepage = "https://mantevo.org"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniAMR/miniAMR_1.0_all.tgz"
+
+ tags = ['proxy-app']
+
+ version('1.0', '812e5aaaab99689a4e9381a3bbd718a6')
+
+ variant('mpi', default=True, description='Build with MPI support')
+
+ depends_on('mpi', when="+mpi")
+
+ @property
+ def build_targets(self):
+ targets = []
+ if '+mpi' in self.spec:
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+ targets.append('LDLIBS=-lm')
+ targets.append('--file=Makefile.mpi')
+ targets.append('--directory=miniAMR_ref')
+ else:
+ targets.append('--file=Makefile.serial')
+ targets.append('--directory=miniAMR_serial')
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual installation
+ mkdir(prefix.bin)
+ mkdir(prefix.doc)
+
+ if '+mpi' in spec:
+ install('miniAMR_ref/miniAMR.x', prefix.bin)
+ else:
+ install('miniAMR_serial/miniAMR.x', prefix.bin)
+
+ # Install Support Documents
+ install('miniAMR_ref/README', prefix.doc)
diff --git a/var/spack/repos/builtin/packages/minife/package.py b/var/spack/repos/builtin/packages/minife/package.py
new file mode 100644
index 0000000000..ced755d112
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minife/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import tarfile
+
+from spack import *
+
+
+class Minife(MakefilePackage):
+ """Proxy Application. MiniFE is an proxy application
+ for unstructured implicit finite element codes.
+ """
+
+ homepage = "https://mantevo.org/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniFE/miniFE-2.0.1.tgz"
+
+ tags = ['proxy-app']
+
+ version('2.0.1', '3113d7c8fc01495d08552672b0dbd015')
+
+ variant('build', default='ref', description='Type of Parallelism',
+ values=('ref', 'openmp_ref', 'qthreads', 'kokkos'))
+
+ depends_on('mpi')
+ depends_on('qthreads', when='build=qthreads')
+
+ @property
+ def build_version(self):
+ return self.version.up_to(2)
+
+ @property
+ def build_targets(self):
+ targets = [
+ '--directory=miniFE-{0}_{1}/src'.format(
+ self.build_version, self.spec.variants['build'].value),
+ 'CXX={0}'.format(self.spec['mpi'].mpicxx),
+ 'CC={0}'.format(self.spec['mpi'].mpicc)
+ ]
+
+ return targets
+
+ def edit(self, spec, prefix):
+ inner_tar = tarfile.open(name='miniFE-{0}_{1}.tgz'.format(
+ self.build_version,
+ self.spec.variants['build'].value))
+ inner_tar.extractall()
+
+ makefile = FileFilter('miniFE-{0}_{1}/src/Makefile'.format(
+ self.build_version,
+ self.spec.variants['build'].value))
+
+ makefile.filter('-fopenmp', self.compiler.openmp_flag, string=True)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('miniFE-{0}_{1}/src/miniFE.x'.format(
+ self.build_version, self.spec.variants['build'].value),
+ prefix.bin)
diff --git a/var/spack/repos/builtin/packages/minighost/package.py b/var/spack/repos/builtin/packages/minighost/package.py
new file mode 100644
index 0000000000..59b0b33dc4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minighost/package.py
@@ -0,0 +1,96 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import tarfile
+
+from spack import *
+
+
+class Minighost(MakefilePackage):
+ """Proxy Application. A Finite Difference proxy
+ application which implements a difference stencil
+ across a homogenous three dimensional domain.
+ """
+
+ homepage = "http://mantevo.org"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniGhost/miniGhost_1.0.1.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.0.1', '2a4ac4383e9be00f87b6067c3cfe6463')
+
+ variant('mpi', default=True, description='Enable MPI Support')
+
+ depends_on('mpi', when='+mpi')
+
+ parallel = False
+
+ @property
+ def build_targets(self):
+ targets = ['--directory=miniGhost_ref']
+
+ if '+mpi' in self.spec:
+ targets.append('PROTOCOL=-D_MG_MPI')
+ targets.append('FC={0}'.format(self.spec['mpi'].mpif77))
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+ targets.append(
+ 'LIBS=-lm -lgfortran -lmpi_usempi -lmpi_mpifh -lmpi')
+ else:
+ targets.append('PROTOCOL=-D_MG_SERIAL')
+ targets.append('FC=f77')
+ targets.append('CC=cc')
+ targets.append('LIBS=-lm -lgfortran')
+
+ if '%gcc' in self.spec:
+ targets.append('COMPILER_SUITE=gnu')
+ elif '%cce' in self.spec:
+ targets.append('COMPILER_SUITE=cray')
+ elif '%intel' in self.spec:
+ targets.append('COMPILER_SUITE=intel')
+ elif '%pgi' in self.spec:
+ targets.append('COMPILER_SUITE=pgi')
+
+ return targets
+
+ def edit(self, spec, prefix):
+ inner_tar = tarfile.open(
+ 'miniGhost_ref_{0}.tar.gz'.format(self.version.up_to(3)))
+ inner_tar.extractall()
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('miniGhost_ref/miniGhost.x', prefix.bin)
+ install('miniGhost_ref/default-settings.h', prefix.bin)
+
+ if '+mpi' in spec:
+ install('miniGhost_ref/runtest.mpi', prefix.bin)
+ install('miniGhost_ref/runtest.mpi.ds', prefix.bin)
+ else:
+ install('miniGhost_ref/runtest.serial', prefix.bin)
+
+ install('README', prefix.doc)
diff --git a/var/spack/repos/builtin/packages/minigmg/package.py b/var/spack/repos/builtin/packages/minigmg/package.py
new file mode 100644
index 0000000000..799fb1ee6f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minigmg/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class Minigmg(Package):
+ """miniGMG is a compact benchmark for understanding the performance
+ challenges associated with geometric multigrid solvers
+ found in applications built from AMR MG frameworks
+ like CHOMBO or BoxLib when running
+ on modern multi- and manycore-based supercomputers.
+ It includes both productive reference examples as well as
+ highly-optimized implementations for CPUs and GPUs.
+ It is sufficiently general that it has been used to evaluate
+ a broad range of research topics including PGAS programming models
+ and algorithmic tradeoffs inherit in multigrid. miniGMG was developed
+ under the CACHE Joint Math-CS Institute.
+
+ Note, miniGMG code has been supersceded by HPGMG. """
+
+ homepage = "http://crd.lbl.gov/departments/computer-science/PAR/research/previous-projects/miniGMG/"
+ url = "http://crd.lbl.gov/assets/Uploads/FTG/Projects/miniGMG/miniGMG.tar.gz"
+
+ version('master', '975a2a118403fc0024b5e04cef280e95')
+
+ depends_on('mpi')
+
+ phases = ['build', 'install']
+
+ def build(self, spec, prefix):
+ cc = Executable(spec['mpi'].mpicc)
+ cc('-O3', self.compiler.openmp_flag, 'miniGMG.c',
+ 'mg.c', 'box.c', 'solver.c', 'operators.ompif.c', 'timer.x86.c',
+ '-D__MPI', '-D__COLLABORATIVE_THREADING=6',
+ '-D__TEST_MG_CONVERGENCE', '-D__PRINT_NORM', '-D__USE_BICGSTAB',
+ '-o', 'run.miniGMG', '-lm')
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('run.miniGMG', prefix.bin)
+ mkdir(prefix.jobs)
+ files = glob.glob('job*')
+ for f in files:
+ install(f, prefix.jobs)
diff --git a/var/spack/repos/builtin/packages/minimd/package.py b/var/spack/repos/builtin/packages/minimd/package.py
new file mode 100644
index 0000000000..a8d72e7015
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minimd/package.py
@@ -0,0 +1,76 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import glob
+import tarfile
+
+from spack import *
+
+
+class Minimd(MakefilePackage):
+ """Proxy Application. A simple proxy for the force computations
+ in a typical molecular dynamics applications.
+ """
+
+ homepage = "http://mantevo.org"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniMD/miniMD_1.2.tgz"
+
+ tags = ['proxy-app']
+
+ version('1.2', '893ef1ca5062e32b43a8d11bcfe1a056')
+
+ depends_on('mpi')
+
+ build_directory = 'miniMD_ref'
+
+ @property
+ def build_targets(self):
+ targets = [
+ 'LINK={0}'.format(self.spec['mpi'].mpicxx),
+ 'CC={0}'.format(self.spec['mpi'].mpicxx),
+ 'CCFLAGS={0} -DMPICH_IGNORE_CXX_SEEK -DNOCHUNK'.format(
+ self.compiler.openmp_flag),
+ 'EXE=miniMD_mpi',
+ 'openmpi'
+ ]
+
+ return targets
+
+ def edit(self, spec, prefix):
+ inner_tar = tarfile.open(name='miniMD_{0}_ref.tgz'.format(
+ self.version.up_to(2)))
+ inner_tar.extractall()
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('miniMD_ref/miniMD_mpi', prefix.bin)
+ install('miniMD_ref/in.lj.miniMD', prefix.bin)
+ install('miniMD_ref/README', prefix.doc)
+
+ for f in glob.glob('miniMD_ref/in.*'):
+ install(f, prefix.doc)
diff --git a/var/spack/repos/builtin/packages/minismac2d/package.py b/var/spack/repos/builtin/packages/minismac2d/package.py
new file mode 100644
index 0000000000..b519128b19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minismac2d/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Minismac2d(MakefilePackage):
+ """Proxy Application. Solves the finite-differenced 2D incompressible
+ Navier-Stokes equations with Spalart-Allmaras one-equation
+ turbulence model on a structured body conforming grid.
+ """
+
+ homepage = "http://mantevo.org"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniSMAC2D/miniSMAC2D-2.0.tgz"
+
+ tags = ['proxy-app']
+
+ version('2.0', '1bb1a52cea21bc9162bf7a71a6ddf37d')
+
+ depends_on('mpi')
+
+ parallel = False
+
+ @property
+ def build_targets(self):
+ targets = [
+ 'CPP=cpp',
+ 'FC={0}'.format(self.spec['mpi'].mpifc),
+ 'LD={0}'.format(self.spec['mpi'].mpifc),
+ 'MPIDIR=-I{0}/include'.format(self.spec['mpi'].prefix),
+ 'CPPFLAGS=-P -traditional -DD_PRECISION',
+ 'FFLAGS=-O3 -c -g -DD_PRECISION',
+ 'LDFLAGS=-O3',
+ '--file=Makefile_mpi_only'
+ ]
+
+ return targets
+
+ def edit(self, spec, prefix):
+ # Editing input file to point to installed data files
+ param_file = FileFilter('smac2d.in')
+ param_file.filter('bcmain_directory=.*', "bcmain_directory='.'")
+ param_file.filter('bcmain_filename=.*',
+ "bcmain_filename='bcmain.dat_original_119x31'")
+ param_file.filter('xygrid_directory=.*', "xygrid_directory='.'")
+ param_file.filter('xygrid_filename=.*',
+ "xygrid_filename='xy.dat_original_119x31'")
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('smac2d_mpi_only', prefix.bin)
+ install('bcmain.dat_original_119x31', prefix.bin)
+ install('xy.dat_original_119x31', prefix.bin)
+ install('smac2d.in', prefix.bin)
+ install('README.txt', prefix.doc)
diff --git a/var/spack/repos/builtin/packages/minixyce/package.py b/var/spack/repos/builtin/packages/minixyce/package.py
new file mode 100644
index 0000000000..46d160d2da
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minixyce/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Minixyce(MakefilePackage):
+ """Proxy Application. A portable proxy of some of the key
+ capabilities in the electrical modeling Xyce.
+ """
+
+ homepage = "https://mantevo.org"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniXyce/miniXyce_1.0.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.0', '6fc0e5a561af0b8ff581d9f704194133')
+
+ variant('mpi', default=True, description='Build with MPI Support')
+
+ depends_on('mpi', when='+mpi')
+
+ @property
+ def build_targets(self):
+ targets = []
+
+ if '+mpi' in self.spec:
+ targets.append('CXX={0}'.format(self.spec['mpi'].mpicxx))
+ targets.append('LINKER={0}'.format(self.spec['mpi'].mpicxx))
+ targets.append('USE_MPI=-DHAVE_MPI -DMPICH_IGNORE_CXX_SEEK')
+ else:
+ targets.append('CXX=c++')
+ targets.append('LINKER=c++')
+ targets.append('USE_MPI=')
+
+ # Remove Compiler Specific Optimization Flags
+ if '%gcc' not in self.spec:
+ targets.append('CPP_OPT_FLAGS=')
+
+ return targets
+
+ def build(self, spec, prefix):
+ with working_dir('miniXyce_ref'):
+ # Call Script Targets First to Generate Needed Files
+ make('generate_info')
+ make('common_files')
+ make(*self.build_targets)
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('miniXyce_ref/miniXyce.x', prefix.bin)
+ install('miniXyce_ref/default_params.txt', prefix.bin)
+ install('README', prefix.doc)
+
+ install_tree('miniXyce_ref/tests/', prefix.doc.tests)
diff --git a/var/spack/repos/builtin/packages/mitofates/package.py b/var/spack/repos/builtin/packages/mitofates/package.py
new file mode 100644
index 0000000000..0ca4ae58f2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mitofates/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mitofates(Package):
+ """MitoFates predicts mitochondrial presequence, a cleavable localization
+ signal located in N-terminal, and its cleaved position."""
+
+ homepage = "http://mitf.cbrc.jp/MitoFates/cgi-bin/top.cgi"
+ url = "http://mitf.cbrc.jp/MitoFates/program/MitoFates_1.2.tar.gz"
+
+ version('1.2', 'aaac42a8e8c7318a4abde9df3a4b72d1')
+
+ depends_on('libsvm')
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
+ install('MitoFates.pl', prefix)
diff --git a/var/spack/repos/builtin/packages/mitos/package.py b/var/spack/repos/builtin/packages/mitos/package.py
index 0e87f7c376..2c2177f968 100644
--- a/var/spack/repos/builtin/packages/mitos/package.py
+++ b/var/spack/repos/builtin/packages/mitos/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Mitos(Package):
+class Mitos(CMakePackage):
"""Mitos is a library and a tool for collecting sampled memory
performance data to view with MemAxes"""
@@ -40,10 +40,4 @@ class Mitos(Package):
depends_on('dyninst@8.2.1:')
depends_on('hwloc')
depends_on('mpi')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make("install")
+ depends_on('cmake@2.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py
index 4798f842f0..1bf81b34ea 100644
--- a/var/spack/repos/builtin/packages/moab/package.py
+++ b/var/spack/repos/builtin/packages/moab/package.py
@@ -49,7 +49,7 @@ class Moab(AutotoolsPackage):
description='Required to enable the hdf5 (default I/O) format')
variant('netcdf', default=False,
description='Required to enable the ExodusII reader/writer.')
- variant('pnetcdf', default=False,
+ variant('pnetcdf', default=False,
description='Enable pnetcdf (AKA parallel-netcdf) support')
variant('netcdf', default=False,
description='Required to enable the ExodusII reader/writer.')
@@ -57,7 +57,7 @@ class Moab(AutotoolsPackage):
variant('cgm', default=False, description='Enable common geometric module')
variant('metis', default=True, description='Enable metis link')
variant('parmetis', default=True, description='Enable parmetis link')
- variant('irel', default=False, description='Enable irel interface')
+ variant('irel', default=False, description='Enable irel interface')
variant('fbigeom', default=False, description='Enable fbigeom interface')
variant('coupler', default=True, description='Enable mbcoupler tool')
@@ -79,6 +79,7 @@ class Moab(AutotoolsPackage):
# depends_on('cgns', when='+cgns')
# depends_on('vtk', when='+vtk')
+ depends_on('blas')
depends_on('mpi', when='+mpi')
depends_on('hdf5', when='+hdf5')
depends_on('hdf5+mpi', when='+hdf5+mpi')
diff --git a/var/spack/repos/builtin/packages/molcas/install_driver.patch b/var/spack/repos/builtin/packages/molcas/install_driver.patch
new file mode 100644
index 0000000000..717e776aee
--- /dev/null
+++ b/var/spack/repos/builtin/packages/molcas/install_driver.patch
@@ -0,0 +1,114 @@
+--- molcas82/sbin/install_driver.sh 2017-02-14 04:35:06.000000000 -0600
++++ molcas82/sbin/install_driver.sh 2017-08-04 15:08:17.872417692 -0500
+@@ -1,110 +1,3 @@
+ #!/bin/sh
+
+-echo `pwd` > $HOME/.Molcas/molcas 2> /dev/null
+-
+-# current driver version
+-if [ -z "$1" ] ; then
+- driver_file="sbin/molcas.driver"
+-else
+- driver_file="$1"
+-fi
+-current_version=`sed -e 's/.*Molcas driver shell script version // ; tx ; d ; :x s/\.//' $driver_file`
+-
+-MOLCASDRIVER=""
+-
+-# check location of driver script in your PATH
+-installed=0
+-
+-orig_IFS=$IFS
+-IFS=':'
+-for x in $PATH; do
+- if [ -f "$x/molcas" ]; then
+- l=`sed -e 's/.*Molcas driver shell script version // ; tx ; d ; :x s/\.//' "$x/molcas"`
+- if [ "$l" -lt "$current_version" ]; then
+- echo "*** Warning! An old version of the molcas driver script was found at: $x"
+- rm -f "$x/molcas" > /dev/null 2>&1
+- if [ "$?" != 0 ]; then
+- echo "*** $x/molcas is read only!"
+- echo "*** You have to remove this file manually"
+- echo ""
+- else
+- echo " and removed..."
+- MOLCASDRIVER="$x"
+- fi
+- else
+- echo "Molcas driver has been found at: $x"
+- MOLCASDRIVER="$x"
+- installed=1
+- fi
+- break
+- fi
+-done
+-
+-# latest version already installed, exit
+-if [ $installed = 1 ] ; then
+- exit 0
+-fi
+-
+-# try to find proper location for molcas driver
+-if [ -z "$MOLCASDRIVER" ]; then
+- # no existing version found, use default PATH
+- if [ -z "$PATH" ]; then
+- E_PATH="$HOME/bin"
+- else
+- E_PATH="$HOME/bin:$PATH"
+- fi
+-else
+- # a previous version was found, create it there
+- E_PATH="$MOLCASDRIVER"
+-fi
+-
+-# find first writable directory
+-dir_found=0
+-for x in $E_PATH ; do
+- if [ "$x" = "." ] ; then continue ; fi
+- # detect if directory is writable (-w would not work, since it does not handle mount permissions)
+- cp "$driver_file" "$x/this_is_not_molcas" > /dev/null 2>&1
+- if [ "$?" = 0 ] ; then
+- rm -f "$x/this_is_not_molcas" > /dev/null 2>&1
+- MOLCASDRIVER="$x"
+- dir_found=1
+- break
+- fi
+-done
+-
+-# create a default molcas driver
+-if [ $dir_found = 0 ] ; then
+- echo "*** Warning! Could not find a proper directory to install the molcas driver"
+- echo ""
+- echo "*** Check that there is a directory in your PATH with write access"
+- echo "*** (for example $HOME/bin) and restart the installation"
+- echo ""
+- echo "*** You have to put the molcas driver in any directory in your PATH"
+-else
+- echo "molcas driver will be installed in $MOLCASDRIVER"
+- echo "Is this OK?"
+- while true; do
+- read answer
+- case "${answer}_" in
+- [Yy]*|_ )
+- cp "$driver_file" "$MOLCASDRIVER/molcas"
+- chmod +x "$MOLCASDRIVER/molcas"
+- # check again the driver was installed
+- l=`sed -e 's/.*Molcas driver shell script version // ; tx ; d ; :x s/\.//' "$x/molcas"`
+- if [ "$l" -eq "$current_version" -a -x "$MOLCASDRIVER/molcas" ] ; then
+- echo "Driver installation successful"
+- else
+- echo "*** Driver installation failed!"
+- echo ""
+- echo "*** You have to put the molcas driver in any directory in your PATH"
+- fi
+- break ;;
+- [Nn]* )
+- echo "*** Driver installation canceled!"
+- echo ""
+- echo "*** You have to put the molcas driver in any directory in your PATH"
+- break ;;
+- * ) echo "Please answer yes or no"
+- esac
+- done
+-fi
++echo `Driver Will be in the sbin folder`
diff --git a/var/spack/repos/builtin/packages/molcas/package.py b/var/spack/repos/builtin/packages/molcas/package.py
new file mode 100644
index 0000000000..c5d92b9c50
--- /dev/null
+++ b/var/spack/repos/builtin/packages/molcas/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Molcas(CMakePackage):
+ """Molcas is an ab initio quantum chemistry software package
+ developed by scientists to be used by scientists.
+ Please set the path to licence file with the following command
+ export MOLCAS_LICENSE=/path/to/molcas/license/"""
+
+ homepage = "http://www.molcas.org/"
+ url = "file://{0}/molcas8.2.tar.gz".format(os.getcwd())
+
+ version('8.2', '25b5fb8e1338b458a3eaea0b3d3b5e58')
+
+ # Licensing
+ license_required = True
+ license_vars = ['MOLCAS_LICENSE']
+
+ depends_on('openmpi')
+ depends_on('openblas')
+ depends_on('hdf5')
+
+ patch('install_driver.patch')
diff --git a/var/spack/repos/builtin/packages/mothur/package.py b/var/spack/repos/builtin/packages/mothur/package.py
new file mode 100644
index 0000000000..0caf0bc1f9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mothur/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mothur(MakefilePackage):
+ """This project seeks to develop a single piece of open-source, expandable
+ software to fill the bioinformatics needs of the microbial ecology
+ community."""
+
+ homepage = "https://github.com/mothur/mothur"
+ url = "https://github.com/mothur/mothur/archive/v1.39.5.tar.gz"
+
+ version('1.39.5', '1f826ea4420e6822fc0db002c5940b92')
+
+ variant('mpi', default=True, description='Enable MPI parallel support')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('boost')
+ depends_on('readline')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('Makefile')
+ makefile.filter('BOOST_LIBRARY_DIR=\"\\\"Enter_your_boost_library_path'
+ '_here\\\"\"', 'BOOST_LIBRARY_DIR=%s' %
+ self.spec['boost'].prefix.lib)
+ makefile.filter('BOOST_INCLUDE_DIR=\"\\\"Enter_your_boost_include_path'
+ '_here\\\"\"', 'BOOST_INCLUDE_DIR=%s' %
+ self.spec['boost'].prefix.include)
+ makefile.filter('MOTHUR_FILES=\"\\\"Enter_your_default_path_'
+ 'here\\\"\"', 'MOTHUR_FILES=%s' % prefix)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('mothur', prefix.bin)
+ install('uchime', prefix.bin)
+ install_tree('source', prefix.include)
diff --git a/var/spack/repos/builtin/packages/mpest/package.py b/var/spack/repos/builtin/packages/mpest/package.py
new file mode 100644
index 0000000000..a00eb37bb8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpest/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mpest(MakefilePackage):
+ """MP-EST estimates species trees from a set of gene trees by maximizing
+ a pseudo-likelihood function."""
+
+ homepage = "http://faculty.franklin.uga.edu/lliu/content/mp-est"
+ url = "https://faculty.franklin.uga.edu/lliu/sites/faculty.franklin.uga.edu.lliu/files/mpest_1.5.zip"
+
+ version('1.5', 'f176d5301aa26567918664e5e30027d1')
+
+ @property
+ def build_directory(self):
+ return join_path('mpest_{0}'.format(self.version), 'src')
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ mkdirp(prefix.bin)
+ install('mpest', prefix.bin)
+
+ def setup_environment(self, spack_env, run_env):
+ if self.spec.satisfies('platform=darwin'):
+ spack_env.set('ARCHITECTURE', 'mac')
+ else:
+ spack_env.set('ARCHITECTURE', 'unix')
diff --git a/var/spack/repos/builtin/packages/mpiblast/mpiBLAST-1.6.0-patch-110806 b/var/spack/repos/builtin/packages/mpiblast/mpiBLAST-1.6.0-patch-110806
new file mode 100644
index 0000000000..05de8ed074
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpiblast/mpiBLAST-1.6.0-patch-110806
@@ -0,0 +1,182 @@
+diff -rwu mpiblast-1.6.0/ncbi/corelib/ncbienv.c mpiblast-1.6.0-patched/ncbi/corelib/ncbienv.c
+--- mpiblast-1.6.0/ncbi/corelib/ncbienv.c 2009-11-22 01:17:48.000000000 -0500
++++ mpiblast-1.6.0-patched/ncbi/corelib/ncbienv.c 2011-08-06 17:10:08.000000000 -0400
+@@ -1932,7 +1932,7 @@
+ static char **targv = NULL;
+
+
+-#if defined(WIN_MAC)
++#if defined(WIN_MAC) || defined(OS_UNIX_DARWIN)
+ static FSSpec apFileSpec;
+ static Str255 apName;
+ static Handle apParam;
+@@ -2047,7 +2047,7 @@
+ }
+ }
+ #endif /* defined(OS_UNIX_DARWIN) */
+-#endif /* defined(WIN_MAC) */
++#endif /* defined(WIN_MAC) || defined(OS_UNIX_DARWIN) */
+
+
+ #if defined(OS_MSWIN) || defined(OS_VMS)
+diff -rwu mpiblast-1.6.0/ncbi/make/makedis.csh mpiblast-1.6.0-patched/ncbi/make/makedis.csh
+--- mpiblast-1.6.0/ncbi/make/makedis.csh 2010-06-28 21:04:36.000000000 -0400
++++ mpiblast-1.6.0-patched/ncbi/make/makedis.csh 2011-08-06 17:06:42.000000000 -0400
+@@ -1,6 +1,6 @@
+ #!/bin/csh -f
+ #
+-# $Id: makedis.csh 148594 2008-12-30 15:11:36Z ucko $
++# $Id: makedis.csh 179886 2010-01-04 17:28:02Z ucko $
+ #
+ ## PUBLIC DOMAIN NOTICE
+ # National Center for Biotechnology Information
+@@ -54,7 +54,7 @@
+ endif
+
+ ls -l $tar_file
+- tar xvf $tar_file
++ tar xf $tar_file
+ else
+ # make sure that ncbi/build directory exists
+ if ( ! -d "ncbi/build" ) then
+@@ -74,6 +74,7 @@
+ set HAVE_MAC=0
+ #we will try to build OpenGL version of vibrant
+ set HAVE_OGL=1
++set MPBL_HAVE_MAC=0
+
+ switch ($os)
+ case SunOS:
+@@ -164,7 +165,7 @@
+ gcc -v
+ switch (`uname -m`)
+ case "ia64":
+- if (-e `which ecc`) then
++ if (-e `which icc`) then
+ set platform=linux_ecc
+ else
+ set platform=linux
+@@ -253,7 +254,11 @@
+ endif
+ endif
+ set HAVE_MOTIF=0
+- set HAVE_MAC=1
++#MPIBLAST <<<
++# set HAVE_MAC=1
++ set MPBL_HAVE_MAC=1
++ set HAVE_MAC=0
++#MPIBLAST
+ breaksw
+ case NetBSD:
+ set platform=netbsd
+@@ -319,6 +324,7 @@
+ goto BADPLATFORM
+ endif
+
++
+ set noglob
+ # take the file $NCBI_DOT_MK and convert it to be suitable for csh eval:
+ # (1) remove comments at the beginning of the lines
+@@ -328,6 +334,7 @@
+ eval `sed -e 's/^ *#.*//g' -e 's/\$(\([a-zA-Z_]*\))/\${\1}/g' -e 's/ *= */=/g' -e 's/^\([^=]*\)=\(.*\)$/setenv \1 "\2";/' < $NCBI_DOT_MK`
+ unset noglob
+
++
+ # disable assert() unless ENABLE_ASSERT is set
+ if ("$?ENABLE_ASSERT" == 0) then
+ set NCBI_OPTFLAG="-DNDEBUG $NCBI_OPTFLAG"
+@@ -441,13 +448,23 @@
+ set NET_VIB=(VIB=\"blastcl3 taxblast idfetch bl2seq asn2gb tbl2asn gene2xml $NONVIBWWWBLAST \")
+ endif
+
++# MPIBLAST <<<<<
++if ("$MPBL_HAVE_MAC" == 1) then
++set CMD='make $MFLG \
++ CFLAGS1=\"-I/Developer/Headers/FlatCarbon $NCBI_OPTFLAG $NCBI_CFLAGS1 $OGL_INCLUDE $PNG_INCLUDE\" \
++ LDFLAGS1=\"$NCBI_LDFLAGS1\" OTHERLIBS=\"$NCBI_OTHERLIBS\" \
++ SHELL=\"$NCBI_MAKE_SHELL\" LCL=\"$NCBI_DEFAULT_LCL\" \
++ RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\" $ALL_VIB all'
++else
+ set CMD='make $MFLG \
+ CFLAGS1=\"$NCBI_OPTFLAG $NCBI_CFLAGS1 $OGL_INCLUDE $PNG_INCLUDE\" \
+ LDFLAGS1=\"$NCBI_LDFLAGS1\" OTHERLIBS=\"$NCBI_OTHERLIBS\" \
+ SHELL=\"$NCBI_MAKE_SHELL\" LCL=\"$NCBI_DEFAULT_LCL\" \
+ RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\" $ALL_VIB all'
++endif
+ eval echo $CMD
+ eval echo $CMD | sh
++# MPIBLAST >>>>>
+
+ set make_stat = $status
+
+@@ -463,12 +480,18 @@
+ endif
+
+ # MPIBLAST <<<<<
+-
++if ("$MPBL_HAVE_MAC" == 1) then
+ set CMD='make $MFLG -f makempiblast.unx CFLAGS1=\"$NCBI_OPTFLAG $NCBI_CFLAGS1\" \
+ LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" \
+ LCL=\"$NCBI_DEFAULT_LCL\" RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\"'
++else
++set CMD='make $MFLG -f makempiblast.unx CFLAGS1=\"$NCBI_OPTFLAG $NCBI_CFLAGS1\" \
++ LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" \
++ LCL=\"$NCBI_DEFAULT_LCL\" RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\"'
++endif
+ eval echo $CMD
+ eval echo $CMD | sh
++if ($status != 0) exit $status
+
+ if( "$platform" == "bluegenel" || "$platform" == "bluegenep" ) then
+ exit 0
+@@ -476,7 +499,7 @@
+ # MPIBLAST >>>>>
+
+ set CMD='make $MFLG -f makedemo.unx CFLAGS1=\"$NCBI_OPTFLAG $NCBI_CFLAGS1\" \
+- LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" \
++ LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" OTHERLIBS=\"$NCBI_OTHERLIBS\" \
+ LCL=\"$NCBI_DEFAULT_LCL\" RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\" $DEMO_VIB'
+ eval echo $CMD
+ eval echo $CMD | sh
+@@ -495,7 +518,7 @@
+
+
+ set CMD='make $MFLG -f makedemo.unx CFLAGS1=\"$NCBI_OPTFLAG $NCBI_CFLAGS1\" \
+- LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" \
++ LDFLAGS1=\"$NCBI_LDFLAGS1\" SHELL=\"$NCBI_MAKE_SHELL\" OTHERLIBS=\"$NCBI_OTHERLIBS\" \
+ LCL=\"$NCBI_DEFAULT_LCL\" RAN=\"$NCBI_RANLIB\" AR=\"$NCBI_AR\" CC=\"$NCBI_CC\" \
+ THREAD_OBJ=$NCBI_THREAD_OBJ THREAD_OTHERLIBS=\"$NCBI_MT_OTHERLIBS\" \
+ $DEMO_VIB $mtapps'
+diff -rwu mpiblast-1.6.0/src/Makefile.am mpiblast-1.6.0-patched/src/Makefile.am
+--- mpiblast-1.6.0/src/Makefile.am 2009-11-22 01:17:48.000000000 -0500
++++ mpiblast-1.6.0-patched/src/Makefile.am 2011-08-06 17:06:42.000000000 -0400
+@@ -2,7 +2,7 @@
+ -D_LARGEFILE64_SOURCE -DMPIBLAST_PIO \
+ -I$(top_srcdir)/include/ -I@CONFIG_NCBIDIR@/include/ $(MPE_INCS) \
+ -I@CONFIG_NCBIDIR@/corelib/
+-AM_CXXFLAGS = -DMPICH_IGNORE_CXX_SEEK -DINSTALL_PREFIX="\"@prefix@\"" \
++AM_CXXFLAGS = -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX -DINSTALL_PREFIX="\"@prefix@\"" \
+ @COMPILE_FLAGS@ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
+ -I$(top_srcdir)/include/ -I@CONFIG_NCBIDIR@/include/ $(MPE_INCS) \
+ -I@CONFIG_NCBIDIR@/corelib/
+@@ -31,7 +31,7 @@
+ @CONFIG_NCBIDIR@/build/blast_hooks.o -lmyncbitool -lblastcompadj -lmyncbiobj \
+ -lmyncbi -L. -L@CONFIG_NCBIDIR@/lib/ $(MPE_LIBS) -lm @LINK_FLAGS@
+ mpiblast_DEPENDENCIES = @GETOPT_LONG_SYSTEM@
+-mpiblast_CPPFLAGS = -DUSING_MPI -DMPICH_IGNORE_CXX_SEEK
++mpiblast_CPPFLAGS = -DUSING_MPI -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX
+
+ mpiformatdb_SOURCES = mpiformatdb.cpp mpiblast_config.cpp mpiblast_config.hpp \
+ file_util.cpp file_util.hpp mpiblast_util.cpp mpiblast_util.hpp \
+diff -rwu mpiblast-1.6.0/src/pio_intercept.h mpiblast-1.6.0-patched/src/pio_intercept.h
+--- mpiblast-1.6.0/src/pio_intercept.h 2009-11-22 01:17:48.000000000 -0500
++++ mpiblast-1.6.0-patched/src/pio_intercept.h 2011-08-06 17:06:42.000000000 -0400
+@@ -60,7 +60,7 @@
+ #include <txalign.h>
+
+ /* marcros are duplicated in ncbi files to avoid header file conflict */
+-#define CHECK_NULPTR(x) if(x==NULL) fprintf(stderr, "%s, line%d: cannot allocate enough memory\n", __FILE__, __LINE__);
++#define CHECK_NULPTR(x) if(x==NULL) { perror("Cannot allocate enough memory:"); exit(-1); }
+
+ #ifndef NO_MPI
+ typedef struct _output_record {
diff --git a/var/spack/repos/builtin/packages/mpiblast/package.py b/var/spack/repos/builtin/packages/mpiblast/package.py
new file mode 100644
index 0000000000..c5e283dbcf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpiblast/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mpiblast(AutotoolsPackage):
+ """mpiBLAST is a freely available, open-source, parallel implementation of
+ NCBI BLAST"""
+
+ homepage = "http://www.mpiblast.org/"
+ url = "http://www.mpiblast.org/downloads/files/mpiBLAST-1.6.0.tgz"
+
+ version('1.6.0', '707105ccd56825db776b50bfd81cecd5')
+
+ patch('mpiBLAST-1.6.0-patch-110806')
+
+ depends_on('mpi')
+
+ def configure_args(self):
+ args = ['--with-mpi=%s' % self.spec['mpi'].prefix]
+ return args
+
+ def build(self, spec, prefix):
+ make('ncbi')
+ make()
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.set('ac_cv_path_CC', self.spec['mpi'].mpicc)
+ spack_env.set('ac_cv_path_CXX', self.spec['mpi'].mpicxx)
diff --git a/var/spack/repos/builtin/packages/mpich/mpich32_clang.patch b/var/spack/repos/builtin/packages/mpich/mpich32_clang.patch
new file mode 100644
index 0000000000..01243072f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpich/mpich32_clang.patch
@@ -0,0 +1,13 @@
+diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
+index e705e5d..3bfcbee 100644
+--- a/src/include/mpiimpl.h
++++ b/src/include/mpiimpl.h
+@@ -1528,7 +1528,7 @@ typedef struct MPID_Request {
+ #ifdef MPID_DEV_REQUEST_DECL
+ MPID_DEV_REQUEST_DECL
+ #endif
+-} MPID_Request ATTRIBUTE((__aligned__(32)));
++} ATTRIBUTE((__aligned__(32))) MPID_Request;
+
+ extern MPIU_Object_alloc_t MPID_Request_mem;
+ /* Preallocated request objects */
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index f61a160d98..0663ce2b7b 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -51,6 +51,11 @@ class Mpich(AutotoolsPackage):
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
+ # fix MPI_Barrier segmentation fault
+ # see https://lists.mpich.org/pipermail/discuss/2016-May/004764.html
+ # and https://lists.mpich.org/pipermail/discuss/2016-June/004768.html
+ patch('mpich32_clang.patch', when='@3.2%clang')
+
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# On Cray, the regular compiler wrappers *are* the MPI wrappers.
if 'platform=cray' in self.spec:
diff --git a/var/spack/repos/builtin/packages/mpifileutils/package.py b/var/spack/repos/builtin/packages/mpifileutils/package.py
index 03ec613e0b..21b600f99b 100644
--- a/var/spack/repos/builtin/packages/mpifileutils/package.py
+++ b/var/spack/repos/builtin/packages/mpifileutils/package.py
@@ -38,6 +38,7 @@ class Mpifileutils(AutotoolsPackage):
homepage = "https://github.com/hpc/mpifileutils"
url = "https://github.com/hpc/mpifileutils/releases/download/v0.6/mpifileutils-0.6.tar.gz"
+ version('0.7', 'c081f7f72c4521dddccdcf9e087c5a2b')
version('0.6', '620bcc4966907481f1b1a965b28fc9bf')
depends_on('mpi')
@@ -52,10 +53,11 @@ class Mpifileutils(AutotoolsPackage):
variant('lustre', default=False,
description="Enable optimizations and features for Lustre")
- # install experimental tools
- # (coming with v0.7)
- # variant('experimental', default=False,
- # description="Install experimental tools")
+ variant('experimental', default=False,
+ description="Install experimental tools")
+
+ # --enable-experimental fails with v0.6 and earlier
+ conflicts('+experimental', when='@:0.6')
def configure_args(self):
args = []
@@ -65,11 +67,11 @@ class Mpifileutils(AutotoolsPackage):
else:
args.append('--disable-lustre')
- # coming with v0.7
- # if '+experimental' in self.spec:
- # args.append('--enable-experimental')
- # else:
- # args.append('--disable-experimental')
+ if self.spec.satisfies('@0.7:'):
+ if '+experimental' in self.spec:
+ args.append('--enable-experimental')
+ else:
+ args.append('--disable-experimental')
return args
diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py
index f75df37278..4bc4b01ef0 100644
--- a/var/spack/repos/builtin/packages/mpip/package.py
+++ b/var/spack/repos/builtin/packages/mpip/package.py
@@ -33,10 +33,14 @@ class Mpip(AutotoolsPackage):
version("3.4.1", "1168adc83777ac31d6ebd385823aabbd")
- depends_on("libelf", type="build")
- depends_on("libdwarf", type="build")
- depends_on('libunwind', when=os.uname()[4] == "x86_64", type="build")
- depends_on("mpi", type="build")
+ depends_on("libelf")
+ depends_on("libdwarf")
+ depends_on('libunwind', when=os.uname()[4] == "x86_64")
+ depends_on("mpi")
def configure_args(self):
- return ['--without-f77']
+ config_args = ['--without-f77']
+ config_args.append("--with-cc=%s" % self.spec['mpi'].mpicc)
+ config_args.append("--with-cxx=%s" % self.spec['mpi'].mpicxx)
+
+ return config_args
diff --git a/var/spack/repos/builtin/packages/mpix-launch-swift/package.py b/var/spack/repos/builtin/packages/mpix-launch-swift/package.py
new file mode 100644
index 0000000000..72e93b7992
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpix-launch-swift/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+from distutils.dir_util import copy_tree
+
+
+class MpixLaunchSwift(Package):
+ """Library that allows a child MPI application to be launched
+ inside a subset of processes in a parent MPI application.
+ """
+
+ homepage = "https://bitbucket.org/kshitijvmehta/mpix_launch_swift"
+ url = "https://kshitijvmehta@bitbucket.org/kshitijvmehta/mpix_launch_swift.git"
+
+ version('develop', git='https://kshitijvmehta@bitbucket.org/kshitijvmehta/mpix_launch_swift.git',
+ branch='envs')
+
+ depends_on('stc')
+ depends_on('tcl')
+ depends_on('mpi')
+ depends_on('swig', type='build')
+
+ def install(self, spec, prefix):
+ make()
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/mrbayes/package.py b/var/spack/repos/builtin/packages/mrbayes/package.py
new file mode 100644
index 0000000000..05038b6931
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mrbayes/package.py
@@ -0,0 +1,72 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Mrbayes(AutotoolsPackage):
+ """MrBayes is a program for Bayesian inference and model choice across a
+ wide range of phylogenetic and evolutionary models. MrBayes uses Markov
+ chain Monte Carlo (MCMC) methods to estimate the posterior distribution
+ of model parameters."""
+
+ homepage = "http://mrbayes.sourceforge.net"
+ url = "https://downloads.sourceforge.net/project/mrbayes/mrbayes/3.2.6/mrbayes-3.2.6.tar.gz"
+
+ version('3.2.6', '95f9822f24be47b976bf87540b55d1fe')
+
+ variant('mpi', default=True, description='Enable MPI parallel support')
+ variant('beagle', default=True, description='Enable BEAGLE library for speed benefits')
+ variant('sse', default=True, description='Enable SSE in order to substantially speed up execution')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+
+ depends_on('libbeagle', when='+beagle')
+ depends_on('mpi', when='+mpi')
+
+ configure_directory = 'src'
+
+ def configure_args(self):
+ args = []
+ if '~beagle' in self.spec:
+ args.append('--with-beagle=no')
+ else:
+ args.append('--with-beagle=%s' % self.spec['libbeagle'].prefix)
+ if '~sse' in self.spec:
+ args.append('--enable-sse=no')
+ else:
+ args.append('--enable-sse=yes')
+ if '~mpi' in self.spec:
+ args.append('--enable-mpi=no')
+ else:
+ args.append('--enable-mpi=yes')
+ return args
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir('src'):
+ install('mb', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py
index 5771fba86d..a22fd0e312 100644
--- a/var/spack/repos/builtin/packages/msgpack-c/package.py
+++ b/var/spack/repos/builtin/packages/msgpack-c/package.py
@@ -25,17 +25,11 @@
from spack import *
-class MsgpackC(Package):
+class MsgpackC(CMakePackage):
"""A small, fast binary interchange format convertible to/from JSON"""
homepage = "http://www.msgpack.org"
url = "https://github.com/msgpack/msgpack-c/archive/cpp-1.4.1.tar.gz"
version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
-
- make()
- make("install")
+ depends_on('cmake@2.8.12:', type='build')
diff --git a/var/spack/repos/builtin/packages/muscle/package.py b/var/spack/repos/builtin/packages/muscle/package.py
index c8237826a2..3aac5fb5bb 100644
--- a/var/spack/repos/builtin/packages/muscle/package.py
+++ b/var/spack/repos/builtin/packages/muscle/package.py
@@ -35,6 +35,11 @@ class Muscle(MakefilePackage):
version('3.8.1551', '1b7c9661f275a82d3cf708f923736bf8')
+ def edit(self, spec, prefix):
+ makefile = FileFilter('Makefile')
+ makefile.filter('-static', '')
+ makefile.filter('-funroll-loops', '')
+
def install(self, spec, prefix):
mkdirp(prefix.bin)
install('muscle', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/muse/package.py b/var/spack/repos/builtin/packages/muse/package.py
new file mode 100644
index 0000000000..54dcdf9d15
--- /dev/null
+++ b/var/spack/repos/builtin/packages/muse/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Muse(MakefilePackage):
+ """Somatic point mutation caller."""
+
+ homepage = "http://bioinformatics.mdanderson.org/main/MuSE"
+ url = "https://github.com/danielfan/MuSE/archive/v1.0-rc.tar.gz"
+
+ version('1.0-rc', 'c63fdb48c041f6f9545879f1a7e4da58')
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('MuSE', prefix.bin.MuSE)
diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py
index bcc68ade27..4f61938a80 100644
--- a/var/spack/repos/builtin/packages/muster/package.py
+++ b/var/spack/repos/builtin/packages/muster/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Muster(Package):
+class Muster(CMakePackage):
"""The Muster library provides implementations of sequential and
parallel K-Medoids clustering algorithms. It is intended as a
general framework for parallel cluster analysis, particularly
@@ -38,11 +38,6 @@ class Muster(Package):
version('1.0.1', 'd709787db7e080447afb6571ac17723c')
version('1.0', '2eec6979a4a36d3a65a792d12969be16')
- depends_on("boost")
- depends_on("mpi")
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- cmake(".", *std_cmake_args)
- make()
- make("install")
+ depends_on('boost')
+ depends_on('mpi')
+ depends_on('cmake@2.8:', type='build')
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 7a3d8f1e02..675731146e 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -59,6 +59,9 @@ class Mvapich2(AutotoolsPackage):
variant('debug', default=False,
description='Enable debug info and error messages at run-time')
+ variant('cuda', default=False,
+ description='Enable CUDA extension')
+
# Accepted values are:
# single - No threads (MPI_THREAD_SINGLE)
# funneled - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
@@ -100,9 +103,9 @@ class Mvapich2(AutotoolsPackage):
)
)
- # FIXME : CUDA support is missing
- depends_on('bison')
+ depends_on('bison', type='build')
depends_on('libpciaccess', when=(sys.platform != 'darwin'))
+ depends_on('cuda', when='+cuda')
def url_for_version(self, version):
base_url = "http://mvapich.cse.ohio-state.edu/download"
@@ -217,6 +220,14 @@ class Mvapich2(AutotoolsPackage):
else:
args.append('--enable-fast=all')
+ if '+cuda' in self.spec:
+ args.extend([
+ '--enable-cuda',
+ '--with-cuda={0}'.format(spec['cuda'].prefix)
+ ])
+ else:
+ args.append('--disable-cuda')
+
args.extend(self.process_manager_options)
args.extend(self.network_options)
return args
@@ -235,6 +246,7 @@ class Mvapich2(AutotoolsPackage):
mpicxx = join_path(bin, 'mpicxx')
mpif77 = join_path(bin, 'mpif77')
mpif90 = join_path(bin, 'mpif90')
+ mpifort = join_path(bin, 'mpifort')
# Substitute Spack compile wrappers for the real
# underlying compiler
@@ -243,8 +255,9 @@ class Mvapich2(AutotoolsPackage):
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
+ filter_file(env['FC'], self.compiler.fc, mpifort, **kwargs)
# Remove this linking flag if present
# (it turns RPATH into RUNPATH)
- for wrapper in (mpicc, mpicxx, mpif77, mpif90):
+ for wrapper in (mpicc, mpicxx, mpif77, mpif90, mpifort):
filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs)
diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py
index e8b87e52c1..da5ef6437b 100644
--- a/var/spack/repos/builtin/packages/mxml/package.py
+++ b/var/spack/repos/builtin/packages/mxml/package.py
@@ -50,7 +50,7 @@ class Mxml(AutotoolsPackage):
def configure_args(self):
return [
# ADIOS build with -fPIC, so we need it too (avoid linkage issue)
- 'CFLAGS=-fPIC',
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
# Default is non-shared, but avoid any future surprises
'--disable-shared',
]
diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py
index fc6d79e9ea..3836c7a17f 100644
--- a/var/spack/repos/builtin/packages/nalu/package.py
+++ b/var/spack/repos/builtin/packages/nalu/package.py
@@ -38,19 +38,10 @@ class Nalu(CMakePackage):
version('master',
git='https://github.com/NaluCFD/Nalu.git', branch='master')
- variant('debug', default=False,
- description='Builds a debug version')
-
# Currently Nalu only builds static libraries; To be fixed soon
- depends_on('yaml-cpp+fpic~shared')
+ depends_on('yaml-cpp+pic~shared')
depends_on('trilinos~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf@master')
- def build_type(self):
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
spec = self.spec
options = []
diff --git a/var/spack/repos/builtin/packages/nanoflann/package.py b/var/spack/repos/builtin/packages/nanoflann/package.py
new file mode 100644
index 0000000000..da0ec728b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nanoflann/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Nanoflann(CMakePackage):
+ """a C++ header-only library for Nearest Neighbor (NN) search wih KD-trees.
+ """
+
+ homepage = "https://github.com/jlblancoc/nanoflann"
+ url = "https://github.com/jlblancoc/nanoflann/archive/v1.2.3.tar.gz"
+
+ version('1.2.3', '92a0f44a631c41aa06f9716c51dcdb11')
+
+ def cmake_args(self):
+ args = ['-DBUILD_SHARED_LIBS=ON']
+ return args
diff --git a/var/spack/repos/builtin/packages/nco/NUL-0-NULL.patch b/var/spack/repos/builtin/packages/nco/NUL-0-NULL.patch
new file mode 100644
index 0000000000..b1d17c0ecc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nco/NUL-0-NULL.patch
@@ -0,0 +1,51 @@
+From fec59e92795bfac5779d09cd5d96f10cd1c3e6af Mon Sep 17 00:00:00 2001
+From: Charlie Zender <zender@uci.edu>
+Date: Thu, 1 Jun 2017 20:18:02 -0700
+Subject: [PATCH] Patch for NUL = '\0' != NULL errors in ncap2 supplied by
+ Manfred Schwarb
+
+---
+ src/nco++/fmc_all_cls.cc | 8 ++++----
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/nco++/fmc_all_cls.cc b/src/nco++/fmc_all_cls.cc
+index 3cccc17..79e3240 100644
+--- a/src/nco++/fmc_all_cls.cc
++++ b/src/nco++/fmc_all_cls.cc
+@@ -4796,14 +4796,14 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
+ {
+ case PATOI:
+ {
+- char *pend='\0';
++ char *pend=NULL;
+ nco_int iout;
+ iout=0;
+
+ // allows whites space prefix & suffix
+ iout=(nco_int)std::strtol(buffer,&pend,10);
+
+- if( pend !=buffer && (*pend=='\0'|| *pend==' ') )
++ if(pend != buffer && (*pend == '\0'|| *pend == ' '))
+ ierr=0;
+ else
+ ierr=errno;
+@@ -4817,14 +4817,14 @@ var_sct *vlist_cls::push_fnd(bool &is_mtd, std::vector<RefAST> &vtr_args, fmc_cl
+
+ case PATOL:
+ {
+- char *pend='\0';
++ char *pend=NULL;
+ nco_int64 lout;
+ lout=0;
+
+ // allows whites space prefix & suffix
+ lout=(nco_int64)std::strtoll(buffer,&pend,10);
+
+- if( pend !=buffer && (*pend=='\0'|| *pend==' ') )
++ if( pend !=buffer && (*pend == '\0' || *pend == ' '))
+ ierr=0;
+ else
+ ierr=errno;
+--
+2.7.4
+
diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py
index 9a96685d54..85af71cbdf 100644
--- a/var/spack/repos/builtin/packages/nco/package.py
+++ b/var/spack/repos/builtin/packages/nco/package.py
@@ -41,6 +41,9 @@ class Nco(AutotoolsPackage):
version('4.6.1', 'ef43cc989229c2790a9094bd84728fd8')
version('4.5.5', '9f1f1cb149ad6407c5a03c20122223ce')
+ # https://github.com/nco/nco/issues/43
+ patch('NUL-0-NULL.patch')
+
variant('doc', default=False, description='Build/install NCO TexInfo-based documentation')
# See "Compilation Requirements" at:
diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py
index a9a33421a1..253f438b47 100644
--- a/var/spack/repos/builtin/packages/ncview/package.py
+++ b/var/spack/repos/builtin/packages/ncview/package.py
@@ -28,7 +28,7 @@ from spack import *
class Ncview(AutotoolsPackage):
"""Simple viewer for NetCDF files."""
homepage = "http://meteora.ucsd.edu/~pierce/ncview_home_page.html"
- url = "https://fossies.org/linux/misc/ncview-2.1.7.tar.gz"
+ url = "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz"
version('2.1.7', 'debd6ca61410aac3514e53122ab2ba07')
diff --git a/var/spack/repos/builtin/packages/nekbone/package.py b/var/spack/repos/builtin/packages/nekbone/package.py
new file mode 100644
index 0000000000..22d07661e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nekbone/package.py
@@ -0,0 +1,60 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Nekbone(Package):
+ """NEK5000 emulation software called NEKbone. Nekbone captures the basic
+ structure and user interface of the extensive Nek5000 software.
+ Nek5000 is a high order, incompressible Navier-Stokes solver based on
+ the spectral element method."""
+
+ homepage = "https://github.com/ANL-CESAR/"
+ url = "https://github.com/ANL-CESAR/nekbone.git"
+
+ tags = ['proxy-app']
+
+ version('develop', git='https://github.com/ANL-CESAR/nekbone.git')
+
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+
+ working_dirs = ['example1', 'example2', 'example3', 'nek_comm',
+ 'nek_delay', 'nek_mgrid']
+ mkdir(prefix.bin)
+
+ for wdir in working_dirs:
+ with working_dir('test/' + wdir):
+ makenec = FileFilter('makenek')
+ makenec.filter('CC.*', 'CC=' + self.spec['mpi'].mpicc)
+ makenec.filter('FF77.*', 'FF77=' + self.spec['mpi'].mpif77)
+ makenek = Executable('./makenek')
+ path = join_path(prefix.bin, wdir)
+ makenek('ex1', '../../src')
+ mkdir(path)
+ install('nekbone', path)
+ install('nekpmpi', path)
diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py
index 262036d771..90dd4dd5d7 100644
--- a/var/spack/repos/builtin/packages/netcdf/package.py
+++ b/var/spack/repos/builtin/packages/netcdf/package.py
@@ -133,7 +133,7 @@ class Netcdf(AutotoolsPackage):
config_args.append('--disable-shared')
# We don't have shared libraries but we still want it to be
# possible to use this library in shared builds
- CFLAGS.append('-fPIC')
+ CFLAGS.append(self.compiler.pic_flag)
if '+dap' in spec:
config_args.append('--enable-dap')
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index d6419b744e..6c6114f011 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -46,9 +46,9 @@ class NetlibScalapack(CMakePackage):
description='Build the shared library version'
)
variant(
- 'fpic',
+ 'pic',
default=False,
- description='Build with -fpic compiler option'
+ description='Build position independent code'
)
provides('scalapack')
@@ -87,10 +87,10 @@ class NetlibScalapack(CMakePackage):
'-DBLAS_LIBRARIES=%s' % (blas.joined(';'))
])
- if '+fpic' in spec:
+ if '+pic' in spec:
options.extend([
- "-DCMAKE_C_FLAGS=-fPIC",
- "-DCMAKE_Fortran_FLAGS=-fPIC"
+ "-DCMAKE_C_FLAGS=%s" % self.compiler.pic_flag,
+ "-DCMAKE_Fortran_FLAGS=%s" % self.compiler.pic_flag
])
return options
diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py
index a44df66b07..2917447a36 100644
--- a/var/spack/repos/builtin/packages/nextflow/package.py
+++ b/var/spack/repos/builtin/packages/nextflow/package.py
@@ -31,6 +31,8 @@ class Nextflow(Package):
homepage = "http://www.nextflow.io"
url = "https://github.com/nextflow-io/nextflow/releases/download/v0.24.1/nextflow"
+ version('0.25.6', '29d739b6caf8ceb5aa9997310ee8d0e7',
+ expand=False)
version('0.24.1', '80ec8c4fe8e766e0bdd1371a50410d1d',
expand=False)
version('0.23.3', '71fb69275b6788af1c6f1165f40d362e',
@@ -40,7 +42,7 @@ class Nextflow(Package):
version('0.17.3', '5df00105fb1ce6fd0ba019ae735d9617',
expand=False)
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
mkdirp(prefix.bin)
diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py
index 9b733cee6c..349b60bae9 100644
--- a/var/spack/repos/builtin/packages/ninja-fortran/package.py
+++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py
@@ -23,27 +23,45 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class NinjaFortran(Package):
- """ A Fortran capable fork of ninja """
+ """A Fortran capable fork of ninja."""
+
homepage = "https://github.com/Kitware/ninja"
- url = "https://github.com/Kitware/ninja/archive/v1.7.2.gcc0ea.kitware.dyndep-1.tar.gz"
+ url = "https://github.com/Kitware/ninja/archive/v1.7.2.gaad58.kitware.dyndep-1.tar.gz"
+
+ # Each version is a fork off of a specific commit of ninja
+ # Hashes don't sort properly, so manually set newest version
+ version('1.7.2.gaad58', 'eb51b042b9dbaf8ecd79a6fb24de1320', preferred=True)
+ version('1.7.2.gcc0ea', '3982f508c415c0abaca34cb5e92e711a')
+ version('1.7.1.g7ca7f', '187a8d15c1e20e5e9b00c5c3f227ca8a')
- version('1.7.2', '3982f508c415c0abaca34cb5e92e711a')
+ depends_on('python', type=('build', 'run'))
- extends('python')
+ phases = ['configure', 'install']
def url_for_version(self, version):
- url = 'https://github.com/Kitware/ninja/archive/v{0}.gcc0ea.kitware.dyndep-1.tar.gz'
+ url = 'https://github.com/Kitware/ninja/archive/v{0}.kitware.dyndep-1.tar.gz'
return url.format(version)
- def install(self, spec, prefix):
+ def configure(self, spec, prefix):
python('configure.py', '--bootstrap')
+ @run_after('configure')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ ninja = Executable('./ninja')
+ ninja('-j{0}'.format(make_jobs), 'ninja_test')
+ ninja_test = Executable('./ninja_test')
+ ninja_test()
+
+ def install(self, spec, prefix):
mkdir(prefix.bin)
install('ninja', prefix.bin)
- install_tree('misc', join_path(prefix, 'misc'))
+ install_tree('misc', prefix.misc)
+
+ # Some distros like Fedora install a 'ninja-build' executable
+ # instead of 'ninja'. Install both for uniformity.
with working_dir(prefix.bin):
- os.symlink('ninja', 'ninja-build')
+ symlink('ninja', 'ninja-build')
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py
index 28aa36c465..7a53ae684c 100644
--- a/var/spack/repos/builtin/packages/ninja/package.py
+++ b/var/spack/repos/builtin/packages/ninja/package.py
@@ -23,23 +23,41 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
class Ninja(Package):
- """ A small, fast Make alternative """
- homepage = "https://martine.github.io/ninja/"
- url = "https://github.com/martine/ninja/archive/v1.6.0.tar.gz"
+ """Ninja is a small build system with a focus on speed. It differs from
+ other build systems in two major respects: it is designed to have its input
+ files generated by a higher-level build system, and it is designed to run
+ builds as fast as possible."""
+ homepage = "https://ninja-build.org/"
+ url = "https://github.com/ninja-build/ninja/archive/v1.7.2.tar.gz"
+
+ version('1.7.2', '7b482218757acbaeac4d4d54a3cd94e1')
version('1.6.0', '254133059f2da79d8727f654d7198f43')
- extends('python')
+ depends_on('python', type=('build', 'run'))
- def install(self, spec, prefix):
+ phases = ['configure', 'install']
+
+ def configure(self, spec, prefix):
python('configure.py', '--bootstrap')
+ @run_after('configure')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ ninja = Executable('./ninja')
+ ninja('-j{0}'.format(make_jobs), 'ninja_test')
+ ninja_test = Executable('./ninja_test')
+ ninja_test()
+
+ def install(self, spec, prefix):
mkdir(prefix.bin)
install('ninja', prefix.bin)
- install_tree('misc', join_path(prefix, 'misc'))
+ install_tree('misc', prefix.misc)
+
+ # Some distros like Fedora install a 'ninja-build' executable
+ # instead of 'ninja'. Install both for uniformity.
with working_dir(prefix.bin):
- os.symlink('ninja', 'ninja-build')
+ symlink('ninja', 'ninja-build')
diff --git a/var/spack/repos/builtin/packages/nut/package.py b/var/spack/repos/builtin/packages/nut/package.py
new file mode 100644
index 0000000000..561e52f1a5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nut/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Nut(CMakePackage):
+ """NuT is Monte Carlo code for neutrino transport and
+ is a C++ analog to the Haskell McPhD code.
+ NuT is principally aimed at exploring on-node parallelism
+ and performance issues."""
+
+ homepage = "https://github.com/lanl/NuT"
+ url = "https://github.com/lanl/NuT.git"
+ tags = ['proxy-app']
+
+ version(
+ 'serial', git='https://github.com/lanl/NuT.git',
+ branch='master')
+ version(
+ 'openmp', git='https://github.com/lanl/NuT.git',
+ branch='openmp')
+
+ depends_on('random123')
+
+ # serial must be built with clang
+ conflicts('%gcc', when='@serial')
+ conflicts('%intel', when='@serial')
+ conflicts('%pgi', when='@serial')
+ conflicts('%xl', when='@serial')
+ conflicts('%nag', when='@serial')
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.set('RANDOM123_DIR', self.spec['random123'].prefix)
+
+ build_targets = ['VERBOSE=on']
+
+ def install(self, spec, prefix):
+ install('README.md', prefix)
+ mkdirp(prefix.bin)
+ install('spack-build/test/nut_unittests', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py
index f18be0186f..29896172b1 100644
--- a/var/spack/repos/builtin/packages/octave/package.py
+++ b/var/spack/repos/builtin/packages/octave/package.py
@@ -93,7 +93,7 @@ class Octave(AutotoolsPackage):
depends_on('gnuplot', when='+gnuplot')
depends_on('image-magick', when='+magick')
depends_on('hdf5', when='+hdf5')
- depends_on('jdk', when='+jdk') # TODO: requires Java 6 ?
+ depends_on('java', when='+jdk') # TODO: requires Java 6 ?
depends_on('llvm', when='+llvm')
# depends_on('opengl', when='+opengl') # TODO: add package
depends_on('qhull', when='+qhull')
@@ -186,9 +186,9 @@ class Octave(AutotoolsPackage):
if '+jdk' in spec:
config_args.extend([
- "--with-java-homedir=%s" % spec['jdk'].prefix,
- "--with-java-includedir=%s" % spec['jdk'].prefix.include,
- "--with-java-libdir=%s" % spec['jdk'].prefix.lib
+ "--with-java-homedir=%s" % spec['java'].prefix,
+ "--with-java-includedir=%s" % spec['java'].prefix.include,
+ "--with-java-libdir=%s" % spec['java'].prefix.lib
])
else:
config_args.append("--disable-java")
diff --git a/var/spack/repos/builtin/packages/of-adios-write/package.py b/var/spack/repos/builtin/packages/of-adios-write/package.py
new file mode 100644
index 0000000000..cd25fbe654
--- /dev/null
+++ b/var/spack/repos/builtin/packages/of-adios-write/package.py
@@ -0,0 +1,136 @@
+##############################################################################
+# Copyright (c) 2017 Mark Olesen, OpenCFD Ltd.
+#
+# This file was authored by Mark Olesen <mark.olesen@esi-group.com>
+# and is released as part of spack under the LGPL license.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for the LLNL notice and LGPL.
+#
+# License
+# -------
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Legal Notice
+# ------------
+# OPENFOAM is a trademark owned by OpenCFD Ltd
+# (producer and distributor of the OpenFOAM software via www.openfoam.com).
+# The trademark information must remain visible and unadulterated in this
+# file and via the "spack info" and comply with the term set by
+# http://openfoam.com/legal/trademark-policy.php
+#
+# This file is not part of OpenFOAM, nor does it constitute a component of an
+# OpenFOAM distribution.
+#
+##############################################################################
+from spack import *
+from spack.environment import *
+import llnl.util.tty as tty
+
+import os
+from spack.pkg.builtin.openfoam_com import *
+
+
+class OfAdiosWrite(Package):
+ """adios-write supplies additional libraries and function objects
+ for reading/writing OpenFOAM data with ADIOS.
+ This offering is part of the community repository supported by OpenCFD Ltd,
+ producer and distributor of the OpenFOAM software via www.openfoam.com,
+ and owner of the OPENFOAM trademark.
+ OpenCFD Ltd has been developing and releasing OpenFOAM since its debut
+ in 2004.
+ """
+
+ # Currently only via git, but with some branches corresponding to main
+ # OpenFOAM releases.
+ homepage = "https://develop.openfoam.com/Community/feature-adiosWrite/"
+ gitrepo = "https://develop.openfoam.com/Community/feature-adiosWrite.git"
+
+ version('develop', branch='develop', git=gitrepo)
+ version('1706', branch='v1706', git=gitrepo)
+ version('1612', branch='v1612', git=gitrepo)
+
+ variant('source', default=True, description='Install library source')
+
+ depends_on('openfoam-com@develop+source', when='@develop')
+ depends_on('openfoam-com@1706+source', when='@1706')
+ depends_on('openfoam-com@1612+source', when='@1612')
+ depends_on('adios')
+
+ # General patches
+ common = ['change-userdir.sh', 'spack-derived-Allwmake']
+ assets = []
+
+ build_script = './spack-derived-Allwmake'
+ build_userdir = 'spack-userdir' # Build user APPBIN, LIBBIN into here
+
+ phases = ['configure', 'build', 'install']
+
+ #
+ # - End of definitions / setup -
+ #
+
+ def patch(self):
+ """Copy additional files or other patching."""
+ add_extra_files(self, self.common, self.assets)
+ # Emit openfoam version immediately, if we resolved the wrong version
+ # it takes a very long time to rebuild!
+ tty.info('Build for ' + self.spec['openfoam'].format('$_$@$%@+$+'))
+
+ def configure(self, spec, prefix):
+ """Generate spack-config.sh file."""
+ # Local tweaks
+ config = join_path(self.stage.source_path, 'spack-config.sh')
+ with open(config, 'w') as out:
+ out.write(
+ """# Local tweaks for building
+# Location of adios from spack
+export ADIOS_ARCH_PATH={adios_dir}
+
+# Local build (for user appbin, libbin)
+. ./change-userdir.sh $PWD/{user_dir}
+#
+"""
+ .format(
+ adios_dir=spec['adios'].prefix,
+ user_dir=self.build_userdir))
+
+ def build(self, spec, prefix):
+ """Build with Allwmake script, wrapped to source environment first."""
+ args = []
+ if self.parallel: # Parallel build? - pass via environment
+ os.environ['WM_NCOMPPROCS'] = str(make_jobs)
+ builder = Executable(self.build_script)
+ builder(*args)
+
+ def install(self, spec, prefix):
+ """Install under the prefix directory"""
+
+ for f in ['README.md', 'Issues.txt']:
+ if os.path.isfile(f):
+ install(f, join_path(self.prefix, f))
+
+ dirs = ['doc', 'etc', 'tutorials']
+ if '+source' in spec:
+ dirs.append('src')
+
+ for d in dirs:
+ install_tree(d, join_path(self.prefix, d))
+
+ # Place directly under 'lib' (no bin)
+ for d in ['lib']:
+ install_tree(
+ join_path(self.build_userdir, d),
+ join_path(self.prefix, d))
diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py
index daa3fed670..387edd7c64 100644
--- a/var/spack/repos/builtin/packages/ompt-openmp/package.py
+++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py
@@ -25,7 +25,7 @@
from spack import *
-class OmptOpenmp(Package):
+class OmptOpenmp(CMakePackage):
"""LLVM/Clang OpenMP runtime with OMPT support. This is a fork of the
OpenMPToolsInterface/LLVM-openmp fork of the official LLVM OpenMP
mirror. This library provides a drop-in replacement of the OpenMP
@@ -35,15 +35,10 @@ class OmptOpenmp(Package):
homepage = "https://github.com/OpenMPToolsInterface/LLVM-openmp"
url = "http://github.com/khuck/LLVM-openmp/archive/v0.1.tar.gz"
- version('0.1', '2334e6a84b52da41b27afd9831ed5370')
+ version('0.1', '59d6933a2e9b7d1423fb9c7c77d5663f')
- depends_on('cmake', type='build')
+ depends_on('cmake@2.8:', type='build')
- def install(self, spec, prefix):
- with working_dir("runtime/build", create=True):
- cmake('-DCMAKE_C_COMPILER=%s' % self.compiler.cc,
- '-DCMAKE_CXX_COMPILER=%s' % self.compiler.cxx,
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '..', *std_cmake_args)
- make()
- make("install")
+ conflicts('%gcc@:4.7')
+
+ root_cmakelists_dir = 'runtime'
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index d79e2c27f8..73b89fcd23 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -33,6 +33,7 @@ class Openblas(MakefilePackage):
homepage = 'http://www.openblas.net'
url = 'http://github.com/xianyi/OpenBLAS/archive/v0.2.19.tar.gz'
+ version('0.2.20', '48637eb29f5b492b91459175dcc574b1')
version('0.2.19', '28c998054fd377279741c6f0b9ea7941')
version('0.2.18', '805e7f660877d588ea7e3792cda2ee65')
version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1')
@@ -56,10 +57,15 @@ class Openblas(MakefilePackage):
patch('make.patch', when='@0.2.16:')
# This patch is in a pull request to OpenBLAS that has not been handled
# https://github.com/xianyi/OpenBLAS/pull/915
- patch('openblas_icc.patch', when='%intel')
+ # UPD: the patch has been merged starting version 0.2.20
+ patch('openblas_icc.patch', when='@:0.2.19%intel')
patch('openblas_icc_openmp.patch', when='%intel@16.0:')
patch('openblas_icc_fortran.patch', when='%intel@16.0:')
+ # Fixes compilation error on POWER8 with GCC 7
+ # https://github.com/xianyi/OpenBLAS/pull/1098
+ patch('power8.patch', when='@0.2.18:0.2.19 %gcc@7.1.0: target=ppc64')
+
# Change file comments to work around clang 3.9 assembler bug
# https://github.com/xianyi/OpenBLAS/pull/982
patch('openblas0.2.19.diff', when='@0.2.19')
@@ -78,12 +84,15 @@ class Openblas(MakefilePackage):
'OpenBLAS requires both C and Fortran compilers!'
)
# Add support for OpenMP
- if '+openmp' in self.spec and self.spec.satisfies('%clang'):
- # Openblas (as of 0.2.18) hardcoded that OpenMP cannot
- # be used with any (!) compiler named clang, bummer.
- raise InstallError(
- 'OpenBLAS does not support OpenMP with clang!'
- )
+ if (('+openmp' in self.spec) and self.spec.satisfies('%clang')):
+ if str(self.spec.compiler.version).endswith('-apple'):
+ raise InstallError("Apple's clang does not support OpenMP")
+ if '@:0.2.19' in self.spec:
+ # Openblas (as of 0.2.19) hardcoded that OpenMP cannot
+ # be used with any (!) compiler named clang, bummer.
+ raise InstallError(
+ 'OpenBLAS @:0.2.19 does not support OpenMP with clang!'
+ )
@property
def make_defs(self):
diff --git a/var/spack/repos/builtin/packages/openblas/power8.patch b/var/spack/repos/builtin/packages/openblas/power8.patch
new file mode 100644
index 0000000000..b89c044c1b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openblas/power8.patch
@@ -0,0 +1,7809 @@
+diff --git a/kernel/power/casum.c b/kernel/power/casum.c
+index aeed0ca78..d1108581d 100644
+--- a/kernel/power/casum.c
++++ b/kernel/power/casum.c
+@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_16
+
+-static void casum_kernel_16(BLASLONG n, FLOAT *x1, FLOAT *svec)
++static FLOAT casum_kernel_16(BLASLONG n, FLOAT *x1)
+ {
+
+ BLASLONG i=0;
+@@ -92,11 +92,7 @@ static void casum_kernel_16(BLASLONG n, FLOAT *x1, FLOAT *svec)
+
+ }
+
+- svec[0] = sum0+sum1+sum2+sum3;
+- svec[1] = 0.0;
+- svec[2] = 0.0;
+- svec[3] = 0.0;
+-
++ return sum0+sum1+sum2+sum3;
+ }
+
+ #endif
+@@ -106,7 +102,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ BLASLONG i=0;
+ BLASLONG ip=0;
+ FLOAT sumf = 0.0;
+- FLOAT svec[4] __attribute__ ((aligned (16)));;
+ BLASLONG n1;
+ BLASLONG inc_x2;
+
+@@ -119,8 +114,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ if ( n1 > 0 )
+ {
+
+- casum_kernel_16(n1, x, svec);
+- sumf = svec[0] + svec[1]+svec[2]+svec[3];
++ sumf = casum_kernel_16(n1, x);
+ i=n1;
+ ip = 2 * n1;
+ }
+diff --git a/kernel/power/casum_microk_power8.c b/kernel/power/casum_microk_power8.c
+index cb50234ce..38a114326 100644
+--- a/kernel/power/casum_microk_power8.c
++++ b/kernel/power/casum_microk_power8.c
+@@ -34,144 +34,145 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_16 1
+-static void casum_kernel_16( BLASLONG n, FLOAT *x, FLOAT *svec) __attribute__ ((noinline));
+
+-static void casum_kernel_16( BLASLONG n, FLOAT *x, FLOAT *svec)
++static float casum_kernel_16 (long n, float *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xvabssp 48, 40 \n\t"
+- "xvabssp 49, 41 \n\t"
+- "xvabssp 50, 42 \n\t"
+- "xvabssp 51, 43 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+-
+- "xvabssp 52, 44 \n\t"
+- "xvabssp 53, 45 \n\t"
+-
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+-
+- "xvabssp 54, 46 \n\t"
+- "xvabssp 55, 47 \n\t"
+-
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+-
+- "xvaddsp 32, 32, 48 \n\t"
+- "xvaddsp 33, 33, 49 \n\t"
+-
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "xvaddsp 34, 34, 50 \n\t"
+- "xvaddsp 35, 35, 51 \n\t"
+- "addi %2, %2, 128 \n\t"
+- "xvaddsp 36, 36, 52 \n\t"
+- "xvaddsp 37, 37, 53 \n\t"
+- "addic. %0 , %0 , -16 \n\t"
+- "xvaddsp 38, 38, 54 \n\t"
+- "xvaddsp 39, 39, 55 \n\t"
+-
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+-
+- "xvabssp 48, 40 \n\t"
+- "xvabssp 49, 41 \n\t"
+- "xvabssp 50, 42 \n\t"
+- "xvabssp 51, 43 \n\t"
+- "xvabssp 52, 44 \n\t"
+- "xvabssp 53, 45 \n\t"
+- "xvabssp 54, 46 \n\t"
+- "xvabssp 55, 47 \n\t"
+-
+- "xvaddsp 32, 32, 48 \n\t"
+- "xvaddsp 33, 33, 49 \n\t"
+- "xvaddsp 34, 34, 50 \n\t"
+- "xvaddsp 35, 35, 51 \n\t"
+- "xvaddsp 36, 36, 52 \n\t"
+- "xvaddsp 37, 37, 53 \n\t"
+- "xvaddsp 38, 38, 54 \n\t"
+- "xvaddsp 39, 39, 55 \n\t"
+-
+- "xvaddsp 32, 32, 33 \n\t"
+- "xvaddsp 34, 34, 35 \n\t"
+- "xvaddsp 36, 36, 37 \n\t"
+- "xvaddsp 38, 38, 39 \n\t"
+-
+- "xvaddsp 32, 32, 34 \n\t"
+- "xvaddsp 36, 36, 38 \n\t"
+-
+- "xvaddsp 32, 32, 36 \n\t"
+-
+-
+- "stxvw4x 32, 0, %3 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (svec), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2", "memory"
+- );
+-
+-}
+-
+-
++ float sum;
++ __vector float t0;
++ __vector float t1;
++ __vector float t2;
++ __vector float t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %8, %2 \n\t"
++ "lxvw4x 42, %9, %2 \n\t"
++ "lxvw4x 43, %10, %2 \n\t"
++ "lxvw4x 44, %11, %2 \n\t"
++ "lxvw4x 45, %12, %2 \n\t"
++ "lxvw4x 46, %13, %2 \n\t"
++ "lxvw4x 47, %14, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvabssp 48, 40 \n\t"
++ "xvabssp 49, 41 \n\t"
++ "xvabssp 50, 42 \n\t"
++ "xvabssp 51, 43 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %8, %2 \n\t"
++
++ "xvabssp %x3, 44 \n\t"
++ "xvabssp %x4, 45 \n\t"
++
++ "lxvw4x 42, %9, %2 \n\t"
++ "lxvw4x 43, %10, %2 \n\t"
++
++ "xvabssp %x5, 46 \n\t"
++ "xvabssp %x6, 47 \n\t"
++
++ "lxvw4x 44, %11, %2 \n\t"
++ "lxvw4x 45, %12, %2 \n\t"
++
++ "xvaddsp 32, 32, 48 \n\t"
++ "xvaddsp 33, 33, 49 \n\t"
++
++ "lxvw4x 46, %13, %2 \n\t"
++ "lxvw4x 47, %14, %2 \n\t"
++
++ "xvaddsp 34, 34, 50 \n\t"
++ "xvaddsp 35, 35, 51 \n\t"
++ "addi %2, %2, 128 \n\t"
++ "xvaddsp 36, 36, %x3 \n\t"
++ "xvaddsp 37, 37, %x4 \n\t"
++ "addic. %1, %1, -16 \n\t"
++ "xvaddsp 38, 38, %x5 \n\t"
++ "xvaddsp 39, 39, %x6 \n\t"
++
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvabssp 48, 40 \n\t"
++ "xvabssp 49, 41 \n\t"
++ "xvabssp 50, 42 \n\t"
++ "xvabssp 51, 43 \n\t"
++ "xvabssp %x3, 44 \n\t"
++ "xvabssp %x4, 45 \n\t"
++ "xvabssp %x5, 46 \n\t"
++ "xvabssp %x6, 47 \n\t"
++
++ "xvaddsp 32, 32, 48 \n\t"
++ "xvaddsp 33, 33, 49 \n\t"
++ "xvaddsp 34, 34, 50 \n\t"
++ "xvaddsp 35, 35, 51 \n\t"
++ "xvaddsp 36, 36, %x3 \n\t"
++ "xvaddsp 37, 37, %x4 \n\t"
++ "xvaddsp 38, 38, %x5 \n\t"
++ "xvaddsp 39, 39, %x6 \n\t"
++
++ "xvaddsp 32, 32, 33 \n\t"
++ "xvaddsp 34, 34, 35 \n\t"
++ "xvaddsp 36, 36, 37 \n\t"
++ "xvaddsp 38, 38, 39 \n\t"
++
++ "xvaddsp 32, 32, 34 \n\t"
++ "xvaddsp 36, 36, 38 \n\t"
++
++ "xvaddsp 32, 32, 36 \n\t"
++
++ "xxsldwi 33, 32, 32, 2 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xxsldwi 33, 32, 32, 1 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xscvspdp %0, 32 \n"
++
++ "#n=%1 x=%3=%2 sum=%0 o16=%8 o32=%9 o48=%10 o64=%11 o80=%12 o96=%13 o112=%14\n"
++ "#t0=%x3 t1=%x4 t2=%x5 t3=%x6"
++ :
++ "=f" (sum), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0), // 3
++ "=wa" (t1), // 4
++ "=wa" (t2), // 5
++ "=wa" (t3) // 6
++ :
++ "m" (*x),
++ "b" (16), // 8
++ "b" (32), // 9
++ "b" (48), // 10
++ "b" (64), // 11
++ "b" (80), // 12
++ "b" (96), // 13
++ "b" (112) // 14
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return sum;
++}
+diff --git a/kernel/power/ccopy_microk_power8.c b/kernel/power/ccopy_microk_power8.c
+index 95b3559ba..b2b1bead1 100644
+--- a/kernel/power/ccopy_microk_power8.c
++++ b/kernel/power/ccopy_microk_power8.c
+@@ -35,140 +35,121 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void ccopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void ccopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void ccopy_kernel_32 (long n, float *x, float *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvw4x 50, 0, %2 \n\t"
+- "lxvw4x 51, %5, %2 \n\t"
+- "lxvw4x 52, %6, %2 \n\t"
+- "lxvw4x 53, %7, %2 \n\t"
+- "lxvw4x 54, %8, %2 \n\t"
+- "lxvw4x 55, %9, %2 \n\t"
+- "lxvw4x 56, %10, %2 \n\t"
+- "lxvw4x 57, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvw4x 40, 0, %1 \n\t"
+- "stxvw4x 41, %5, %1 \n\t"
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "stxvw4x 42, %6, %1 \n\t"
+- "stxvw4x 43, %7, %1 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "stxvw4x 44, %8, %1 \n\t"
+- "stxvw4x 45, %9, %1 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "stxvw4x 46, %10, %1 \n\t"
+- "stxvw4x 47, %11, %1 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "stxvw4x 50, 0, %1 \n\t"
+- "stxvw4x 51, %5, %1 \n\t"
+- "lxvw4x 50, 0, %2 \n\t"
+- "lxvw4x 51, %5, %2 \n\t"
+- "stxvw4x 52, %6, %1 \n\t"
+- "stxvw4x 53, %7, %1 \n\t"
+- "lxvw4x 52, %6, %2 \n\t"
+- "lxvw4x 53, %7, %2 \n\t"
+- "stxvw4x 54, %8, %1 \n\t"
+- "stxvw4x 55, %9, %1 \n\t"
+- "lxvw4x 54, %8, %2 \n\t"
+- "lxvw4x 55, %9, %2 \n\t"
+- "stxvw4x 56, %10, %1 \n\t"
+- "stxvw4x 57, %11, %1 \n\t"
+- "lxvw4x 56, %10, %2 \n\t"
+- "lxvw4x 57, %11, %2 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "stxvw4x 40, 0, %1 \n\t"
+- "stxvw4x 41, %5, %1 \n\t"
+- "stxvw4x 42, %6, %1 \n\t"
+- "stxvw4x 43, %7, %1 \n\t"
+- "stxvw4x 44, %8, %1 \n\t"
+- "stxvw4x 45, %9, %1 \n\t"
+- "stxvw4x 46, %10, %1 \n\t"
+- "stxvw4x 47, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvw4x 50, 0, %1 \n\t"
+- "stxvw4x 51, %5, %1 \n\t"
+- "stxvw4x 52, %6, %1 \n\t"
+- "stxvw4x 53, %7, %1 \n\t"
+- "stxvw4x 54, %8, %1 \n\t"
+- "stxvw4x 55, %9, %1 \n\t"
+- "stxvw4x 56, %10, %1 \n\t"
+- "stxvw4x 57, %11, %1 \n\t"
+-
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ "lxvw4x 32, 0, %2 \n\t"
++ "lxvw4x 33, %5, %2 \n\t"
++ "lxvw4x 34, %6, %2 \n\t"
++ "lxvw4x 35, %7, %2 \n\t"
++ "lxvw4x 36, %8, %2 \n\t"
++ "lxvw4x 37, %9, %2 \n\t"
++ "lxvw4x 38, %10, %2 \n\t"
++ "lxvw4x 39, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %5, %2 \n\t"
++ "lxvw4x 42, %6, %2 \n\t"
++ "lxvw4x 43, %7, %2 \n\t"
++ "lxvw4x 44, %8, %2 \n\t"
++ "lxvw4x 45, %9, %2 \n\t"
++ "lxvw4x 46, %10, %2 \n\t"
++ "lxvw4x 47, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvw4x 32, 0, %3 \n\t"
++ "stxvw4x 33, %5, %3 \n\t"
++ "lxvw4x 32, 0, %2 \n\t"
++ "lxvw4x 33, %5, %2 \n\t"
++ "stxvw4x 34, %6, %3 \n\t"
++ "stxvw4x 35, %7, %3 \n\t"
++ "lxvw4x 34, %6, %2 \n\t"
++ "lxvw4x 35, %7, %2 \n\t"
++ "stxvw4x 36, %8, %3 \n\t"
++ "stxvw4x 37, %9, %3 \n\t"
++ "lxvw4x 36, %8, %2 \n\t"
++ "lxvw4x 37, %9, %2 \n\t"
++ "stxvw4x 38, %10, %3 \n\t"
++ "stxvw4x 39, %11, %3 \n\t"
++ "lxvw4x 38, %10, %2 \n\t"
++ "lxvw4x 39, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "stxvw4x 40, 0, %3 \n\t"
++ "stxvw4x 41, %5, %3 \n\t"
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %5, %2 \n\t"
++ "stxvw4x 42, %6, %3 \n\t"
++ "stxvw4x 43, %7, %3 \n\t"
++ "lxvw4x 42, %6, %2 \n\t"
++ "lxvw4x 43, %7, %2 \n\t"
++ "stxvw4x 44, %8, %3 \n\t"
++ "stxvw4x 45, %9, %3 \n\t"
++ "lxvw4x 44, %8, %2 \n\t"
++ "lxvw4x 45, %9, %2 \n\t"
++ "stxvw4x 46, %10, %3 \n\t"
++ "stxvw4x 47, %11, %3 \n\t"
++ "lxvw4x 46, %10, %2 \n\t"
++ "lxvw4x 47, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "stxvw4x 32, 0, %3 \n\t"
++ "stxvw4x 33, %5, %3 \n\t"
++ "stxvw4x 34, %6, %3 \n\t"
++ "stxvw4x 35, %7, %3 \n\t"
++ "stxvw4x 36, %8, %3 \n\t"
++ "stxvw4x 37, %9, %3 \n\t"
++ "stxvw4x 38, %10, %3 \n\t"
++ "stxvw4x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvw4x 40, 0, %3 \n\t"
++ "stxvw4x 41, %5, %3 \n\t"
++ "stxvw4x 42, %6, %3 \n\t"
++ "stxvw4x 43, %7, %3 \n\t"
++ "stxvw4x 44, %8, %3 \n\t"
++ "stxvw4x 45, %9, %3 \n\t"
++ "stxvw4x 46, %10, %3 \n\t"
++ "stxvw4x 47, %11, %3 \n"
++
++ "#n=%1 x=%4=%2 y=%0=%3 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "=m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y) // 3
++ :
++ "m" (*x),
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/cswap_microk_power8.c b/kernel/power/cswap_microk_power8.c
+index 90ab59c54..1dd03dc88 100644
+--- a/kernel/power/cswap_microk_power8.c
++++ b/kernel/power/cswap_microk_power8.c
+@@ -35,146 +35,124 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void cswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void cswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void cswap_kernel_32 (long n, float *x, float *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "addi %3, %3, -4 \n\t"
+- "addi %4, %4, -4 \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "lxvw4x 32, 0, %2 \n\t"
+- "lxvw4x 33, %5, %2 \n\t"
+- "lxvw4x 34, %6, %2 \n\t"
+- "lxvw4x 35, %7, %2 \n\t"
+- "lxvw4x 36, %8, %2 \n\t"
+- "lxvw4x 37, %9, %2 \n\t"
+- "lxvw4x 38, %10, %2 \n\t"
+- "lxvw4x 39, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvw4x 48, 0, %1 \n\t"
+- "lxvw4x 49, %5, %1 \n\t"
+- "lxvw4x 50, %6, %1 \n\t"
+- "lxvw4x 51, %7, %1 \n\t"
+- "lxvw4x 52, %8, %1 \n\t"
+- "lxvw4x 53, %9, %1 \n\t"
+- "lxvw4x 54, %10, %1 \n\t"
+- "lxvw4x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "lxvw4x 56, 0, %1 \n\t"
+- "lxvw4x 57, %5, %1 \n\t"
+- "lxvw4x 58, %6, %1 \n\t"
+- "lxvw4x 59, %7, %1 \n\t"
+- "lxvw4x 60, %8, %1 \n\t"
+- "lxvw4x 61, %9, %1 \n\t"
+- "lxvw4x 62, %10, %1 \n\t"
+- "lxvw4x 63, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvw4x 32, 0, %3 \n\t"
+- "stxvw4x 33, %5, %3 \n\t"
+- "stxvw4x 34, %6, %3 \n\t"
+- "stxvw4x 35, %7, %3 \n\t"
+- "stxvw4x 36, %8, %3 \n\t"
+- "stxvw4x 37, %9, %3 \n\t"
+- "stxvw4x 38, %10, %3 \n\t"
+- "stxvw4x 39, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvw4x 40, 0, %3 \n\t"
+- "stxvw4x 41, %5, %3 \n\t"
+- "stxvw4x 42, %6, %3 \n\t"
+- "stxvw4x 43, %7, %3 \n\t"
+- "stxvw4x 44, %8, %3 \n\t"
+- "stxvw4x 45, %9, %3 \n\t"
+- "stxvw4x 46, %10, %3 \n\t"
+- "stxvw4x 47, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvw4x 48, 0, %4 \n\t"
+- "stxvw4x 49, %5, %4 \n\t"
+- "stxvw4x 50, %6, %4 \n\t"
+- "stxvw4x 51, %7, %4 \n\t"
+- "stxvw4x 52, %8, %4 \n\t"
+- "stxvw4x 53, %9, %4 \n\t"
+- "stxvw4x 54, %10, %4 \n\t"
+- "stxvw4x 55, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "stxvw4x 56, 0, %4 \n\t"
+- "stxvw4x 57, %5, %4 \n\t"
+- "stxvw4x 58, %6, %4 \n\t"
+- "stxvw4x 59, %7, %4 \n\t"
+- "stxvw4x 60, %8, %4 \n\t"
+- "stxvw4x 61, %9, %4 \n\t"
+- "stxvw4x 62, %10, %4 \n\t"
+- "stxvw4x 63, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (y2), // 3
+- "r" (x2), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "%3", "%4", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "lxvw4x 32, 0, %4 \n\t"
++ "lxvw4x 33, %5, %4 \n\t"
++ "lxvw4x 34, %6, %4 \n\t"
++ "lxvw4x 35, %7, %4 \n\t"
++ "lxvw4x 36, %8, %4 \n\t"
++ "lxvw4x 37, %9, %4 \n\t"
++ "lxvw4x 38, %10, %4 \n\t"
++ "lxvw4x 39, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "lxvw4x 40, 0, %4 \n\t"
++ "lxvw4x 41, %5, %4 \n\t"
++ "lxvw4x 42, %6, %4 \n\t"
++ "lxvw4x 43, %7, %4 \n\t"
++ "lxvw4x 44, %8, %4 \n\t"
++ "lxvw4x 45, %9, %4 \n\t"
++ "lxvw4x 46, %10, %4 \n\t"
++ "lxvw4x 47, %11, %4 \n\t"
++
++ "addi %4, %4, -128 \n\t"
++
++ "lxvw4x 48, 0, %3 \n\t"
++ "lxvw4x 49, %5, %3 \n\t"
++ "lxvw4x 50, %6, %3 \n\t"
++ "lxvw4x 51, %7, %3 \n\t"
++ "lxvw4x 0, %8, %3 \n\t"
++ "lxvw4x 1, %9, %3 \n\t"
++ "lxvw4x 2, %10, %3 \n\t"
++ "lxvw4x 3, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "lxvw4x 4, 0, %3 \n\t"
++ "lxvw4x 5, %5, %3 \n\t"
++ "lxvw4x 6, %6, %3 \n\t"
++ "lxvw4x 7, %7, %3 \n\t"
++ "lxvw4x 8, %8, %3 \n\t"
++ "lxvw4x 9, %9, %3 \n\t"
++ "lxvw4x 10, %10, %3 \n\t"
++ "lxvw4x 11, %11, %3 \n\t"
++
++ "addi %3, %3, -128 \n\t"
++
++ "stxvw4x 32, 0, %3 \n\t"
++ "stxvw4x 33, %5, %3 \n\t"
++ "stxvw4x 34, %6, %3 \n\t"
++ "stxvw4x 35, %7, %3 \n\t"
++ "stxvw4x 36, %8, %3 \n\t"
++ "stxvw4x 37, %9, %3 \n\t"
++ "stxvw4x 38, %10, %3 \n\t"
++ "stxvw4x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvw4x 40, 0, %3 \n\t"
++ "stxvw4x 41, %5, %3 \n\t"
++ "stxvw4x 42, %6, %3 \n\t"
++ "stxvw4x 43, %7, %3 \n\t"
++ "stxvw4x 44, %8, %3 \n\t"
++ "stxvw4x 45, %9, %3 \n\t"
++ "stxvw4x 46, %10, %3 \n\t"
++ "stxvw4x 47, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvw4x 48, 0, %4 \n\t"
++ "stxvw4x 49, %5, %4 \n\t"
++ "stxvw4x 50, %6, %4 \n\t"
++ "stxvw4x 51, %7, %4 \n\t"
++ "stxvw4x 0, %8, %4 \n\t"
++ "stxvw4x 1, %9, %4 \n\t"
++ "stxvw4x 2, %10, %4 \n\t"
++ "stxvw4x 3, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "stxvw4x 4, 0, %4 \n\t"
++ "stxvw4x 5, %5, %4 \n\t"
++ "stxvw4x 6, %6, %4 \n\t"
++ "stxvw4x 7, %7, %4 \n\t"
++ "stxvw4x 8, %8, %4 \n\t"
++ "stxvw4x 9, %9, %4 \n\t"
++ "stxvw4x 10, %10, %4 \n\t"
++ "stxvw4x 11, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "addic. %2, %2, -32 \n\t"
++ "bgt 1b \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y) // 4
++ :
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51","vs0","vs1","vs2","vs3",
++ "vs4","vs5","vs6","vs7","vs8","vs9","vs10","vs11"
++ );
++}
+diff --git a/kernel/power/dasum.c b/kernel/power/dasum.c
+index 77f5345ba..73962c2f2 100644
+--- a/kernel/power/dasum.c
++++ b/kernel/power/dasum.c
+@@ -42,7 +42,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #else
+
+-#define ABS fabsf
++#error supports double only
+
+ #endif
+
+@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_16
+
+-static void dasum_kernel_16(BLASLONG n, FLOAT *x1, FLOAT *svec)
++static FLOAT dasum_kernel_16(BLASLONG n, FLOAT *x1)
+ {
+
+ BLASLONG i=0;
+@@ -92,9 +92,7 @@ static void dasum_kernel_16(BLASLONG n, FLOAT *x1, FLOAT *svec)
+
+ }
+
+- svec[0] = sum0+sum1+sum2+sum3;
+- svec[1] = 0.0;
+-
++ return sum0+sum1+sum2+sum3;
+ }
+
+ #endif
+@@ -103,7 +101,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ {
+ BLASLONG i=0;
+ FLOAT sumf = 0.0;
+- FLOAT svec[2] __attribute__ ((aligned (16)));;
+ BLASLONG n1;
+
+ if (n <= 0 || inc_x <= 0) return(sumf);
+@@ -115,8 +112,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ if ( n1 > 0 )
+ {
+
+- dasum_kernel_16(n1, x, svec);
+- sumf = svec[0] + svec[1];
++ sumf = dasum_kernel_16(n1, x);
+ i=n1;
+ }
+
+diff --git a/kernel/power/dasum_microk_power8.c b/kernel/power/dasum_microk_power8.c
+index cc38c4f7d..880d7d271 100644
+--- a/kernel/power/dasum_microk_power8.c
++++ b/kernel/power/dasum_microk_power8.c
+@@ -34,144 +34,142 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_16 1
+-static void dasum_kernel_16( BLASLONG n, FLOAT *x, FLOAT *svec) __attribute__ ((noinline));
+
+-static void dasum_kernel_16( BLASLONG n, FLOAT *x, FLOAT *svec)
++static double dasum_kernel_16 (long n, double *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xvabsdp 48, 40 \n\t"
+- "xvabsdp 49, 41 \n\t"
+- "xvabsdp 50, 42 \n\t"
+- "xvabsdp 51, 43 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+-
+- "xvabsdp 52, 44 \n\t"
+- "xvabsdp 53, 45 \n\t"
+-
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "xvabsdp 54, 46 \n\t"
+- "xvabsdp 55, 47 \n\t"
+-
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+-
+- "xvadddp 32, 32, 48 \n\t"
+- "xvadddp 33, 33, 49 \n\t"
+-
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "xvadddp 34, 34, 50 \n\t"
+- "xvadddp 35, 35, 51 \n\t"
+- "addi %2, %2, 128 \n\t"
+- "xvadddp 36, 36, 52 \n\t"
+- "xvadddp 37, 37, 53 \n\t"
+- "addic. %0 , %0 , -16 \n\t"
+- "xvadddp 38, 38, 54 \n\t"
+- "xvadddp 39, 39, 55 \n\t"
+-
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+-
+- "xvabsdp 48, 40 \n\t"
+- "xvabsdp 49, 41 \n\t"
+- "xvabsdp 50, 42 \n\t"
+- "xvabsdp 51, 43 \n\t"
+- "xvabsdp 52, 44 \n\t"
+- "xvabsdp 53, 45 \n\t"
+- "xvabsdp 54, 46 \n\t"
+- "xvabsdp 55, 47 \n\t"
+-
+- "xvadddp 32, 32, 48 \n\t"
+- "xvadddp 33, 33, 49 \n\t"
+- "xvadddp 34, 34, 50 \n\t"
+- "xvadddp 35, 35, 51 \n\t"
+- "xvadddp 36, 36, 52 \n\t"
+- "xvadddp 37, 37, 53 \n\t"
+- "xvadddp 38, 38, 54 \n\t"
+- "xvadddp 39, 39, 55 \n\t"
+-
+- "xvadddp 32, 32, 33 \n\t"
+- "xvadddp 34, 34, 35 \n\t"
+- "xvadddp 36, 36, 37 \n\t"
+- "xvadddp 38, 38, 39 \n\t"
+-
+- "xvadddp 32, 32, 34 \n\t"
+- "xvadddp 36, 36, 38 \n\t"
+-
+- "xvadddp 32, 32, 36 \n\t"
+-
+-
+- "stxvd2x 32, 0, %3 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (svec), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2", "memory"
+- );
+-
+-}
++ double sum;
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %8, %2 \n\t"
++ "lxvd2x 42, %9, %2 \n\t"
++ "lxvd2x 43, %10, %2 \n\t"
++ "lxvd2x 44, %11, %2 \n\t"
++ "lxvd2x 45, %12, %2 \n\t"
++ "lxvd2x 46, %13, %2 \n\t"
++ "lxvd2x 47, %14, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvabsdp 48, 40 \n\t"
++ "xvabsdp 49, 41 \n\t"
++ "xvabsdp 50, 42 \n\t"
++ "xvabsdp 51, 43 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %8, %2 \n\t"
++
++ "xvabsdp %x3, 44 \n\t"
++ "xvabsdp %x4, 45 \n\t"
++
++ "lxvd2x 42, %9, %2 \n\t"
++ "lxvd2x 43, %10, %2 \n\t"
++
++ "xvabsdp %x5, 46 \n\t"
++ "xvabsdp %x6, 47 \n\t"
++
++ "lxvd2x 44, %11, %2 \n\t"
++ "lxvd2x 45, %12, %2 \n\t"
++
++ "xvadddp 32, 32, 48 \n\t"
++ "xvadddp 33, 33, 49 \n\t"
++
++ "lxvd2x 46, %13, %2 \n\t"
++ "lxvd2x 47, %14, %2 \n\t"
++
++ "xvadddp 34, 34, 50 \n\t"
++ "xvadddp 35, 35, 51 \n\t"
++ "addi %2, %2, 128 \n\t"
++ "xvadddp 36, 36, %x3 \n\t"
++ "xvadddp 37, 37, %x4 \n\t"
++ "addic. %1, %1, -16 \n\t"
++ "xvadddp 38, 38, %x5 \n\t"
++ "xvadddp 39, 39, %x6 \n\t"
++
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvabsdp 48, 40 \n\t"
++ "xvabsdp 49, 41 \n\t"
++ "xvabsdp 50, 42 \n\t"
++ "xvabsdp 51, 43 \n\t"
++ "xvabsdp %x3, 44 \n\t"
++ "xvabsdp %x4, 45 \n\t"
++ "xvabsdp %x5, 46 \n\t"
++ "xvabsdp %x6, 47 \n\t"
++
++ "xvadddp 32, 32, 48 \n\t"
++ "xvadddp 33, 33, 49 \n\t"
++ "xvadddp 34, 34, 50 \n\t"
++ "xvadddp 35, 35, 51 \n\t"
++ "xvadddp 36, 36, %x3 \n\t"
++ "xvadddp 37, 37, %x4 \n\t"
++ "xvadddp 38, 38, %x5 \n\t"
++ "xvadddp 39, 39, %x6 \n\t"
++
++ "xvadddp 32, 32, 33 \n\t"
++ "xvadddp 34, 34, 35 \n\t"
++ "xvadddp 36, 36, 37 \n\t"
++ "xvadddp 38, 38, 39 \n\t"
++
++ "xvadddp 32, 32, 34 \n\t"
++ "xvadddp 36, 36, 38 \n\t"
++
++ "xvadddp 32, 32, 36 \n\t"
++
++ "xxswapd 33, 32 \n\t"
++ "xsadddp %x0, 32, 33 \n"
++
++ "#n=%1 x=%3=%2 sum=%0 o16=%8 o32=%9 o48=%10 o64=%11 o80=%12 o96=%13 o112=%14\n"
++ "#t0=%x3 t1=%x4 t2=%x5 t3=%x6"
++ :
++ "=d" (sum), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0), // 3
++ "=wa" (t1), // 4
++ "=wa" (t2), // 5
++ "=wa" (t3) // 6
++ :
++ "m" (*x),
++ "b" (16), // 8
++ "b" (32), // 9
++ "b" (48), // 10
++ "b" (64), // 11
++ "b" (80), // 12
++ "b" (96), // 13
++ "b" (112) // 14
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return sum;
++}
+
+
+diff --git a/kernel/power/daxpy.c b/kernel/power/daxpy.c
+index 4365bd88d..df0572e8e 100644
+--- a/kernel/power/daxpy.c
++++ b/kernel/power/daxpy.c
+@@ -43,21 +43,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_8
+
+-static void daxpy_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
++static void daxpy_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT alpha)
+ {
+ BLASLONG register i = 0;
+- FLOAT a = *alpha;
+
+ while(i < n)
+ {
+- y[i] += a * x[i];
+- y[i+1] += a * x[i+1];
+- y[i+2] += a * x[i+2];
+- y[i+3] += a * x[i+3];
+- y[i+4] += a * x[i+4];
+- y[i+5] += a * x[i+5];
+- y[i+6] += a * x[i+6];
+- y[i+7] += a * x[i+7];
++ y[i] += alpha * x[i];
++ y[i+1] += alpha * x[i+1];
++ y[i+2] += alpha * x[i+2];
++ y[i+3] += alpha * x[i+3];
++ y[i+4] += alpha * x[i+4];
++ y[i+5] += alpha * x[i+5];
++ y[i+6] += alpha * x[i+6];
++ y[i+7] += alpha * x[i+7];
+ i+=8 ;
+
+ }
+@@ -70,11 +69,6 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ {
+ BLASLONG i=0;
+ BLASLONG ix=0,iy=0;
+- FLOAT a2[4];
+- a2[0]=da;
+- a2[1]=da;
+- a2[2]=da;
+- a2[3]=da;
+
+ if ( n <= 0 ) return(0);
+
+@@ -84,7 +78,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ BLASLONG n1 = n & -16;
+
+ if ( n1 )
+- daxpy_kernel_8(n1, x, y , a2 );
++ daxpy_kernel_8(n1, x, y, da);
+
+ i = n1;
+ while(i < n)
+diff --git a/kernel/power/daxpy_microk_power8.c b/kernel/power/daxpy_microk_power8.c
+index bb3f73aca..fb714a3f9 100644
+--- a/kernel/power/daxpy_microk_power8.c
++++ b/kernel/power/daxpy_microk_power8.c
+@@ -35,167 +35,183 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ #define HAVE_KERNEL_8 1
+-static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y , FLOAT *alpha) __attribute__ ((noinline));
+
+-static void daxpy_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
++static void daxpy_kernel_8 (long n, double *x, double *y, double alpha)
+ {
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++ __vector double t4;
++ __vector double t5;
++ __vector double t6;
++ __vector double t7;
++ __vector double t8;
++ __vector double t9;
++ __vector double t10;
++ __vector double t11;
++ __vector double t12;
++ __vector double t13;
++ __vector double t14;
++ __vector double t15;
++ __vector double t16;
+
++ __asm__
++ (
++ "xxspltd %x4, %x22, 0 \n\t"
+
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
++ "dcbt 0, %2 \n\t"
++ "dcbt 0, %3 \n\t"
+
+- __asm__ __volatile__
+- (
++ "lxvd2x %x5, 0, %2 \n\t"
++ "lxvd2x %x6, %23, %2 \n\t"
++ "lxvd2x %x7, %24, %2 \n\t"
++ "lxvd2x %x8, %25, %2 \n\t"
+
+- "lxsdx 33, %5, %4 \n\t"
+- "xxspltd 32, 33, 0 \n\t"
+- "addi %8, %8, -8 \n\t"
++ "lxvd2x %x13, 0, %3 \n\t"
++ "lxvd2x %x14, %23, %3 \n\t"
++ "lxvd2x %x15, %24, %3 \n\t"
++ "lxvd2x %x16, %25, %3 \n\t"
+
+- "dcbt %2, %9 \n\t"
+- "dcbt %3, %9 \n\t"
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
+
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
++ "lxvd2x %x9, 0, %2 \n\t"
++ "lxvd2x %x10, %23, %2 \n\t"
++ "lxvd2x %x11, %24, %2 \n\t"
++ "lxvd2x %x12, %25, %2 \n\t"
+
+- "lxvd2x 48, 0, %3 \n\t"
+- "lxvd2x 49, %5, %3 \n\t"
+- "lxvd2x 50, %6, %3 \n\t"
+- "lxvd2x 51, %7, %3 \n\t"
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "lxvd2x 44, 0, %2 \n\t"
+- "lxvd2x 45, %5, %2 \n\t"
+- "lxvd2x 46, %6, %2 \n\t"
+- "lxvd2x 47, %7, %2 \n\t"
+-
+- "lxvd2x 52, 0, %3 \n\t"
+- "lxvd2x 53, %5, %3 \n\t"
+- "lxvd2x 54, %6, %3 \n\t"
+- "lxvd2x 55, %7, %3 \n\t"
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %9 \n\t"
+- "dcbt %3, %9 \n\t"
+-
+- "xvmaddadp 48, 40, 32 \n\t"
+- "xvmaddadp 49, 41, 32 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+-
+- "stxvd2x 48, 0, %8 \n\t"
+- "stxvd2x 49, %5, %8 \n\t"
+-
+- "xvmaddadp 50, 42, 32 \n\t"
+- "xvmaddadp 51, 43, 32 \n\t"
+-
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
+-
+- "lxvd2x 48, 0, %3 \n\t"
+- "lxvd2x 49, %5, %3 \n\t"
+- "lxvd2x 50, %6, %3 \n\t"
+- "lxvd2x 51, %7, %3 \n\t"
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %8, %8, 64 \n\t"
+-
+- "xvmaddadp 52, 44, 32 \n\t"
+- "addi %3, %3, 64 \n\t"
+- "xvmaddadp 53, 45, 32 \n\t"
+-
+- "lxvd2x 44, 0, %2 \n\t"
+- "lxvd2x 45, %5, %2 \n\t"
+-
+- "stxvd2x 52, 0, %8 \n\t"
+- "stxvd2x 53, %5, %8 \n\t"
+-
+- "xvmaddadp 54, 46, 32 \n\t"
+- "xvmaddadp 55, 47, 32 \n\t"
+-
+- "lxvd2x 46, %6, %2 \n\t"
+- "lxvd2x 47, %7, %2 \n\t"
+-
+- "stxvd2x 54, %6, %8 \n\t"
+- "stxvd2x 55, %7, %8 \n\t"
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %8, %8, 64 \n\t"
+-
+- "lxvd2x 52, 0, %3 \n\t"
+- "lxvd2x 53, %5, %3 \n\t"
+- "lxvd2x 54, %6, %3 \n\t"
+- "lxvd2x 55, %7, %3 \n\t"
+-
+- "addi %3, %3, 64 \n\t"
+-
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+-
+- "xvmaddadp 48, 40, 32 \n\t"
+- "xvmaddadp 49, 41, 32 \n\t"
+- "xvmaddadp 50, 42, 32 \n\t"
+- "xvmaddadp 51, 43, 32 \n\t"
+-
+- "xvmaddadp 52, 44, 32 \n\t"
+- "xvmaddadp 53, 45, 32 \n\t"
+- "xvmaddadp 54, 46, 32 \n\t"
+- "xvmaddadp 55, 47, 32 \n\t"
+-
+- "stxvd2x 48, 0, %8 \n\t"
+- "stxvd2x 49, %5, %8 \n\t"
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- "stxvd2x 52, 0, %8 \n\t"
+- "stxvd2x 53, %5, %8 \n\t"
+- "stxvd2x 54, %6, %8 \n\t"
+- "stxvd2x 55, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (y1), // 3
+- "r" (alpha), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (y2), // 8
+- "r" (pre) // 9
+- : "cr0", "%0", "%2" , "%3", "%8", "memory"
+- );
+-
+-}
++ "lxvd2x %x17, 0, %3 \n\t"
++ "lxvd2x %x18, %23, %3 \n\t"
++ "lxvd2x %x19, %24, %3 \n\t"
++ "lxvd2x %x20, %25, %3 \n\t"
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, -64 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".align 5 \n"
++ "1: \n\t"
++
++ "xvmaddadp %x13, %x5, %x4 \n\t"
++ "xvmaddadp %x14, %x6, %x4 \n\t"
++
++ "lxvd2x %x5, 0, %2 \n\t"
++ "lxvd2x %x6, %23, %2 \n\t"
++
++ "stxvd2x %x13, 0, %3 \n\t"
++ "stxvd2x %x14, %23, %3 \n\t"
++
++ "xvmaddadp %x15, %x7, %x4 \n\t"
++ "xvmaddadp %x16, %x8, %x4 \n\t"
++
++ "lxvd2x %x7, %24, %2 \n\t"
++ "lxvd2x %x8, %25, %2 \n\t"
++
++ "stxvd2x %x15, %24, %3 \n\t"
++ "stxvd2x %x16, %25, %3 \n\t"
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "lxvd2x %x13, 0, %3 \n\t"
++ "lxvd2x %x14, %23, %3 \n\t"
++ "lxvd2x %x15, %24, %3 \n\t"
++ "lxvd2x %x16, %25, %3 \n\t"
++
++ "addi %3, %3, -64 \n\t"
++
++ "xvmaddadp %x17, %x9, %x4 \n\t"
++ "xvmaddadp %x18, %x10, %x4 \n\t"
++
++ "lxvd2x %x9, 0, %2 \n\t"
++ "lxvd2x %x10, %23, %2 \n\t"
++
++ "stxvd2x %x17, 0, %3 \n\t"
++ "stxvd2x %x18, %23, %3 \n\t"
++
++ "xvmaddadp %x19, %x11, %x4 \n\t"
++ "xvmaddadp %x20, %x12, %x4 \n\t"
++
++ "lxvd2x %x11, %24, %2 \n\t"
++ "lxvd2x %x12, %25, %2 \n\t"
++
++ "stxvd2x %x19, %24, %3 \n\t"
++ "stxvd2x %x20, %25, %3 \n\t"
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "lxvd2x %x17, 0, %3 \n\t"
++ "lxvd2x %x18, %23, %3 \n\t"
++ "lxvd2x %x19, %24, %3 \n\t"
++ "lxvd2x %x20, %25, %3 \n\t"
++
++ "addi %3, %3, -64 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmaddadp %x13, %x5, %x4 \n\t"
++ "xvmaddadp %x14, %x6, %x4 \n\t"
++ "xvmaddadp %x15, %x7, %x4 \n\t"
++ "xvmaddadp %x16, %x8, %x4 \n\t"
++
++ "xvmaddadp %x17, %x9, %x4 \n\t"
++ "xvmaddadp %x18, %x10, %x4 \n\t"
++ "xvmaddadp %x19, %x11, %x4 \n\t"
++ "xvmaddadp %x20, %x12, %x4 \n\t"
++
++ "stxvd2x %x13, 0, %3 \n\t"
++ "stxvd2x %x14, %23, %3 \n\t"
++ "stxvd2x %x15, %24, %3 \n\t"
++ "stxvd2x %x16, %25, %3 \n\t"
++
++ "addi %3, %3, 64 \n\t"
++
++ "stxvd2x %x17, 0, %3 \n\t"
++ "stxvd2x %x18, %23, %3 \n\t"
++ "stxvd2x %x19, %24, %3 \n\t"
++ "stxvd2x %x20, %25, %3 \n"
++
++ "#n=%1 x=%21=%2 y=%0=%3 alpha=%22 o16=%23 o32=%24 o48=%25\n"
++ "#t0=%x4 t1=%x5 t2=%x6 t3=%x7 t4=%x8 t5=%x9 t6=%x10 t7=%x11 t8=%x12 t9=%x13 t10=%x14 t11=%x15 t12=%x16 t13=%x17 t14=%x18 t15=%x19 t16=%x20"
++ :
++ "+m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y), // 3
++ "=wa" (t0), // 4
++ "=wa" (t1), // 5
++ "=wa" (t2), // 6
++ "=wa" (t3), // 7
++ "=wa" (t4), // 8
++ "=wa" (t5), // 9
++ "=wa" (t6), // 10
++ "=wa" (t7), // 11
++ "=wa" (t8), // 12
++ "=wa" (t9), // 13
++ "=wa" (t10), // 14
++ "=wa" (t11), // 15
++ "=wa" (t12), // 16
++ "=wa" (t13), // 17
++ "=wa" (t14), // 18
++ "=wa" (t15), // 19
++ "=wa" (t16) // 20
++ :
++ "m" (*x),
++ "d" (alpha), // 22
++ "b" (16), // 23
++ "b" (32), // 24
++ "b" (48) // 25
++ :
++ "cr0"
++ );
++
++}
+
+
+diff --git a/kernel/power/dcopy_microk_power8.c b/kernel/power/dcopy_microk_power8.c
+index 04f7db556..261dc04de 100644
+--- a/kernel/power/dcopy_microk_power8.c
++++ b/kernel/power/dcopy_microk_power8.c
+@@ -35,140 +35,121 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void dcopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void dcopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void dcopy_kernel_32 (long n, double *x, double *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 50, 0, %2 \n\t"
+- "lxvd2x 51, %5, %2 \n\t"
+- "lxvd2x 52, %6, %2 \n\t"
+- "lxvd2x 53, %7, %2 \n\t"
+- "lxvd2x 54, %8, %2 \n\t"
+- "lxvd2x 55, %9, %2 \n\t"
+- "lxvd2x 56, %10, %2 \n\t"
+- "lxvd2x 57, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvd2x 40, 0, %1 \n\t"
+- "stxvd2x 41, %5, %1 \n\t"
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "stxvd2x 42, %6, %1 \n\t"
+- "stxvd2x 43, %7, %1 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "stxvd2x 44, %8, %1 \n\t"
+- "stxvd2x 45, %9, %1 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "stxvd2x 46, %10, %1 \n\t"
+- "stxvd2x 47, %11, %1 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "stxvd2x 50, 0, %1 \n\t"
+- "stxvd2x 51, %5, %1 \n\t"
+- "lxvd2x 50, 0, %2 \n\t"
+- "lxvd2x 51, %5, %2 \n\t"
+- "stxvd2x 52, %6, %1 \n\t"
+- "stxvd2x 53, %7, %1 \n\t"
+- "lxvd2x 52, %6, %2 \n\t"
+- "lxvd2x 53, %7, %2 \n\t"
+- "stxvd2x 54, %8, %1 \n\t"
+- "stxvd2x 55, %9, %1 \n\t"
+- "lxvd2x 54, %8, %2 \n\t"
+- "lxvd2x 55, %9, %2 \n\t"
+- "stxvd2x 56, %10, %1 \n\t"
+- "stxvd2x 57, %11, %1 \n\t"
+- "lxvd2x 56, %10, %2 \n\t"
+- "lxvd2x 57, %11, %2 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "stxvd2x 40, 0, %1 \n\t"
+- "stxvd2x 41, %5, %1 \n\t"
+- "stxvd2x 42, %6, %1 \n\t"
+- "stxvd2x 43, %7, %1 \n\t"
+- "stxvd2x 44, %8, %1 \n\t"
+- "stxvd2x 45, %9, %1 \n\t"
+- "stxvd2x 46, %10, %1 \n\t"
+- "stxvd2x 47, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvd2x 50, 0, %1 \n\t"
+- "stxvd2x 51, %5, %1 \n\t"
+- "stxvd2x 52, %6, %1 \n\t"
+- "stxvd2x 53, %7, %1 \n\t"
+- "stxvd2x 54, %8, %1 \n\t"
+- "stxvd2x 55, %9, %1 \n\t"
+- "stxvd2x 56, %10, %1 \n\t"
+- "stxvd2x 57, %11, %1 \n\t"
+-
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %5, %2 \n\t"
++ "lxvd2x 34, %6, %2 \n\t"
++ "lxvd2x 35, %7, %2 \n\t"
++ "lxvd2x 36, %8, %2 \n\t"
++ "lxvd2x 37, %9, %2 \n\t"
++ "lxvd2x 38, %10, %2 \n\t"
++ "lxvd2x 39, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %5, %2 \n\t"
++ "lxvd2x 42, %6, %2 \n\t"
++ "lxvd2x 43, %7, %2 \n\t"
++ "lxvd2x 44, %8, %2 \n\t"
++ "lxvd2x 45, %9, %2 \n\t"
++ "lxvd2x 46, %10, %2 \n\t"
++ "lxvd2x 47, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %5, %2 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "lxvd2x 34, %6, %2 \n\t"
++ "lxvd2x 35, %7, %2 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "lxvd2x 36, %8, %2 \n\t"
++ "lxvd2x 37, %9, %2 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++ "lxvd2x 38, %10, %2 \n\t"
++ "lxvd2x 39, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %5, %2 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "lxvd2x 42, %6, %2 \n\t"
++ "lxvd2x 43, %7, %2 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "lxvd2x 44, %8, %2 \n\t"
++ "lxvd2x 45, %9, %2 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n\t"
++ "lxvd2x 46, %10, %2 \n\t"
++ "lxvd2x 47, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n"
++
++ "#n=%1 x=%4=%2 y=%0=%3 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "=m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y) // 3
++ :
++ "m" (*x),
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/ddot.c b/kernel/power/ddot.c
+index cef60a2e5..e43470e23 100644
+--- a/kernel/power/ddot.c
++++ b/kernel/power/ddot.c
+@@ -43,7 +43,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_8
+
+-static void ddot_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
++static FLOAT ddot_kernel_8 (BLASLONG n, FLOAT *x, FLOAT *y)
+ {
+ BLASLONG register i = 0;
+ FLOAT dot = 0.0;
+@@ -62,8 +62,7 @@ static void ddot_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
+ i+=8 ;
+
+ }
+- *d += dot;
+-
++ return dot;
+ }
+
+ #endif
+@@ -83,7 +82,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
+ BLASLONG n1 = n & -16;
+
+ if ( n1 )
+- ddot_kernel_8(n1, x, y , &dot );
++ dot = ddot_kernel_8(n1, x, y);
+
+ i = n1;
+ while(i < n)
+diff --git a/kernel/power/ddot_microk_power8.c b/kernel/power/ddot_microk_power8.c
+index b88049212..4e6bc29c9 100644
+--- a/kernel/power/ddot_microk_power8.c
++++ b/kernel/power/ddot_microk_power8.c
+@@ -34,145 +34,138 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_8 1
+-static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y , FLOAT *dot) __attribute__ ((noinline));
+
+-static void ddot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
++static double ddot_kernel_8 (long n, double *x, double *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "dcbt %2, %12 \n\t"
+- "dcbt %3, %12 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 48, 0, %3 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 49, %5, %3 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 50, %6, %3 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 51, %7, %3 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 52, %8, %3 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 53, %9, %3 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 54, %10, %3 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+- "lxvd2x 55, %11, %3 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+- "addi %3, %3, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %12 \n\t"
+- "dcbt %3, %12 \n\t"
+-
+- "xvmaddadp 32, 40, 48 \n\t"
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 48, 0, %3 \n\t"
+- "xvmaddadp 33, 41, 49 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 49, %5, %3 \n\t"
+- "xvmaddadp 34, 42, 50 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 50, %6, %3 \n\t"
+- "xvmaddadp 35, 43, 51 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 51, %7, %3 \n\t"
+- "xvmaddadp 36, 44, 52 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 52, %8, %3 \n\t"
+- "xvmaddadp 37, 45, 53 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 53, %9, %3 \n\t"
+- "xvmaddadp 38, 46, 54 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 54, %10, %3 \n\t"
+- "xvmaddadp 39, 47, 55 \n\t"
+-
+- "lxvd2x 47, %11, %2 \n\t"
+- "lxvd2x 55, %11, %3 \n\t"
+-
+-
+- "addi %2, %2, 128 \n\t"
+- "addi %3, %3, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmaddadp 32, 40, 48 \n\t"
+- "xvmaddadp 33, 41, 49 \n\t"
+- "xvmaddadp 34, 42, 50 \n\t"
+- "xvmaddadp 35, 43, 51 \n\t"
+- "xvmaddadp 36, 44, 52 \n\t"
+- "xvmaddadp 37, 45, 53 \n\t"
+- "xvmaddadp 38, 46, 54 \n\t"
+- "xvmaddadp 39, 47, 55 \n\t"
+-
+- "xvadddp 32, 32, 33 \n\t"
+- "xvadddp 34, 34, 35 \n\t"
+- "xvadddp 36, 36, 37 \n\t"
+- "xvadddp 38, 38, 39 \n\t"
+-
+- "xvadddp 32, 32, 34 \n\t"
+- "xvadddp 36, 36, 38 \n\t"
+-
+- "xvadddp 32, 32, 36 \n\t"
+-
+- "xxswapd 33, 32 \n\t"
+-
+- "xsadddp 32, 32, 33 \n\t"
+-
+- "stxsdx 32, 0, %4 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (y1), // 3
+- "r" (dot), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112), // 11
+- "r" (pre) // 12
+- : "cr0", "%0", "%2" , "%3", "memory"
+- );
+-
+-}
+-
+-
++ double dot;
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++ "dcbt 0, %3 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 48, 0, %3 \n\t"
++ "lxvd2x 41, %10, %2 \n\t"
++ "lxvd2x 49, %10, %3 \n\t"
++ "lxvd2x 42, %11, %2 \n\t"
++ "lxvd2x 50, %11, %3 \n\t"
++ "lxvd2x 43, %12, %2 \n\t"
++ "lxvd2x 51, %12, %3 \n\t"
++ "lxvd2x 44, %13, %2 \n\t"
++ "lxvd2x %x4, %13, %3 \n\t"
++ "lxvd2x 45, %14, %2 \n\t"
++ "lxvd2x %x5, %14, %3 \n\t"
++ "lxvd2x 46, %15, %2 \n\t"
++ "lxvd2x %x6, %15, %3 \n\t"
++ "lxvd2x 47, %16, %2 \n\t"
++ "lxvd2x %x7, %16, %3 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmaddadp 32, 40, 48 \n\t"
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 48, 0, %3 \n\t"
++ "xvmaddadp 33, 41, 49 \n\t"
++ "lxvd2x 41, %10, %2 \n\t"
++ "lxvd2x 49, %10, %3 \n\t"
++ "xvmaddadp 34, 42, 50 \n\t"
++ "lxvd2x 42, %11, %2 \n\t"
++ "lxvd2x 50, %11, %3 \n\t"
++ "xvmaddadp 35, 43, 51 \n\t"
++ "lxvd2x 43, %12, %2 \n\t"
++ "lxvd2x 51, %12, %3 \n\t"
++ "xvmaddadp 36, 44, %x4 \n\t"
++ "lxvd2x 44, %13, %2 \n\t"
++ "lxvd2x %x4, %13, %3 \n\t"
++ "xvmaddadp 37, 45, %x5 \n\t"
++ "lxvd2x 45, %14, %2 \n\t"
++ "lxvd2x %x5, %14, %3 \n\t"
++ "xvmaddadp 38, 46, %x6 \n\t"
++ "lxvd2x 46, %15, %2 \n\t"
++ "lxvd2x %x6, %15, %3 \n\t"
++ "xvmaddadp 39, 47, %x7 \n\t"
++ "lxvd2x 47, %16, %2 \n\t"
++ "lxvd2x %x7, %16, %3 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmaddadp 32, 40, 48 \n\t"
++ "xvmaddadp 33, 41, 49 \n\t"
++ "xvmaddadp 34, 42, 50 \n\t"
++ "xvmaddadp 35, 43, 51 \n\t"
++ "xvmaddadp 36, 44, %x4 \n\t"
++ "xvmaddadp 37, 45, %x5 \n\t"
++ "xvmaddadp 38, 46, %x6 \n\t"
++ "xvmaddadp 39, 47, %x7 \n\t"
++
++ "xvadddp 32, 32, 33 \n\t"
++ "xvadddp 34, 34, 35 \n\t"
++ "xvadddp 36, 36, 37 \n\t"
++ "xvadddp 38, 38, 39 \n\t"
++
++ "xvadddp 32, 32, 34 \n\t"
++ "xvadddp 36, 36, 38 \n\t"
++
++ "xvadddp 32, 32, 36 \n\t"
++
++ "xxswapd 33, 32 \n\t"
++
++ "xsadddp %x0, 32, 33 \n"
++
++ "#dot=%0 n=%1 x=%8=%2 y=%9=%3 o16=%10 o32=%11 o48=%12 o64=%13 o80=%14 o96=%15 o122=%16\n"
++ "#t0=%x4 t1=%x5 t2=%x6 t3=%x7"
++ :
++ "=d" (dot), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y), // 3
++ "=wa" (t0), // 4
++ "=wa" (t1), // 5
++ "=wa" (t2), // 6
++ "=wa" (t3) // 7
++ :
++ "m" (*x),
++ "m" (*y),
++ "b" (16), // 10
++ "b" (32), // 11
++ "b" (48), // 12
++ "b" (64), // 13
++ "b" (80), // 14
++ "b" (96), // 15
++ "b" (112) // 16
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return dot;
++}
+diff --git a/kernel/power/dgemv_n.c b/kernel/power/dgemv_n.c
+index 812d09d15..57f9f9e72 100644
+--- a/kernel/power/dgemv_n.c
++++ b/kernel/power/dgemv_n.c
+@@ -47,18 +47,18 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_4x4
+
+-static void dgemv_kernel_4x4(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT *alpha)
++static void dgemv_kernel_4x4(BLASLONG n, FLOAT *a_ptr, BLASLONG lda, FLOAT *xo, FLOAT *y, FLOAT alpha)
+ {
+ BLASLONG i;
+- FLOAT *a0,*a1,*a2,*a3;
+ FLOAT x[4] __attribute__ ((aligned (16)));;
+- a0 = ap[0];
+- a1 = ap[1];
+- a2 = ap[2];
+- a3 = ap[3];
++ FLOAT *a0 = a_ptr;
++ FLOAT *a1 = a0 + lda;
++ FLOAT *a2 = a1 + lda;
++ FLOAT *a3 = a2 + lda;
++
+
+ for ( i=0; i<4; i++)
+- x[i] = xo[i] * *alpha;
++ x[i] = xo[i] * alpha;
+
+ for ( i=0; i< n; i+=4 )
+ {
+@@ -73,16 +73,13 @@ static void dgemv_kernel_4x4(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT
+
+ #ifndef HAVE_KERNEL_4x2
+
+-static void dgemv_kernel_4x2(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT *alpha)
++static void dgemv_kernel_4x2(BLASLONG n, FLOAT *a0, FLOAT *a1, FLOAT *xo, FLOAT *y, FLOAT alpha)
+ {
+ BLASLONG i;
+- FLOAT *a0,*a1;
+ FLOAT x[4] __attribute__ ((aligned (16)));;
+- a0 = ap[0];
+- a1 = ap[1];
+
+ for ( i=0; i<2; i++)
+- x[i] = xo[i] * *alpha;
++ x[i] = xo[i] * alpha;
+
+ for ( i=0; i< n; i+=4 )
+ {
+@@ -98,15 +95,13 @@ static void dgemv_kernel_4x2(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT
+
+ #ifndef HAVE_KERNEL_4x1
+
+-static void dgemv_kernel_4x1(BLASLONG n, FLOAT *ap, FLOAT *xo, FLOAT *y, FLOAT *alpha)
++static void dgemv_kernel_4x1(BLASLONG n, FLOAT *a0, FLOAT *xo, FLOAT *y, FLOAT alpha)
+ {
+ BLASLONG i;
+- FLOAT *a0;
+ FLOAT x[4] __attribute__ ((aligned (16)));;
+- a0 = ap;
+
+ for ( i=0; i<1; i++)
+- x[i] = xo[i] * *alpha;
++ x[i] = xo[i] * alpha;
+
+ for ( i=0; i< n; i+=4 )
+ {
+@@ -141,7 +136,6 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+ {
+
+ BLASLONG i;
+- BLASLONG j;
+ FLOAT *a_ptr;
+ FLOAT *x_ptr;
+ FLOAT *y_ptr;
+@@ -151,13 +145,9 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+ BLASLONG m3;
+ BLASLONG n2;
+ BLASLONG lda4 = lda << 2;
+- FLOAT *ap[4] __attribute__ ((aligned (16)));;
+ FLOAT xbuffer[8] __attribute__ ((aligned (16)));;
+- FLOAT alpha_r[4] __attribute__ ((aligned (16)));;
+ FLOAT *ybuffer;
+
+- alpha_r[0] = alpha;
+-
+ if ( m < 1 ) return(0);
+ if ( n < 1 ) return(0);
+
+@@ -187,11 +177,6 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+ a_ptr = a;
+ x_ptr = x;
+
+- ap[0] = a_ptr;
+- ap[1] = a_ptr + lda;
+- ap[2] = ap[1] + lda;
+- ap[3] = ap[2] + lda;
+-
+ if ( inc_y != 1 )
+ memset(ybuffer,0,NB*8);
+ else
+@@ -203,18 +188,14 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+
+ for( i = 0; i < n1 ; i++)
+ {
+- dgemv_kernel_4x4(NB,ap,x_ptr,ybuffer,alpha_r);
+- ap[0] += lda4;
+- ap[1] += lda4;
+- ap[2] += lda4;
+- ap[3] += lda4;
++ dgemv_kernel_4x4(NB,a_ptr,lda,x_ptr,ybuffer,alpha);
+ a_ptr += lda4;
+ x_ptr += 4;
+ }
+
+ if ( n2 & 2 )
+ {
+- dgemv_kernel_4x2(NB,ap,x_ptr,ybuffer,alpha_r);
++ dgemv_kernel_4x2(NB,a_ptr,a_ptr+lda,x_ptr,ybuffer,alpha);
+ a_ptr += lda*2;
+ x_ptr += 2;
+ }
+@@ -222,7 +203,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+
+ if ( n2 & 1 )
+ {
+- dgemv_kernel_4x1(NB,a_ptr,x_ptr,ybuffer,alpha_r);
++ dgemv_kernel_4x1(NB,a_ptr,x_ptr,ybuffer,alpha);
+ a_ptr += lda;
+ x_ptr += 1;
+
+@@ -243,11 +224,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+ x_ptr += inc_x;
+ xbuffer[3] = x_ptr[0];
+ x_ptr += inc_x;
+- dgemv_kernel_4x4(NB,ap,xbuffer,ybuffer,alpha_r);
+- ap[0] += lda4;
+- ap[1] += lda4;
+- ap[2] += lda4;
+- ap[3] += lda4;
++ dgemv_kernel_4x4(NB,a_ptr,lda,xbuffer,ybuffer,alpha);
+ a_ptr += lda4;
+ }
+
+@@ -255,7 +232,7 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
+ {
+ xbuffer[0] = x_ptr[0];
+ x_ptr += inc_x;
+- dgemv_kernel_4x1(NB,a_ptr,xbuffer,ybuffer,alpha_r);
++ dgemv_kernel_4x1(NB,a_ptr,xbuffer,ybuffer,alpha);
+ a_ptr += lda;
+
+ }
+diff --git a/kernel/power/dgemv_n_microk_power8.c b/kernel/power/dgemv_n_microk_power8.c
+index 9eabe555c..5b42bbb38 100644
+--- a/kernel/power/dgemv_n_microk_power8.c
++++ b/kernel/power/dgemv_n_microk_power8.c
+@@ -35,267 +35,264 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_4x4 1
+
+-static void dgemv_kernel_4x4(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT *alpha) __attribute__ ((noinline));
+-
+-static void dgemv_kernel_4x4(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT *alpha)
++static void dgemv_kernel_4x4 (long n, double *ap, long lda, double *x, double *y, double alpha)
+ {
+- BLASLONG i=n;
+- BLASLONG o8 = 8;
+- BLASLONG o16 = 16;
+- BLASLONG o24 = 24;
+- BLASLONG pre = 384;
+-
+- FLOAT *a0,*a1,*a2,*a3;
+- FLOAT *y1=y+1;
+- FLOAT x[4] __attribute__ ((aligned (16)));;
+- a0 = ap[0]+1;
+- a1 = ap[1]+1;
+- a2 = ap[2]+1;
+- a3 = ap[3]+1;
+-
+- x[0]=xo[0] * *alpha;
+- x[1]=xo[1] * *alpha;
+- x[2]=xo[2] * *alpha;
+- x[3]=xo[3] * *alpha;
++ double *a0;
++ double *a1;
++ double *a2;
++ double *a3;
++
++ __asm__
++ (
++ "lxvd2x 34, 0, %9 \n\t" // x0, x1
++ "lxvd2x 35, %10, %9 \n\t" // x2, x3
++ "xxspltd 32, %x8, 0 \n\t" // alpha, alpha
++
++ "sldi %6, %4, 3 \n\t" // lda * sizeof (double)
++
++ "xvmuldp 34, 34, 32 \n\t" // x0 * alpha, x1 * alpha
++ "xvmuldp 35, 35, 32 \n\t" // x2 * alpha, x3 * alpha
++
++ "add %4, %3, %6 \n\t" // a1 = a0 + lda
++ "add %6, %6, %6 \n\t" // 2 * lda
++
++ "xxspltd 32, 34, 0 \n\t" // x0 * alpha, x0 * alpha
++ "xxspltd 33, 34, 1 \n\t" // x1 * alpha, x1 * alpha
++ "xxspltd 34, 35, 0 \n\t" // x2 * alpha, x2 * alpha
++ "xxspltd 35, 35, 1 \n\t" // x3 * alpha, x3 * alpha
++
++ "add %5, %3, %6 \n\t" // a2 = a0 + 2 * lda
++ "add %6, %4, %6 \n\t" // a3 = a1 + 2 * lda
++
++ "dcbt 0, %3 \n\t"
++ "dcbt 0, %4 \n\t"
++ "dcbt 0, %5 \n\t"
++ "dcbt 0, %6 \n\t"
+
++ "lxvd2x 40, 0, %3 \n\t" // a0[0], a0[1]
++ "lxvd2x 41, %10, %3 \n\t" // a0[2], a0[3]
+
+- __asm__ __volatile__
+- (
+- "lxvdsx 32, 0 , %1 \n\t" // x0
+- "lxvdsx 33,%3 , %1 \n\t" // x1
+- "lxvdsx 34,%4 , %1 \n\t" // x2
+- "lxvdsx 35,%5 , %1 \n\t" // x3
+- "addi %2 , %2 , -8 \n\t"
+- "addi %6 , %6 , -8 \n\t"
+- "addi %7 , %7 , -8 \n\t"
+- "addi %8 , %8 , -8 \n\t"
+- "addi %9 , %9 , -8 \n\t"
+-
+- "lxvd2x 48, 0, %6 \n\t" // a0[0], a0[1]
+- "lxvd2x 49,%4, %6 \n\t" // a0[2], a0[3]
+-
+- "lxvd2x 50, 0, %7 \n\t" // a1[0], a1[1]
+- "lxvd2x 51,%4, %7 \n\t" // a1[2], a1[3]
++ "lxvd2x 42, 0, %4 \n\t" // a1[0], a1[1]
++ "lxvd2x 43, %10, %4 \n\t" // a1[2], a1[3]
+
+- "lxvd2x 52, 0, %8 \n\t" // a2[0], a2[1]
+- "lxvd2x 53,%4, %8 \n\t" // a2[2], a2[3]
++ "lxvd2x 44, 0, %5 \n\t" // a2[0], a2[1]
++ "lxvd2x 45, %10, %5 \n\t" // a2[2], a2[3]
+
+- "lxvd2x 54, 0, %9 \n\t" // a3[0], a3[1]
+- "lxvd2x 55,%4, %9 \n\t" // a3[2], a3[3]
++ "lxvd2x 46, 0, %6 \n\t" // a3[0], a3[1]
++ "lxvd2x 47, %10, %6 \n\t" // a3[2], a3[3]
+
+- "addi %6, %6, 32 \n\t"
+- "addi %7, %7, 32 \n\t"
+- "addi %8, %8, 32 \n\t"
+- "addi %9, %9, 32 \n\t"
++ "dcbt 0, %2 \n\t"
+
+- "addic. %0 , %0 , -4 \n\t"
+- "ble 2f \n\t"
++ "addi %3, %3, 32 \n\t"
++ "addi %4, %4, 32 \n\t"
++ "addi %5, %5, 32 \n\t"
++ "addi %6, %6, 32 \n\t"
+
+- ".align 5 \n\t"
+- "1: \n\t"
++ "addic. %1, %1, -4 \n\t"
++ "ble 2f \n\t"
+
+- "dcbt %2, %10 \n\t"
++ ".p2align 5 \n"
++ "1: \n\t"
+
+- "lxvd2x 40, 0, %2 \n\t" // y0, y1
+- "lxvd2x 41,%4, %2 \n\t" // y2, y3
+-
+- "dcbt %6, %10 \n\t"
+- "dcbt %7, %10 \n\t"
+- "dcbt %8, %10 \n\t"
+- "dcbt %9, %10 \n\t"
++ "lxvd2x 36, 0, %2 \n\t" // y0, y1
++ "lxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "xvmaddadp 40, 48, 32 \n\t"
+- "xvmaddadp 41, 49, 32 \n\t"
++ "xvmaddadp 36, 40, 32 \n\t"
++ "xvmaddadp 37, 41, 32 \n\t"
+
+- "lxvd2x 48, 0, %6 \n\t" // a0[0], a0[1]
+- "lxvd2x 49,%4, %6 \n\t" // a0[2], a0[3]
++ "lxvd2x 40, 0, %3 \n\t" // a0[0], a0[1]
++ "lxvd2x 41, %10, %3 \n\t" // a0[2], a0[3]
+
+- "xvmaddadp 40, 50, 33 \n\t"
+- "addi %6, %6, 32 \n\t"
+- "xvmaddadp 41, 51, 33 \n\t"
++ "xvmaddadp 36, 42, 33 \n\t"
++ "addi %3, %3, 32 \n\t"
++ "xvmaddadp 37, 43, 33 \n\t"
+
+- "lxvd2x 50, 0, %7 \n\t" // a1[0], a1[1]
+- "lxvd2x 51,%4, %7 \n\t" // a1[2], a1[3]
++ "lxvd2x 42, 0, %4 \n\t" // a1[0], a1[1]
++ "lxvd2x 43, %10, %4 \n\t" // a1[2], a1[3]
+
+- "xvmaddadp 40, 52, 34 \n\t"
+- "addi %7, %7, 32 \n\t"
+- "xvmaddadp 41, 53, 34 \n\t"
++ "xvmaddadp 36, 44, 34 \n\t"
++ "addi %4, %4, 32 \n\t"
++ "xvmaddadp 37, 45, 34 \n\t"
+
+- "lxvd2x 52, 0, %8 \n\t" // a2[0], a2[1]
+- "lxvd2x 53,%4, %8 \n\t" // a2[2], a2[3]
++ "lxvd2x 44, 0, %5 \n\t" // a2[0], a2[1]
++ "lxvd2x 45, %10, %5 \n\t" // a2[2], a2[3]
+
+- "xvmaddadp 40, 54, 35 \n\t"
+- "addi %8, %8, 32 \n\t"
+- "xvmaddadp 41, 55, 35 \n\t"
++ "xvmaddadp 36, 46, 35 \n\t"
++ "addi %5, %5, 32 \n\t"
++ "xvmaddadp 37, 47, 35 \n\t"
+
+- "stxvd2x 40, 0, %2 \n\t" // y0, y1
+- "stxvd2x 41,%4, %2 \n\t" // y2, y3
++ "stxvd2x 36, 0, %2 \n\t" // y0, y1
++ "stxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "lxvd2x 54, 0, %9 \n\t" // a3[0], a3[1]
+- "lxvd2x 55,%4, %9 \n\t" // a3[2], a3[3]
++ "lxvd2x 46, 0, %6 \n\t" // a3[0], a3[1]
++ "lxvd2x 47, %10, %6 \n\t" // a3[2], a3[3]
+
+- "addi %9, %9, 32 \n\t"
+- "addi %2, %2, 32 \n\t"
++ "addi %6, %6, 32 \n\t"
++ "addi %2, %2, 32 \n\t"
+
+- "addic. %0 , %0 , -4 \n\t"
+- "ble 2f \n\t"
++ "addic. %1, %1, -4 \n\t"
++ "ble 2f \n\t"
+
+
+- "lxvd2x 40, 0, %2 \n\t" // y0, y1
+- "lxvd2x 41,%4, %2 \n\t" // y2, y3
+-
+- "xvmaddadp 40, 48, 32 \n\t"
+- "xvmaddadp 41, 49, 32 \n\t"
++ "lxvd2x 36, 0, %2 \n\t" // y0, y1
++ "lxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "lxvd2x 48, 0, %6 \n\t" // a0[0], a0[1]
+- "lxvd2x 49,%4, %6 \n\t" // a0[2], a0[3]
++ "xvmaddadp 36, 40, 32 \n\t"
++ "xvmaddadp 37, 41, 32 \n\t"
+
+- "xvmaddadp 40, 50, 33 \n\t"
+- "addi %6, %6, 32 \n\t"
+- "xvmaddadp 41, 51, 33 \n\t"
++ "lxvd2x 40, 0, %3 \n\t" // a0[0], a0[1]
++ "lxvd2x 41, %10, %3 \n\t" // a0[2], a0[3]
+
+- "lxvd2x 50, 0, %7 \n\t" // a1[0], a1[1]
+- "lxvd2x 51,%4, %7 \n\t" // a1[2], a1[3]
++ "xvmaddadp 36, 42, 33 \n\t"
++ "addi %3, %3, 32 \n\t"
++ "xvmaddadp 37, 43, 33 \n\t"
+
+- "xvmaddadp 40, 52, 34 \n\t"
+- "addi %7, %7, 32 \n\t"
+- "xvmaddadp 41, 53, 34 \n\t"
++ "lxvd2x 42, 0, %4 \n\t" // a1[0], a1[1]
++ "lxvd2x 43, %10, %4 \n\t" // a1[2], a1[3]
+
+- "lxvd2x 52, 0, %8 \n\t" // a2[0], a2[1]
+- "lxvd2x 53,%4, %8 \n\t" // a2[2], a2[3]
++ "xvmaddadp 36, 44, 34 \n\t"
++ "addi %4, %4, 32 \n\t"
++ "xvmaddadp 37, 45, 34 \n\t"
+
+- "xvmaddadp 40, 54, 35 \n\t"
+- "addi %8, %8, 32 \n\t"
+- "xvmaddadp 41, 55, 35 \n\t"
++ "lxvd2x 44, 0, %5 \n\t" // a2[0], a2[1]
++ "lxvd2x 45, %10, %5 \n\t" // a2[2], a2[3]
+
+- "stxvd2x 40, 0, %2 \n\t" // y0, y1
+- "stxvd2x 41,%4, %2 \n\t" // y2, y3
++ "xvmaddadp 36, 46, 35 \n\t"
++ "addi %5, %5, 32 \n\t"
++ "xvmaddadp 37, 47, 35 \n\t"
+
+- "lxvd2x 54, 0, %9 \n\t" // a3[0], a3[1]
+- "lxvd2x 55,%4, %9 \n\t" // a3[2], a3[3]
++ "stxvd2x 36, 0, %2 \n\t" // y0, y1
++ "stxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "addi %9, %9, 32 \n\t"
+- "addi %2, %2, 32 \n\t"
++ "lxvd2x 46, 0, %6 \n\t" // a3[0], a3[1]
++ "lxvd2x 47, %10, %6 \n\t" // a3[2], a3[3]
+
+- "addic. %0 , %0 , -4 \n\t"
+- "ble 2f \n\t"
++ "addi %6, %6, 32 \n\t"
++ "addi %2, %2, 32 \n\t"
+
++ "addic. %1, %1, -4 \n\t"
++ "ble 2f \n\t"
+
+- "lxvd2x 40, 0, %2 \n\t" // y0, y1
+- "lxvd2x 41,%4, %2 \n\t" // y2, y3
+-
+- "xvmaddadp 40, 48, 32 \n\t"
+- "xvmaddadp 41, 49, 32 \n\t"
+
+- "lxvd2x 48, 0, %6 \n\t" // a0[0], a0[1]
+- "lxvd2x 49,%4, %6 \n\t" // a0[2], a0[3]
++ "lxvd2x 36, 0, %2 \n\t" // y0, y1
++ "lxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "xvmaddadp 40, 50, 33 \n\t"
+- "addi %6, %6, 32 \n\t"
+- "xvmaddadp 41, 51, 33 \n\t"
++ "xvmaddadp 36, 40, 32 \n\t"
++ "xvmaddadp 37, 41, 32 \n\t"
+
+- "lxvd2x 50, 0, %7 \n\t" // a1[0], a1[1]
+- "lxvd2x 51,%4, %7 \n\t" // a1[2], a1[3]
++ "lxvd2x 40, 0, %3 \n\t" // a0[0], a0[1]
++ "lxvd2x 41, %10, %3 \n\t" // a0[2], a0[3]
+
+- "xvmaddadp 40, 52, 34 \n\t"
+- "addi %7, %7, 32 \n\t"
+- "xvmaddadp 41, 53, 34 \n\t"
++ "xvmaddadp 36, 42, 33 \n\t"
++ "addi %3, %3, 32 \n\t"
++ "xvmaddadp 37, 43, 33 \n\t"
+
+- "lxvd2x 52, 0, %8 \n\t" // a2[0], a2[1]
+- "lxvd2x 53,%4, %8 \n\t" // a2[2], a2[3]
++ "lxvd2x 42, 0, %4 \n\t" // a1[0], a1[1]
++ "lxvd2x 43, %10, %4 \n\t" // a1[2], a1[3]
+
+- "xvmaddadp 40, 54, 35 \n\t"
+- "addi %8, %8, 32 \n\t"
+- "xvmaddadp 41, 55, 35 \n\t"
++ "xvmaddadp 36, 44, 34 \n\t"
++ "addi %4, %4, 32 \n\t"
++ "xvmaddadp 37, 45, 34 \n\t"
+
+- "stxvd2x 40, 0, %2 \n\t" // y0, y1
+- "stxvd2x 41,%4, %2 \n\t" // y2, y3
++ "lxvd2x 44, 0, %5 \n\t" // a2[0], a2[1]
++ "lxvd2x 45, %10, %5 \n\t" // a2[2], a2[3]
+
+- "lxvd2x 54, 0, %9 \n\t" // a3[0], a3[1]
+- "lxvd2x 55,%4, %9 \n\t" // a3[2], a3[3]
++ "xvmaddadp 36, 46, 35 \n\t"
++ "addi %5, %5, 32 \n\t"
++ "xvmaddadp 37, 47, 35 \n\t"
+
+- "addi %9, %9, 32 \n\t"
+- "addi %2, %2, 32 \n\t"
++ "stxvd2x 36, 0, %2 \n\t" // y0, y1
++ "stxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "addic. %0 , %0 , -4 \n\t"
+- "ble 2f \n\t"
++ "lxvd2x 46, 0, %6 \n\t" // a3[0], a3[1]
++ "lxvd2x 47, %10, %6 \n\t" // a3[2], a3[3]
+
++ "addi %6, %6, 32 \n\t"
++ "addi %2, %2, 32 \n\t"
+
+- "lxvd2x 40, 0, %2 \n\t" // y0, y1
+- "lxvd2x 41,%4, %2 \n\t" // y2, y3
+-
+- "xvmaddadp 40, 48, 32 \n\t"
+- "xvmaddadp 41, 49, 32 \n\t"
++ "addic. %1, %1, -4 \n\t"
++ "ble 2f \n\t"
+
+- "lxvd2x 48, 0, %6 \n\t" // a0[0], a0[1]
+- "lxvd2x 49,%4, %6 \n\t" // a0[2], a0[3]
+
+- "xvmaddadp 40, 50, 33 \n\t"
+- "addi %6, %6, 32 \n\t"
+- "xvmaddadp 41, 51, 33 \n\t"
++ "lxvd2x 36, 0, %2 \n\t" // y0, y1
++ "lxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "lxvd2x 50, 0, %7 \n\t" // a1[0], a1[1]
+- "lxvd2x 51,%4, %7 \n\t" // a1[2], a1[3]
++ "xvmaddadp 36, 40, 32 \n\t"
++ "xvmaddadp 37, 41, 32 \n\t"
+
+- "xvmaddadp 40, 52, 34 \n\t"
+- "addi %7, %7, 32 \n\t"
+- "xvmaddadp 41, 53, 34 \n\t"
++ "lxvd2x 40, 0, %3 \n\t" // a0[0], a0[1]
++ "lxvd2x 41, %10, %3 \n\t" // a0[2], a0[3]
+
+- "lxvd2x 52, 0, %8 \n\t" // a2[0], a2[1]
+- "lxvd2x 53,%4, %8 \n\t" // a2[2], a2[3]
++ "xvmaddadp 36, 42, 33 \n\t"
++ "addi %3, %3, 32 \n\t"
++ "xvmaddadp 37, 43, 33 \n\t"
+
+- "xvmaddadp 40, 54, 35 \n\t"
+- "addi %8, %8, 32 \n\t"
+- "xvmaddadp 41, 55, 35 \n\t"
++ "lxvd2x 42, 0, %4 \n\t" // a1[0], a1[1]
++ "lxvd2x 43, %10, %4 \n\t" // a1[2], a1[3]
+
+- "stxvd2x 40, 0, %2 \n\t" // y0, y1
+- "stxvd2x 41,%4, %2 \n\t" // y2, y3
++ "xvmaddadp 36, 44, 34 \n\t"
++ "addi %4, %4, 32 \n\t"
++ "xvmaddadp 37, 45, 34 \n\t"
+
+- "lxvd2x 54, 0, %9 \n\t" // a3[0], a3[1]
+- "lxvd2x 55,%4, %9 \n\t" // a3[2], a3[3]
++ "lxvd2x 44, 0, %5 \n\t" // a2[0], a2[1]
++ "lxvd2x 45, %10, %5 \n\t" // a2[2], a2[3]
+
+- "addi %9, %9, 32 \n\t"
+- "addi %2, %2, 32 \n\t"
++ "xvmaddadp 36, 46, 35 \n\t"
++ "addi %5, %5, 32 \n\t"
++ "xvmaddadp 37, 47, 35 \n\t"
+
+- "addic. %0 , %0 , -4 \n\t"
+- "bgt 1b \n\t"
++ "stxvd2x 36, 0, %2 \n\t" // y0, y1
++ "stxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "2: \n\t"
++ "lxvd2x 46, 0, %6 \n\t" // a3[0], a3[1]
++ "lxvd2x 47, %10, %6 \n\t" // a3[2], a3[3]
+
+- "lxvd2x 40, 0, %2 \n\t" // y0, y1
+- "lxvd2x 41,%4, %2 \n\t" // y2, y3
++ "addi %6, %6, 32 \n\t"
++ "addi %2, %2, 32 \n\t"
+
+- "xvmaddadp 40, 48, 32 \n\t"
+- "xvmaddadp 41, 49, 32 \n\t"
++ "addic. %1, %1, -4 \n\t"
++ "bgt 1b \n"
+
+- "xvmaddadp 40, 50, 33 \n\t"
+- "xvmaddadp 41, 51, 33 \n\t"
++ "2: \n\t"
+
+- "xvmaddadp 40, 52, 34 \n\t"
+- "xvmaddadp 41, 53, 34 \n\t"
++ "lxvd2x 36, 0, %2 \n\t" // y0, y1
++ "lxvd2x 37, %10, %2 \n\t" // y2, y3
+
+- "xvmaddadp 40, 54, 35 \n\t"
+- "xvmaddadp 41, 55, 35 \n\t"
++ "xvmaddadp 36, 40, 32 \n\t"
++ "xvmaddadp 37, 41, 32 \n\t"
+
+- "stxvd2x 40, 0, %2 \n\t" // y0, y1
+- "stxvd2x 41,%4, %2 \n\t" // y2, y3
++ "xvmaddadp 36, 42, 33 \n\t"
++ "xvmaddadp 37, 43, 33 \n\t"
+
+- :
+- :
+- "r" (i), // 0
+- "r" (x), // 1
+- "r" (y1), // 2
+- "r" (o8), // 3
+- "r" (o16), // 4
+- "r" (o24), // 5
+- "r" (a0), // 6
+- "r" (a1), // 7
+- "r" (a2), // 8
+- "r" (a3), // 9
+- "r" (pre) // 10
+- : "cr0", "%0", "%2" , "%6", "%7", "%8", "%9", "memory"
+- );
++ "xvmaddadp 36, 44, 34 \n\t"
++ "xvmaddadp 37, 45, 34 \n\t"
+
+-}
++ "xvmaddadp 36, 46, 35 \n\t"
++ "xvmaddadp 37, 47, 35 \n\t"
+
++ "stxvd2x 36, 0, %2 \n\t" // y0, y1
++ "stxvd2x 37, %10, %2 \n" // y2, y3
+
++ "#n=%1 ap=%11 lda=%12 x=%7=%9 y=%0=%2 alpha=%8 o16=%10\n"
++ "#a0=%3 a1=%4 a2=%5 a3=%6"
++ :
++ "=m" (*y),
++ "+r" (n), // 1
++ "+b" (y), // 2
++ "=b" (a0), // 3
++ "=b" (a1), // 4
++ "=&b" (a2), // 5
++ "=&b" (a3) // 6
++ :
++ "m" (*x),
++ "d" (alpha), // 8
++ "r" (x), // 9
++ "b" (16), // 10
++ "3" (ap), // 11
++ "4" (lda) // 12
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/drot.c b/kernel/power/drot.c
+index c93f69b12..3e107486f 100644
+--- a/kernel/power/drot.c
++++ b/kernel/power/drot.c
+@@ -46,7 +46,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_16
+
+-static void drot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
++static void drot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT c, FLOAT s)
+ {
+
+ BLASLONG i=0;
+@@ -56,8 +56,6 @@ static void drot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
+ FLOAT y00, y01, y02, y03;
+ FLOAT *x1=x;
+ FLOAT *y1=y;
+- FLOAT c1=*c;
+- FLOAT s1=*s;
+
+ while ( i<n )
+ {
+@@ -71,14 +69,14 @@ static void drot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
+ x03 = x1[3];
+ y03 = y1[3];
+
+- f0 = c1*x00 + s1*y00;
+- g0 = c1*y00 - s1*x00;
+- f1 = c1*x01 + s1*y01;
+- g1 = c1*y01 - s1*x01;
+- f2 = c1*x02 + s1*y02;
+- g2 = c1*y02 - s1*x02;
+- f3 = c1*x03 + s1*y03;
+- g3 = c1*y03 - s1*x03;
++ f0 = c*x00 + s*y00;
++ g0 = c*y00 - s*x00;
++ f1 = c*x01 + s*y01;
++ g1 = c*y01 - s*x01;
++ f2 = c*x02 + s*y02;
++ g2 = c*y02 - s*x02;
++ f3 = c*x03 + s*y03;
++ g3 = c*y03 - s*x03;
+
+ x1[0] = f0;
+ y1[0] = g0;
+@@ -106,8 +104,6 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
+ {
+ BLASLONG i=0;
+ BLASLONG ix=0,iy=0;
+- FLOAT c1[4] __attribute__ ((aligned (16)));;
+- FLOAT s1[4] __attribute__ ((aligned (16)));;
+ FLOAT *x1=x;
+ FLOAT *y1=y;
+ FLOAT temp;
+@@ -120,15 +116,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
+ BLASLONG n1 = n & -16;
+ if ( n1 > 0 )
+ {
+- c1[0]=c;
+- c1[1]=c;
+- c1[2]=c;
+- c1[3]=c;
+- s1[0]=s;
+- s1[1]=s;
+- s1[2]=s;
+- s1[3]=s;
+- drot_kernel_16(n1, x1, y1, c1, s1);
++ drot_kernel_16(n1, x1, y1, c, s);
+ i=n1;
+ }
+
+diff --git a/kernel/power/drot_microk_power8.c b/kernel/power/drot_microk_power8.c
+index 4444ac7eb..016b7764d 100644
+--- a/kernel/power/drot_microk_power8.c
++++ b/kernel/power/drot_microk_power8.c
+@@ -38,174 +38,176 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_16 1
+
+-static void drot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s) __attribute__ ((noinline));
+-
+-static void drot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
++static void drot_kernel_16 (long n, double *x, double *y, double c, double s)
+ {
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++ __vector double t4;
++ __vector double t5;
++ __vector double t6;
++ __vector double t7;
+
++ __asm__
++ (
++ "xxspltd 36, %x13, 0 \n\t" // load c to both dwords
++ "xxspltd 37, %x14, 0 \n\t" // load s to both dwords
+
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxsdx 36 , %5, %3 \n\t" // load c
+- "lxsdx 37 , %5, %4 \n\t" // load s
+- "addi %8 , %8, -8 \n\t"
+- "addi %9 , %9, -8 \n\t"
+-
+- "xxspltd 36 , 36, 0 \n\t"
+- "xxspltd 37 , 37, 0 \n\t"
+-
+- "lxvd2x 32, 0, %1 \n\t" // load x
+- "lxvd2x 33, %5, %1 \n\t"
+- "lxvd2x 34, %6, %1 \n\t"
+- "lxvd2x 35, %7, %1 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t" // load y
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "addi %1, %1, 64 \n\t"
+- "addi %2, %2, 64 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "xvmuldp 48, 32, 36 \n\t" // c * x
+- "xvmuldp 49, 33, 36 \n\t"
+- "xvmuldp 50, 34, 36 \n\t"
+- "xvmuldp 51, 35, 36 \n\t"
+-
+- "xvmuldp 56, 40, 36 \n\t" // c * y
+- "xvmuldp 57, 41, 36 \n\t"
+- "xvmuldp 58, 42, 36 \n\t"
+- "xvmuldp 59, 43, 36 \n\t"
+-
+- "xvmuldp 52, 32, 37 \n\t" // s * x
+- "xvmuldp 53, 33, 37 \n\t"
+-
+- "lxvd2x 32, 0, %1 \n\t" // load x
+- "lxvd2x 33, %5, %1 \n\t"
+-
+- "xvmuldp 54, 34, 37 \n\t"
+- "xvmuldp 55, 35, 37 \n\t"
+-
+- "lxvd2x 34, %6, %1 \n\t"
+- "lxvd2x 35, %7, %1 \n\t"
+-
+- "xvmuldp 60, 40, 37 \n\t" // s * y
+- "xvmuldp 61, 41, 37 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t" // load y
+- "lxvd2x 41, %5, %2 \n\t"
+-
+- "xvmuldp 62, 42, 37 \n\t"
+- "xvmuldp 63, 43, 37 \n\t"
+-
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "xvadddp 48, 48 , 60 \n\t" // c * x + s * y
+- "xvadddp 49, 49 , 61 \n\t" // c * x + s * y
+-
+- "addi %1, %1, 64 \n\t"
+- "addi %2, %2, 64 \n\t"
+-
+- "xvadddp 50, 50 , 62 \n\t" // c * x + s * y
+- "xvadddp 51, 51 , 63 \n\t" // c * x + s * y
+-
+- "xvsubdp 56, 56 , 52 \n\t" // c * y - s * x
+- "xvsubdp 57, 57 , 53 \n\t" // c * y - s * x
+- "xvsubdp 58, 58 , 54 \n\t" // c * y - s * x
+- "xvsubdp 59, 59 , 55 \n\t" // c * y - s * x
+-
+- "stxvd2x 48, 0, %8 \n\t" // store x
+- "stxvd2x 49, %5, %8 \n\t"
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
+-
+- "stxvd2x 56, 0, %9 \n\t" // store y
+- "stxvd2x 57, %5, %9 \n\t"
+- "stxvd2x 58, %6, %9 \n\t"
+- "stxvd2x 59, %7, %9 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+- "addi %9, %9, 64 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmuldp 48, 32, 36 \n\t" // c * x
+- "xvmuldp 49, 33, 36 \n\t"
+- "xvmuldp 50, 34, 36 \n\t"
+- "xvmuldp 51, 35, 36 \n\t"
+-
+- "xvmuldp 56, 40, 36 \n\t" // c * y
+- "xvmuldp 57, 41, 36 \n\t"
+- "xvmuldp 58, 42, 36 \n\t"
+- "xvmuldp 59, 43, 36 \n\t"
+-
+- "xvmuldp 52, 32, 37 \n\t" // s * x
+- "xvmuldp 53, 33, 37 \n\t"
+- "xvmuldp 54, 34, 37 \n\t"
+- "xvmuldp 55, 35, 37 \n\t"
+-
+- "xvmuldp 60, 40, 37 \n\t" // s * y
+- "xvmuldp 61, 41, 37 \n\t"
+- "xvmuldp 62, 42, 37 \n\t"
+- "xvmuldp 63, 43, 37 \n\t"
+-
+- "xvadddp 48, 48 , 60 \n\t" // c * x + s * y
+- "xvadddp 49, 49 , 61 \n\t" // c * x + s * y
+- "xvadddp 50, 50 , 62 \n\t" // c * x + s * y
+- "xvadddp 51, 51 , 63 \n\t" // c * x + s * y
+-
+- "xvsubdp 56, 56 , 52 \n\t" // c * y - s * x
+- "xvsubdp 57, 57 , 53 \n\t" // c * y - s * x
+- "xvsubdp 58, 58 , 54 \n\t" // c * y - s * x
+- "xvsubdp 59, 59 , 55 \n\t" // c * y - s * x
+-
+- "stxvd2x 48, 0, %8 \n\t" // store x
+- "stxvd2x 49, %5, %8 \n\t"
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
++ "lxvd2x 32, 0, %3 \n\t" // load x
++ "lxvd2x 33, %15, %3 \n\t"
++ "lxvd2x 34, %16, %3 \n\t"
++ "lxvd2x 35, %17, %3 \n\t"
+
+- "stxvd2x 56, 0, %9 \n\t" // store y
+- "stxvd2x 57, %5, %9 \n\t"
+- "stxvd2x 58, %6, %9 \n\t"
+- "stxvd2x 59, %7, %9 \n\t"
++ "lxvd2x 48, 0, %4 \n\t" // load y
++ "lxvd2x 49, %15, %4 \n\t"
++ "lxvd2x 50, %16, %4 \n\t"
++ "lxvd2x 51, %17, %4 \n\t"
+
++ "addi %3, %3, 64 \n\t"
++ "addi %4, %4, 64 \n\t"
+
++ "addic. %2, %2, -8 \n\t"
++ "ble 2f \n\t"
+
+- :
+- :
+- "r" (i), // 0
+- "r" (x1), // 1
+- "r" (y1), // 2
+- "r" (c), // 3
+- "r" (s), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (x2), // 8
+- "r" (y2) // 9
+- : "cr0", "%0", "%1" , "%2", "%8", "%9", "memory"
+- );
++ ".p2align 5 \n"
++ "1: \n\t"
+
+-}
++ "xvmuldp 40, 32, 36 \n\t" // c * x
++ "xvmuldp 41, 33, 36 \n\t"
++ "xvmuldp 42, 34, 36 \n\t"
++ "xvmuldp 43, 35, 36 \n\t"
+
++ "xvmuldp %x5, 48, 36 \n\t" // c * y
++ "xvmuldp %x6, 49, 36 \n\t"
++ "xvmuldp %x7, 50, 36 \n\t"
++ "xvmuldp %x8, 51, 36 \n\t"
+
++ "xvmuldp 44, 32, 37 \n\t" // s * x
++ "xvmuldp 45, 33, 37 \n\t"
++
++ "lxvd2x 32, 0, %3 \n\t" // load x
++ "lxvd2x 33, %15, %3 \n\t"
++
++ "xvmuldp 46, 34, 37 \n\t"
++ "xvmuldp 47, 35, 37 \n\t"
++
++ "lxvd2x 34, %16, %3 \n\t"
++ "lxvd2x 35, %17, %3 \n\t"
++
++ "xvmuldp %x9, 48, 37 \n\t" // s * y
++ "xvmuldp %x10, 49, 37 \n\t"
++
++ "lxvd2x 48, 0, %4 \n\t" // load y
++ "lxvd2x 49, %15, %4 \n\t"
++
++ "xvmuldp %x11, 50, 37 \n\t"
++ "xvmuldp %x12, 51, 37 \n\t"
++
++ "lxvd2x 50, %16, %4 \n\t"
++ "lxvd2x 51, %17, %4 \n\t"
++
++ "xvadddp 40, 40, %x9 \n\t" // c * x + s * y
++ "xvadddp 41, 41, %x10 \n\t" // c * x + s * y
++
++ "addi %3, %3, -64 \n\t"
++ "addi %4, %4, -64 \n\t"
++
++ "xvadddp 42, 42, %x11 \n\t" // c * x + s * y
++ "xvadddp 43, 43, %x12 \n\t" // c * x + s * y
++
++ "xvsubdp %x5, %x5, 44 \n\t" // c * y - s * x
++ "xvsubdp %x6, %x6, 45 \n\t" // c * y - s * x
++ "xvsubdp %x7, %x7, 46 \n\t" // c * y - s * x
++ "xvsubdp %x8, %x8, 47 \n\t" // c * y - s * x
++
++ "stxvd2x 40, 0, %3 \n\t" // store x
++ "stxvd2x 41, %15, %3 \n\t"
++ "stxvd2x 42, %16, %3 \n\t"
++ "stxvd2x 43, %17, %3 \n\t"
++
++ "stxvd2x %x5, 0, %4 \n\t" // store y
++ "stxvd2x %x6, %15, %4 \n\t"
++ "stxvd2x %x7, %16, %4 \n\t"
++ "stxvd2x %x8, %17, %4 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %4, %4, 128 \n\t"
++
++ "addic. %2, %2, -8 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmuldp 40, 32, 36 \n\t" // c * x
++ "xvmuldp 41, 33, 36 \n\t"
++ "xvmuldp 42, 34, 36 \n\t"
++ "xvmuldp 43, 35, 36 \n\t"
++
++ "xvmuldp %x5, 48, 36 \n\t" // c * y
++ "xvmuldp %x6, 49, 36 \n\t"
++ "xvmuldp %x7, 50, 36 \n\t"
++ "xvmuldp %x8, 51, 36 \n\t"
++
++ "xvmuldp 44, 32, 37 \n\t" // s * x
++ "xvmuldp 45, 33, 37 \n\t"
++ "xvmuldp 46, 34, 37 \n\t"
++ "xvmuldp 47, 35, 37 \n\t"
++
++ "xvmuldp %x9, 48, 37 \n\t" // s * y
++ "xvmuldp %x10, 49, 37 \n\t"
++ "xvmuldp %x11, 50, 37 \n\t"
++ "xvmuldp %x12, 51, 37 \n\t"
++
++ "addi %3, %3, -64 \n\t"
++ "addi %4, %4, -64 \n\t"
++
++ "xvadddp 40, 40, %x9 \n\t" // c * x + s * y
++ "xvadddp 41, 41, %x10 \n\t" // c * x + s * y
++ "xvadddp 42, 42, %x11 \n\t" // c * x + s * y
++ "xvadddp 43, 43, %x12 \n\t" // c * x + s * y
++
++ "xvsubdp %x5, %x5, 44 \n\t" // c * y - s * x
++ "xvsubdp %x6, %x6, 45 \n\t" // c * y - s * x
++ "xvsubdp %x7, %x7, 46 \n\t" // c * y - s * x
++ "xvsubdp %x8, %x8, 47 \n\t" // c * y - s * x
++
++ "stxvd2x 40, 0, %3 \n\t" // store x
++ "stxvd2x 41, %15, %3 \n\t"
++ "stxvd2x 42, %16, %3 \n\t"
++ "stxvd2x 43, %17, %3 \n\t"
++
++ "stxvd2x %x5, 0, %4 \n\t" // store y
++ "stxvd2x %x6, %15, %4 \n\t"
++ "stxvd2x %x7, %16, %4 \n\t"
++ "stxvd2x %x8, %17, %4 \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 c=%13 s=%14 o16=%15 o32=%16 o48=%17\n"
++ "#t0=%x5 t1=%x6 t2=%x7 t3=%x8 t4=%x9 t5=%x10 t6=%x11 t7=%x12"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y), // 4
++ "=wa" (t0), // 5
++ "=wa" (t1), // 6
++ "=wa" (t2), // 7
++ "=wa" (t3), // 8
++ "=wa" (t4), // 9
++ "=wa" (t5), // 10
++ "=wa" (t6), // 11
++ "=wa" (t7) // 12
++ :
++ "d" (c), // 13
++ "d" (s), // 14
++ "b" (16), // 15
++ "b" (32), // 16
++ "b" (48) // 17
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++}
+diff --git a/kernel/power/dscal.c b/kernel/power/dscal.c
+index c62a56315..f32dc4bad 100644
+--- a/kernel/power/dscal.c
++++ b/kernel/power/dscal.c
+@@ -41,11 +41,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #if !defined(HAVE_KERNEL_8)
+
+-static void dscal_kernel_8( BLASLONG n, FLOAT *da , FLOAT *x )
++static void dscal_kernel_8 (BLASLONG n, FLOAT *x, FLOAT alpha)
+ {
+
+ BLASLONG i;
+- FLOAT alpha = *da;
+
+ for( i=0; i<n; i+=8 )
+ {
+@@ -62,7 +61,7 @@ static void dscal_kernel_8( BLASLONG n, FLOAT *da , FLOAT *x )
+
+ }
+
+-static void dscal_kernel_8_zero( BLASLONG n, FLOAT *da , FLOAT *x )
++static void dscal_kernel_8_zero (BLASLONG n, FLOAT *x)
+ {
+
+ BLASLONG i;
+@@ -102,10 +101,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ BLASLONG n1 = n & -16;
+ if ( n1 > 0 )
+ {
+- FLOAT alpha[2];
+- alpha[0]=da;
+- alpha[1]=da;
+- dscal_kernel_8_zero(n1 , alpha , x);
++ dscal_kernel_8_zero(n1, x);
+ j=n1;
+ }
+
+@@ -123,10 +119,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ BLASLONG n1 = n & -16;
+ if ( n1 > 0 )
+ {
+- FLOAT alpha[2];
+- alpha[0]=da;
+- alpha[1]=da;
+- dscal_kernel_8(n1 , alpha , x);
++ dscal_kernel_8(n1, x, da);
+ j=n1;
+ }
+ while(j < n)
+diff --git a/kernel/power/dscal_microk_power8.c b/kernel/power/dscal_microk_power8.c
+index d90c3d80c..04898eb3d 100644
+--- a/kernel/power/dscal_microk_power8.c
++++ b/kernel/power/dscal_microk_power8.c
+@@ -35,185 +35,149 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_8 1
+
+-static void dscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x) __attribute__ ((noinline));
+-
+-static void dscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x)
++static void dscal_kernel_8 (long n, double *x, double alpha)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *x2=x+1;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxsdx 33, 0, %3 \n\t"
+- "xxspltd 32, 33, 0 \n\t"
+- "addi %1, %1, -8 \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "xvmuldp 48, 40, 32 \n\t"
+- "xvmuldp 49, 41, 32 \n\t"
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "xvmuldp 50, 42, 32 \n\t"
+- "xvmuldp 51, 43, 32 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "xvmuldp 52, 44, 32 \n\t"
+- "xvmuldp 53, 45, 32 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "xvmuldp 54, 46, 32 \n\t"
+- "xvmuldp 55, 47, 32 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "stxvd2x 48, 0, %1 \n\t"
+- "stxvd2x 49, %5, %1 \n\t"
+- "stxvd2x 50, %6, %1 \n\t"
+- "stxvd2x 51, %7, %1 \n\t"
+- "stxvd2x 52, %8, %1 \n\t"
+- "stxvd2x 53, %9, %1 \n\t"
+- "stxvd2x 54, %10, %1 \n\t"
+- "stxvd2x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmuldp 48, 40, 32 \n\t"
+- "xvmuldp 49, 41, 32 \n\t"
+- "xvmuldp 50, 42, 32 \n\t"
+- "xvmuldp 51, 43, 32 \n\t"
+- "xvmuldp 52, 44, 32 \n\t"
+- "xvmuldp 53, 45, 32 \n\t"
+- "xvmuldp 54, 46, 32 \n\t"
+- "xvmuldp 55, 47, 32 \n\t"
+-
+- "stxvd2x 48, 0, %1 \n\t"
+- "stxvd2x 49, %5, %1 \n\t"
+- "stxvd2x 50, %6, %1 \n\t"
+- "stxvd2x 51, %7, %1 \n\t"
+- "stxvd2x 52, %8, %1 \n\t"
+- "stxvd2x 53, %9, %1 \n\t"
+- "stxvd2x 54, %10, %1 \n\t"
+- "stxvd2x 55, %11, %1 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (x2), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
+-static void dscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) __attribute__ ((noinline));
+-
+-static void dscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xxspltd %x3, %x3, 0 \n\t"
++
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %4, %2 \n\t"
++ "lxvd2x 34, %5, %2 \n\t"
++ "lxvd2x 35, %6, %2 \n\t"
++ "lxvd2x 36, %7, %2 \n\t"
++ "lxvd2x 37, %8, %2 \n\t"
++ "lxvd2x 38, %9, %2 \n\t"
++ "lxvd2x 39, %10, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmuldp 40, 32, %x3 \n\t"
++ "xvmuldp 41, 33, %x3 \n\t"
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %4, %2 \n\t"
++ "xvmuldp 42, 34, %x3 \n\t"
++ "xvmuldp 43, 35, %x3 \n\t"
++ "lxvd2x 34, %5, %2 \n\t"
++ "lxvd2x 35, %6, %2 \n\t"
++ "xvmuldp 44, 36, %x3 \n\t"
++ "xvmuldp 45, 37, %x3 \n\t"
++ "lxvd2x 36, %7, %2 \n\t"
++ "lxvd2x 37, %8, %2 \n\t"
++ "xvmuldp 46, 38, %x3 \n\t"
++ "xvmuldp 47, 39, %x3 \n\t"
++ "lxvd2x 38, %9, %2 \n\t"
++ "lxvd2x 39, %10, %2 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "stxvd2x 40, 0, %2 \n\t"
++ "stxvd2x 41, %4, %2 \n\t"
++ "stxvd2x 42, %5, %2 \n\t"
++ "stxvd2x 43, %6, %2 \n\t"
++ "stxvd2x 44, %7, %2 \n\t"
++ "stxvd2x 45, %8, %2 \n\t"
++ "stxvd2x 46, %9, %2 \n\t"
++ "stxvd2x 47, %10, %2 \n\t"
++
++ "addi %2, %2, 256 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmuldp 40, 32, %x3 \n\t"
++ "xvmuldp 41, 33, %x3 \n\t"
++ "xvmuldp 42, 34, %x3 \n\t"
++ "xvmuldp 43, 35, %x3 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "xvmuldp 44, 36, %x3 \n\t"
++ "xvmuldp 45, 37, %x3 \n\t"
++ "xvmuldp 46, 38, %x3 \n\t"
++ "xvmuldp 47, 39, %x3 \n\t"
++
++ "stxvd2x 40, 0, %2 \n\t"
++ "stxvd2x 41, %4, %2 \n\t"
++ "stxvd2x 42, %5, %2 \n\t"
++ "stxvd2x 43, %6, %2 \n\t"
++ "stxvd2x 44, %7, %2 \n\t"
++ "stxvd2x 45, %8, %2 \n\t"
++ "stxvd2x 46, %9, %2 \n\t"
++ "stxvd2x 47, %10, %2 \n"
++
++ "#n=%1 alpha=%3 x=%0=%2 o16=%4 o32=%5 o48=%6 o64=%7 o80=%8 o96=%9 o112=%10"
++ :
++ "+m" (*x),
++ "+r" (n), // 1
++ "+b" (x) // 2
++ :
++ "d" (alpha), // 3
++ "b" (16), // 4
++ "b" (32), // 5
++ "b" (48), // 6
++ "b" (64), // 7
++ "b" (80), // 8
++ "b" (96), // 9
++ "b" (112) // 10
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
++
++
++static void dscal_kernel_8_zero (long n, double *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *x2=x+1;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "xxlxor 32 , 32 , 32 \n\t"
+- "addi %1, %1, -8 \n\t"
+-
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvd2x 32, 0, %1 \n\t"
+- "stxvd2x 32, %5, %1 \n\t"
+- "stxvd2x 32, %6, %1 \n\t"
+- "stxvd2x 32, %7, %1 \n\t"
+- "stxvd2x 32, %8, %1 \n\t"
+- "stxvd2x 32, %9, %1 \n\t"
+- "stxvd2x 32, %10, %1 \n\t"
+- "stxvd2x 32, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (x2), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __vector double t0;
++
++ __asm__
++ (
++ "xxlxor %x3, %x3, %x3 \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvd2x %x3, 0, %2 \n\t"
++ "stxvd2x %x3, %4, %2 \n\t"
++ "stxvd2x %x3, %5, %2 \n\t"
++ "stxvd2x %x3, %6, %2 \n\t"
++ "stxvd2x %x3, %7, %2 \n\t"
++ "stxvd2x %x3, %8, %2 \n\t"
++ "stxvd2x %x3, %9, %2 \n\t"
++ "stxvd2x %x3, %10, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "bgt 1b \n"
++
++ "#n=%1 x=%0=%2 t0=%x3 o16=%4 o32=%5 o48=%6 o64=%7 o80=%8 o96=%9 o112=%10"
++ :
++ "=m" (*x),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0) // 3
++ :
++ "b" (16), // 4
++ "b" (32), // 5
++ "b" (48), // 6
++ "b" (64), // 7
++ "b" (80), // 8
++ "b" (96), // 9
++ "b" (112) // 10
++ :
++ "cr0"
++ );
++}
+diff --git a/kernel/power/dswap_microk_power8.c b/kernel/power/dswap_microk_power8.c
+index 77747c3b9..31eff3449 100644
+--- a/kernel/power/dswap_microk_power8.c
++++ b/kernel/power/dswap_microk_power8.c
+@@ -35,146 +35,124 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void dswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void dswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void dswap_kernel_32 (long n, double *x, double *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "addi %3, %3, -8 \n\t"
+- "addi %4, %4, -8 \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "lxvd2x 32, 0, %2 \n\t"
+- "lxvd2x 33, %5, %2 \n\t"
+- "lxvd2x 34, %6, %2 \n\t"
+- "lxvd2x 35, %7, %2 \n\t"
+- "lxvd2x 36, %8, %2 \n\t"
+- "lxvd2x 37, %9, %2 \n\t"
+- "lxvd2x 38, %10, %2 \n\t"
+- "lxvd2x 39, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 48, 0, %1 \n\t"
+- "lxvd2x 49, %5, %1 \n\t"
+- "lxvd2x 50, %6, %1 \n\t"
+- "lxvd2x 51, %7, %1 \n\t"
+- "lxvd2x 52, %8, %1 \n\t"
+- "lxvd2x 53, %9, %1 \n\t"
+- "lxvd2x 54, %10, %1 \n\t"
+- "lxvd2x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "lxvd2x 56, 0, %1 \n\t"
+- "lxvd2x 57, %5, %1 \n\t"
+- "lxvd2x 58, %6, %1 \n\t"
+- "lxvd2x 59, %7, %1 \n\t"
+- "lxvd2x 60, %8, %1 \n\t"
+- "lxvd2x 61, %9, %1 \n\t"
+- "lxvd2x 62, %10, %1 \n\t"
+- "lxvd2x 63, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvd2x 32, 0, %3 \n\t"
+- "stxvd2x 33, %5, %3 \n\t"
+- "stxvd2x 34, %6, %3 \n\t"
+- "stxvd2x 35, %7, %3 \n\t"
+- "stxvd2x 36, %8, %3 \n\t"
+- "stxvd2x 37, %9, %3 \n\t"
+- "stxvd2x 38, %10, %3 \n\t"
+- "stxvd2x 39, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvd2x 40, 0, %3 \n\t"
+- "stxvd2x 41, %5, %3 \n\t"
+- "stxvd2x 42, %6, %3 \n\t"
+- "stxvd2x 43, %7, %3 \n\t"
+- "stxvd2x 44, %8, %3 \n\t"
+- "stxvd2x 45, %9, %3 \n\t"
+- "stxvd2x 46, %10, %3 \n\t"
+- "stxvd2x 47, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvd2x 48, 0, %4 \n\t"
+- "stxvd2x 49, %5, %4 \n\t"
+- "stxvd2x 50, %6, %4 \n\t"
+- "stxvd2x 51, %7, %4 \n\t"
+- "stxvd2x 52, %8, %4 \n\t"
+- "stxvd2x 53, %9, %4 \n\t"
+- "stxvd2x 54, %10, %4 \n\t"
+- "stxvd2x 55, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "stxvd2x 56, 0, %4 \n\t"
+- "stxvd2x 57, %5, %4 \n\t"
+- "stxvd2x 58, %6, %4 \n\t"
+- "stxvd2x 59, %7, %4 \n\t"
+- "stxvd2x 60, %8, %4 \n\t"
+- "stxvd2x 61, %9, %4 \n\t"
+- "stxvd2x 62, %10, %4 \n\t"
+- "stxvd2x 63, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (y2), // 3
+- "r" (x2), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "%3", "%4", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "lxvd2x 32, 0, %4 \n\t"
++ "lxvd2x 33, %5, %4 \n\t"
++ "lxvd2x 34, %6, %4 \n\t"
++ "lxvd2x 35, %7, %4 \n\t"
++ "lxvd2x 36, %8, %4 \n\t"
++ "lxvd2x 37, %9, %4 \n\t"
++ "lxvd2x 38, %10, %4 \n\t"
++ "lxvd2x 39, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "lxvd2x 40, 0, %4 \n\t"
++ "lxvd2x 41, %5, %4 \n\t"
++ "lxvd2x 42, %6, %4 \n\t"
++ "lxvd2x 43, %7, %4 \n\t"
++ "lxvd2x 44, %8, %4 \n\t"
++ "lxvd2x 45, %9, %4 \n\t"
++ "lxvd2x 46, %10, %4 \n\t"
++ "lxvd2x 47, %11, %4 \n\t"
++
++ "addi %4, %4, -128 \n\t"
++
++ "lxvd2x 48, 0, %3 \n\t"
++ "lxvd2x 49, %5, %3 \n\t"
++ "lxvd2x 50, %6, %3 \n\t"
++ "lxvd2x 51, %7, %3 \n\t"
++ "lxvd2x 0, %8, %3 \n\t"
++ "lxvd2x 1, %9, %3 \n\t"
++ "lxvd2x 2, %10, %3 \n\t"
++ "lxvd2x 3, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "lxvd2x 4, 0, %3 \n\t"
++ "lxvd2x 5, %5, %3 \n\t"
++ "lxvd2x 6, %6, %3 \n\t"
++ "lxvd2x 7, %7, %3 \n\t"
++ "lxvd2x 8, %8, %3 \n\t"
++ "lxvd2x 9, %9, %3 \n\t"
++ "lxvd2x 10, %10, %3 \n\t"
++ "lxvd2x 11, %11, %3 \n\t"
++
++ "addi %3, %3, -128 \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 48, 0, %4 \n\t"
++ "stxvd2x 49, %5, %4 \n\t"
++ "stxvd2x 50, %6, %4 \n\t"
++ "stxvd2x 51, %7, %4 \n\t"
++ "stxvd2x 0, %8, %4 \n\t"
++ "stxvd2x 1, %9, %4 \n\t"
++ "stxvd2x 2, %10, %4 \n\t"
++ "stxvd2x 3, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "stxvd2x 4, 0, %4 \n\t"
++ "stxvd2x 5, %5, %4 \n\t"
++ "stxvd2x 6, %6, %4 \n\t"
++ "stxvd2x 7, %7, %4 \n\t"
++ "stxvd2x 8, %8, %4 \n\t"
++ "stxvd2x 9, %9, %4 \n\t"
++ "stxvd2x 10, %10, %4 \n\t"
++ "stxvd2x 11, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "addic. %2, %2, -32 \n\t"
++ "bgt 1b \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y) // 4
++ :
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51","vs0","vs1","vs2","vs3",
++ "vs4","vs5","vs6","vs7","vs8","vs9","vs10","vs11"
++ );
++}
+diff --git a/kernel/power/sasum.c b/kernel/power/sasum.c
+index 43311f2ba..fb10b1d27 100644
+--- a/kernel/power/sasum.c
++++ b/kernel/power/sasum.c
+@@ -38,7 +38,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #if defined(DOUBLE)
+
+-#define ABS fabs
++#error supports float only
+
+ #else
+
+@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_32
+
+-static void sasum_kernel_32(BLASLONG n, FLOAT *x1, FLOAT *svec)
++static FLOAT sasum_kernel_32(BLASLONG n, FLOAT *x1)
+ {
+
+ BLASLONG i=0;
+@@ -92,11 +92,7 @@ static void sasum_kernel_32(BLASLONG n, FLOAT *x1, FLOAT *svec)
+
+ }
+
+- svec[0] = sum0+sum1+sum2+sum3;
+- svec[1] = 0.0;
+- svec[2] = 0.0;
+- svec[3] = 0.0;
+-
++ return sum0+sum1+sum2+sum3;
+ }
+
+ #endif
+@@ -105,7 +101,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ {
+ BLASLONG i=0;
+ FLOAT sumf = 0.0;
+- FLOAT svec[4] __attribute__ ((aligned (16)));;
+ BLASLONG n1;
+
+ if (n <= 0 || inc_x <= 0) return(sumf);
+@@ -117,8 +112,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ if ( n1 > 0 )
+ {
+
+- sasum_kernel_32(n1, x, svec);
+- sumf = svec[0] + svec[1]+svec[2]+svec[3];
++ sumf = sasum_kernel_32(n1, x);
+ i=n1;
+ }
+
+diff --git a/kernel/power/sasum_microk_power8.c b/kernel/power/sasum_microk_power8.c
+index 847fffe04..25a969d62 100644
+--- a/kernel/power/sasum_microk_power8.c
++++ b/kernel/power/sasum_microk_power8.c
+@@ -34,144 +34,145 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_32 1
+-static void sasum_kernel_32( BLASLONG n, FLOAT *x, FLOAT *svec) __attribute__ ((noinline));
+
+-static void sasum_kernel_32( BLASLONG n, FLOAT *x, FLOAT *svec)
++static float sasum_kernel_32 (long n, float *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xvabssp 48, 40 \n\t"
+- "xvabssp 49, 41 \n\t"
+- "xvabssp 50, 42 \n\t"
+- "xvabssp 51, 43 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+-
+- "xvabssp 52, 44 \n\t"
+- "xvabssp 53, 45 \n\t"
+-
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+-
+- "xvabssp 54, 46 \n\t"
+- "xvabssp 55, 47 \n\t"
+-
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+-
+- "xvaddsp 32, 32, 48 \n\t"
+- "xvaddsp 33, 33, 49 \n\t"
+-
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "xvaddsp 34, 34, 50 \n\t"
+- "xvaddsp 35, 35, 51 \n\t"
+- "addi %2, %2, 128 \n\t"
+- "xvaddsp 36, 36, 52 \n\t"
+- "xvaddsp 37, 37, 53 \n\t"
+- "addic. %0 , %0 , -32 \n\t"
+- "xvaddsp 38, 38, 54 \n\t"
+- "xvaddsp 39, 39, 55 \n\t"
+-
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+-
+- "xvabssp 48, 40 \n\t"
+- "xvabssp 49, 41 \n\t"
+- "xvabssp 50, 42 \n\t"
+- "xvabssp 51, 43 \n\t"
+- "xvabssp 52, 44 \n\t"
+- "xvabssp 53, 45 \n\t"
+- "xvabssp 54, 46 \n\t"
+- "xvabssp 55, 47 \n\t"
+-
+- "xvaddsp 32, 32, 48 \n\t"
+- "xvaddsp 33, 33, 49 \n\t"
+- "xvaddsp 34, 34, 50 \n\t"
+- "xvaddsp 35, 35, 51 \n\t"
+- "xvaddsp 36, 36, 52 \n\t"
+- "xvaddsp 37, 37, 53 \n\t"
+- "xvaddsp 38, 38, 54 \n\t"
+- "xvaddsp 39, 39, 55 \n\t"
+-
+- "xvaddsp 32, 32, 33 \n\t"
+- "xvaddsp 34, 34, 35 \n\t"
+- "xvaddsp 36, 36, 37 \n\t"
+- "xvaddsp 38, 38, 39 \n\t"
+-
+- "xvaddsp 32, 32, 34 \n\t"
+- "xvaddsp 36, 36, 38 \n\t"
+-
+- "xvaddsp 32, 32, 36 \n\t"
+-
+-
+- "stxvw4x 32, 0, %3 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (svec), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2", "memory"
+- );
+-
+-}
+-
+-
++ float sum;
++ __vector float t0;
++ __vector float t1;
++ __vector float t2;
++ __vector float t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %8, %2 \n\t"
++ "lxvw4x 42, %9, %2 \n\t"
++ "lxvw4x 43, %10, %2 \n\t"
++ "lxvw4x 44, %11, %2 \n\t"
++ "lxvw4x 45, %12, %2 \n\t"
++ "lxvw4x 46, %13, %2 \n\t"
++ "lxvw4x 47, %14, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvabssp 48, 40 \n\t"
++ "xvabssp 49, 41 \n\t"
++ "xvabssp 50, 42 \n\t"
++ "xvabssp 51, 43 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %8, %2 \n\t"
++
++ "xvabssp %x3, 44 \n\t"
++ "xvabssp %x4, 45 \n\t"
++
++ "lxvw4x 42, %9, %2 \n\t"
++ "lxvw4x 43, %10, %2 \n\t"
++
++ "xvabssp %x5, 46 \n\t"
++ "xvabssp %x6, 47 \n\t"
++
++ "lxvw4x 44, %11, %2 \n\t"
++ "lxvw4x 45, %12, %2 \n\t"
++
++ "xvaddsp 32, 32, 48 \n\t"
++ "xvaddsp 33, 33, 49 \n\t"
++
++ "lxvw4x 46, %13, %2 \n\t"
++ "lxvw4x 47, %14, %2 \n\t"
++
++ "xvaddsp 34, 34, 50 \n\t"
++ "xvaddsp 35, 35, 51 \n\t"
++ "addi %2, %2, 128 \n\t"
++ "xvaddsp 36, 36, %x3 \n\t"
++ "xvaddsp 37, 37, %x4 \n\t"
++ "addic. %1, %1, -32 \n\t"
++ "xvaddsp 38, 38, %x5 \n\t"
++ "xvaddsp 39, 39, %x6 \n\t"
++
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvabssp 48, 40 \n\t"
++ "xvabssp 49, 41 \n\t"
++ "xvabssp 50, 42 \n\t"
++ "xvabssp 51, 43 \n\t"
++ "xvabssp %x3, 44 \n\t"
++ "xvabssp %x4, 45 \n\t"
++ "xvabssp %x5, 46 \n\t"
++ "xvabssp %x6, 47 \n\t"
++
++ "xvaddsp 32, 32, 48 \n\t"
++ "xvaddsp 33, 33, 49 \n\t"
++ "xvaddsp 34, 34, 50 \n\t"
++ "xvaddsp 35, 35, 51 \n\t"
++ "xvaddsp 36, 36, %x3 \n\t"
++ "xvaddsp 37, 37, %x4 \n\t"
++ "xvaddsp 38, 38, %x5 \n\t"
++ "xvaddsp 39, 39, %x6 \n\t"
++
++ "xvaddsp 32, 32, 33 \n\t"
++ "xvaddsp 34, 34, 35 \n\t"
++ "xvaddsp 36, 36, 37 \n\t"
++ "xvaddsp 38, 38, 39 \n\t"
++
++ "xvaddsp 32, 32, 34 \n\t"
++ "xvaddsp 36, 36, 38 \n\t"
++
++ "xvaddsp 32, 32, 36 \n\t"
++
++ "xxsldwi 33, 32, 32, 2 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xxsldwi 33, 32, 32, 1 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xscvspdp %0, 32 \n"
++
++ "#n=%1 x=%3=%2 sum=%0 o16=%8 o32=%9 o48=%10 o64=%11 o80=%12 o96=%13 o112=%14\n"
++ "#t0=%x3 t1=%x4 t2=%x5 t3=%x6"
++ :
++ "=f" (sum), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0), // 3
++ "=wa" (t1), // 4
++ "=wa" (t2), // 5
++ "=wa" (t3) // 6
++ :
++ "m" (*x),
++ "b" (16), // 8
++ "b" (32), // 9
++ "b" (48), // 10
++ "b" (64), // 11
++ "b" (80), // 12
++ "b" (96), // 13
++ "b" (112) // 14
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return sum;
++}
+diff --git a/kernel/power/scopy_microk_power8.c b/kernel/power/scopy_microk_power8.c
+index 2e08e3561..444a6d4d5 100644
+--- a/kernel/power/scopy_microk_power8.c
++++ b/kernel/power/scopy_microk_power8.c
+@@ -35,97 +35,78 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void scopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void scopy_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void scopy_kernel_32 (long n, float *x, float *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvw4x 40, 0, %1 \n\t"
+- "stxvw4x 41, %5, %1 \n\t"
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "stxvw4x 42, %6, %1 \n\t"
+- "stxvw4x 43, %7, %1 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "stxvw4x 44, %8, %1 \n\t"
+- "stxvw4x 45, %9, %1 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "stxvw4x 46, %10, %1 \n\t"
+- "stxvw4x 47, %11, %1 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "stxvw4x 40, 0, %1 \n\t"
+- "stxvw4x 41, %5, %1 \n\t"
+- "stxvw4x 42, %6, %1 \n\t"
+- "stxvw4x 43, %7, %1 \n\t"
+- "stxvw4x 44, %8, %1 \n\t"
+- "stxvw4x 45, %9, %1 \n\t"
+- "stxvw4x 46, %10, %1 \n\t"
+- "stxvw4x 47, %11, %1 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %5, %2 \n\t"
++ "lxvw4x 42, %6, %2 \n\t"
++ "lxvw4x 43, %7, %2 \n\t"
++ "lxvw4x 44, %8, %2 \n\t"
++ "lxvw4x 45, %9, %2 \n\t"
++ "lxvw4x 46, %10, %2 \n\t"
++ "lxvw4x 47, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvw4x 40, 0, %3 \n\t"
++ "stxvw4x 41, %5, %3 \n\t"
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 41, %5, %2 \n\t"
++ "stxvw4x 42, %6, %3 \n\t"
++ "stxvw4x 43, %7, %3 \n\t"
++ "lxvw4x 42, %6, %2 \n\t"
++ "lxvw4x 43, %7, %2 \n\t"
++ "stxvw4x 44, %8, %3 \n\t"
++ "stxvw4x 45, %9, %3 \n\t"
++ "lxvw4x 44, %8, %2 \n\t"
++ "lxvw4x 45, %9, %2 \n\t"
++ "stxvw4x 46, %10, %3 \n\t"
++ "stxvw4x 47, %11, %3 \n\t"
++ "lxvw4x 46, %10, %2 \n\t"
++ "lxvw4x 47, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "stxvw4x 40, 0, %3 \n\t"
++ "stxvw4x 41, %5, %3 \n\t"
++ "stxvw4x 42, %6, %3 \n\t"
++ "stxvw4x 43, %7, %3 \n\t"
++ "stxvw4x 44, %8, %3 \n\t"
++ "stxvw4x 45, %9, %3 \n\t"
++ "stxvw4x 46, %10, %3 \n\t"
++ "stxvw4x 47, %11, %3 \n"
++
++ "#n=%1 x=%4=%2 y=%0=%3 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "=m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y) // 3
++ :
++ "m" (*x),
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/sdot.c b/kernel/power/sdot.c
+index 52fb1fe24..31f473485 100644
+--- a/kernel/power/sdot.c
++++ b/kernel/power/sdot.c
+@@ -42,7 +42,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_16
+
+-static void sdot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
++static FLOAT sdot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y)
+ {
+ BLASLONG register i = 0;
+ FLOAT dot = 0.0;
+@@ -61,8 +61,7 @@ static void sdot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
+ i+=8 ;
+
+ }
+- *d += dot;
+-
++ return dot;
+ }
+
+ #endif
+@@ -82,8 +81,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
+ BLASLONG n1 = n & -32;
+
+ if ( n1 )
+- sdot_kernel_16(n1, x, y , &dot );
+-
++ dot = sdot_kernel_16(n1, x, y);
+
+ i = n1;
+ while(i < n)
+diff --git a/kernel/power/sdot_microk_power8.c b/kernel/power/sdot_microk_power8.c
+index 6dd588acd..7f7ccfac3 100644
+--- a/kernel/power/sdot_microk_power8.c
++++ b/kernel/power/sdot_microk_power8.c
+@@ -34,146 +34,142 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_16 1
+-static void sdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y , FLOAT *dot) __attribute__ ((noinline));
+
+-static void sdot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
++static float sdot_kernel_16 (long n, float *x, float *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+- FLOAT tempdot[4];
+-
+-
+- __asm__ __volatile__
+- (
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "dcbt %2, %12 \n\t"
+- "dcbt %3, %12 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 48, 0, %3 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 49, %5, %3 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 50, %6, %3 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 51, %7, %3 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 52, %8, %3 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 53, %9, %3 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 54, %10, %3 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+- "lxvw4x 55, %11, %3 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+- "addi %3, %3, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %12 \n\t"
+- "dcbt %3, %12 \n\t"
+-
+- "xvmaddasp 32, 40, 48 \n\t"
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 48, 0, %3 \n\t"
+- "xvmaddasp 33, 41, 49 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 49, %5, %3 \n\t"
+- "xvmaddasp 34, 42, 50 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 50, %6, %3 \n\t"
+- "xvmaddasp 35, 43, 51 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 51, %7, %3 \n\t"
+- "xvmaddasp 36, 44, 52 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 52, %8, %3 \n\t"
+- "xvmaddasp 37, 45, 53 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 53, %9, %3 \n\t"
+- "xvmaddasp 38, 46, 54 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 54, %10, %3 \n\t"
+- "xvmaddasp 39, 47, 55 \n\t"
+-
+- "lxvw4x 47, %11, %2 \n\t"
+- "lxvw4x 55, %11, %3 \n\t"
+-
+-
+- "addi %2, %2, 128 \n\t"
+- "addi %3, %3, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmaddasp 32, 40, 48 \n\t"
+- "xvmaddasp 33, 41, 49 \n\t"
+- "xvmaddasp 34, 42, 50 \n\t"
+- "xvmaddasp 35, 43, 51 \n\t"
+- "xvmaddasp 36, 44, 52 \n\t"
+- "xvmaddasp 37, 45, 53 \n\t"
+- "xvmaddasp 38, 46, 54 \n\t"
+- "xvmaddasp 39, 47, 55 \n\t"
+-
+- "xvaddsp 32, 32 , 33 \n\t"
+- "xvaddsp 34, 34 , 35 \n\t"
+- "xvaddsp 36, 36 , 37 \n\t"
+- "xvaddsp 38, 38 , 39 \n\t"
+-
+- "xvaddsp 32, 32 , 34 \n\t"
+- "xvaddsp 36, 36 , 38 \n\t"
+-
+- "xvaddsp 32, 32 , 36 \n\t"
+-
+- "stxvw4x 32, 0 , %4 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (y1), // 3
+- "r" (tempdot), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112), // 11
+- "r" (pre) // 12
+- : "cr0", "%0", "%2" , "%3", "memory"
+- );
+-
+- *dot = tempdot[0] + tempdot[1] + tempdot[2] + tempdot[3];
+-
+-
+-}
+-
+-
++ float dot;
++ __vector float t0;
++ __vector float t1;
++ __vector float t2;
++ __vector float t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++ "dcbt 0, %3 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 48, 0, %3 \n\t"
++ "lxvw4x 41, %10, %2 \n\t"
++ "lxvw4x 49, %10, %3 \n\t"
++ "lxvw4x 42, %11, %2 \n\t"
++ "lxvw4x 50, %11, %3 \n\t"
++ "lxvw4x 43, %12, %2 \n\t"
++ "lxvw4x 51, %12, %3 \n\t"
++ "lxvw4x 44, %13, %2 \n\t"
++ "lxvw4x %x4, %13, %3 \n\t"
++ "lxvw4x 45, %14, %2 \n\t"
++ "lxvw4x %x5, %14, %3 \n\t"
++ "lxvw4x 46, %15, %2 \n\t"
++ "lxvw4x %x6, %15, %3 \n\t"
++ "lxvw4x 47, %16, %2 \n\t"
++ "lxvw4x %x7, %16, %3 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmaddasp 32, 40, 48 \n\t"
++ "lxvw4x 40, 0, %2 \n\t"
++ "lxvw4x 48, 0, %3 \n\t"
++ "xvmaddasp 33, 41, 49 \n\t"
++ "lxvw4x 41, %10, %2 \n\t"
++ "lxvw4x 49, %10, %3 \n\t"
++ "xvmaddasp 34, 42, 50 \n\t"
++ "lxvw4x 42, %11, %2 \n\t"
++ "lxvw4x 50, %11, %3 \n\t"
++ "xvmaddasp 35, 43, 51 \n\t"
++ "lxvw4x 43, %12, %2 \n\t"
++ "lxvw4x 51, %12, %3 \n\t"
++ "xvmaddasp 36, 44, %x4 \n\t"
++ "lxvw4x 44, %13, %2 \n\t"
++ "lxvw4x %x4, %13, %3 \n\t"
++ "xvmaddasp 37, 45, %x5 \n\t"
++ "lxvw4x 45, %14, %2 \n\t"
++ "lxvw4x %x5, %14, %3 \n\t"
++ "xvmaddasp 38, 46, %x6 \n\t"
++ "lxvw4x 46, %15, %2 \n\t"
++ "lxvw4x %x6, %15, %3 \n\t"
++ "xvmaddasp 39, 47, %x7 \n\t"
++ "lxvw4x 47, %16, %2 \n\t"
++ "lxvw4x %x7, %16, %3 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++ "addi %3, %3, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmaddasp 32, 40, 48 \n\t"
++ "xvmaddasp 33, 41, 49 \n\t"
++ "xvmaddasp 34, 42, 50 \n\t"
++ "xvmaddasp 35, 43, 51 \n\t"
++ "xvmaddasp 36, 44, %x4 \n\t"
++ "xvmaddasp 37, 45, %x5 \n\t"
++ "xvmaddasp 38, 46, %x6 \n\t"
++ "xvmaddasp 39, 47, %x7 \n\t"
++
++ "xvaddsp 32, 32, 33 \n\t"
++ "xvaddsp 34, 34, 35 \n\t"
++ "xvaddsp 36, 36, 37 \n\t"
++ "xvaddsp 38, 38, 39 \n\t"
++
++ "xvaddsp 32, 32, 34 \n\t"
++ "xvaddsp 36, 36, 38 \n\t"
++
++ "xvaddsp 32, 32, 36 \n\t"
++
++ "xxsldwi 33, 32, 32, 2 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xxsldwi 33, 32, 32, 1 \n\t"
++ "xvaddsp 32, 32, 33 \n\t"
++
++ "xscvspdp %x0, 32 \n"
++
++ "#dot=%0 n=%1 x=%8=%2 y=%9=%3 o16=%10 o32=%11 o48=%12 o64=%13 o80=%14 o96=%15 o122=%16\n"
++ "#t0=%x4 t1=%x5 t2=%x6 t3=%x7"
++ :
++ "=f" (dot), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y), // 3
++ "=wa" (t0), // 4
++ "=wa" (t1), // 5
++ "=wa" (t2), // 6
++ "=wa" (t3) // 7
++ :
++ "m" (*x),
++ "m" (*y),
++ "b" (16), // 10
++ "b" (32), // 11
++ "b" (48), // 12
++ "b" (64), // 13
++ "b" (80), // 14
++ "b" (96), // 15
++ "b" (112) // 16
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return dot;
++}
+diff --git a/kernel/power/srot.c b/kernel/power/srot.c
+index d464846a4..d2910ff87 100644
+--- a/kernel/power/srot.c
++++ b/kernel/power/srot.c
+@@ -46,7 +46,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_16
+
+-static void srot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
++static void srot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT c, FLOAT s)
+ {
+
+ BLASLONG i=0;
+@@ -56,8 +56,6 @@ static void srot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
+ FLOAT y00, y01, y02, y03;
+ FLOAT *x1=x;
+ FLOAT *y1=y;
+- FLOAT c1=*c;
+- FLOAT s1=*s;
+
+ while ( i<n )
+ {
+@@ -71,14 +69,14 @@ static void srot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
+ x03 = x1[3];
+ y03 = y1[3];
+
+- f0 = c1*x00 + s1*y00;
+- g0 = c1*y00 - s1*x00;
+- f1 = c1*x01 + s1*y01;
+- g1 = c1*y01 - s1*x01;
+- f2 = c1*x02 + s1*y02;
+- g2 = c1*y02 - s1*x02;
+- f3 = c1*x03 + s1*y03;
+- g3 = c1*y03 - s1*x03;
++ f0 = c*x00 + s*y00;
++ g0 = c*y00 - s*x00;
++ f1 = c*x01 + s*y01;
++ g1 = c*y01 - s*x01;
++ f2 = c*x02 + s*y02;
++ g2 = c*y02 - s*x02;
++ f3 = c*x03 + s*y03;
++ g3 = c*y03 - s*x03;
+
+ x1[0] = f0;
+ y1[0] = g0;
+@@ -106,8 +104,6 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
+ {
+ BLASLONG i=0;
+ BLASLONG ix=0,iy=0;
+- FLOAT c1[4] __attribute__ ((aligned (16)));;
+- FLOAT s1[4] __attribute__ ((aligned (16)));;
+ FLOAT *x1=x;
+ FLOAT *y1=y;
+ FLOAT temp;
+@@ -120,15 +116,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
+ BLASLONG n1 = n & -16;
+ if ( n1 > 0 )
+ {
+- c1[0]=c;
+- c1[1]=c;
+- c1[2]=c;
+- c1[3]=c;
+- s1[0]=s;
+- s1[1]=s;
+- s1[2]=s;
+- s1[3]=s;
+- srot_kernel_16(n1, x1, y1, c1, s1);
++ srot_kernel_16(n1, x1, y1, c, s);
+ i=n1;
+ }
+
+diff --git a/kernel/power/srot_microk_power8.c b/kernel/power/srot_microk_power8.c
+index ade65500f..0a18c16e0 100644
+--- a/kernel/power/srot_microk_power8.c
++++ b/kernel/power/srot_microk_power8.c
+@@ -38,171 +38,179 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_16 1
+
+-static void srot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s) __attribute__ ((noinline));
+-
+-static void srot_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *c, FLOAT *s)
++static void srot_kernel_16 (long n, float *x, float *y, float c, float s)
+ {
++ __vector float t0;
++ __vector float t1;
++ __vector float t2;
++ __vector float t3;
++ __vector float t4;
++ __vector float t5;
++ __vector float t6;
++ __vector float t7;
+
++ __asm__
++ (
++ "xscvdpspn 36, %x13 \n\t" // load c to all words
++ "xxspltw 36, 36, 0 \n\t"
+
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvw4x 36 , 0, %3 \n\t" // load c
+- "lxvw4x 37 , 0, %4 \n\t" // load s
+- "addi %8 , %8, -4 \n\t"
+- "addi %9 , %9, -4 \n\t"
+-
+- "lxvw4x 32, 0, %1 \n\t" // load x
+- "lxvw4x 33, %5, %1 \n\t"
+- "lxvw4x 34, %6, %1 \n\t"
+- "lxvw4x 35, %7, %1 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t" // load y
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+-
+- "addi %1, %1, 64 \n\t"
+- "addi %2, %2, 64 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "xvmulsp 48, 32, 36 \n\t" // c * x
+- "xvmulsp 49, 33, 36 \n\t"
+- "xvmulsp 50, 34, 36 \n\t"
+- "xvmulsp 51, 35, 36 \n\t"
+-
+- "xvmulsp 56, 40, 36 \n\t" // c * y
+- "xvmulsp 57, 41, 36 \n\t"
+- "xvmulsp 58, 42, 36 \n\t"
+- "xvmulsp 59, 43, 36 \n\t"
+-
+- "xvmulsp 52, 32, 37 \n\t" // s * x
+- "xvmulsp 53, 33, 37 \n\t"
+-
+- "lxvw4x 32, 0, %1 \n\t" // load x
+- "lxvw4x 33, %5, %1 \n\t"
+-
+- "xvmulsp 54, 34, 37 \n\t"
+- "xvmulsp 55, 35, 37 \n\t"
+-
+- "lxvw4x 34, %6, %1 \n\t"
+- "lxvw4x 35, %7, %1 \n\t"
+-
+- "xvmulsp 60, 40, 37 \n\t" // s * y
+- "xvmulsp 61, 41, 37 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t" // load y
+- "lxvw4x 41, %5, %2 \n\t"
+-
+- "xvmulsp 62, 42, 37 \n\t"
+- "xvmulsp 63, 43, 37 \n\t"
+-
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+-
+- "xvaddsp 48, 48 , 60 \n\t" // c * x + s * y
+- "xvaddsp 49, 49 , 61 \n\t" // c * x + s * y
+-
+- "addi %1, %1, 64 \n\t"
+- "addi %2, %2, 64 \n\t"
+-
+- "xvaddsp 50, 50 , 62 \n\t" // c * x + s * y
+- "xvaddsp 51, 51 , 63 \n\t" // c * x + s * y
+-
+- "xvsubsp 56, 56 , 52 \n\t" // c * y - s * x
+- "xvsubsp 57, 57 , 53 \n\t" // c * y - s * x
+- "xvsubsp 58, 58 , 54 \n\t" // c * y - s * x
+- "xvsubsp 59, 59 , 55 \n\t" // c * y - s * x
+-
+- "stxvw4x 48, 0, %8 \n\t" // store x
+- "stxvw4x 49, %5, %8 \n\t"
+- "stxvw4x 50, %6, %8 \n\t"
+- "stxvw4x 51, %7, %8 \n\t"
+-
+- "stxvw4x 56, 0, %9 \n\t" // store y
+- "stxvw4x 57, %5, %9 \n\t"
+- "stxvw4x 58, %6, %9 \n\t"
+- "stxvw4x 59, %7, %9 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+- "addi %9, %9, 64 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmulsp 48, 32, 36 \n\t" // c * x
+- "xvmulsp 49, 33, 36 \n\t"
+- "xvmulsp 50, 34, 36 \n\t"
+- "xvmulsp 51, 35, 36 \n\t"
+-
+- "xvmulsp 56, 40, 36 \n\t" // c * y
+- "xvmulsp 57, 41, 36 \n\t"
+- "xvmulsp 58, 42, 36 \n\t"
+- "xvmulsp 59, 43, 36 \n\t"
+-
+- "xvmulsp 52, 32, 37 \n\t" // s * x
+- "xvmulsp 53, 33, 37 \n\t"
+- "xvmulsp 54, 34, 37 \n\t"
+- "xvmulsp 55, 35, 37 \n\t"
+-
+- "xvmulsp 60, 40, 37 \n\t" // s * y
+- "xvmulsp 61, 41, 37 \n\t"
+- "xvmulsp 62, 42, 37 \n\t"
+- "xvmulsp 63, 43, 37 \n\t"
+-
+- "xvaddsp 48, 48 , 60 \n\t" // c * x + s * y
+- "xvaddsp 49, 49 , 61 \n\t" // c * x + s * y
+- "xvaddsp 50, 50 , 62 \n\t" // c * x + s * y
+- "xvaddsp 51, 51 , 63 \n\t" // c * x + s * y
+-
+- "xvsubsp 56, 56 , 52 \n\t" // c * y - s * x
+- "xvsubsp 57, 57 , 53 \n\t" // c * y - s * x
+- "xvsubsp 58, 58 , 54 \n\t" // c * y - s * x
+- "xvsubsp 59, 59 , 55 \n\t" // c * y - s * x
++ "xscvdpspn 37, %x14 \n\t" // load s to all words
++ "xxspltw 37, 37, 0 \n\t"
+
+- "stxvw4x 48, 0, %8 \n\t" // store x
+- "stxvw4x 49, %5, %8 \n\t"
+- "stxvw4x 50, %6, %8 \n\t"
+- "stxvw4x 51, %7, %8 \n\t"
++ "lxvw4x 32, 0, %3 \n\t" // load x
++ "lxvw4x 33, %15, %3 \n\t"
++ "lxvw4x 34, %16, %3 \n\t"
++ "lxvw4x 35, %17, %3 \n\t"
+
+- "stxvw4x 56, 0, %9 \n\t" // store y
+- "stxvw4x 57, %5, %9 \n\t"
+- "stxvw4x 58, %6, %9 \n\t"
+- "stxvw4x 59, %7, %9 \n\t"
++ "lxvw4x 48, 0, %4 \n\t" // load y
++ "lxvw4x 49, %15, %4 \n\t"
++ "lxvw4x 50, %16, %4 \n\t"
++ "lxvw4x 51, %17, %4 \n\t"
+
++ "addi %3, %3, 64 \n\t"
++ "addi %4, %4, 64 \n\t"
+
++ "addic. %2, %2, -16 \n\t"
++ "ble 2f \n\t"
+
+- :
+- :
+- "r" (i), // 0
+- "r" (x1), // 1
+- "r" (y1), // 2
+- "r" (c), // 3
+- "r" (s), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (x2), // 8
+- "r" (y2) // 9
+- : "cr0", "%0", "%1" , "%2", "%8", "%9", "memory"
+- );
++ ".p2align 5 \n"
++ "1: \n\t"
+
+-}
++ "xvmulsp 40, 32, 36 \n\t" // c * x
++ "xvmulsp 41, 33, 36 \n\t"
++ "xvmulsp 42, 34, 36 \n\t"
++ "xvmulsp 43, 35, 36 \n\t"
+
++ "xvmulsp %x5, 48, 36 \n\t" // c * y
++ "xvmulsp %x6, 49, 36 \n\t"
++ "xvmulsp %x7, 50, 36 \n\t"
++ "xvmulsp %x8, 51, 36 \n\t"
+
++ "xvmulsp 44, 32, 37 \n\t" // s * x
++ "xvmulsp 45, 33, 37 \n\t"
++
++ "lxvw4x 32, 0, %3 \n\t" // load x
++ "lxvw4x 33, %15, %3 \n\t"
++
++ "xvmulsp 46, 34, 37 \n\t"
++ "xvmulsp 47, 35, 37 \n\t"
++
++ "lxvw4x 34, %16, %3 \n\t"
++ "lxvw4x 35, %17, %3 \n\t"
++
++ "xvmulsp %x9, 48, 37 \n\t" // s * y
++ "xvmulsp %x10, 49, 37 \n\t"
++
++ "lxvw4x 48, 0, %4 \n\t" // load y
++ "lxvw4x 49, %15, %4 \n\t"
++
++ "xvmulsp %x11, 50, 37 \n\t"
++ "xvmulsp %x12, 51, 37 \n\t"
++
++ "lxvw4x 50, %16, %4 \n\t"
++ "lxvw4x 51, %17, %4 \n\t"
++
++ "xvaddsp 40, 40, %x9 \n\t" // c * x + s * y
++ "xvaddsp 41, 41, %x10 \n\t" // c * x + s * y
++
++ "addi %3, %3, -64 \n\t"
++ "addi %4, %4, -64 \n\t"
++
++ "xvaddsp 42, 42, %x11 \n\t" // c * x + s * y
++ "xvaddsp 43, 43, %x12 \n\t" // c * x + s * y
++
++ "xvsubsp %x5, %x5, 44 \n\t" // c * y - s * x
++ "xvsubsp %x6, %x6, 45 \n\t" // c * y - s * x
++ "xvsubsp %x7, %x7, 46 \n\t" // c * y - s * x
++ "xvsubsp %x8, %x8, 47 \n\t" // c * y - s * x
++
++ "stxvw4x 40, 0, %3 \n\t" // store x
++ "stxvw4x 41, %15, %3 \n\t"
++ "stxvw4x 42, %16, %3 \n\t"
++ "stxvw4x 43, %17, %3 \n\t"
++
++ "stxvw4x %x5, 0, %4 \n\t" // store y
++ "stxvw4x %x6, %15, %4 \n\t"
++ "stxvw4x %x7, %16, %4 \n\t"
++ "stxvw4x %x8, %17, %4 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %4, %4, 128 \n\t"
++
++ "addic. %2, %2, -16 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmulsp 40, 32, 36 \n\t" // c * x
++ "xvmulsp 41, 33, 36 \n\t"
++ "xvmulsp 42, 34, 36 \n\t"
++ "xvmulsp 43, 35, 36 \n\t"
++
++ "xvmulsp %x5, 48, 36 \n\t" // c * y
++ "xvmulsp %x6, 49, 36 \n\t"
++ "xvmulsp %x7, 50, 36 \n\t"
++ "xvmulsp %x8, 51, 36 \n\t"
++
++ "xvmulsp 44, 32, 37 \n\t" // s * x
++ "xvmulsp 45, 33, 37 \n\t"
++ "xvmulsp 46, 34, 37 \n\t"
++ "xvmulsp 47, 35, 37 \n\t"
++
++ "xvmulsp %x9, 48, 37 \n\t" // s * y
++ "xvmulsp %x10, 49, 37 \n\t"
++ "xvmulsp %x11, 50, 37 \n\t"
++ "xvmulsp %x12, 51, 37 \n\t"
++
++ "addi %3, %3, -64 \n\t"
++ "addi %4, %4, -64 \n\t"
++
++ "xvaddsp 40, 40, %x9 \n\t" // c * x + s * y
++ "xvaddsp 41, 41, %x10 \n\t" // c * x + s * y
++ "xvaddsp 42, 42, %x11 \n\t" // c * x + s * y
++ "xvaddsp 43, 43, %x12 \n\t" // c * x + s * y
++
++ "xvsubsp %x5, %x5, 44 \n\t" // c * y - s * x
++ "xvsubsp %x6, %x6, 45 \n\t" // c * y - s * x
++ "xvsubsp %x7, %x7, 46 \n\t" // c * y - s * x
++ "xvsubsp %x8, %x8, 47 \n\t" // c * y - s * x
++
++ "stxvw4x 40, 0, %3 \n\t" // store x
++ "stxvw4x 41, %15, %3 \n\t"
++ "stxvw4x 42, %16, %3 \n\t"
++ "stxvw4x 43, %17, %3 \n\t"
++
++ "stxvw4x %x5, 0, %4 \n\t" // store y
++ "stxvw4x %x6, %15, %4 \n\t"
++ "stxvw4x %x7, %16, %4 \n\t"
++ "stxvw4x %x8, %17, %4 \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 c=%13 s=%14 o16=%15 o32=%16 o48=%17\n"
++ "#t0=%x5 t1=%x6 t2=%x7 t3=%x8 t4=%x9 t5=%x10 t6=%x11 t7=%x12"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y), // 4
++ "=wa" (t0), // 5
++ "=wa" (t1), // 6
++ "=wa" (t2), // 7
++ "=wa" (t3), // 8
++ "=wa" (t4), // 9
++ "=wa" (t5), // 10
++ "=wa" (t6), // 11
++ "=wa" (t7) // 12
++ :
++ "f" (c), // 13
++ "f" (s), // 14
++ "b" (16), // 15
++ "b" (32), // 16
++ "b" (48) // 17
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++}
+diff --git a/kernel/power/sscal.c b/kernel/power/sscal.c
+index c6ef5e969..bd5cdc43f 100644
+--- a/kernel/power/sscal.c
++++ b/kernel/power/sscal.c
+@@ -42,11 +42,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #if !defined(HAVE_KERNEL_16)
+
+-static void sscal_kernel_16( BLASLONG n, FLOAT *da , FLOAT *x )
++static void sscal_kernel_16 (BLASLONG n, FLOAT *x, FLOAT alpha)
+ {
+
+ BLASLONG i;
+- FLOAT alpha = *da;
+
+ for( i=0; i<n; i+=8 )
+ {
+@@ -63,7 +62,7 @@ static void sscal_kernel_16( BLASLONG n, FLOAT *da , FLOAT *x )
+
+ }
+
+-static void sscal_kernel_16_zero( BLASLONG n, FLOAT *da , FLOAT *x )
++static void sscal_kernel_16_zero( BLASLONG n, FLOAT *x )
+ {
+
+ BLASLONG i;
+@@ -90,7 +89,6 @@ static void sscal_kernel_16_zero( BLASLONG n, FLOAT *da , FLOAT *x )
+ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2)
+ {
+ BLASLONG i=0,j=0;
+- FLOAT alpha[4] __attribute__ ((aligned (16)));;
+
+ if ( n <= 0 || inc_x <=0 )
+ return(0);
+@@ -105,11 +103,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ BLASLONG n1 = n & -32;
+ if ( n1 > 0 )
+ {
+- alpha[0]=da;
+- alpha[1]=da;
+- alpha[2]=da;
+- alpha[3]=da;
+- sscal_kernel_16_zero(n1 , alpha , x);
++ sscal_kernel_16_zero(n1, x);
+ j=n1;
+ }
+
+@@ -127,11 +121,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
+ BLASLONG n1 = n & -32;
+ if ( n1 > 0 )
+ {
+- alpha[0]=da;
+- alpha[1]=da;
+- alpha[2]=da;
+- alpha[3]=da;
+- sscal_kernel_16(n1 , alpha , x);
++ sscal_kernel_16(n1, x, da);
+ j=n1;
+ }
+ while(j < n)
+diff --git a/kernel/power/sscal_microk_power8.c b/kernel/power/sscal_microk_power8.c
+index 963cec777..49862a329 100644
+--- a/kernel/power/sscal_microk_power8.c
++++ b/kernel/power/sscal_microk_power8.c
+@@ -35,184 +35,150 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_16 1
+
+-static void sscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x) __attribute__ ((noinline));
+-
+-static void sscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x)
++static void sscal_kernel_16 (long n, float *x, float alpha)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *x2=x+1;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvw4x 32, 0, %3 \n\t"
+- "addi %1, %1, -4 \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "xvmulsp 48, 40, 32 \n\t"
+- "xvmulsp 49, 41, 32 \n\t"
+- "lxvw4x 40, 0, %2 \n\t"
+- "lxvw4x 41, %5, %2 \n\t"
+- "xvmulsp 50, 42, 32 \n\t"
+- "xvmulsp 51, 43, 32 \n\t"
+- "lxvw4x 42, %6, %2 \n\t"
+- "lxvw4x 43, %7, %2 \n\t"
+- "xvmulsp 52, 44, 32 \n\t"
+- "xvmulsp 53, 45, 32 \n\t"
+- "lxvw4x 44, %8, %2 \n\t"
+- "lxvw4x 45, %9, %2 \n\t"
+- "xvmulsp 54, 46, 32 \n\t"
+- "xvmulsp 55, 47, 32 \n\t"
+- "lxvw4x 46, %10, %2 \n\t"
+- "lxvw4x 47, %11, %2 \n\t"
+-
+- "stxvw4x 48, 0, %1 \n\t"
+- "stxvw4x 49, %5, %1 \n\t"
+- "stxvw4x 50, %6, %1 \n\t"
+- "stxvw4x 51, %7, %1 \n\t"
+- "stxvw4x 52, %8, %1 \n\t"
+- "stxvw4x 53, %9, %1 \n\t"
+- "stxvw4x 54, %10, %1 \n\t"
+- "stxvw4x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmulsp 48, 40, 32 \n\t"
+- "xvmulsp 49, 41, 32 \n\t"
+- "xvmulsp 50, 42, 32 \n\t"
+- "xvmulsp 51, 43, 32 \n\t"
+- "xvmulsp 52, 44, 32 \n\t"
+- "xvmulsp 53, 45, 32 \n\t"
+- "xvmulsp 54, 46, 32 \n\t"
+- "xvmulsp 55, 47, 32 \n\t"
+-
+- "stxvw4x 48, 0, %1 \n\t"
+- "stxvw4x 49, %5, %1 \n\t"
+- "stxvw4x 50, %6, %1 \n\t"
+- "stxvw4x 51, %7, %1 \n\t"
+- "stxvw4x 52, %8, %1 \n\t"
+- "stxvw4x 53, %9, %1 \n\t"
+- "stxvw4x 54, %10, %1 \n\t"
+- "stxvw4x 55, %11, %1 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (x2), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
+-static void sscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) __attribute__ ((noinline));
+-
+-static void sscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x)
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xscvdpspn %x3, %x3 \n\t"
++ "xxspltw %x3, %x3, 0 \n\t"
++
++ "lxvw4x 32, 0, %2 \n\t"
++ "lxvw4x 33, %4, %2 \n\t"
++ "lxvw4x 34, %5, %2 \n\t"
++ "lxvw4x 35, %6, %2 \n\t"
++ "lxvw4x 36, %7, %2 \n\t"
++ "lxvw4x 37, %8, %2 \n\t"
++ "lxvw4x 38, %9, %2 \n\t"
++ "lxvw4x 39, %10, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmulsp 40, 32, %x3 \n\t"
++ "xvmulsp 41, 33, %x3 \n\t"
++ "lxvw4x 32, 0, %2 \n\t"
++ "lxvw4x 33, %4, %2 \n\t"
++ "xvmulsp 42, 34, %x3 \n\t"
++ "xvmulsp 43, 35, %x3 \n\t"
++ "lxvw4x 34, %5, %2 \n\t"
++ "lxvw4x 35, %6, %2 \n\t"
++ "xvmulsp 44, 36, %x3 \n\t"
++ "xvmulsp 45, 37, %x3 \n\t"
++ "lxvw4x 36, %7, %2 \n\t"
++ "lxvw4x 37, %8, %2 \n\t"
++ "xvmulsp 46, 38, %x3 \n\t"
++ "xvmulsp 47, 39, %x3 \n\t"
++ "lxvw4x 38, %9, %2 \n\t"
++ "lxvw4x 39, %10, %2 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "stxvw4x 40, 0, %2 \n\t"
++ "stxvw4x 41, %4, %2 \n\t"
++ "stxvw4x 42, %5, %2 \n\t"
++ "stxvw4x 43, %6, %2 \n\t"
++ "stxvw4x 44, %7, %2 \n\t"
++ "stxvw4x 45, %8, %2 \n\t"
++ "stxvw4x 46, %9, %2 \n\t"
++ "stxvw4x 47, %10, %2 \n\t"
++
++ "addi %2, %2, 256 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmulsp 40, 32, %x3 \n\t"
++ "xvmulsp 41, 33, %x3 \n\t"
++ "xvmulsp 42, 34, %x3 \n\t"
++ "xvmulsp 43, 35, %x3 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "xvmulsp 44, 36, %x3 \n\t"
++ "xvmulsp 45, 37, %x3 \n\t"
++ "xvmulsp 46, 38, %x3 \n\t"
++ "xvmulsp 47, 39, %x3 \n\t"
++
++ "stxvw4x 40, 0, %2 \n\t"
++ "stxvw4x 41, %4, %2 \n\t"
++ "stxvw4x 42, %5, %2 \n\t"
++ "stxvw4x 43, %6, %2 \n\t"
++ "stxvw4x 44, %7, %2 \n\t"
++ "stxvw4x 45, %8, %2 \n\t"
++ "stxvw4x 46, %9, %2 \n\t"
++ "stxvw4x 47, %10, %2 \n"
++
++ "#n=%1 alpha=%3 x=%0=%2 o16=%4 o32=%5 o48=%6 o64=%7 o80=%8 o96=%9 o112=%10"
++ :
++ "+m" (*x),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+f" (alpha) // 3
++ :
++ "b" (16), // 4
++ "b" (32), // 5
++ "b" (48), // 6
++ "b" (64), // 7
++ "b" (80), // 8
++ "b" (96), // 9
++ "b" (112) // 10
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
++
++
++static void sscal_kernel_16_zero (long n, float *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *x2=x+1;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "xxlxor 32 , 32 , 32 \n\t"
+- "addi %1, %1, -4 \n\t"
+-
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvw4x 32, 0, %1 \n\t"
+- "stxvw4x 32, %5, %1 \n\t"
+- "stxvw4x 32, %6, %1 \n\t"
+- "stxvw4x 32, %7, %1 \n\t"
+- "stxvw4x 32, %8, %1 \n\t"
+- "stxvw4x 32, %9, %1 \n\t"
+- "stxvw4x 32, %10, %1 \n\t"
+- "stxvw4x 32, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (x2), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __vector float t0;
++
++ __asm__
++ (
++ "xxlxor %x3, %x3, %x3 \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvw4x %x3, 0, %2 \n\t"
++ "stxvw4x %x3, %4, %2 \n\t"
++ "stxvw4x %x3, %5, %2 \n\t"
++ "stxvw4x %x3, %6, %2 \n\t"
++ "stxvw4x %x3, %7, %2 \n\t"
++ "stxvw4x %x3, %8, %2 \n\t"
++ "stxvw4x %x3, %9, %2 \n\t"
++ "stxvw4x %x3, %10, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -32 \n\t"
++ "bgt 1b \n"
++
++ "#n=%1 x=%0=%2 t0=%x3 o16=%4 o32=%5 o48=%6 o64=%7 o80=%8 o96=%9 o112=%10"
++ :
++ "=m" (*x),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0) // 3
++ :
++ "b" (16), // 4
++ "b" (32), // 5
++ "b" (48), // 6
++ "b" (64), // 7
++ "b" (80), // 8
++ "b" (96), // 9
++ "b" (112) // 10
++ :
++ "cr0"
++ );
++}
+diff --git a/kernel/power/sswap_microk_power8.c b/kernel/power/sswap_microk_power8.c
+index c48e743de..d44f16765 100644
+--- a/kernel/power/sswap_microk_power8.c
++++ b/kernel/power/sswap_microk_power8.c
+@@ -35,102 +35,74 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_32 1
+
+-static void sswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void sswap_kernel_32( BLASLONG n, FLOAT *x, FLOAT *y)
++static void sswap_kernel_32 (long n, float *x, float *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "addi %3, %3, -4 \n\t"
+- "addi %4, %4, -4 \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "lxvw4x 32, 0, %2 \n\t"
+- "lxvw4x 33, %5, %2 \n\t"
+- "lxvw4x 34, %6, %2 \n\t"
+- "lxvw4x 35, %7, %2 \n\t"
+- "lxvw4x 36, %8, %2 \n\t"
+- "lxvw4x 37, %9, %2 \n\t"
+- "lxvw4x 38, %10, %2 \n\t"
+- "lxvw4x 39, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvw4x 48, 0, %1 \n\t"
+- "lxvw4x 49, %5, %1 \n\t"
+- "lxvw4x 50, %6, %1 \n\t"
+- "lxvw4x 51, %7, %1 \n\t"
+- "lxvw4x 52, %8, %1 \n\t"
+- "lxvw4x 53, %9, %1 \n\t"
+- "lxvw4x 54, %10, %1 \n\t"
+- "lxvw4x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvw4x 32, 0, %3 \n\t"
+- "stxvw4x 33, %5, %3 \n\t"
+- "stxvw4x 34, %6, %3 \n\t"
+- "stxvw4x 35, %7, %3 \n\t"
+- "stxvw4x 36, %8, %3 \n\t"
+- "stxvw4x 37, %9, %3 \n\t"
+- "stxvw4x 38, %10, %3 \n\t"
+- "stxvw4x 39, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvw4x 48, 0, %4 \n\t"
+- "stxvw4x 49, %5, %4 \n\t"
+- "stxvw4x 50, %6, %4 \n\t"
+- "stxvw4x 51, %7, %4 \n\t"
+- "stxvw4x 52, %8, %4 \n\t"
+- "stxvw4x 53, %9, %4 \n\t"
+- "stxvw4x 54, %10, %4 \n\t"
+- "stxvw4x 55, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "addic. %0 , %0 , -32 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (y2), // 3
+- "r" (x2), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "%3", "%4", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "lxvw4x 32, 0, %4 \n\t"
++ "lxvw4x 33, %5, %4 \n\t"
++ "lxvw4x 34, %6, %4 \n\t"
++ "lxvw4x 35, %7, %4 \n\t"
++ "lxvw4x 36, %8, %4 \n\t"
++ "lxvw4x 37, %9, %4 \n\t"
++ "lxvw4x 38, %10, %4 \n\t"
++ "lxvw4x 39, %11, %4 \n\t"
++
++ "lxvw4x 40, 0, %3 \n\t"
++ "lxvw4x 41, %5, %3 \n\t"
++ "lxvw4x 42, %6, %3 \n\t"
++ "lxvw4x 43, %7, %3 \n\t"
++ "lxvw4x 44, %8, %3 \n\t"
++ "lxvw4x 45, %9, %3 \n\t"
++ "lxvw4x 46, %10, %3 \n\t"
++ "lxvw4x 47, %11, %3 \n\t"
++
++ "stxvw4x 32, 0, %3 \n\t"
++ "stxvw4x 33, %5, %3 \n\t"
++ "stxvw4x 34, %6, %3 \n\t"
++ "stxvw4x 35, %7, %3 \n\t"
++ "stxvw4x 36, %8, %3 \n\t"
++ "stxvw4x 37, %9, %3 \n\t"
++ "stxvw4x 38, %10, %3 \n\t"
++ "stxvw4x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvw4x 40, 0, %4 \n\t"
++ "stxvw4x 41, %5, %4 \n\t"
++ "stxvw4x 42, %6, %4 \n\t"
++ "stxvw4x 43, %7, %4 \n\t"
++ "stxvw4x 44, %8, %4 \n\t"
++ "stxvw4x 45, %9, %4 \n\t"
++ "stxvw4x 46, %10, %4 \n\t"
++ "stxvw4x 47, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "addic. %2, %2, -32 \n\t"
++ "bgt 1b \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y) // 4
++ :
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/zasum.c b/kernel/power/zasum.c
+index abd6ec08a..0b6b87d46 100644
+--- a/kernel/power/zasum.c
++++ b/kernel/power/zasum.c
+@@ -53,7 +53,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_8
+
+-static void zasum_kernel_8(BLASLONG n, FLOAT *x1, FLOAT *svec)
++static FLOAT zasum_kernel_8(BLASLONG n, FLOAT *x1)
+ {
+
+ BLASLONG i=0;
+@@ -92,9 +92,7 @@ static void zasum_kernel_8(BLASLONG n, FLOAT *x1, FLOAT *svec)
+
+ }
+
+- svec[0] = sum0+sum1+sum2+sum3;
+- svec[1] = 0.0;
+-
++ return sum0+sum1+sum2+sum3;
+ }
+
+ #endif
+@@ -104,7 +102,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ BLASLONG i=0;
+ BLASLONG ip=0;
+ FLOAT sumf = 0.0;
+- FLOAT svec[2] __attribute__ ((aligned (16)));;
+ BLASLONG n1;
+ BLASLONG inc_x2;
+
+@@ -117,8 +114,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
+ if ( n1 > 0 )
+ {
+
+- zasum_kernel_8(n1, x, svec);
+- sumf = svec[0] + svec[1];
++ sumf = zasum_kernel_8(n1, x);
+ i=n1;
+ ip=2*n1;
+ }
+diff --git a/kernel/power/zasum_microk_power8.c b/kernel/power/zasum_microk_power8.c
+index b9f6c0ac6..82366902d 100644
+--- a/kernel/power/zasum_microk_power8.c
++++ b/kernel/power/zasum_microk_power8.c
+@@ -34,144 +34,140 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_8 1
+-static void zasum_kernel_8( BLASLONG n, FLOAT *x, FLOAT *svec) __attribute__ ((noinline));
+
+-static void zasum_kernel_8( BLASLONG n, FLOAT *x, FLOAT *svec)
++static double zasum_kernel_8 (long n, double *x)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2 , %4 \n\t"
+-
+- "xvabsdp 48, 40 \n\t"
+- "xvabsdp 49, 41 \n\t"
+- "xvabsdp 50, 42 \n\t"
+- "xvabsdp 51, 43 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+-
+- "xvabsdp 52, 44 \n\t"
+- "xvabsdp 53, 45 \n\t"
+-
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "xvabsdp 54, 46 \n\t"
+- "xvabsdp 55, 47 \n\t"
+-
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+-
+- "xvadddp 32, 32, 48 \n\t"
+- "xvadddp 33, 33, 49 \n\t"
+-
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "xvadddp 34, 34, 50 \n\t"
+- "xvadddp 35, 35, 51 \n\t"
+- "addi %2, %2, 128 \n\t"
+- "xvadddp 36, 36, 52 \n\t"
+- "xvadddp 37, 37, 53 \n\t"
+- "addic. %0 , %0 , -8 \n\t"
+- "xvadddp 38, 38, 54 \n\t"
+- "xvadddp 39, 39, 55 \n\t"
+-
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+-
+- "xvabsdp 48, 40 \n\t"
+- "xvabsdp 49, 41 \n\t"
+- "xvabsdp 50, 42 \n\t"
+- "xvabsdp 51, 43 \n\t"
+- "xvabsdp 52, 44 \n\t"
+- "xvabsdp 53, 45 \n\t"
+- "xvabsdp 54, 46 \n\t"
+- "xvabsdp 55, 47 \n\t"
+-
+- "xvadddp 32, 32, 48 \n\t"
+- "xvadddp 33, 33, 49 \n\t"
+- "xvadddp 34, 34, 50 \n\t"
+- "xvadddp 35, 35, 51 \n\t"
+- "xvadddp 36, 36, 52 \n\t"
+- "xvadddp 37, 37, 53 \n\t"
+- "xvadddp 38, 38, 54 \n\t"
+- "xvadddp 39, 39, 55 \n\t"
+-
+- "xvadddp 32, 32, 33 \n\t"
+- "xvadddp 34, 34, 35 \n\t"
+- "xvadddp 36, 36, 37 \n\t"
+- "xvadddp 38, 38, 39 \n\t"
+-
+- "xvadddp 32, 32, 34 \n\t"
+- "xvadddp 36, 36, 38 \n\t"
+-
+- "xvadddp 32, 32, 36 \n\t"
+-
+-
+- "stxvd2x 32, 0, %3 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (svec), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2", "memory"
+- );
+-
+-}
+-
+-
++ double sum;
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %8, %2 \n\t"
++ "lxvd2x 42, %9, %2 \n\t"
++ "lxvd2x 43, %10, %2 \n\t"
++ "lxvd2x 44, %11, %2 \n\t"
++ "lxvd2x 45, %12, %2 \n\t"
++ "lxvd2x 46, %13, %2 \n\t"
++ "lxvd2x 47, %14, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvabsdp 48, 40 \n\t"
++ "xvabsdp 49, 41 \n\t"
++ "xvabsdp 50, 42 \n\t"
++ "xvabsdp 51, 43 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %8, %2 \n\t"
++
++ "xvabsdp %x3, 44 \n\t"
++ "xvabsdp %x4, 45 \n\t"
++
++ "lxvd2x 42, %9, %2 \n\t"
++ "lxvd2x 43, %10, %2 \n\t"
++
++ "xvabsdp %x5, 46 \n\t"
++ "xvabsdp %x6, 47 \n\t"
++
++ "lxvd2x 44, %11, %2 \n\t"
++ "lxvd2x 45, %12, %2 \n\t"
++
++ "xvadddp 32, 32, 48 \n\t"
++ "xvadddp 33, 33, 49 \n\t"
++
++ "lxvd2x 46, %13, %2 \n\t"
++ "lxvd2x 47, %14, %2 \n\t"
++
++ "xvadddp 34, 34, 50 \n\t"
++ "xvadddp 35, 35, 51 \n\t"
++ "addi %2, %2, 128 \n\t"
++ "xvadddp 36, 36, %x3 \n\t"
++ "xvadddp 37, 37, %x4 \n\t"
++ "addic. %1, %1, -8 \n\t"
++ "xvadddp 38, 38, %x5 \n\t"
++ "xvadddp 39, 39, %x6 \n\t"
++
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvabsdp 48, 40 \n\t"
++ "xvabsdp 49, 41 \n\t"
++ "xvabsdp 50, 42 \n\t"
++ "xvabsdp 51, 43 \n\t"
++ "xvabsdp %x3, 44 \n\t"
++ "xvabsdp %x4, 45 \n\t"
++ "xvabsdp %x5, 46 \n\t"
++ "xvabsdp %x6, 47 \n\t"
++
++ "xvadddp 32, 32, 48 \n\t"
++ "xvadddp 33, 33, 49 \n\t"
++ "xvadddp 34, 34, 50 \n\t"
++ "xvadddp 35, 35, 51 \n\t"
++ "xvadddp 36, 36, %x3 \n\t"
++ "xvadddp 37, 37, %x4 \n\t"
++ "xvadddp 38, 38, %x5 \n\t"
++ "xvadddp 39, 39, %x6 \n\t"
++
++ "xvadddp 32, 32, 33 \n\t"
++ "xvadddp 34, 34, 35 \n\t"
++ "xvadddp 36, 36, 37 \n\t"
++ "xvadddp 38, 38, 39 \n\t"
++
++ "xvadddp 32, 32, 34 \n\t"
++ "xvadddp 36, 36, 38 \n\t"
++
++ "xvadddp 32, 32, 36 \n\t"
++
++ "xxswapd 33, 32 \n\t"
++ "xsadddp %x0, 32, 33 \n"
++
++ "#n=%1 x=%3=%2 sum=%0 o16=%8 o32=%9 o48=%10 o64=%11 o80=%12 o96=%13 o112=%14\n"
++ "#t0=%x3 t1=%x4 t2=%x5 t3=%x6"
++ :
++ "=d" (sum), // 0
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0), // 3
++ "=wa" (t1), // 4
++ "=wa" (t2), // 5
++ "=wa" (t3) // 6
++ :
++ "m" (*x),
++ "b" (16), // 8
++ "b" (32), // 9
++ "b" (48), // 10
++ "b" (64), // 11
++ "b" (80), // 12
++ "b" (96), // 13
++ "b" (112) // 14
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++
++ return sum;
++}
+diff --git a/kernel/power/zaxpy.c b/kernel/power/zaxpy.c
+index 0ee0c1bf9..dd7ab6c3c 100644
+--- a/kernel/power/zaxpy.c
++++ b/kernel/power/zaxpy.c
+@@ -78,7 +78,6 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
+ {
+ BLASLONG i=0;
+ BLASLONG ix=0,iy=0;
+- FLOAT da[4];
+
+ if ( n <= 0 ) return(0);
+
+@@ -89,11 +88,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
+
+ if ( n1 )
+ {
+- da[0] = da_r;
+- da[1] = da_r;
+- da[2] = da_i;
+- da[3] = da_i;
+- zaxpy_kernel_4(n1, x, y , da );
++ zaxpy_kernel_4 (n1, x, y, da_r, da_i);
+ ix = 2 * n1;
+ }
+ i = n1;
+diff --git a/kernel/power/zaxpy_microk_power8.c b/kernel/power/zaxpy_microk_power8.c
+index c8a529fd9..124614f62 100644
+--- a/kernel/power/zaxpy_microk_power8.c
++++ b/kernel/power/zaxpy_microk_power8.c
+@@ -35,216 +35,225 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ #define HAVE_KERNEL_4 1
+-static void zaxpy_kernel_4( BLASLONG n, FLOAT *x, FLOAT *y , FLOAT *alpha) __attribute__ ((noinline));
+-
+-static void zaxpy_kernel_4( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *alpha)
++static void zaxpy_kernel_4 (long n, double *x, double *y,
++ double alpha_r, double alpha_i)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
+-
+ #if !defined(CONJ)
+- FLOAT mvec[2] = { -1.0, 1.0 };
++ static const double mvec[2] = { -1.0, 1.0 };
+ #else
+- FLOAT mvec[2] = { 1.0, -1.0 };
++ static const double mvec[2] = { 1.0, -1.0 };
+ #endif
+-
+-
+- __asm__ __volatile__
+- (
+-
+- "lxsdx 34, 0 , %4 \n\t" // alpha_r
+- "lxsdx 35, %5, %4 \n\t" // alpha_i
+- "xxspltd 32, 34, 0 \n\t"
+- "xxspltd 33, 35, 0 \n\t"
+-
+- "lxvd2x 36, 0, %9 \n\t" // mvec
++ const double *mvecp = mvec;
++
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++ __vector double t4;
++ __vector double t5;
++ __vector double t6;
++ __vector double t7;
++ __vector double t8;
++ __vector double t9;
++ __vector double t10;
++ __vector double t11;
++ long ytmp;
++
++ __asm__
++ (
++ "xxspltd 32, %x19, 0 \n\t" // alpha_r
++ "xxspltd 33, %x20, 0 \n\t" // alpha_i
++
++ "lxvd2x 36, 0, %21 \n\t" // mvec
+
+ #if !defined(CONJ)
+- "xvmuldp 33, 33 , 36 \n\t" // alpha_i * mvec
++ "xvmuldp 33, 33, 36 \n\t" // alpha_i * mvec
+ #else
+- "xvmuldp 32, 32 , 36 \n\t" // alpha_r * mvec
++ "xvmuldp 32, 32, 36 \n\t" // alpha_r * mvec
+ #endif
+
+- "addi %8, %8, -8 \n\t"
+-
+- "dcbt %2, %10 \n\t"
+- "dcbt %3, %10 \n\t"
+-
+-
+- "lxvd2x 40, 0, %2 \n\t" // x0
+- "lxvd2x 41, %5, %2 \n\t" // x1
+- "lxvd2x 42, %6, %2 \n\t" // x2
+- "lxvd2x 43, %7, %2 \n\t" // x3
+-
+- "lxvd2x 48, 0, %3 \n\t" // y0
+- "lxvd2x 49, %5, %3 \n\t" // y1
+- "lxvd2x 50, %6, %3 \n\t" // y2
+- "lxvd2x 51, %7, %3 \n\t" // y3
+-
+- "xxswapd 56, 40 \n\t" // exchange real and imag part
+- "xxswapd 57, 41 \n\t" // exchange real and imag part
+- "xxswapd 58, 42 \n\t" // exchange real and imag part
+- "xxswapd 59, 43 \n\t" // exchange real and imag part
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "lxvd2x 44, 0, %2 \n\t" // x4
+- "lxvd2x 45, %5, %2 \n\t" // x5
+- "lxvd2x 46, %6, %2 \n\t" // x6
+- "lxvd2x 47, %7, %2 \n\t" // x7
+-
+- "lxvd2x 52, 0, %3 \n\t" // y4
+- "lxvd2x 53, %5, %3 \n\t" // y5
+- "lxvd2x 54, %6, %3 \n\t" // y6
+- "lxvd2x 55, %7, %3 \n\t" // y7
+-
+- "xxswapd 60, 44 \n\t" // exchange real and imag part
+- "xxswapd 61, 45 \n\t" // exchange real and imag part
+- "xxswapd 62, 46 \n\t" // exchange real and imag part
+- "xxswapd 63, 47 \n\t" // exchange real and imag part
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %10 \n\t"
+- "dcbt %3, %10 \n\t"
+-
+- "xvmaddadp 48, 40, 32 \n\t" // alpha_r * x0_r , alpha_r * x0_i
+- "xvmaddadp 49, 41, 32 \n\t"
+- "lxvd2x 40, 0, %2 \n\t" // x0
+- "lxvd2x 41, %5, %2 \n\t" // x1
+- "xvmaddadp 50, 42, 32 \n\t"
+- "xvmaddadp 51, 43, 32 \n\t"
+- "lxvd2x 42, %6, %2 \n\t" // x2
+- "lxvd2x 43, %7, %2 \n\t" // x3
+-
+- "xvmaddadp 52, 44, 32 \n\t"
+- "addi %2, %2, 64 \n\t"
+- "xvmaddadp 53, 45, 32 \n\t"
+- "lxvd2x 44, 0, %2 \n\t" // x4
+- "lxvd2x 45, %5, %2 \n\t" // x5
+- "xvmaddadp 54, 46, 32 \n\t"
+- "xvmaddadp 55, 47, 32 \n\t"
+- "lxvd2x 46, %6, %2 \n\t" // x6
+- "lxvd2x 47, %7, %2 \n\t" // x7
+-
+- "xvmaddadp 48, 56, 33 \n\t" // alpha_i * x0_i , alpha_i * x0_r
+- "addi %2, %2, 64 \n\t"
+- "xvmaddadp 49, 57, 33 \n\t"
+- "xvmaddadp 50, 58, 33 \n\t"
+- "xvmaddadp 51, 59, 33 \n\t"
+-
+- "xvmaddadp 52, 60, 33 \n\t"
+- "xvmaddadp 53, 61, 33 \n\t"
+- "xvmaddadp 54, 62, 33 \n\t"
+- "xvmaddadp 55, 63, 33 \n\t"
+-
+- "stxvd2x 48, 0, %8 \n\t"
+- "stxvd2x 49, %5, %8 \n\t"
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- "stxvd2x 52, 0, %8 \n\t"
+- "stxvd2x 53, %5, %8 \n\t"
+- "stxvd2x 54, %6, %8 \n\t"
+- "stxvd2x 55, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- "xxswapd 56, 40 \n\t" // exchange real and imag part
+- "xxswapd 57, 41 \n\t" // exchange real and imag part
+- "lxvd2x 48, 0, %3 \n\t" // y0
+- "lxvd2x 49, %5, %3 \n\t" // y1
+- "xxswapd 58, 42 \n\t" // exchange real and imag part
+- "xxswapd 59, 43 \n\t" // exchange real and imag part
+- "lxvd2x 50, %6, %3 \n\t" // y2
+- "lxvd2x 51, %7, %3 \n\t" // y3
+-
+- "xxswapd 60, 44 \n\t" // exchange real and imag part
+- "addi %3, %3, 64 \n\t"
+- "xxswapd 61, 45 \n\t" // exchange real and imag part
+- "lxvd2x 52, 0, %3 \n\t" // y4
+- "lxvd2x 53, %5, %3 \n\t" // y5
+- "xxswapd 62, 46 \n\t" // exchange real and imag part
+- "xxswapd 63, 47 \n\t" // exchange real and imag part
+- "lxvd2x 54, %6, %3 \n\t" // y6
+- "lxvd2x 55, %7, %3 \n\t" // y7
+-
+- "addi %3, %3, 64 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmaddadp 48, 40, 32 \n\t" // alpha_r * x0_r , alpha_r * x0_i
+- "xvmaddadp 49, 41, 32 \n\t"
+- "xvmaddadp 50, 42, 32 \n\t"
+- "xvmaddadp 51, 43, 32 \n\t"
+-
+- "xvmaddadp 52, 44, 32 \n\t"
+- "xvmaddadp 53, 45, 32 \n\t"
+- "xvmaddadp 54, 46, 32 \n\t"
+- "xvmaddadp 55, 47, 32 \n\t"
+-
+- "xvmaddadp 48, 56, 33 \n\t" // alpha_i * x0_i , alpha_i * x0_r
+- "xvmaddadp 49, 57, 33 \n\t"
+- "xvmaddadp 50, 58, 33 \n\t"
+- "xvmaddadp 51, 59, 33 \n\t"
+-
+- "xvmaddadp 52, 60, 33 \n\t"
+- "xvmaddadp 53, 61, 33 \n\t"
+- "xvmaddadp 54, 62, 33 \n\t"
+- "xvmaddadp 55, 63, 33 \n\t"
+-
+-
+- "stxvd2x 48, 0, %8 \n\t"
+- "stxvd2x 49, %5, %8 \n\t"
+- "stxvd2x 50, %6, %8 \n\t"
+- "stxvd2x 51, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- "stxvd2x 52, 0, %8 \n\t"
+- "stxvd2x 53, %5, %8 \n\t"
+- "stxvd2x 54, %6, %8 \n\t"
+- "stxvd2x 55, %7, %8 \n\t"
+-
+- "addi %8, %8, 64 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (y1), // 3
+- "r" (alpha), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (y2), // 8
+- "r" (mvec), // 9
+- "r" (pre) // 10
+- : "cr0", "%0", "%2" , "%3", "%8", "memory"
+- );
+-
+-}
+-
+-
++ "mr %16, %3 \n\t"
++ "dcbt 0, %2 \n\t"
++ "dcbt 0, %3 \n\t"
++
++
++ "lxvd2x 40, 0, %2 \n\t" // x0
++ "lxvd2x 41, %22, %2 \n\t" // x1
++ "lxvd2x 42, %23, %2 \n\t" // x2
++ "lxvd2x 43, %24, %2 \n\t" // x3
++
++ "lxvd2x 48, 0, %3 \n\t" // y0
++ "lxvd2x 49, %22, %3 \n\t" // y1
++ "lxvd2x 50, %23, %3 \n\t" // y2
++ "lxvd2x 51, %24, %3 \n\t" // y3
++
++ "xxswapd %x8, 40 \n\t" // exchange real and imag part
++ "xxswapd %x9, 41 \n\t" // exchange real and imag part
++ "xxswapd %x10, 42 \n\t" // exchange real and imag part
++ "xxswapd %x11, 43 \n\t" // exchange real and imag part
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "lxvd2x 44, 0, %2 \n\t" // x4
++ "lxvd2x 45, %22, %2 \n\t" // x5
++ "lxvd2x 46, %23, %2 \n\t" // x6
++ "lxvd2x 47, %24, %2 \n\t" // x7
++
++ "lxvd2x %x4, 0, %3 \n\t" // y4
++ "lxvd2x %x5, %22, %3 \n\t" // y5
++ "lxvd2x %x6, %23, %3 \n\t" // y6
++ "lxvd2x %x7, %24, %3 \n\t" // y7
++
++ "xxswapd %x12, 44 \n\t" // exchange real and imag part
++ "xxswapd %x13, 45 \n\t" // exchange real and imag part
++ "xxswapd %x14, 46 \n\t" // exchange real and imag part
++ "xxswapd %x15, 47 \n\t" // exchange real and imag part
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmaddadp 48, 40, 32 \n\t" // alpha_r * x0_r , alpha_r * x0_i
++ "xvmaddadp 49, 41, 32 \n\t"
++ "lxvd2x 40, 0, %2 \n\t" // x0
++ "lxvd2x 41, %22, %2 \n\t" // x1
++ "xvmaddadp 50, 42, 32 \n\t"
++ "xvmaddadp 51, 43, 32 \n\t"
++ "lxvd2x 42, %23, %2 \n\t" // x2
++ "lxvd2x 43, %24, %2 \n\t" // x3
++
++ "xvmaddadp %x4, 44, 32 \n\t"
++ "addi %2, %2, 64 \n\t"
++ "xvmaddadp %x5, 45, 32 \n\t"
++ "lxvd2x 44, 0, %2 \n\t" // x4
++ "lxvd2x 45, %22, %2 \n\t" // x5
++ "xvmaddadp %x6, 46, 32 \n\t"
++ "xvmaddadp %x7, 47, 32 \n\t"
++ "lxvd2x 46, %23, %2 \n\t" // x6
++ "lxvd2x 47, %24, %2 \n\t" // x7
++
++ "xvmaddadp 48, %x8, 33 \n\t" // alpha_i * x0_i , alpha_i * x0_r
++ "addi %2, %2, 64 \n\t"
++ "xvmaddadp 49, %x9, 33 \n\t"
++ "xvmaddadp 50, %x10, 33 \n\t"
++ "xvmaddadp 51, %x11, 33 \n\t"
++
++ "xvmaddadp %x4, %x12, 33 \n\t"
++ "xvmaddadp %x5, %x13, 33 \n\t"
++ "xvmaddadp %x6, %x14, 33 \n\t"
++ "xvmaddadp %x7, %x15, 33 \n\t"
++
++ "stxvd2x 48, 0, %16 \n\t"
++ "stxvd2x 49, %22, %16 \n\t"
++ "stxvd2x 50, %23, %16 \n\t"
++ "stxvd2x 51, %24, %16 \n\t"
++
++ "addi %16, %16, 64 \n\t"
++
++ "stxvd2x %x4, 0, %16 \n\t"
++ "stxvd2x %x5, %22, %16 \n\t"
++ "stxvd2x %x6, %23, %16 \n\t"
++ "stxvd2x %x7, %24, %16 \n\t"
++
++ "addi %16, %16, 64 \n\t"
++
++ "xxswapd %x8, 40 \n\t" // exchange real and imag part
++ "xxswapd %x9, 41 \n\t" // exchange real and imag part
++ "lxvd2x 48, 0, %3 \n\t" // y0
++ "lxvd2x 49, %22, %3 \n\t" // y1
++ "xxswapd %x10, 42 \n\t" // exchange real and imag part
++ "xxswapd %x11, 43 \n\t" // exchange real and imag part
++ "lxvd2x 50, %23, %3 \n\t" // y2
++ "lxvd2x 51, %24, %3 \n\t" // y3
++
++ "xxswapd %x12, 44 \n\t" // exchange real and imag part
++ "addi %3, %3, 64 \n\t"
++ "xxswapd %x13, 45 \n\t" // exchange real and imag part
++ "lxvd2x %x4, 0, %3 \n\t" // y4
++ "lxvd2x %x5, %22, %3 \n\t" // y5
++ "xxswapd %x14, 46 \n\t" // exchange real and imag part
++ "xxswapd %x15, 47 \n\t" // exchange real and imag part
++ "lxvd2x %x6, %23, %3 \n\t" // y6
++ "lxvd2x %x7, %24, %3 \n\t" // y7
++
++ "addi %3, %3, 64 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmaddadp 48, 40, 32 \n\t" // alpha_r * x0_r , alpha_r * x0_i
++ "xvmaddadp 49, 41, 32 \n\t"
++ "xvmaddadp 50, 42, 32 \n\t"
++ "xvmaddadp 51, 43, 32 \n\t"
++
++ "xvmaddadp %x4, 44, 32 \n\t"
++ "xvmaddadp %x5, 45, 32 \n\t"
++ "xvmaddadp %x6, 46, 32 \n\t"
++ "xvmaddadp %x7, 47, 32 \n\t"
++
++ "xvmaddadp 48, %x8, 33 \n\t" // alpha_i * x0_i , alpha_i * x0_r
++ "xvmaddadp 49, %x9, 33 \n\t"
++ "xvmaddadp 50, %x10, 33 \n\t"
++ "xvmaddadp 51, %x11, 33 \n\t"
++
++ "xvmaddadp %x4, %x12, 33 \n\t"
++ "xvmaddadp %x5, %x13, 33 \n\t"
++ "xvmaddadp %x6, %x14, 33 \n\t"
++ "xvmaddadp %x7, %x15, 33 \n\t"
++
++ "stxvd2x 48, 0, %16 \n\t"
++ "stxvd2x 49, %22, %16 \n\t"
++ "stxvd2x 50, %23, %16 \n\t"
++ "stxvd2x 51, %24, %16 \n\t"
++
++ "addi %16, %16, 64 \n\t"
++
++ "stxvd2x %x4, 0, %16 \n\t"
++ "stxvd2x %x5, %22, %16 \n\t"
++ "stxvd2x %x6, %23, %16 \n\t"
++ "stxvd2x %x7, %24, %16 \n"
++
++ "#n=%1 x=%17=%2 y=%0=%3 alpha=(%19,%20) mvecp=%18=%16 o16=%22 o32=%23 o48=%24 ytmp=%16\n"
++ "#t0=%x4 t1=%x5 t2=%x6 t3=%x7 t4=%x8 t5=%x9 t6=%x10 t7=%x11 t8=%x12 t9=%x13 t10=%x14 t11=%x15"
++ :
++ "+m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y), // 3
++ "=wa" (t0), // 4
++ "=wa" (t1), // 5
++ "=wa" (t2), // 6
++ "=wa" (t3), // 7
++ "=wa" (t4), // 8
++ "=wa" (t5), // 9
++ "=wa" (t6), // 10
++ "=wa" (t7), // 11
++ "=wa" (t8), // 12
++ "=wa" (t9), // 13
++ "=wa" (t10), // 14
++ "=wa" (t11), // 15
++ "=b" (ytmp) // 16
++ :
++ "m" (*x),
++ "m" (*mvecp),
++ "d" (alpha_r), // 19
++ "d" (alpha_i), // 20
++ "16" (mvecp), // 21
++ "b" (16), // 22
++ "b" (32), // 23
++ "b" (48) // 24
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++}
+diff --git a/kernel/power/zcopy_microk_power8.c b/kernel/power/zcopy_microk_power8.c
+index 73abe084e..5ca34b633 100644
+--- a/kernel/power/zcopy_microk_power8.c
++++ b/kernel/power/zcopy_microk_power8.c
+@@ -35,140 +35,121 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_16 1
+
+-static void zcopy_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void zcopy_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y)
++static void zcopy_kernel_16 (long n, FLOAT *x, FLOAT *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 50, 0, %2 \n\t"
+- "lxvd2x 51, %5, %2 \n\t"
+- "lxvd2x 52, %6, %2 \n\t"
+- "lxvd2x 53, %7, %2 \n\t"
+- "lxvd2x 54, %8, %2 \n\t"
+- "lxvd2x 55, %9, %2 \n\t"
+- "lxvd2x 56, %10, %2 \n\t"
+- "lxvd2x 57, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "stxvd2x 40, 0, %1 \n\t"
+- "stxvd2x 41, %5, %1 \n\t"
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "stxvd2x 42, %6, %1 \n\t"
+- "stxvd2x 43, %7, %1 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "stxvd2x 44, %8, %1 \n\t"
+- "stxvd2x 45, %9, %1 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "stxvd2x 46, %10, %1 \n\t"
+- "stxvd2x 47, %11, %1 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "stxvd2x 50, 0, %1 \n\t"
+- "stxvd2x 51, %5, %1 \n\t"
+- "lxvd2x 50, 0, %2 \n\t"
+- "lxvd2x 51, %5, %2 \n\t"
+- "stxvd2x 52, %6, %1 \n\t"
+- "stxvd2x 53, %7, %1 \n\t"
+- "lxvd2x 52, %6, %2 \n\t"
+- "lxvd2x 53, %7, %2 \n\t"
+- "stxvd2x 54, %8, %1 \n\t"
+- "stxvd2x 55, %9, %1 \n\t"
+- "lxvd2x 54, %8, %2 \n\t"
+- "lxvd2x 55, %9, %2 \n\t"
+- "stxvd2x 56, %10, %1 \n\t"
+- "stxvd2x 57, %11, %1 \n\t"
+- "lxvd2x 56, %10, %2 \n\t"
+- "lxvd2x 57, %11, %2 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "stxvd2x 40, 0, %1 \n\t"
+- "stxvd2x 41, %5, %1 \n\t"
+- "stxvd2x 42, %6, %1 \n\t"
+- "stxvd2x 43, %7, %1 \n\t"
+- "stxvd2x 44, %8, %1 \n\t"
+- "stxvd2x 45, %9, %1 \n\t"
+- "stxvd2x 46, %10, %1 \n\t"
+- "stxvd2x 47, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvd2x 50, 0, %1 \n\t"
+- "stxvd2x 51, %5, %1 \n\t"
+- "stxvd2x 52, %6, %1 \n\t"
+- "stxvd2x 53, %7, %1 \n\t"
+- "stxvd2x 54, %8, %1 \n\t"
+- "stxvd2x 55, %9, %1 \n\t"
+- "stxvd2x 56, %10, %1 \n\t"
+- "stxvd2x 57, %11, %1 \n\t"
+-
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %5, %2 \n\t"
++ "lxvd2x 34, %6, %2 \n\t"
++ "lxvd2x 35, %7, %2 \n\t"
++ "lxvd2x 36, %8, %2 \n\t"
++ "lxvd2x 37, %9, %2 \n\t"
++ "lxvd2x 38, %10, %2 \n\t"
++ "lxvd2x 39, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %5, %2 \n\t"
++ "lxvd2x 42, %6, %2 \n\t"
++ "lxvd2x 43, %7, %2 \n\t"
++ "lxvd2x 44, %8, %2 \n\t"
++ "lxvd2x 45, %9, %2 \n\t"
++ "lxvd2x 46, %10, %2 \n\t"
++ "lxvd2x 47, %11, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "lxvd2x 32, 0, %2 \n\t"
++ "lxvd2x 33, %5, %2 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "lxvd2x 34, %6, %2 \n\t"
++ "lxvd2x 35, %7, %2 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "lxvd2x 36, %8, %2 \n\t"
++ "lxvd2x 37, %9, %2 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++ "lxvd2x 38, %10, %2 \n\t"
++ "lxvd2x 39, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "lxvd2x 40, 0, %2 \n\t"
++ "lxvd2x 41, %5, %2 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "lxvd2x 42, %6, %2 \n\t"
++ "lxvd2x 43, %7, %2 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "lxvd2x 44, %8, %2 \n\t"
++ "lxvd2x 45, %9, %2 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n\t"
++ "lxvd2x 46, %10, %2 \n\t"
++ "lxvd2x 47, %11, %2 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -16 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n"
++
++ "#n=%1 x=%4=%2 y=%0=%3 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "=m" (*y),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y) // 3
++ :
++ "m" (*x),
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47"
++ );
++}
+diff --git a/kernel/power/zdot.c b/kernel/power/zdot.c
+index bc1a95e22..b83f832b1 100644
+--- a/kernel/power/zdot.c
++++ b/kernel/power/zdot.c
+@@ -43,8 +43,6 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_8
+
+-static void zdot_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d) __attribute__ ((noinline));
+-
+ static void zdot_kernel_8(BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *d)
+ {
+ BLASLONG register i = 0;
+diff --git a/kernel/power/zdot_microk_power8.c b/kernel/power/zdot_microk_power8.c
+index 296d3d469..71078b66c 100644
+--- a/kernel/power/zdot_microk_power8.c
++++ b/kernel/power/zdot_microk_power8.c
+@@ -34,186 +34,174 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **************************************************************************************/
+
+ #define HAVE_KERNEL_8 1
+-static void zdot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y , FLOAT *dot) __attribute__ ((noinline));
+
+-static void zdot_kernel_8( BLASLONG n, FLOAT *x, FLOAT *y, FLOAT *dot)
++static void zdot_kernel_8 (long n, double *x, double *y, double *dot)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+- "xxlxor 32,32,32 \n\t"
+- "xxlxor 33,33,33 \n\t"
+- "xxlxor 34,34,34 \n\t"
+- "xxlxor 35,35,35 \n\t"
+- "xxlxor 36,36,36 \n\t"
+- "xxlxor 37,37,37 \n\t"
+- "xxlxor 38,38,38 \n\t"
+- "xxlxor 39,39,39 \n\t"
+-
+- "dcbt %2, %8 \n\t"
+- "dcbt %3, %8 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
+- "lxvd2x 48, 0, %3 \n\t" // y0_r, y0_i
+- "lxvd2x 41, %5, %2 \n\t" // x1_r, x1_i
+- "lxvd2x 49, %5, %3 \n\t" // y1_r, y1_i
+- "lxvd2x 42, %6, %2 \n\t" // x2_r, x2_i
+- "lxvd2x 50, %6, %3 \n\t" // y2_r, y2_i
+- "lxvd2x 43, %7, %2 \n\t" // x3_r, x3_i
+- "lxvd2x 51, %7, %3 \n\t" // y3_r, y3_i
+-
+- "xxswapd 52,48 \n\t" // y0_i, y0_r
+- "xxswapd 53,49 \n\t" // y1_i, y1_r
+- "xxswapd 54,50 \n\t" // y2_i, y2_r
+- "xxswapd 55,51 \n\t" // y3_i, y3_r
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+-
+- "lxvd2x 44, 0, %2 \n\t" // x0_r, x0_i
+- "lxvd2x 56, 0, %3 \n\t" // y0_r, y0_i
+- "lxvd2x 45, %5, %2 \n\t" // x1_r, x1_i
+- "lxvd2x 57, %5, %3 \n\t" // y1_r, y1_i
+- "lxvd2x 46, %6, %2 \n\t" // x2_r, x2_i
+- "lxvd2x 58, %6, %3 \n\t" // y2_r, y2_i
+- "lxvd2x 47, %7, %2 \n\t" // x3_r, x3_i
+- "lxvd2x 59, %7, %3 \n\t" // y3_r, y3_i
+-
+- "xxswapd 60,56 \n\t" // y0_i, y0_r
+- "xxswapd 61,57 \n\t" // y1_i, y1_r
+- "xxswapd 62,58 \n\t" // y2_i, y2_r
+- "xxswapd 63,59 \n\t" // y3_i, y3_r
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %8 \n\t"
+- "dcbt %3, %8 \n\t"
+-
+- "xvmaddadp 32, 40, 48 \n\t" // x0_r * y0_r , x0_i * y0_i
+- "lxvd2x 48, 0, %3 \n\t" // y0_r, y0_i
+- "xvmaddadp 34, 41, 49 \n\t" // x1_r * y1_r , x1_i * y1_i
+- "lxvd2x 49, %5, %3 \n\t" // y1_r, y1_i
+-
+- "xvmaddadp 36, 42, 50 \n\t" // x2_r * y2_r , x2_i * y2_i
+- "lxvd2x 50, %6, %3 \n\t" // y2_r, y2_i
+- "xvmaddadp 38, 43, 51 \n\t" // x3_r * y3_r , x3_i * y3_i
+- "lxvd2x 51, %7, %3 \n\t" // y3_r, y3_i
+-
+- "xvmaddadp 33, 40, 52 \n\t" // x0_r * y0_i , x0_i * y0_r
+- "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
+- "xvmaddadp 35, 41, 53 \n\t" // x1_r * y1_i , x1_i * y1_r
+- "lxvd2x 41, %5, %2 \n\t" // x1_r, x1_i
+-
+- "xvmaddadp 37, 42, 54 \n\t" // x2_r * y2_i , x2_i * y2_r
+- "lxvd2x 42, %6, %2 \n\t" // x2_r, x2_i
+- "xvmaddadp 39, 43, 55 \n\t" // x3_r * y3_i , x3_i * y3_r
+- "lxvd2x 43, %7, %2 \n\t" // x3_r, x3_i
+-
+- "xxswapd 52,48 \n\t" // y0_i, y0_r
+- "xxswapd 53,49 \n\t" // y1_i, y1_r
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "xxswapd 54,50 \n\t" // y2_i, y2_r
+- "xxswapd 55,51 \n\t" // y3_i, y3_r
+-
+- "xvmaddadp 32, 44, 56 \n\t" // x0_r * y0_r , x0_i * y0_i
+- "lxvd2x 56, 0, %3 \n\t" // y0_r, y0_i
+- "xvmaddadp 34, 45, 57 \n\t" // x1_r * y1_r , x1_i * y1_i
+- "lxvd2x 57, %5, %3 \n\t" // y1_r, y1_i
+- "xvmaddadp 36, 46, 58 \n\t" // x2_r * y2_r , x2_i * y2_i
+- "lxvd2x 58, %6, %3 \n\t" // y2_r, y2_i
+- "xvmaddadp 38, 47, 59 \n\t" // x3_r * y3_r , x3_i * y3_i
+- "lxvd2x 59, %7, %3 \n\t" // y3_r, y3_i
+-
+- "xvmaddadp 33, 44, 60 \n\t" // x0_r * y0_i , x0_i * y0_r
+- "lxvd2x 44, 0, %2 \n\t" // x0_r, x0_i
+- "xvmaddadp 35, 45, 61 \n\t" // x1_r * y1_i , x1_i * y1_r
+- "lxvd2x 45, %5, %2 \n\t" // x1_r, x1_i
+- "xvmaddadp 37, 46, 62 \n\t" // x2_r * y2_i , x2_i * y2_r
+- "lxvd2x 46, %6, %2 \n\t" // x2_r, x2_i
+- "xvmaddadp 39, 47, 63 \n\t" // x3_r * y3_i , x3_i * y3_r
+- "lxvd2x 47, %7, %2 \n\t" // x3_r, x3_i
+-
+- "xxswapd 60,56 \n\t" // y0_i, y0_r
+- "xxswapd 61,57 \n\t" // y1_i, y1_r
+-
+- "addi %2, %2, 64 \n\t"
+- "addi %3, %3, 64 \n\t"
+-
+- "xxswapd 62,58 \n\t" // y2_i, y2_r
+- "xxswapd 63,59 \n\t" // y3_i, y3_r
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmaddadp 32, 40, 48 \n\t" // x0_r * y0_r , x0_i * y0_i
+- "xvmaddadp 34, 41, 49 \n\t" // x1_r * y1_r , x1_i * y1_i
+- "xvmaddadp 36, 42, 50 \n\t" // x2_r * y2_r , x2_i * y2_i
+- "xvmaddadp 38, 43, 51 \n\t" // x3_r * y3_r , x3_i * y3_i
+-
+- "xvmaddadp 33, 40, 52 \n\t" // x0_r * y0_i , x0_i * y0_r
+- "xvmaddadp 35, 41, 53 \n\t" // x1_r * y1_i , x1_i * y1_r
+- "xvmaddadp 37, 42, 54 \n\t" // x2_r * y2_i , x2_i * y2_r
+- "xvmaddadp 39, 43, 55 \n\t" // x3_r * y3_i , x3_i * y3_r
+-
+- "xvmaddadp 32, 44, 56 \n\t" // x0_r * y0_r , x0_i * y0_i
+- "xvmaddadp 34, 45, 57 \n\t" // x1_r * y1_r , x1_i * y1_i
+- "xvmaddadp 36, 46, 58 \n\t" // x2_r * y2_r , x2_i * y2_i
+- "xvmaddadp 38, 47, 59 \n\t" // x3_r * y3_r , x3_i * y3_i
+-
+- "xvmaddadp 33, 44, 60 \n\t" // x0_r * y0_i , x0_i * y0_r
+- "xvmaddadp 35, 45, 61 \n\t" // x1_r * y1_i , x1_i * y1_r
+- "xvmaddadp 37, 46, 62 \n\t" // x2_r * y2_i , x2_i * y2_r
+- "xvmaddadp 39, 47, 63 \n\t" // x3_r * y3_i , x3_i * y3_r
+-
+-
+- "xvadddp 32, 32, 34 \n\t"
+- "xvadddp 36, 36, 38 \n\t"
+-
+- "xvadddp 33, 33, 35 \n\t"
+- "xvadddp 37, 37, 39 \n\t"
+-
+- "xvadddp 32, 32, 36 \n\t"
+- "xvadddp 33, 33, 37 \n\t"
+-
+- "stxvd2x 32, 0, %4 \n\t"
+- "stxvd2x 33, %5, %4 \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (n), // 1
+- "r" (x1), // 2
+- "r" (y1), // 3
+- "r" (dot), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (pre) // 8
+- : "cr0", "%0", "%2" , "%3", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++ "dcbt 0, %3 \n\t"
++
++ "xxlxor 32, 32, 32 \n\t"
++ "xxlxor 33, 33, 33 \n\t"
++ "xxlxor 34, 34, 34 \n\t"
++ "xxlxor 35, 35, 35 \n\t"
++ "xxlxor 36, 36, 36 \n\t"
++ "xxlxor 37, 37, 37 \n\t"
++ "xxlxor 38, 38, 38 \n\t"
++ "xxlxor 39, 39, 39 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
++ "lxvd2x 48, 0, %3 \n\t" // y0_r, y0_i
++ "lxvd2x 41, %7, %2 \n\t" // x1_r, x1_i
++ "lxvd2x 49, %7, %3 \n\t" // y1_r, y1_i
++ "lxvd2x 42, %8, %2 \n\t" // x2_r, x2_i
++ "lxvd2x 50, %8, %3 \n\t" // y2_r, y2_i
++ "lxvd2x 43, %9, %2 \n\t" // x3_r, x3_i
++ "lxvd2x 51, %9, %3 \n\t" // y3_r, y3_i
++
++ "xxswapd 0, 48 \n\t" // y0_i, y0_r
++ "xxswapd 1, 49 \n\t" // y1_i, y1_r
++ "xxswapd 2, 50 \n\t" // y2_i, y2_r
++ "xxswapd 3, 51 \n\t" // y3_i, y3_r
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "lxvd2x 44, 0, %2 \n\t" // x0_r, x0_i
++ "lxvd2x 4, 0, %3 \n\t" // y0_r, y0_i
++ "lxvd2x 45, %7, %2 \n\t" // x1_r, x1_i
++ "lxvd2x 5, %7, %3 \n\t" // y1_r, y1_i
++ "lxvd2x 46, %8, %2 \n\t" // x2_r, x2_i
++ "lxvd2x 6, %8, %3 \n\t" // y2_r, y2_i
++ "lxvd2x 47, %9, %2 \n\t" // x3_r, x3_i
++ "lxvd2x 7, %9, %3 \n\t" // y3_r, y3_i
++
++ "xxswapd 8, 4 \n\t" // y0_i, y0_r
++ "xxswapd 9, 5 \n\t" // y1_i, y1_r
++ "xxswapd 10, 6 \n\t" // y2_i, y2_r
++ "xxswapd 11, 7 \n\t" // y3_i, y3_r
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmaddadp 32, 40, 48 \n\t" // x0_r * y0_r , x0_i * y0_i
++ "lxvd2x 48, 0, %3 \n\t" // y0_r, y0_i
++ "xvmaddadp 34, 41, 49 \n\t" // x1_r * y1_r , x1_i * y1_i
++ "lxvd2x 49, %7, %3 \n\t" // y1_r, y1_i
++
++ "xvmaddadp 36, 42, 50 \n\t" // x2_r * y2_r , x2_i * y2_i
++ "lxvd2x 50, %8, %3 \n\t" // y2_r, y2_i
++ "xvmaddadp 38, 43, 51 \n\t" // x3_r * y3_r , x3_i * y3_i
++ "lxvd2x 51, %9, %3 \n\t" // y3_r, y3_i
++
++ "xvmaddadp 33, 40, 0 \n\t" // x0_r * y0_i , x0_i * y0_r
++ "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
++ "xvmaddadp 35, 41, 1 \n\t" // x1_r * y1_i , x1_i * y1_r
++ "lxvd2x 41, %7, %2 \n\t" // x1_r, x1_i
++
++ "xvmaddadp 37, 42, 2 \n\t" // x2_r * y2_i , x2_i * y2_r
++ "lxvd2x 42, %8, %2 \n\t" // x2_r, x2_i
++ "xvmaddadp 39, 43, 3 \n\t" // x3_r * y3_i , x3_i * y3_r
++ "lxvd2x 43, %9, %2 \n\t" // x3_r, x3_i
++
++ "xxswapd 0,48 \n\t" // y0_i, y0_r
++ "xxswapd 1,49 \n\t" // y1_i, y1_r
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "xxswapd 2,50 \n\t" // y2_i, y2_r
++ "xxswapd 3,51 \n\t" // y3_i, y3_r
++
++ "xvmaddadp 32, 44, 4 \n\t" // x0_r * y0_r , x0_i * y0_i
++ "lxvd2x 4, 0, %3 \n\t" // y0_r, y0_i
++ "xvmaddadp 34, 45, 5 \n\t" // x1_r * y1_r , x1_i * y1_i
++ "lxvd2x 5, %7, %3 \n\t" // y1_r, y1_i
++ "xvmaddadp 36, 46, 6 \n\t" // x2_r * y2_r , x2_i * y2_i
++ "lxvd2x 6, %8, %3 \n\t" // y2_r, y2_i
++ "xvmaddadp 38, 47, 7 \n\t" // x3_r * y3_r , x3_i * y3_i
++ "lxvd2x 7, %9, %3 \n\t" // y3_r, y3_i
++
++ "xvmaddadp 33, 44, 8 \n\t" // x0_r * y0_i , x0_i * y0_r
++ "lxvd2x 44, 0, %2 \n\t" // x0_r, x0_i
++ "xvmaddadp 35, 45, 9 \n\t" // x1_r * y1_i , x1_i * y1_r
++ "lxvd2x 45, %7, %2 \n\t" // x1_r, x1_i
++ "xvmaddadp 37, 46, 10 \n\t" // x2_r * y2_i , x2_i * y2_r
++ "lxvd2x 46, %8, %2 \n\t" // x2_r, x2_i
++ "xvmaddadp 39, 47, 11 \n\t" // x3_r * y3_i , x3_i * y3_r
++ "lxvd2x 47, %9, %2 \n\t" // x3_r, x3_i
++
++ "xxswapd 8,4 \n\t" // y0_i, y0_r
++ "xxswapd 9,5 \n\t" // y1_i, y1_r
++
++ "addi %2, %2, 64 \n\t"
++ "addi %3, %3, 64 \n\t"
++
++ "xxswapd 10,6 \n\t" // y2_i, y2_r
++ "xxswapd 11,7 \n\t" // y3_i, y3_r
++
++ "addic. %1, %1, -8 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmaddadp 32, 40, 48 \n\t" // x0_r * y0_r , x0_i * y0_i
++ "xvmaddadp 34, 41, 49 \n\t" // x1_r * y1_r , x1_i * y1_i
++ "xvmaddadp 36, 42, 50 \n\t" // x2_r * y2_r , x2_i * y2_i
++ "xvmaddadp 38, 43, 51 \n\t" // x3_r * y3_r , x3_i * y3_i
++
++ "xvmaddadp 33, 40, 0 \n\t" // x0_r * y0_i , x0_i * y0_r
++ "xvmaddadp 35, 41, 1 \n\t" // x1_r * y1_i , x1_i * y1_r
++ "xvmaddadp 37, 42, 2 \n\t" // x2_r * y2_i , x2_i * y2_r
++ "xvmaddadp 39, 43, 3 \n\t" // x3_r * y3_i , x3_i * y3_r
++
++ "xvmaddadp 32, 44, 4 \n\t" // x0_r * y0_r , x0_i * y0_i
++ "xvmaddadp 34, 45, 5 \n\t" // x1_r * y1_r , x1_i * y1_i
++ "xvmaddadp 36, 46, 6 \n\t" // x2_r * y2_r , x2_i * y2_i
++ "xvmaddadp 38, 47, 7 \n\t" // x3_r * y3_r , x3_i * y3_i
++
++ "xvmaddadp 33, 44, 8 \n\t" // x0_r * y0_i , x0_i * y0_r
++ "xvmaddadp 35, 45, 9 \n\t" // x1_r * y1_i , x1_i * y1_r
++ "xvmaddadp 37, 46, 10 \n\t" // x2_r * y2_i , x2_i * y2_r
++ "xvmaddadp 39, 47, 11 \n\t" // x3_r * y3_i , x3_i * y3_r
++
++ "xvadddp 32, 32, 34 \n\t"
++ "xvadddp 36, 36, 38 \n\t"
++
++ "xvadddp 33, 33, 35 \n\t"
++ "xvadddp 37, 37, 39 \n\t"
++
++ "xvadddp 32, 32, 36 \n\t"
++ "xvadddp 33, 33, 37 \n\t"
++
++ "stxvd2x 32, 0, %6 \n\t"
++ "stxvd2x 33, %7, %6 \n"
++
++ "#n=%1 x=%4=%2 y=%5=%3 dot=%0=%6 o16=%7 o32=%8 o48=%9"
++ :
++ "=m" (*dot),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "+b" (y) // 3
++ :
++ "m" (*x),
++ "m" (*y),
++ "b" (dot), // 6
++ "b" (16), // 7
++ "b" (32), // 8
++ "b" (48) // 9
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51","vs0","vs1","vs2","vs3",
++ "vs4","vs5","vs6","vs7","vs8","vs9","vs10","vs11"
++ );
++}
+diff --git a/kernel/power/zscal.c b/kernel/power/zscal.c
+index 410fc9840..14d677f24 100644
+--- a/kernel/power/zscal.c
++++ b/kernel/power/zscal.c
+@@ -47,15 +47,15 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifndef HAVE_KERNEL_8
+
+-static void zscal_kernel_8(BLASLONG n, FLOAT *x, FLOAT *alpha)
++static void zscal_kernel_8(BLASLONG n, FLOAT *x, FLOAT da_r, FLOAT da_i)
+ {
+
+ BLASLONG i=0;
+ FLOAT *x1=x;
+- FLOAT alpha_r1=alpha[0];
+- FLOAT alpha_r2=alpha[1];
+- FLOAT alpha_i1=alpha[2];
+- FLOAT alpha_i2=alpha[3];
++ FLOAT alpha_r1=da_r;
++ FLOAT alpha_r2=da_r;
++ FLOAT alpha_i1=-da_i;
++ FLOAT alpha_i2=da_i;
+ FLOAT temp00, temp01, temp10, temp11, temp20, temp21, temp30, temp31;
+ FLOAT x0_r, x0_i, x1_r, x1_i, x2_r, x2_i, x3_r, x3_i;
+
+@@ -116,7 +116,6 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F
+ BLASLONG inc_x2;
+ BLASLONG ip = 0;
+ FLOAT temp;
+- FLOAT alpha[4] __attribute__ ((aligned (16)));;
+ BLASLONG n1;
+
+ if ( n <= 0 )
+@@ -147,11 +146,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F
+ n1 = n & -8;
+ if ( n1 > 0 )
+ {
+- alpha[0] = da_r;
+- alpha[1] = da_r;
+- alpha[2] = -da_i;
+- alpha[3] = da_i;
+- zscal_kernel_8(n1, x, alpha);
++ zscal_kernel_8(n1, x, da_r, da_i);
+ i=n1;
+ ip = n1 * 2;
+
+diff --git a/kernel/power/zscal_microk_power8.c b/kernel/power/zscal_microk_power8.c
+index 5e09d8d79..aba9029a0 100644
+--- a/kernel/power/zscal_microk_power8.c
++++ b/kernel/power/zscal_microk_power8.c
+@@ -38,187 +38,202 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_8 1
+
+-static void zscal_kernel_8( BLASLONG n, FLOAT *x, FLOAT *alpha) __attribute__ ((noinline));
+-
+-static void zscal_kernel_8( BLASLONG n, FLOAT *x, FLOAT *alpha)
++static void zscal_kernel_8 (long n, double *x, double alpha_r, double alpha_i)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *x2=x+1;
+- BLASLONG pre = 384;
+-
+- __asm__ __volatile__
+- (
+-
+- "lxvd2x 32, 0, %3 \n\t" // alpha_r , alpha_r
+- "lxvd2x 33, %5, %3 \n\t" // -alpha_i , alpha_i
+- "addi %1, %1, -8 \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "ble 2f \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "dcbt %2, %4 \n\t"
+-
+- "xvmuldp 48, 40, 32 \n\t" // x0_r * alpha_r, x0_i * alpha_r
+- "xvmuldp 49, 41, 32 \n\t"
+- "xvmuldp 50, 42, 32 \n\t"
+- "xvmuldp 51, 43, 32 \n\t"
+- "xvmuldp 52, 44, 32 \n\t"
+- "xvmuldp 53, 45, 32 \n\t"
+- "xvmuldp 54, 46, 32 \n\t"
+- "xvmuldp 55, 47, 32 \n\t"
+-
+- "xxswapd 56, 40 \n\t"
+- "xxswapd 57, 41 \n\t"
+- "xxswapd 58, 42 \n\t"
+- "xxswapd 59, 43 \n\t"
+- "xxswapd 60, 44 \n\t"
+- "xxswapd 61, 45 \n\t"
+- "xxswapd 62, 46 \n\t"
+- "xxswapd 63, 47 \n\t"
+-
+- "xvmuldp 56, 56, 33 \n\t" // x0_i * -alpha_i, x0_r * alpha_i
+- "xvmuldp 57, 57, 33 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
+- "lxvd2x 41, %5, %2 \n\t"
+-
+- "xvmuldp 58, 58, 33 \n\t"
+- "xvmuldp 59, 59, 33 \n\t"
+-
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+-
+- "xvmuldp 60, 60, 33 \n\t"
+- "xvmuldp 61, 61, 33 \n\t"
+-
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+-
+- "xvmuldp 62, 62, 33 \n\t"
+- "xvmuldp 63, 63, 33 \n\t"
+-
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "xvadddp 48, 48 , 56 \n\t"
+- "xvadddp 49, 49 , 57 \n\t"
+- "xvadddp 50, 50 , 58 \n\t"
+- "xvadddp 51, 51 , 59 \n\t"
+-
+- "stxvd2x 48, 0, %1 \n\t"
+- "stxvd2x 49, %5, %1 \n\t"
+-
+- "xvadddp 52, 52 , 60 \n\t"
+- "xvadddp 53, 53 , 61 \n\t"
+-
+- "stxvd2x 50, %6, %1 \n\t"
+- "stxvd2x 51, %7, %1 \n\t"
+-
+- "xvadddp 54, 54 , 62 \n\t"
+- "xvadddp 55, 55 , 63 \n\t"
+-
+- "stxvd2x 52, %8, %1 \n\t"
+- "stxvd2x 53, %9, %1 \n\t"
+- "stxvd2x 54, %10, %1 \n\t"
+- "stxvd2x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+- "addi %2, %2, 128 \n\t"
+-
+- "addic. %0 , %0 , -8 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- "xvmuldp 48, 40, 32 \n\t" // x0_r * alpha_r, x0_i * alpha_r
+- "xvmuldp 49, 41, 32 \n\t"
+- "xvmuldp 50, 42, 32 \n\t"
+- "xvmuldp 51, 43, 32 \n\t"
+- "xvmuldp 52, 44, 32 \n\t"
+- "xvmuldp 53, 45, 32 \n\t"
+- "xvmuldp 54, 46, 32 \n\t"
+- "xvmuldp 55, 47, 32 \n\t"
+-
+- "xxswapd 56, 40 \n\t"
+- "xxswapd 57, 41 \n\t"
+- "xxswapd 58, 42 \n\t"
+- "xxswapd 59, 43 \n\t"
+- "xxswapd 60, 44 \n\t"
+- "xxswapd 61, 45 \n\t"
+- "xxswapd 62, 46 \n\t"
+- "xxswapd 63, 47 \n\t"
+-
+- "xvmuldp 56, 56, 33 \n\t" // x0_i * -alpha_i, x0_r * alpha_i
+- "xvmuldp 57, 57, 33 \n\t"
+- "xvmuldp 58, 58, 33 \n\t"
+- "xvmuldp 59, 59, 33 \n\t"
+- "xvmuldp 60, 60, 33 \n\t"
+- "xvmuldp 61, 61, 33 \n\t"
+- "xvmuldp 62, 62, 33 \n\t"
+- "xvmuldp 63, 63, 33 \n\t"
+-
+- "xvadddp 48, 48 , 56 \n\t"
+- "xvadddp 49, 49 , 57 \n\t"
+- "xvadddp 50, 50 , 58 \n\t"
+- "xvadddp 51, 51 , 59 \n\t"
+- "xvadddp 52, 52 , 60 \n\t"
+- "xvadddp 53, 53 , 61 \n\t"
+- "xvadddp 54, 54 , 62 \n\t"
+- "xvadddp 55, 55 , 63 \n\t"
+-
+- "stxvd2x 48, 0, %1 \n\t"
+- "stxvd2x 49, %5, %1 \n\t"
+- "stxvd2x 50, %6, %1 \n\t"
+- "stxvd2x 51, %7, %1 \n\t"
+- "stxvd2x 52, %8, %1 \n\t"
+- "stxvd2x 53, %9, %1 \n\t"
+- "stxvd2x 54, %10, %1 \n\t"
+- "stxvd2x 55, %11, %1 \n\t"
+-
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (x2), // 1
+- "r" (x1), // 2
+- "r" (alpha), // 3
+- "r" (pre), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "memory"
+- );
+-
+-}
+-
+-
++ __vector double t0;
++ __vector double t1;
++ __vector double t2;
++ __vector double t3;
++ __vector double t4;
++ __vector double t5;
++ __vector double t6;
++ __vector double t7;
++ __vector double t8;
++ __vector double t9;
++ __vector double t10;
++ __vector double t11;
++
++ __asm__
++ (
++ "dcbt 0, %2 \n\t"
++
++ "xsnegdp 33, %x16 \n\t" // -alpha_i
++ "xxspltd 32, %x15, 0 \n\t" // alpha_r , alpha_r
++ "xxmrghd 33, 33, %x16 \n\t" // -alpha_i , alpha_i
++
++ "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
++ "lxvd2x 41, %17, %2 \n\t"
++ "lxvd2x 42, %18, %2 \n\t"
++ "lxvd2x 43, %19, %2 \n\t"
++ "lxvd2x 44, %20, %2 \n\t"
++ "lxvd2x 45, %21, %2 \n\t"
++ "lxvd2x 46, %22, %2 \n\t"
++ "lxvd2x 47, %23, %2 \n\t"
++
++ "addi %2, %2, 128 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "ble 2f \n\t"
++
++ ".p2align 5 \n"
++ "1: \n\t"
++
++ "xvmuldp 48, 40, 32 \n\t" // x0_r * alpha_r, x0_i * alpha_r
++ "xvmuldp 49, 41, 32 \n\t"
++ "xvmuldp 50, 42, 32 \n\t"
++ "xvmuldp 51, 43, 32 \n\t"
++ "xvmuldp %x3, 44, 32 \n\t"
++ "xvmuldp %x4, 45, 32 \n\t"
++ "xvmuldp %x5, 46, 32 \n\t"
++ "xvmuldp %x6, 47, 32 \n\t"
++
++ "xxswapd %x7, 40 \n\t"
++ "xxswapd %x8, 41 \n\t"
++ "xxswapd %x9, 42 \n\t"
++ "xxswapd %x10, 43 \n\t"
++ "xxswapd %x11, 44 \n\t"
++ "xxswapd %x12, 45 \n\t"
++ "xxswapd %x13, 46 \n\t"
++ "xxswapd %x14, 47 \n\t"
++
++ "xvmuldp %x7, %x7, 33 \n\t" // x0_i * -alpha_i, x0_r * alpha_i
++ "xvmuldp %x8, %x8, 33 \n\t"
++
++ "lxvd2x 40, 0, %2 \n\t" // x0_r, x0_i
++ "lxvd2x 41, %17, %2 \n\t"
++
++ "xvmuldp %x9, %x9, 33 \n\t"
++ "xvmuldp %x10, %x10, 33 \n\t"
++
++ "lxvd2x 42, %18, %2 \n\t"
++ "lxvd2x 43, %19, %2 \n\t"
++
++ "xvmuldp %x11, %x11, 33 \n\t"
++ "xvmuldp %x12, %x12, 33 \n\t"
++
++ "lxvd2x 44, %20, %2 \n\t"
++ "lxvd2x 45, %21, %2 \n\t"
++
++ "xvmuldp %x13, %x13, 33 \n\t"
++ "xvmuldp %x14, %x14, 33 \n\t"
++
++ "lxvd2x 46, %22, %2 \n\t"
++ "lxvd2x 47, %23, %2 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "xvadddp 48, 48, %x7 \n\t"
++ "xvadddp 49, 49, %x8 \n\t"
++ "xvadddp 50, 50, %x9 \n\t"
++ "xvadddp 51, 51, %x10 \n\t"
++
++ "stxvd2x 48, 0, %2 \n\t"
++ "stxvd2x 49, %17, %2 \n\t"
++
++ "xvadddp %x3, %x3, %x11 \n\t"
++ "xvadddp %x4, %x4, %x12 \n\t"
++
++ "stxvd2x 50, %18, %2 \n\t"
++ "stxvd2x 51, %19, %2 \n\t"
++
++ "xvadddp %x5, %x5, %x13 \n\t"
++ "xvadddp %x6, %x6, %x14 \n\t"
++
++ "stxvd2x %x3, %20, %2 \n\t"
++ "stxvd2x %x4, %21, %2 \n\t"
++ "stxvd2x %x5, %22, %2 \n\t"
++ "stxvd2x %x6, %23, %2 \n\t"
++
++ "addi %2, %2, 256 \n\t"
++
++ "addic. %1, %1, -8 \n\t"
++ "bgt 1b \n"
++
++ "2: \n\t"
++
++ "xvmuldp 48, 40, 32 \n\t" // x0_r * alpha_r, x0_i * alpha_r
++ "xvmuldp 49, 41, 32 \n\t"
++ "xvmuldp 50, 42, 32 \n\t"
++ "xvmuldp 51, 43, 32 \n\t"
++ "xvmuldp %x3, 44, 32 \n\t"
++ "xvmuldp %x4, 45, 32 \n\t"
++ "xvmuldp %x5, 46, 32 \n\t"
++ "xvmuldp %x6, 47, 32 \n\t"
++
++ "xxswapd %x7, 40 \n\t"
++ "xxswapd %x8, 41 \n\t"
++ "xxswapd %x9, 42 \n\t"
++ "xxswapd %x10, 43 \n\t"
++ "xxswapd %x11, 44 \n\t"
++ "xxswapd %x12, 45 \n\t"
++ "xxswapd %x13, 46 \n\t"
++ "xxswapd %x14, 47 \n\t"
++
++ "addi %2, %2, -128 \n\t"
++
++ "xvmuldp %x7, %x7, 33 \n\t" // x0_i * -alpha_i, x0_r * alpha_i
++ "xvmuldp %x8, %x8, 33 \n\t"
++ "xvmuldp %x9, %x9, 33 \n\t"
++ "xvmuldp %x10, %x10, 33 \n\t"
++ "xvmuldp %x11, %x11, 33 \n\t"
++ "xvmuldp %x12, %x12, 33 \n\t"
++ "xvmuldp %x13, %x13, 33 \n\t"
++ "xvmuldp %x14, %x14, 33 \n\t"
++
++ "xvadddp 48, 48, %x7 \n\t"
++ "xvadddp 49, 49, %x8 \n\t"
++ "xvadddp 50, 50, %x9 \n\t"
++ "xvadddp 51, 51, %x10 \n\t"
++
++ "stxvd2x 48, 0, %2 \n\t"
++ "stxvd2x 49, %17, %2 \n\t"
++
++ "xvadddp %x3, %x3, %x11 \n\t"
++ "xvadddp %x4, %x4, %x12 \n\t"
++
++ "stxvd2x 50, %18, %2 \n\t"
++ "stxvd2x 51, %19, %2 \n\t"
++
++ "xvadddp %x5, %x5, %x13 \n\t"
++ "xvadddp %x6, %x6, %x14 \n\t"
++
++ "stxvd2x %x3, %20, %2 \n\t"
++ "stxvd2x %x4, %21, %2 \n\t"
++ "stxvd2x %x5, %22, %2 \n\t"
++ "stxvd2x %x6, %23, %2 \n"
++
++ "#n=%1 x=%0=%2 alpha=(%15,%16) o16=%17 o32=%18 o48=%19 o64=%20 o80=%21 o96=%22 o112=%23\n"
++ "#t0=%x3 t1=%x4 t2=%x5 t3=%x6 t4=%x7 t5=%x8 t6=%x9 t7=%x10 t8=%x11 t9=%x12 t10=%x13 t11=%x14"
++ :
++ "+m" (*x),
++ "+r" (n), // 1
++ "+b" (x), // 2
++ "=wa" (t0), // 3
++ "=wa" (t1), // 4
++ "=wa" (t2), // 5
++ "=wa" (t3), // 6
++ "=wa" (t4), // 7
++ "=wa" (t5), // 8
++ "=wa" (t6), // 9
++ "=wa" (t7), // 10
++ "=wa" (t8), // 11
++ "=wa" (t9), // 12
++ "=wa" (t10), // 13
++ "=wa" (t11) // 14
++ :
++ "d" (alpha_r), // 15
++ "d" (alpha_i), // 16
++ "b" (16), // 17
++ "b" (32), // 18
++ "b" (48), // 19
++ "b" (64), // 20
++ "b" (80), // 21
++ "b" (96), // 22
++ "b" (112) // 23
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51"
++ );
++}
+diff --git a/kernel/power/zswap_microk_power8.c b/kernel/power/zswap_microk_power8.c
+index 9e5623752..54391ba5d 100644
+--- a/kernel/power/zswap_microk_power8.c
++++ b/kernel/power/zswap_microk_power8.c
+@@ -35,146 +35,123 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define HAVE_KERNEL_16 1
+
+-static void zswap_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y) __attribute__ ((noinline));
+-
+-static void zswap_kernel_16( BLASLONG n, FLOAT *x, FLOAT *y)
++static void
++zswap_kernel_16 (long n, double *x, double *y)
+ {
+-
+-
+- BLASLONG i = n;
+- BLASLONG o16 = 16;
+- BLASLONG o32 = 32;
+- BLASLONG o48 = 48;
+- BLASLONG o64 = 64;
+- BLASLONG o80 = 80;
+- BLASLONG o96 = 96;
+- BLASLONG o112 = 112;
+- FLOAT *x1=x;
+- FLOAT *y1=y;
+- FLOAT *x2=x+1;
+- FLOAT *y2=y+1;
+- BLASLONG pre = 384;
+- BLASLONG alpha=0;
+-
+- __asm__ __volatile__
+- (
+-
+- "addi %3, %3, -8 \n\t"
+- "addi %4, %4, -8 \n\t"
+-
+- ".align 5 \n\t"
+- "1: \n\t"
+-
+- "lxvd2x 32, 0, %2 \n\t"
+- "lxvd2x 33, %5, %2 \n\t"
+- "lxvd2x 34, %6, %2 \n\t"
+- "lxvd2x 35, %7, %2 \n\t"
+- "lxvd2x 36, %8, %2 \n\t"
+- "lxvd2x 37, %9, %2 \n\t"
+- "lxvd2x 38, %10, %2 \n\t"
+- "lxvd2x 39, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 40, 0, %2 \n\t"
+- "lxvd2x 41, %5, %2 \n\t"
+- "lxvd2x 42, %6, %2 \n\t"
+- "lxvd2x 43, %7, %2 \n\t"
+- "lxvd2x 44, %8, %2 \n\t"
+- "lxvd2x 45, %9, %2 \n\t"
+- "lxvd2x 46, %10, %2 \n\t"
+- "lxvd2x 47, %11, %2 \n\t"
+-
+- "addi %2, %2, 128 \n\t"
+-
+- "lxvd2x 48, 0, %1 \n\t"
+- "lxvd2x 49, %5, %1 \n\t"
+- "lxvd2x 50, %6, %1 \n\t"
+- "lxvd2x 51, %7, %1 \n\t"
+- "lxvd2x 52, %8, %1 \n\t"
+- "lxvd2x 53, %9, %1 \n\t"
+- "lxvd2x 54, %10, %1 \n\t"
+- "lxvd2x 55, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "lxvd2x 56, 0, %1 \n\t"
+- "lxvd2x 57, %5, %1 \n\t"
+- "lxvd2x 58, %6, %1 \n\t"
+- "lxvd2x 59, %7, %1 \n\t"
+- "lxvd2x 60, %8, %1 \n\t"
+- "lxvd2x 61, %9, %1 \n\t"
+- "lxvd2x 62, %10, %1 \n\t"
+- "lxvd2x 63, %11, %1 \n\t"
+-
+- "addi %1, %1, 128 \n\t"
+-
+- "stxvd2x 32, 0, %3 \n\t"
+- "stxvd2x 33, %5, %3 \n\t"
+- "stxvd2x 34, %6, %3 \n\t"
+- "stxvd2x 35, %7, %3 \n\t"
+- "stxvd2x 36, %8, %3 \n\t"
+- "stxvd2x 37, %9, %3 \n\t"
+- "stxvd2x 38, %10, %3 \n\t"
+- "stxvd2x 39, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvd2x 40, 0, %3 \n\t"
+- "stxvd2x 41, %5, %3 \n\t"
+- "stxvd2x 42, %6, %3 \n\t"
+- "stxvd2x 43, %7, %3 \n\t"
+- "stxvd2x 44, %8, %3 \n\t"
+- "stxvd2x 45, %9, %3 \n\t"
+- "stxvd2x 46, %10, %3 \n\t"
+- "stxvd2x 47, %11, %3 \n\t"
+-
+- "addi %3, %3, 128 \n\t"
+-
+- "stxvd2x 48, 0, %4 \n\t"
+- "stxvd2x 49, %5, %4 \n\t"
+- "stxvd2x 50, %6, %4 \n\t"
+- "stxvd2x 51, %7, %4 \n\t"
+- "stxvd2x 52, %8, %4 \n\t"
+- "stxvd2x 53, %9, %4 \n\t"
+- "stxvd2x 54, %10, %4 \n\t"
+- "stxvd2x 55, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "stxvd2x 56, 0, %4 \n\t"
+- "stxvd2x 57, %5, %4 \n\t"
+- "stxvd2x 58, %6, %4 \n\t"
+- "stxvd2x 59, %7, %4 \n\t"
+- "stxvd2x 60, %8, %4 \n\t"
+- "stxvd2x 61, %9, %4 \n\t"
+- "stxvd2x 62, %10, %4 \n\t"
+- "stxvd2x 63, %11, %4 \n\t"
+-
+- "addi %4, %4, 128 \n\t"
+-
+- "addic. %0 , %0 , -16 \n\t"
+- "bgt 1b \n\t"
+-
+- "2: \n\t"
+-
+- :
+- :
+- "r" (i), // 0
+- "r" (y1), // 1
+- "r" (x1), // 2
+- "r" (y2), // 3
+- "r" (x2), // 4
+- "r" (o16), // 5
+- "r" (o32), // 6
+- "r" (o48), // 7
+- "r" (o64), // 8
+- "r" (o80), // 9
+- "r" (o96), // 10
+- "r" (o112) // 11
+- : "cr0", "%0", "%2" , "%1", "%3", "%4", "memory"
+- );
+-
+-}
+-
+-
++ __asm__
++ (
++ ".p2align 5 \n"
++ "1: \n\t"
++ "lxvd2x 32, 0, %4 \n\t"
++ "lxvd2x 33, %5, %4 \n\t"
++ "lxvd2x 34, %6, %4 \n\t"
++ "lxvd2x 35, %7, %4 \n\t"
++ "lxvd2x 36, %8, %4 \n\t"
++ "lxvd2x 37, %9, %4 \n\t"
++ "lxvd2x 38, %10, %4 \n\t"
++ "lxvd2x 39, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "lxvd2x 40, 0, %4 \n\t"
++ "lxvd2x 41, %5, %4 \n\t"
++ "lxvd2x 42, %6, %4 \n\t"
++ "lxvd2x 43, %7, %4 \n\t"
++ "lxvd2x 44, %8, %4 \n\t"
++ "lxvd2x 45, %9, %4 \n\t"
++ "lxvd2x 46, %10, %4 \n\t"
++ "lxvd2x 47, %11, %4 \n\t"
++
++ "addi %4, %4, -128 \n\t"
++
++ "lxvd2x 48, 0, %3 \n\t"
++ "lxvd2x 49, %5, %3 \n\t"
++ "lxvd2x 50, %6, %3 \n\t"
++ "lxvd2x 51, %7, %3 \n\t"
++ "lxvd2x 0, %8, %3 \n\t"
++ "lxvd2x 1, %9, %3 \n\t"
++ "lxvd2x 2, %10, %3 \n\t"
++ "lxvd2x 3, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "lxvd2x 4, 0, %3 \n\t"
++ "lxvd2x 5, %5, %3 \n\t"
++ "lxvd2x 6, %6, %3 \n\t"
++ "lxvd2x 7, %7, %3 \n\t"
++ "lxvd2x 8, %8, %3 \n\t"
++ "lxvd2x 9, %9, %3 \n\t"
++ "lxvd2x 10, %10, %3 \n\t"
++ "lxvd2x 11, %11, %3 \n\t"
++
++ "addi %3, %3, -128 \n\t"
++
++ "stxvd2x 32, 0, %3 \n\t"
++ "stxvd2x 33, %5, %3 \n\t"
++ "stxvd2x 34, %6, %3 \n\t"
++ "stxvd2x 35, %7, %3 \n\t"
++ "stxvd2x 36, %8, %3 \n\t"
++ "stxvd2x 37, %9, %3 \n\t"
++ "stxvd2x 38, %10, %3 \n\t"
++ "stxvd2x 39, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 40, 0, %3 \n\t"
++ "stxvd2x 41, %5, %3 \n\t"
++ "stxvd2x 42, %6, %3 \n\t"
++ "stxvd2x 43, %7, %3 \n\t"
++ "stxvd2x 44, %8, %3 \n\t"
++ "stxvd2x 45, %9, %3 \n\t"
++ "stxvd2x 46, %10, %3 \n\t"
++ "stxvd2x 47, %11, %3 \n\t"
++
++ "addi %3, %3, 128 \n\t"
++
++ "stxvd2x 48, 0, %4 \n\t"
++ "stxvd2x 49, %5, %4 \n\t"
++ "stxvd2x 50, %6, %4 \n\t"
++ "stxvd2x 51, %7, %4 \n\t"
++ "stxvd2x 0, %8, %4 \n\t"
++ "stxvd2x 1, %9, %4 \n\t"
++ "stxvd2x 2, %10, %4 \n\t"
++ "stxvd2x 3, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++
++ "stxvd2x 4, 0, %4 \n\t"
++ "stxvd2x 5, %5, %4 \n\t"
++ "stxvd2x 6, %6, %4 \n\t"
++ "stxvd2x 7, %7, %4 \n\t"
++ "stxvd2x 8, %8, %4 \n\t"
++ "stxvd2x 9, %9, %4 \n\t"
++ "stxvd2x 10, %10, %4 \n\t"
++ "stxvd2x 11, %11, %4 \n\t"
++
++ "addi %4, %4, 128 \n\t"
++ "addic. %2, %2, -16 \n\t"
++ "bgt 1b \n"
++
++ "#n=%2 x=%0=%3 y=%1=%4 o16=%5 o32=%6 o48=%7 o64=%8 o80=%9 o96=%10 o112=%11"
++ :
++ "+m" (*x),
++ "+m" (*y),
++ "+r" (n), // 2
++ "+b" (x), // 3
++ "+b" (y) // 4
++ :
++ "b" (16), // 5
++ "b" (32), // 6
++ "b" (48), // 7
++ "b" (64), // 8
++ "b" (80), // 9
++ "b" (96), // 10
++ "b" (112) // 11
++ :
++ "cr0",
++ "vs32","vs33","vs34","vs35","vs36","vs37","vs38","vs39",
++ "vs40","vs41","vs42","vs43","vs44","vs45","vs46","vs47",
++ "vs48","vs49","vs50","vs51","vs0","vs1","vs2","vs3",
++ "vs4","vs5","vs6","vs7","vs8","vs9","vs10","vs11"
++ );
++}
diff --git a/var/spack/repos/builtin/packages/opencoarrays/package.py b/var/spack/repos/builtin/packages/opencoarrays/package.py
index 0449155bc7..37ae236c0a 100644
--- a/var/spack/repos/builtin/packages/opencoarrays/package.py
+++ b/var/spack/repos/builtin/packages/opencoarrays/package.py
@@ -42,6 +42,11 @@ class Opencoarrays(CMakePackage):
version('1.7.4', '85ba87def461e3ff5a164de2e6482930')
version('1.6.2', '5a4da993794f3e04ea7855a6678981ba')
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo',
+ 'MinSizeRel', 'CodeCoverage'))
+
depends_on('mpi')
def cmake_args(self):
diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py
index 09fa68b9c0..5587a893dc 100644
--- a/var/spack/repos/builtin/packages/opencv/package.py
+++ b/var/spack/repos/builtin/packages/opencv/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Opencv(Package):
+class Opencv(CMakePackage):
"""OpenCV is released under a BSD license and hence it's free for both
academic and commercial use. It has C++, C, Python and Java interfaces and
supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for
@@ -42,13 +42,19 @@ class Opencv(Package):
homepage = 'http://opencv.org/'
url = 'https://github.com/Itseez/opencv/archive/3.1.0.tar.gz'
- version('3.2.0', 'a43b65488124ba33dde195fea9041b70')
- version('3.1.0', '70e1dd07f0aa06606f1bc0e3fa15abd3')
+ version('master', git="https://github.com/opencv/opencv.git", branch="master")
+ version('3.3.0', 'eeedaec282a70aa2ea1d5152a372c990')
+ version('3.2.0', 'a43b65488124ba33dde195fea9041b70')
+ version('3.1.0', '70e1dd07f0aa06606f1bc0e3fa15abd3')
+ version('2.4.13.2', 'fe52791ce523681a67036def4c25261b')
+ version('2.4.13.1', 'f6d354500d5013e60dc0fc44b07a63d1')
+ version('2.4.13', '8feb45a71adad89b8017a777477c3eff')
+ version('2.4.12.3', '2496a4a4caf8fecfbfc294fbe6a814b0')
+ version('2.4.12.2', 'bc0c60c2ea1cf4078deef99569912fc7')
+ version('2.4.12.1', '7192f51434710904b5e3594872b897c3')
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('eigen', default=True, description='Activates support for eigen')
variant('ipp', default=True, description='Activates support for IPP')
@@ -61,32 +67,36 @@ class Opencv(Package):
description='Enables the build of Python extensions')
variant('java', default=False,
description='Activates support for Java')
+ variant('openmp', default=False, description='Activates support for OpenMP threads')
+ variant('core', default=False, description='Include opencv_core module into the OpenCV build')
+ variant('highgui', default=False, description='Include opencv_highgui module into the OpenCV build')
+ variant('imgproc', default=False, description='Include opencv_imgproc module into the OpenCV build')
+ variant('jpeg', default=False, description='Include JPEG support')
+ variant('png', default=False, description='Include PNG support')
+ variant('tiff', default=False, description='Include TIFF support')
+ variant('zlib', default=False, description='Build zlib from source')
- depends_on('cmake', type='build')
depends_on('eigen', when='+eigen', type='build')
- depends_on('zlib')
- depends_on('libpng')
- depends_on('libjpeg-turbo')
- depends_on('libtiff')
+ depends_on('zlib', when='+zlib')
+ depends_on('libpng', when='+png')
+ depends_on('jpeg', when='+jpeg')
+ depends_on('libtiff', when='+tiff')
depends_on('jasper', when='+jasper')
depends_on('cuda', when='+cuda')
depends_on('gtkplus', when='+gtk')
depends_on('vtk', when='+vtk')
depends_on('qt', when='+qt')
- depends_on('jdk', when='+java')
+ depends_on('java', when='+java')
depends_on('py-numpy', when='+python', type=('build', 'run'))
extends('python', when='+python')
- def install(self, spec, prefix):
- cmake_options = []
- cmake_options.extend(std_cmake_args)
+ def cmake_args(self):
+ spec = self.spec
- cmake_options.extend([
- '-DCMAKE_BUILD_TYPE:STRING={0}'.format((
- 'Debug' if '+debug' in spec else 'Release')),
+ args = [
'-DBUILD_SHARED_LIBS:BOOL={0}'.format((
'ON' if '+shared' in spec else 'OFF')),
'-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF',
@@ -100,66 +110,88 @@ class Opencv(Package):
'ON' if '+vtk' in spec else 'OFF')),
'-DBUILD_opencv_java:BOOL={0}'.format((
'ON' if '+java' in spec else 'OFF')),
- ])
+ '-DBUILD_opencv_core:BOOL={0}'.format((
+ 'ON' if '+core' in spec else 'OFF')),
+ '-DBUILD_opencv_highgui:BOOL={0}'.format((
+ 'ON' if '+highgui' in spec else 'OFF')),
+ '-DBUILD_opencv_imgproc:BOOL={0}'.format((
+ 'ON' if '+imgproc' in spec else 'OFF')),
+ '-DWITH_JPEG:BOOL={0}'.format((
+ 'ON' if '+jpeg' in spec else 'OFF')),
+ '-DWITH_PNG:BOOL={0}'.format((
+ 'ON' if '+png' in spec else 'OFF')),
+ '-DWITH_TIFF:BOOL={0}'.format((
+ 'ON' if '+tiff' in spec else 'OFF')),
+ '-DWITH_ZLIB:BOOL={0}'.format((
+ 'ON' if '+zlib' in spec else 'OFF')),
+ '-DWITH_OPENMP:BOOL={0}'.format((
+ 'ON' if '+openmp' in spec else 'OFF')),
+ ]
# Media I/O
- zlib = spec['zlib']
- cmake_options.extend([
- '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(zlib.prefix.lib,
- 'libz.{0}'.format(dso_suffix))),
- '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include)
- ])
-
- libpng = spec['libpng']
- cmake_options.extend([
- '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(libpng.prefix.lib,
- 'libpng.{0}'.format(dso_suffix))),
- '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include)
- ])
-
- libjpeg = spec['libjpeg-turbo']
- cmake_options.extend([
- '-DJPEG_LIBRARY:FILEPATH={0}'.format(
- join_path(libjpeg.prefix.lib,
- 'libjpeg.{0}'.format(dso_suffix))),
- '-DJPEG_INCLUDE_DIR:PATH={0}'.format(libjpeg.prefix.include)
- ])
-
- libtiff = spec['libtiff']
- cmake_options.extend([
- '-DTIFF_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(libtiff.prefix.lib,
- 'libtiff.{0}'.format(dso_suffix))),
- '-DTIFF_INCLUDE_DIR:PATH={0}'.format(libtiff.prefix.include)
- ])
-
- jasper = spec['jasper']
- cmake_options.extend([
- '-DJASPER_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(jasper.prefix.lib,
- 'libjasper.{0}'.format(dso_suffix))),
- '-DJASPER_INCLUDE_DIR:PATH={0}'.format(jasper.prefix.include)
- ])
+ if '+zlib' in spec:
+ zlib = spec['zlib']
+ args.extend([
+ '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(zlib.prefix.lib,
+ 'libz.{0}'.format(dso_suffix))),
+ '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include)
+ ])
+
+ if '+png' in spec:
+ libpng = spec['libpng']
+ args.extend([
+ '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(libpng.prefix.lib,
+ 'libpng.{0}'.format(dso_suffix))),
+ '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include)
+ ])
+
+ if '+jpeg' in spec:
+ libjpeg = spec['jpeg']
+ args.extend([
+ '-DBUILD_JPEG:BOOL=OFF',
+ '-DJPEG_LIBRARY:FILEPATH={0}'.format(
+ join_path(libjpeg.prefix.lib,
+ 'libjpeg.{0}'.format(dso_suffix))),
+ '-DJPEG_INCLUDE_DIR:PATH={0}'.format(libjpeg.prefix.include)
+ ])
+
+ if '+tiff' in spec:
+ libtiff = spec['libtiff']
+ args.extend([
+ '-DTIFF_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(libtiff.prefix.lib,
+ 'libtiff.{0}'.format(dso_suffix))),
+ '-DTIFF_INCLUDE_DIR:PATH={0}'.format(libtiff.prefix.include)
+ ])
+
+ if '+jasper' in spec:
+ jasper = spec['jasper']
+ args.extend([
+ '-DJASPER_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(jasper.prefix.lib,
+ 'libjasper.{0}'.format(dso_suffix))),
+ '-DJASPER_INCLUDE_DIR:PATH={0}'.format(jasper.prefix.include)
+ ])
# GUI
if '+gtk' not in spec:
- cmake_options.extend([
+ args.extend([
'-DWITH_GTK:BOOL=OFF',
'-DWITH_GTK_2_X:BOOL=OFF'
])
elif '^gtkplus@3:' in spec:
- cmake_options.extend([
+ args.extend([
'-DWITH_GTK:BOOL=ON',
'-DWITH_GTK_2_X:BOOL=OFF'
])
elif '^gtkplus@2:3' in spec:
- cmake_options.extend([
+ args.extend([
'-DWITH_GTK:BOOL=OFF',
'-DWITH_GTK_2_X:BOOL=ON'
])
@@ -171,7 +203,7 @@ class Opencv(Package):
python_include_dir = spec['python'].headers.directories[0]
if '^python@3:' in spec:
- cmake_options.extend([
+ args.extend([
'-DBUILD_opencv_python3=ON',
'-DPYTHON3_EXECUTABLE={0}'.format(python_exe),
'-DPYTHON3_LIBRARY={0}'.format(python_lib),
@@ -179,7 +211,7 @@ class Opencv(Package):
'-DBUILD_opencv_python2=OFF',
])
elif '^python@2:3' in spec:
- cmake_options.extend([
+ args.extend([
'-DBUILD_opencv_python2=ON',
'-DPYTHON2_EXECUTABLE={0}'.format(python_exe),
'-DPYTHON2_LIBRARY={0}'.format(python_lib),
@@ -187,12 +219,9 @@ class Opencv(Package):
'-DBUILD_opencv_python3=OFF',
])
else:
- cmake_options.extend([
+ args.extend([
'-DBUILD_opencv_python2=OFF',
'-DBUILD_opencv_python3=OFF'
])
- with working_dir('spack_build', create=True):
- cmake('..', *cmake_options)
- make('VERBOSE=1')
- make("install")
+ return args
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-bin.patch
index b9e87a7ec8..b9e87a7ec8 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-bin-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-bin.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-build.patch
index 26e2d8f085..26e2d8f085 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-build-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-build.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-etc.patch
index dd8146e953..dd8146e953 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-etc-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-etc.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/mgridgen-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-mgridgen-lib.patch
index 8dc0b995ff..8dc0b995ff 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/mgridgen-lib-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-mgridgen-lib.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-mpi.patch
index b3663b0a49..b3663b0a49 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-mpi-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-mpi.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-scotch-metis-lib.patch
index b7530e6320..b7530e6320 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/scotch-metis-lib-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-scotch-metis-lib.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-site.patch
index d988c2f9b8..d988c2f9b8 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-site.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch b/var/spack/repos/builtin/packages/openfoam-com/1612-zoltan-lib.patch
index 712e6a7dfd..712e6a7dfd 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/zoltan-lib-1612.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/1612-zoltan-lib.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-plus.patch b/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch
index a1f5d8a08a..a1f5d8a08a 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/openfoam-site-plus.patch
+++ b/var/spack/repos/builtin/packages/openfoam-com/openfoam-site.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-com/package.py b/var/spack/repos/builtin/packages/openfoam-com/package.py
index 9e930535a0..0e2c0275d3 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/package.py
+++ b/var/spack/repos/builtin/packages/openfoam-com/package.py
@@ -54,6 +54,9 @@
# - Combining +zoltan with +int64 has not been tested, but probably won't work.
# - Combining +mgridgen with +int64 or +float32 probably won't work.
#
+# The spack 'develop' version of openfoam-com retains the upstream
+# WM_PROJECT_VERSION=plus naming internally.
+#
##############################################################################
from spack import *
from spack.environment import *
@@ -258,12 +261,14 @@ class OpenfoamCom(Package):
"""
homepage = "http://www.openfoam.com/"
- baseurl = "https://sourceforge.net/projects/openfoamplus/files"
+ baseurl = "https://sourceforge.net/projects/openfoamplus/files/"
+ gitrepo = "https://develop.openfoam.com/Development/OpenFOAM-plus.git"
+ version('1706', '630d30770f7b54d6809efbf94b7d7c8f',
+ url=baseurl + 'v1706/OpenFOAM-v1706.tgz')
version('1612', 'ca02c491369150ab127cbb88ec60fbdf',
- url=baseurl + '/v1612+/OpenFOAM-v1612+.tgz')
- version('plus', branch='develop', # Note: needs user credentials
- git='https://develop.openfoam.com/Development/OpenFOAM-plus.git')
+ url=baseurl + 'v1612+/OpenFOAM-v1612+.tgz')
+ version('develop', branch='develop', git=gitrepo) # Needs credentials
variant('int64', default=False,
description='Compile with 64-bit label')
@@ -309,27 +314,29 @@ class OpenfoamCom(Package):
# Workaround: use preferred variants "+plugins +qt" in
# ~/.spack/packages.yaml
+ # 1706 ok with newer paraview but avoid pv-5.2, pv-5.3 readers
+ depends_on('paraview@5.4:', when='@1706:+paraview')
# 1612 plugins need older paraview
- # The native reader in paraview 5.2 is broken, so start after that
depends_on('paraview@:5.0.1', when='@1612+paraview')
- depends_on('paraview@5.3:', when='@1706:+paraview')
- depends_on('paraview@5.3:', when='@plus+paraview')
# General patches
common = ['spack-Allwmake', 'README-spack']
assets = []
# Version-specific patches
- patch('openfoam-bin-1612.patch', when='@1612')
- patch('openfoam-etc-1612.patch', when='@1612')
- patch('openfoam-site-1612.patch', when='@1612')
- patch('openfoam-mpi-1612.patch', when='@1612')
- patch('openfoam-build-1612.patch', when='@1612')
- patch('mgridgen-lib-1612.patch', when='@1612')
- patch('scotch-metis-lib-1612.patch', when='@1612')
- patch('zoltan-lib-1612.patch', when='@1612')
-
- patch('openfoam-site-plus.patch', when='@plus')
+ patch('1612-bin.patch', when='@1612')
+ patch('1612-build.patch', when='@1612')
+ patch('1612-etc.patch', when='@1612')
+ patch('1612-site.patch', when='@1612')
+ patch('1612-mpi.patch', when='@1612')
+ patch('1612-mgridgen-lib.patch', when='@1612')
+ patch('1612-scotch-metis-lib.patch', when='@1612')
+ patch('1612-zoltan-lib.patch', when='@1612')
+
+ # This patch is reasonably version-invariant
+ # 1) default site directly under WM_PROJECT_DIR
+ # 2) no FOAM_EXT_LIBBIN required
+ patch('openfoam-site.patch', when='@1706:')
# Some user config settings
# default: 'compile-option': 'RpathOpt',
@@ -349,7 +356,7 @@ class OpenfoamCom(Package):
etc_config = {}
phases = ['configure', 'build', 'install']
- build_script = './spack-Allwmake' # <- Added by patch() method.
+ build_script = './spack-Allwmake' # From patch() method.
#
# - End of definitions / setup -
@@ -360,7 +367,6 @@ class OpenfoamCom(Package):
run_env.set('WM_PROJECT_DIR', self.projectdir)
for d in ['wmake', self.archbin]: # bin already added automatically
run_env.prepend_path('PATH', join_path(self.projectdir, d))
- run_env.set('MPI_BUFFER_SIZE', "20000000")
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""Provide location of the OpenFOAM project.
diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch b/var/spack/repos/builtin/packages/openfoam-org/41-etc.patch
index 6fe3b7b4d3..6fe3b7b4d3 100644
--- a/var/spack/repos/builtin/packages/openfoam-org/openfoam-etc-41.patch
+++ b/var/spack/repos/builtin/packages/openfoam-org/41-etc.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-org/openfoam-site-41.patch b/var/spack/repos/builtin/packages/openfoam-org/41-site.patch
index d988c2f9b8..d988c2f9b8 100644
--- a/var/spack/repos/builtin/packages/openfoam-org/openfoam-site-41.patch
+++ b/var/spack/repos/builtin/packages/openfoam-org/41-site.patch
diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py
index a31cc2e210..98e1ba5602 100644
--- a/var/spack/repos/builtin/packages/openfoam-org/package.py
+++ b/var/spack/repos/builtin/packages/openfoam-org/package.py
@@ -79,7 +79,7 @@ class OpenfoamOrg(Package):
version('4.1', '318a446c4ae6366c7296b61184acd37c',
url=baseurl + '/OpenFOAM-4.x/archive/version-4.1.tar.gz')
- version('dev', git='https://github.com/OpenFOAM/OpenFOAM-dev.git')
+ version('develop', git='https://github.com/OpenFOAM/OpenFOAM-dev.git')
variant('int64', default=False,
description='Compile with 64-bit label')
@@ -103,8 +103,8 @@ class OpenfoamOrg(Package):
assets = ['bin/foamEtcFile']
# Version-specific patches
- patch('openfoam-etc-41.patch', when='@4.1')
- patch('openfoam-site-41.patch', when='@4.1')
+ patch('41-etc.patch', when='@4.1')
+ patch('41-site.patch', when='@4.1')
# Some user config settings
config = {
@@ -134,7 +134,6 @@ class OpenfoamOrg(Package):
run_env.set('WM_PROJECT_DIR', self.projectdir)
for d in ['wmake', self.archbin]: # bin already added automatically
run_env.prepend_path('PATH', join_path(self.projectdir, d))
- run_env.set('MPI_BUFFER_SIZE', "20000000")
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""Provide location of the OpenFOAM project.
diff --git a/var/spack/repos/builtin/packages/openmc/package.py b/var/spack/repos/builtin/packages/openmc/package.py
new file mode 100644
index 0000000000..aed4f4b0e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmc/package.py
@@ -0,0 +1,91 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Openmc(MakefilePackage):
+ """The OpenMC project aims to provide a fully-featured Monte Carlo particle
+ transport code based on modern methods. It is a constructive solid
+ geometry, continuous-energy transport code that uses ACE format cross
+ sections. The project started under the Computational Reactor Physics
+ Group at MIT."""
+
+ homepage = "https://github.com/ANL-CESAR/"
+ url = "https://github.com/ANL-CESAR/openmc.git"
+
+ tags = ['proxy-app']
+
+ version('develop', git='https://github.com/ANL-CESAR/openmc.git')
+
+ build_directory = 'src'
+
+ parallel = False
+
+ @property
+ def build_targets(self):
+
+ targets = []
+
+ if self.compiler.name == 'gcc':
+ targets.append('COMPILER=gnu')
+ targets.append('MACHINE=UNKNOWN')
+ if self.compiler.name == 'intel':
+ targets.append('COMPILER=intel')
+ if self.compiler.name == 'pgi':
+ targets.append('COMPILER=pgi')
+ if self.compiler.name == 'xl':
+ targets.append('COMPILER=ibm')
+ if self.compiler.name == 'cce':
+ targets.append('COMPILER=cray')
+
+ return targets
+
+ def install(self, spec, prefix):
+ with working_dir('src'):
+ pth_st_cmp = join_path(prefix.bin, 'statepoint_cmp')
+ pth_st_histogram = join_path(prefix.bin, 'statepoint_histogram')
+ pth_st_meshpoint = join_path(prefix.bin, 'statepoint_meshpoint')
+ pth_openmc = join_path(prefix, 'share/man/man1/openmc.1')
+ pth_copyright = join_path(prefix, 'share/doc/openmc/copyright')
+ mkdir(prefix.bin)
+ mkdirp(pth_st_cmp)
+ mkdirp(pth_st_histogram)
+ mkdirp(pth_st_meshpoint)
+ mkdirp(pth_openmc)
+ mkdirp(pth_copyright)
+
+ install('openmc', prefix.bin)
+ install('utils/statepoint_cmp.py', pth_st_cmp)
+ install('utils/statepoint_histogram.py',
+ pth_st_histogram)
+ install('utils/statepoint_meshplot.py',
+ pth_st_meshpoint)
+ install('man/man1/openmc.1', pth_openmc)
+ install('LICENSE', pth_copyright)
+ install_tree('docs/', prefix.docs)
+ install_tree('examples/', prefix.examples)
+ install_tree('data/', prefix.data)
+ install_tree('tests/', prefix.tests)
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index e685cfce88..7fc50928db 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -52,6 +52,18 @@ def _verbs_dir():
return None
+def _mxm_dir():
+ """Look for default directory where the Mellanox package is
+ installed. Return None if not found.
+ """
+ # Only using default directory; make this more flexible in the future
+ path = "/opt/mellanox/mxm"
+ if os.path.isdir(path):
+ return path
+ else:
+ return None
+
+
class Openmpi(AutotoolsPackage):
"""The Open MPI Project is an open source Message Passing Interface
implementation that is developed and maintained by a consortium
@@ -189,7 +201,7 @@ class Openmpi(AutotoolsPackage):
depends_on('hwloc')
depends_on('hwloc +cuda', when='+cuda')
- depends_on('jdk', when='+java')
+ depends_on('java', when='+java')
depends_on('sqlite', when='+sqlite3@:1.11')
conflicts('+cuda', when='@:1.6') # CUDA support was added in 1.7
@@ -198,8 +210,8 @@ class Openmpi(AutotoolsPackage):
conflicts('fabrics=mxm', when='@:1.5.3') # MXM support was added in 1.5.4
def url_for_version(self, version):
- return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (
- version.up_to(2), version)
+ url = "http://www.open-mpi.org/software/ompi/v{0}/downloads/openmpi-{1}.tar.bz2"
+ return url.format(version.up_to(2), version)
@property
def libs(self):
@@ -251,6 +263,17 @@ class Openmpi(AutotoolsPackage):
line += '={0}'.format(path)
return line
+ def with_or_without_mxm(self, activated):
+ opt = 'mxm'
+ # If the option has not been activated return --without-mxm
+ if not activated:
+ return '--without-{0}'.format(opt)
+ line = '--with-{0}'.format(opt)
+ path = _mxm_dir()
+ if (path is not None):
+ line += '={0}'.format(path)
+ return line
+
@run_before('autoreconf')
def die_without_fortran(self):
# Until we can pass variants such as +fortran through virtual
@@ -285,7 +308,7 @@ class Openmpi(AutotoolsPackage):
config_args.extend([
'--enable-java',
'--enable-mpi-java',
- '--with-jdk-dir={0}'.format(spec['jdk'].prefix)
+ '--with-jdk-dir={0}'.format(spec['java'].prefix)
])
else:
config_args.extend([
diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py
index 28a7187da8..e90d010e83 100644
--- a/var/spack/repos/builtin/packages/openscenegraph/package.py
+++ b/var/spack/repos/builtin/packages/openscenegraph/package.py
@@ -26,7 +26,7 @@
from spack import *
-class Openscenegraph(Package):
+class Openscenegraph(CMakePackage):
"""OpenSceneGraph is an open source, high performance 3D graphics toolkit
that's used in a variety of visual simulation applications."""
@@ -36,42 +36,34 @@ class Openscenegraph(Package):
version('3.2.3', '02ffdad7744c747d8fad0d7babb58427')
version('3.1.5', '1c90b851b109849c985006486ef59822')
- variant('debug', default=False, description='Builds a debug version of the library')
variant('shared', default=True, description='Builds a shared version of the library')
depends_on('cmake@2.8.7:', type='build')
depends_on('qt@4:')
depends_on('zlib')
- def install(self, spec, prefix):
- build_type = 'Debug' if '+debug' in spec else 'Release'
+ def cmake_args(self):
+ spec = self.spec
+
shared_status = 'ON' if '+shared' in spec else 'OFF'
- cmake_args = std_cmake_args[:]
- cmake_args.extend([
- '-DCMAKE_BUILD_TYPE={0}'.format(build_type),
+ args = [
'-DDYNAMIC_OPENSCENEGRAPH={0}'.format(shared_status),
'-DDYNAMIC_OPENTHREADS={0}'.format(shared_status),
- ])
+ '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include),
+ '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib,
+ dso_suffix),
+ '-DBUILD_OSG_APPLICATIONS=OFF',
+ '-DOSG_NOTIFY_DISABLED=ON',
+ '-DLIB_POSTFIX=',
+ ]
# NOTE: This is necessary in order to allow OpenSceneGraph to compile
# despite containing a number of implicit bool to int conversions.
if spec.satisfies('%gcc'):
- cmake_args.extend([
+ args.extend([
'-DCMAKE_C_FLAGS=-fpermissive',
'-DCMAKE_CXX_FLAGS=-fpermissive',
])
- with working_dir('spack-build', create=True):
- cmake(
- '..',
- '-DZLIB_INCLUDE_DIR={0}'.format(spec['zlib'].prefix.include),
- '-DZLIB_LIBRARY={0}/libz.{1}'.format(spec['zlib'].prefix.lib,
- dso_suffix),
- '-DBUILD_OSG_APPLICATIONS=OFF',
- '-DOSG_NOTIFY_DISABLED=ON',
- '-DLIB_POSTFIX=',
- *cmake_args
- )
- make()
- make('install')
+ return args
diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py
index 7b1c66e5d1..1b71e44346 100644
--- a/var/spack/repos/builtin/packages/openspeedshop/package.py
+++ b/var/spack/repos/builtin/packages/openspeedshop/package.py
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##############################################################################
-# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@@ -45,7 +45,7 @@ import os
import os.path
-class Openspeedshop(Package):
+class Openspeedshop(CMakePackage):
"""OpenSpeedShop is a community effort by The Krell Institute with
current direct funding from DOEs NNSA. It builds on top of a
broad list of community infrastructures, most notably Dyninst
@@ -61,17 +61,11 @@ class Openspeedshop(Package):
homepage = "http://www.openspeedshop.org"
url = "https://github.com/OpenSpeedShop"
- version('2.2', '16cb051179c2038de4e8a845edf1d573')
+
# Use when the git repository is available
version('2.3', branch='master',
git='https://github.com/OpenSpeedShop/openspeedshop.git')
- # Optional mirror template
- # url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.3.tar.gz"
- # version('2.3', '517a7798507241ad8abd8b0626a4d2cf')
-
- parallel = False
-
variant('offline', default=False,
description="build with offline instrumentor enabled.")
variant('cbtf', default=True,
@@ -83,11 +77,13 @@ class Openspeedshop(Package):
to point to target build.")
variant('cuda', default=False,
description="build with cuda packages included.")
- variant('ptgf', default=False,
- description="build with the PTGF based gui package enabled.")
- variant('rtfe', default=False,
- description="build for clusters heterogeneous processors \
- on fe/be nodes.")
+
+ variant('gui', default='qt3', values=('none', 'qt3', 'qt4'),
+ description='Build or not build a GUI of choice'
+ )
+
+ variant('build_type', default='None', values=('None'),
+ description='CMake build type')
# MPI variants
variant('openmpi', default=False,
@@ -112,18 +108,19 @@ class Openspeedshop(Package):
depends_on("cmake@3.0.2:", type='build')
# Dependencies for openspeedshop that are common to all
# the variants of the OpenSpeedShop build
+ depends_on("libtool", type='build')
depends_on("bison", type='build')
depends_on("flex", type='build')
- depends_on("binutils@2.24+krellpatch", type='build')
- # TODO: when using dyninst@9.3.0:, we will need to use elf
- # depends_on("elf", type="link")
- depends_on("libelf")
+ depends_on("binutils", type='build')
+ depends_on("elf", type="link")
depends_on("libdwarf")
depends_on("sqlite")
depends_on("boost@1.50.0:1.59.0")
- depends_on("dyninst@9.2.0")
+ depends_on("dyninst@9.3.2")
depends_on("libxml2+python")
- depends_on("qt@3.3.8b+krellpatch")
+ depends_on("qt@3.3.8b+krellpatch", when='gui=qt3')
+ # Actively working on adding this gui package
+ # depends_on("cbtf-argonavis-gui", when='gui=qt4')
# Dependencies only for the openspeedshop offline package.
depends_on("libunwind", when='+offline')
@@ -138,30 +135,101 @@ class Openspeedshop(Package):
# Dependencies only for the openspeedshop cbtf package.
depends_on("cbtf", when='+cbtf')
- depends_on("cbtf-krell", when='+cbtf')
+ depends_on('cbtf-krell', when='+cbtf')
+ depends_on('cbtf-krell+mpich', when='+cbtf+mpich')
+ depends_on('cbtf-krell+mpich2', when='+cbtf+mpich2')
+ depends_on('cbtf-krell+mpt', when='+cbtf+mpt')
+ depends_on('cbtf-krell+mvapich', when='+cbtf+mvapich')
+ depends_on('cbtf-krell+mvapich2', when='+cbtf+mvapich2')
+ depends_on('cbtf-krell+openmpi', when='+cbtf+openmpi')
depends_on("cbtf-argonavis", when='+cbtf+cuda')
depends_on("mrnet@5.0.1:+lwthreads", when='+cbtf')
- def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
- # Sets build type parameters into cmakeOptions the
- # options that will enable the cbtf-krell built type settings
+ parallel = False
+ build_directory = 'build_openspeedshop'
+
+ def cmake_args(self):
+ spec = self.spec
compile_flags = "-O2 -g"
- BuildTypeOptions = []
- # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it
- # to be, not the stdcmakeargs
- for word in cmakeOptions[:]:
- if word.startswith('-DCMAKE_BUILD_TYPE'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_CXX_FLAGS'):
- cmakeOptions.remove(word)
- if word.startswith('-DCMAKE_C_FLAGS'):
- cmakeOptions.remove(word)
- BuildTypeOptions.extend(['-DCMAKE_BUILD_TYPE=None',
- '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
- '-DCMAKE_C_FLAGS=%s' % compile_flags])
-
- cmakeOptions.extend(BuildTypeOptions)
+
+ if '+offline' in spec:
+ # Indicate building offline vers (writes rawdata files)
+ instrumentor_setting = "offline"
+ if '+runtime' in spec:
+ cmake_args = [
+ '-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DINSTRUMENTOR=%s' % instrumentor_setting,
+ '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
+ '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
+ '-DPAPI_DIR=%s' % spec['papi'].prefix]
+
+ # Add any MPI implementations coming from variant settings
+ self.set_mpi_cmakeOptions(spec, cmake_args)
+
+ else:
+ cmake_args = []
+
+ # Appends base options to cmake_args
+ self.set_defaultbase_cmakeOptions(spec, cmake_args)
+
+ cmake_args.extend(
+ ['-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DINSTRUMENTOR=%s' % instrumentor_setting,
+ '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
+ '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
+ '-DPAPI_DIR=%s' % spec['papi'].prefix,
+ '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
+ '-DQTLIB_DIR=%s' % spec['qt'].prefix])
+
+ # Add any MPI implementations coming from variant settings
+ self.set_mpi_cmakeOptions(spec, cmake_args)
+
+ elif '+cbtf' in spec:
+ # Indicate building cbtf vers (transfer rawdata files)
+ instrumentor_setting = "cbtf"
+
+ if '+runtime' in spec:
+ # Appends base options to cmake_args
+ self.set_defaultbase_cmakeOptions(spec, cmake_args)
+
+ cmake_args.extend(
+ ['-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DINSTRUMENTOR=%s' % instrumentor_setting,
+ '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix])
+
+ else:
+ cmake_args = []
+
+ # Appends base options to cmake_args
+ self.set_defaultbase_cmakeOptions(spec, cmake_args)
+ guitype = self.spec.variants['gui'].value
+ cmake_args.extend(
+ ['-DCMAKE_CXX_FLAGS=%s' % compile_flags,
+ '-DCMAKE_C_FLAGS=%s' % compile_flags,
+ '-DINSTRUMENTOR=%s' % instrumentor_setting,
+ '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix,
+ '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
+ '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
+ '-DMRNET_DIR=%s' % spec['mrnet'].prefix])
+
+ if guitype == 'none':
+ cmake_args.extend(
+ ['-DBUILD_QT3_GUI=FALSE'])
+ elif guitype == 'qt4':
+ cmake_args.extend(
+ ['-DBUILD_QT3_GUI=FALSE'])
+ elif guitype == 'qt3':
+ cmake_args.extend(
+ ['-DQTLIB_DIR=%s'
+ % spec['qt'].prefix])
+
+ return cmake_args
def set_defaultbase_cmakeOptions(self, spec, cmakeOptions):
# Appends to cmakeOptions the options that will enable
@@ -174,7 +242,7 @@ class Openspeedshop(Package):
BaseOptions = []
BaseOptions.append('-DBINUTILS_DIR=%s' % spec['binutils'].prefix)
- BaseOptions.append('-DLIBELF_DIR=%s' % spec['libelf'].prefix)
+ BaseOptions.append('-DLIBELF_DIR=%s' % spec['elf'].prefix)
BaseOptions.append('-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix)
BaseOptions.append('-DPYTHON_EXECUTABLE=%s' % python_exe)
BaseOptions.append('-DPYTHON_INCLUDE_DIR=%s' % python_include)
@@ -273,144 +341,3 @@ class Openspeedshop(Package):
run_env.set('OPENSS_MPI_IMPLEMENTATION', 'mvapich2')
if '+openmpi' in self.spec:
run_env.set('OPENSS_MPI_IMPLEMENTATION', 'openmpi')
-
- def install(self, spec, prefix):
-
- if '+offline' in spec:
- instrumentor_setting = "offline"
- if '+runtime' in spec:
- with working_dir('build_runtime', create=True):
-
- cmakeOptions = []
- cmakeOptions.extend([
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DINSTRUMENTOR=%s' % instrumentor_setting,
- '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
- '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
- '-DPAPI_DIR=%s' % spec['papi'].prefix])
-
- # Add any MPI implementations coming from variant settings
- self.set_mpi_cmakeOptions(spec, cmakeOptions)
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the build options to the favored
- # ones for this build
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
- else:
- cmake_prefix_path = join_path(spec['dyninst'].prefix)
- with working_dir('build', create=True):
- cmakeOptions = []
-
- # Appends base options to cmakeOptions
- self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
-
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s'
- % prefix,
- '-DCMAKE_PREFIX_PATH=%s'
- % cmake_prefix_path,
- '-DINSTRUMENTOR=%s'
- % instrumentor_setting,
- '-DLIBMONITOR_DIR=%s'
- % spec['libmonitor'].prefix,
- '-DLIBUNWIND_DIR=%s'
- % spec['libunwind'].prefix,
- '-DPAPI_DIR=%s'
- % spec['papi'].prefix,
- '-DSQLITE3_DIR=%s'
- % spec['sqlite'].prefix,
- '-DQTLIB_DIR=%s'
- % spec['qt'].prefix])
-
- # Add any MPI implementations coming from variant settings
- self.set_mpi_cmakeOptions(spec, cmakeOptions)
- cmakeOptions.extend(std_cmake_args)
-
- # Adjust the build options to the favored
- # ones for this build
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
-
- elif '+cbtf' in spec:
- instrumentor_setting = "cbtf"
- # resolve_symbols = "symtabapi"
- cmake_prefix_path = join_path(spec['cbtf'].prefix) \
- + ':' + join_path(spec['cbtf-krell'].prefix)\
- + ':' + join_path(spec['dyninst'].prefix)
-
- if '+runtime' in spec:
- with working_dir('build_cbtf_runtime', create=True):
- cmakeOptions = []
-
- # Appends base options to cmakeOptions
- self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
-
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s'
- % prefix,
- '-DCMAKE_PREFIX_PATH=%s'
- % cmake_prefix_path,
- '-DINSTRUMENTOR=%s'
- % instrumentor_setting,
- '-DCBTF_DIR=%s'
- % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s'
- % spec['cbtf-krell'].prefix,
- '-DMRNET_DIR=%s'
- % spec['mrnet'].prefix])
-
- # Adjust the build options to the
- # favored ones for this build
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
-
- else:
- with working_dir('build_cbtf', create=True):
- cmakeOptions = []
-
- # Appends base options to cmakeOptions
- self.set_defaultbase_cmakeOptions(spec, cmakeOptions)
-
- cmakeOptions.extend(
- ['-DCMAKE_INSTALL_PREFIX=%s'
- % prefix,
- '-DCMAKE_PREFIX_PATH=%s'
- % cmake_prefix_path,
- '-DINSTRUMENTOR=%s'
- % instrumentor_setting,
- '-DSQLITE3_DIR=%s'
- % spec['sqlite'].prefix,
- '-DCBTF_DIR=%s'
- % spec['cbtf'].prefix,
- '-DCBTF_KRELL_DIR=%s'
- % spec['cbtf-krell'].prefix,
- '-DQTLIB_DIR=%s'
- % spec['qt'].prefix,
- '-DMRNET_DIR=%s'
- % spec['mrnet'].prefix])
-
- # Adjust the build options to the favored
- # ones for this build
- self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions)
-
- cmake('..', *cmakeOptions)
-
- make("clean")
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/orfm/package.py b/var/spack/repos/builtin/packages/orfm/package.py
new file mode 100644
index 0000000000..11ff3c4c7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/orfm/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Orfm(AutotoolsPackage):
+ """A simple and not slow open reading frame (ORF) caller. No bells or
+ whistles like frameshift detection, just a straightforward goal of
+ returning a FASTA file of open reading frames over a certain length
+ from a FASTA/Q file of nucleotide sequences."""
+
+ homepage = "https://github.com/wwood/OrfM"
+ url = "https://github.com/wwood/OrfM/releases/download/v0.7.1/orfm-0.7.1.tar.gz"
+
+ version('0.7.1', 'fcf18283a028cea2af90663a76a73a2a')
diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
index 44c396e508..f6d49d74e7 100644
--- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
+++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
class OsuMicroBenchmarks(Package):
@@ -46,7 +47,6 @@ class OsuMicroBenchmarks(Package):
config_args = [
'CC=%s' % spec['mpi'].prefix.bin + '/mpicc',
'CXX=%s' % spec['mpi'].prefix.bin + '/mpicxx',
- 'LDFLAGS=-lrt',
'--prefix=%s' % prefix
]
@@ -56,6 +56,10 @@ class OsuMicroBenchmarks(Package):
'--with-cuda=%s' % spec['cuda'].prefix,
])
+ # librt not available on darwin (and not required)
+ if not sys.platform == 'darwin':
+ config_args.append('LDFLAGS=-lrt')
+
configure(*config_args)
make()
diff --git a/var/spack/repos/builtin/packages/otf2/package.py b/var/spack/repos/builtin/packages/otf2/package.py
index 5b78ae935b..cd338f06c6 100644
--- a/var/spack/repos/builtin/packages/otf2/package.py
+++ b/var/spack/repos/builtin/packages/otf2/package.py
@@ -34,6 +34,7 @@ class Otf2(AutotoolsPackage):
homepage = "http://www.vi-hps.org/projects/score-p"
url = "http://www.vi-hps.org/upload/packages/otf2/otf2-1.4.tar.gz"
+ version('2.1', 'e2994e53d9b7c2cbd0c4f564d638751e')
version('2.0', '5b546188b25bc1c4e285e06dddf75dfc')
version('1.5.1', '16a9df46e0da78e374f5d12c8cdc1109')
version('1.4', 'a23c42e936eb9209c4e08b61c3cf5092')
@@ -41,4 +42,8 @@ class Otf2(AutotoolsPackage):
version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8')
def configure_args(self):
- return ["--enable-shared", "CFLAGS=-fPIC", "CXXFLAGS=-fPIC"]
+ return [
+ '--enable-shared',
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
+ 'CXXFLAGS={0}'.format(self.compiler.pic_flag)
+ ]
diff --git a/var/spack/repos/builtin/packages/pacbio-daligner/package.py b/var/spack/repos/builtin/packages/pacbio-daligner/package.py
new file mode 100644
index 0000000000..695c4717f7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pacbio-daligner/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PacbioDaligner(MakefilePackage):
+ """Daligner: The Dazzler "Overlap" Module. This is a special fork
+ required for some pacbio utilities."""
+
+ homepage = "https://github.com/PacificBiosciences/DALIGNER"
+ url = "https://github.com/PacificBiosciences/DALIGNER"
+
+ version('2017-08-05',
+ git='https://github.com/PacificBiosciences/DALIGNER.git',
+ commit='0fe5240d2cc6b55bf9e04465b700b76110749c9d')
+
+ depends_on('gmake', type='build')
+ depends_on('pacbio-dazz-db')
+
+ def edit(self, spec, prefix):
+ mkdir(prefix.bin)
+ makefile = FileFilter('Makefile')
+ makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
+ gmf = FileFilter('GNUmakefile')
+ gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
+ 'cp ${ALL} ' + prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pacbio-damasker/package.py b/var/spack/repos/builtin/packages/pacbio-damasker/package.py
new file mode 100644
index 0000000000..b2415fd340
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pacbio-damasker/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PacbioDamasker(MakefilePackage):
+ """Damasker: The Dazzler Repeat Masking Suite. This is a special fork
+ required for some pacbio utilities."""
+
+ homepage = "https://github.com/PacificBiosciences/DAMASKER"
+ url = "https://github.com/PacificBiosciences/DAMASKER"
+
+ version('2017-02-11',
+ git='https://github.com/PacificBiosciences/DAMASKER.git',
+ commit='144244b77d52cb785cb1b3b8ae3ab6f3f0c63264')
+
+ depends_on('gmake', type='build')
+
+ def edit(self, spec, prefix):
+ mkdirp(prefix.bin)
+ makefile = FileFilter('Makefile')
+ makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
+ gmf = FileFilter('GNUmakefile')
+ gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
+ 'cp ${ALL} ' + prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py b/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
new file mode 100644
index 0000000000..1223c25f37
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pacbio-dazz-db/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class PacbioDazzDb(MakefilePackage):
+ """The Dazzler Database Library. This version is a special fork
+ required for some pacbio utilities."""
+
+ homepage = "https://github.com/PacificBiosciences/DAZZ_DB"
+ url = "https://github.com/PacificBiosciences/DAZZ_DB"
+
+ version('2017-04-10',
+ git='https://github.com/PacificBiosciences/DAZZ_DB.git',
+ commit='f29d27d51f460563481cd227d17f4bdc5e288365')
+
+ depends_on('gmake', type='build')
+
+ def edit(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.lib)
+ mkdirp(prefix.include)
+ makefile = FileFilter('Makefile')
+ makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
+ gmf = FileFilter('GNUmakefile')
+ gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
+ 'cp ${ALL} ' + prefix.bin)
+ gmf.filter('rsync\s*-av\s*libdazzdb.*\s*\$\{PREFIX\}/lib',
+ 'cp libdazzdb.* ' + prefix.lib)
+ gmf.filter(('rsync\s*-av\s*\$\(wildcard\s*\$\{THISDIR\}/\*.h'
+ '\)\s*\$\{PREFIX\}/include'),
+ 'cp *.h ' + prefix.include)
diff --git a/var/spack/repos/builtin/packages/pacbio-dextractor/package.py b/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
new file mode 100644
index 0000000000..91a4e6f330
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pacbio-dextractor/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PacbioDextractor(MakefilePackage):
+ """The Dextractor and Compression Command Library. This is a special
+ fork required by some pacbio utilities."""
+
+ homepage = "https://github.com/PacificBiosciences/DEXTRACTOR"
+ url = "https://github.com/PacificBiosciences/DEXTRACTOR"
+
+ version('2016-08-09',
+ git='https://github.com/PacificBiosciences/DEXTRACTOR.git',
+ commit='89726800346d0bed15d98dcc577f4c7733aab4b1')
+
+ depends_on('hdf5')
+ depends_on('gmake', type='build')
+
+ def edit(self, spec, prefix):
+ mkdirp(prefix.bin)
+ makefile = FileFilter('Makefile')
+ makefile.filter('PATH_HDF5\s*=\s*/sw/apps/hdf5/current',
+ 'PATH_HDF5 = ' + spec['hdf5'].prefix)
+ makefile.filter('PATH_HDF5\*s=\s*/usr/local/hdf5', '')
+ makefile.filter('DEST_DIR\s*=\s*~/bin', 'DEST_DIR = ' + prefix.bin)
+ gmf = FileFilter('GNUmakefile')
+ gmf.filter('rsync\s*-av\s*\$\{ALL\}\s*\$\{PREFIX\}/bin',
+ 'cp ${ALL} ' + prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pagit/package.py b/var/spack/repos/builtin/packages/pagit/package.py
new file mode 100644
index 0000000000..2e41d83da3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pagit/package.py
@@ -0,0 +1,68 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Pagit(Package):
+ """PAGIT addresses the need for software to generate high quality draft
+ genomes."""
+
+ homepage = "http://www.sanger.ac.uk/science/tools/pagit"
+ url = "ftp://ftp.sanger.ac.uk/pub/resources/software/pagit/PAGIT.V1.01.64bit.tgz"
+
+ version('1.01', '2c4e8512c8c02073146b50b328962e9d')
+
+ depends_on('java', type=('build', 'run'))
+ depends_on('perl', type=('build', 'run'))
+
+ def url_for_version(self, version):
+ url = 'ftp://ftp.sanger.ac.uk/pub/resources/software/pagit/PAGIT.V{0}.64bit.tgz'
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ with working_dir('PAGIT'):
+ install_tree('ABACAS', prefix.ABACAS)
+ install_tree('bin', prefix.bin)
+ install_tree('ICORN', prefix.ICORN)
+ install_tree('IMAGE', prefix.IMAGE)
+ install_tree('lib', prefix.lib)
+ install_tree('RATT', prefix.RATT)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('PAGIT_HOME', self.prefix)
+ run_env.set('PILEUP_HOME', join_path(self.prefix.bin, 'pileup_v0.5'))
+ run_env.set('ICORN_HOME', self.prefix.icorn)
+ run_env.set('SNPOMATIC_HOME', self.prefix.bin)
+ run_env.set('RATT_HOME', self.prefix.RATT)
+ run_env.set('RATT_CONFIG', join_path(self.prefix.RATT, 'RATT_config'))
+ run_env.prepend_path('PATH', join_path(self.prefix.bin, 'pileup_v0.5',
+ 'ssaha2'))
+ run_env.prepend_path('PATH', join_path(self.prefix.bin,
+ 'pileup_v0.5'))
+ run_env.prepend_path('PATH', self.prefix.IMAGE)
+ run_env.prepend_path('PATH', self.prefix.ABACAS)
+ run_env.prepend_path('PATH', self.prefix.ICORN)
+ run_env.prepend_path('PATH', self.prefix.RATT)
+ run_env.prepend_path('PERL5LIB', self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/paml/package.py b/var/spack/repos/builtin/packages/paml/package.py
new file mode 100644
index 0000000000..693d2b808b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paml/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Paml(MakefilePackage):
+ """PAML is a package of programs for phylogenetic analyses of DNA or
+ protein sewuences using maximum likelihood."""
+
+ homepage = "http://abacus.gene.ucl.ac.uk/software/paml.html"
+ url = "http://abacus.gene.ucl.ac.uk/software/paml4.9e.tgz"
+
+ version('4.9e', 'ac5a062bfea1f4eaac79008434030acf')
+
+ build_directory = 'src'
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir(self.build_directory):
+ install('baseml', prefix.bin)
+ install('basemlg', prefix.bin)
+ install('chi2', prefix.bin)
+ install('codeml', prefix.bin)
+ install('evolver', prefix.bin)
+ install('infinitesites', prefix.bin)
+ install('mcmctree', prefix.bin)
+ install('pamp', prefix.bin)
+ install('yn00', prefix.bin)
+ install_tree('dat', prefix.dat)
+ install_tree('Technical', prefix.Technical)
diff --git a/var/spack/repos/builtin/packages/panda/package.py b/var/spack/repos/builtin/packages/panda/package.py
index 7e5f7710d2..5c905fb2d3 100644
--- a/var/spack/repos/builtin/packages/panda/package.py
+++ b/var/spack/repos/builtin/packages/panda/package.py
@@ -26,7 +26,7 @@
from spack import *
-class Panda(Package):
+class Panda(CMakePackage):
"""PANDA: Parallel AdjaceNcy Decomposition Algorithm"""
homepage = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/index.html"
url = "http://comopt.ifi.uni-heidelberg.de/software/PANDA/downloads/panda-2016-03-07.tar"
@@ -35,11 +35,5 @@ class Panda(Package):
# Note: Panda can also be built without MPI support
- depends_on("cmake", type="build")
- depends_on("mpi")
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake("..", *std_cmake_args)
- make()
- make("install")
+ depends_on('cmake@2.6.4:', type='build')
+ depends_on('mpi')
diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py
index 4b9bad0f3e..fbcf8ca5e5 100644
--- a/var/spack/repos/builtin/packages/paradiseo/package.py
+++ b/var/spack/repos/builtin/packages/paradiseo/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Paradiseo(Package):
+class Paradiseo(CMakePackage):
"""A C++ white-box object-oriented framework dedicated to the reusable
design of metaheuristics."""
homepage = "http://paradiseo.gforge.inria.fr/"
@@ -51,13 +51,11 @@ class Paradiseo(Package):
description='Compile with (Experimental) EDO module')
# variant('doc', default=False, description='Compile with documentation')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('openmp', default=False, description='Enable OpenMP support')
variant('gnuplot', default=False, description='Enable GnuPlot support')
# Required dependencies
- depends_on("cmake", type='build')
+ depends_on("cmake@2.8:", type='build')
# Optional dependencies
depends_on("mpi", when="+mpi")
@@ -73,13 +71,10 @@ class Paradiseo(Package):
patch('fix_tests.patch')
patch('fix_tutorials.patch')
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
+ def cmake_args(self):
+ spec = self.spec
- options.extend([
- '-DCMAKE_BUILD_TYPE:STRING=%s' % (
- 'Debug' if '+debug' in spec else 'Release'),
+ return [
'-DINSTALL_TYPE:STRING=MIN',
'-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'),
# Note: This requires a C++11 compatible compiler
@@ -91,14 +86,4 @@ class Paradiseo(Package):
'TRUE' if '+openmp' in spec else 'FALSE'),
'-DENABLE_GNUPLOT:BOOL=%s' % (
'TRUE' if '+gnuplot' in spec else 'FALSE')
- ])
-
- with working_dir('spack-build', create=True):
- # Configure
- cmake('..', *options)
-
- # Build, test and install
- make("VERBOSE=1")
- if self.run_tests:
- make("test")
- make("install")
+ ]
diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
index 6d22217440..757a336dd9 100644
--- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
@@ -40,7 +40,7 @@ class ParallelNetcdf(AutotoolsPackage):
variant('cxx', default=True, description='Build the C++ Interface')
variant('fortran', default=True, description='Build the Fortran Interface')
- variant('fpic', default=True,
+ variant('pic', default=True,
description='Produce position-independent code (for shared libs)')
depends_on('mpi')
@@ -53,12 +53,18 @@ class ParallelNetcdf(AutotoolsPackage):
spec = self.spec
args = ['--with-mpi={0}'.format(spec['mpi'].prefix)]
- args.append('SEQ_CC=%s' % spack_cc)
+ args.append('SEQ_CC={0}'.format(spack_cc))
+
+ if '+pic' in spec:
+ args.extend([
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
+ 'CXXFLAGS={0}'.format(self.compiler.pic_flag),
+ 'FFLAGS={0}'.format(self.compiler.pic_flag)
+ ])
- if '+fpic' in spec:
- args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC'])
if '~cxx' in spec:
args.append('--disable-cxx')
+
if '~fortran' in spec:
args.append('--disable-fortran')
diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py
index 50eca81053..8630a139ec 100644
--- a/var/spack/repos/builtin/packages/parmgridgen/package.py
+++ b/var/spack/repos/builtin/packages/parmgridgen/package.py
@@ -47,8 +47,8 @@ class Parmgridgen(Package):
def install(self, spec, prefix):
make_opts = [
'make=make',
- 'COPTIONS=-fPIC',
- 'LDOPTIONS=-fPIC',
+ 'COPTIONS={0}'.format(self.compiler.pic_flag),
+ 'LDOPTIONS={0}'.format(self.compiler.pic_flag),
'CC={0}'.format(self.compiler.cc),
'LD={0}'.format(self.compiler.cc),
'LIBDIR=-L../..',
diff --git a/var/spack/repos/builtin/packages/parsimonator/package.py b/var/spack/repos/builtin/packages/parsimonator/package.py
new file mode 100644
index 0000000000..5b979f23e3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/parsimonator/package.py
@@ -0,0 +1,65 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Parsimonator(MakefilePackage):
+ """Parsimonator is a no-frills light-weight implementation for building
+ starting trees under parsimony for RAxML"""
+
+ homepage = "http://www.exelixis-lab.org/"
+ url = "https://github.com/stamatak/Parsimonator-1.0.2"
+
+ version('1.0.2', git='https://github.com/stamatak/Parsimonator-1.0.2.git', commit='78368c6ab1e9adc7e9c6ec9256dd7ff2a5bb1b0a')
+
+ variant('sse', default=True, description='Enable SSE in order to substantially speed up execution')
+ variant('avx', default=False, description='Enable AVX in order to substantially speed up execution')
+
+ conflicts('+avx', when='+sse')
+
+ @property
+ def makefile_file(self):
+ if '+sse' in self.spec:
+ return 'Makefile.SSE3.gcc'
+ elif '+avx' in self.spec:
+ return 'Makefile.AVX.gcc'
+ else:
+ return 'Makefile.gcc'
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter(self.makefile_file)
+ makefile.filter('CC = gcc', 'CC = %s' % spack_cc)
+
+ def build(self, spec, prefix):
+ make('-f', self.makefile_file)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ if '+sse' in spec:
+ install('parsimonator-SSE3', prefix.bin)
+ elif '+avx' in spec:
+ install('parsimonator-AVX', prefix.bin)
+ else:
+ install('parsimonator', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/partitionfinder/package.py b/var/spack/repos/builtin/packages/partitionfinder/package.py
new file mode 100644
index 0000000000..523550a64b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/partitionfinder/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Partitionfinder(Package):
+ """PartitionFinder is free open source software to select best-fit
+ partitioning schemes and models of molecular evolution for
+ phylogenetic analyses."""
+
+ homepage = "https://github.com/brettc/partitionfinder"
+ url = "https://github.com/brettc/partitionfinder/archive/v2.1.1.tar.gz"
+
+ version('2.1.1', 'b1b6539f93146c69b967cf92459ae28a')
+
+ depends_on('python@2.7.10:2.999', type=('build', 'run'))
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-pandas', type=('build', 'run'))
+ depends_on('py-pytables', type=('build', 'run'))
+ depends_on('py-pyparsing', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('py-scikit-learn', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install_tree('partfinder', prefix.partfinder)
+ install_tree('timings', prefix.timings)
+ install('PartitionFinderMorphology.py', prefix.bin)
+ install('PartitionFinderProtein.py', prefix.bin)
+ install('PartitionFinder.py', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pathfinder/package.py b/var/spack/repos/builtin/packages/pathfinder/package.py
new file mode 100644
index 0000000000..85432ffd49
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pathfinder/package.py
@@ -0,0 +1,55 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Pathfinder(MakefilePackage):
+ """Proxy Application. Signature search."""
+
+ homepage = "https://mantevo.org/packages/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/PathFinder/PathFinder_1.0.0.tgz"
+
+ tags = ['proxy-app']
+
+ version('1.0.0', '374269e8d42c305eda3e392444e22dde')
+
+ build_targets = ['--directory=PathFinder_ref', 'CC=cc']
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('PathFinder_ref/Makefile')
+ makefile.filter('-fopenmp', self.compiler.openmp_flag)
+
+ def install(self, spec, prefix):
+ # Manual installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc)
+
+ install('PathFinder_ref/PathFinder.x', prefix.bin)
+ install('PathFinder_ref/MicroTestData.adj_list', prefix.bin)
+ install('README', prefix.doc)
+
+ install_tree('generatedData/', prefix.doc.generatedData)
+ install_tree('scaleData/', prefix.doc.scaleData)
diff --git a/var/spack/repos/builtin/packages/pbmpi/package.py b/var/spack/repos/builtin/packages/pbmpi/package.py
new file mode 100644
index 0000000000..548c67c358
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pbmpi/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Pbmpi(MakefilePackage):
+ """A Bayesian software for phylogenetic reconstruction using mixture models
+ """
+
+ homepage = "http://megasun.bch.umontreal.ca/People/lartillot/www/index.htm"
+ url = "https://github.com/bayesiancook/pbmpi"
+
+ version('partition', git='https://github.com/bayesiancook/pbmpi.git', branch='partition')
+
+ depends_on('mpi')
+ depends_on('libfabric')
+
+ build_directory = 'sources'
+
+ @run_before('build')
+ def make_data_dir(self):
+ mkdirp(self.stage.source_path, 'data')
+
+ def install(self, spec, prefix):
+ install_tree('data', prefix.bin)
+ install_tree('sources', prefix.sources)
diff --git a/var/spack/repos/builtin/packages/pcma/package.py b/var/spack/repos/builtin/packages/pcma/package.py
new file mode 100644
index 0000000000..944c1ac37b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pcma/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Pcma(MakefilePackage):
+ """PCMA is a progressive multiple sequence alignment program that combines
+ two different alignment strategies."""
+
+ homepage = "http://prodata.swmed.edu/pcma/pcma.php"
+ url = "http://prodata.swmed.edu/download/pub/PCMA/pcma.tar.gz"
+
+ version('2.0', 'e78449b2f6b0e90348a0a6747d266f9b')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('makefile')
+ makefile.filter('gcc', spack_cc)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('pcma', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pdsh/package.py b/var/spack/repos/builtin/packages/pdsh/package.py
index 3d0d265409..06457ba38c 100644
--- a/var/spack/repos/builtin/packages/pdsh/package.py
+++ b/var/spack/repos/builtin/packages/pdsh/package.py
@@ -34,3 +34,15 @@ class Pdsh(AutotoolsPackage):
url = "https://github.com/grondo/pdsh/archive/pdsh-2.31.tar.gz"
version('2.31', 'cab34b0ca78f3cf596fd648b265223ed')
+
+ variant('ssh', default=True, description="Build with ssh module")
+
+ variant('static_modules', default=True, description="Build with static modules")
+
+ def configure_args(self):
+ args = []
+ if '+ssh' in self.spec:
+ args.append('--with-ssh')
+ if '+static_modules' in self.spec:
+ args.append('--enable-static-modules')
+ return args
diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py
index 85a008a119..f6848be725 100644
--- a/var/spack/repos/builtin/packages/pegtl/package.py
+++ b/var/spack/repos/builtin/packages/pegtl/package.py
@@ -39,12 +39,3 @@ class Pegtl(CMakePackage):
version('develop', git='https://github.com/taocpp/PEGTL', branch='master')
version('2.1.4', 'e5288b6968e6e910287fce93dc5557bf')
version('2.0.0', 'c772828e7188459338a920c21f9896db')
-
- variant('debug', default=False, description='Build debug version')
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/pennant/package.py b/var/spack/repos/builtin/packages/pennant/package.py
new file mode 100644
index 0000000000..b8e71c7f31
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pennant/package.py
@@ -0,0 +1,99 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Pennant(MakefilePackage):
+ """PENNANT is an unstructured mesh physics mini-app designed
+ for advanced architecture research. It contains mesh data
+ structures and a few physics algorithms adapted
+ from the LANL rad-hydro code FLAG, and gives a sample of
+ the typical memory access patterns of FLAG.
+ """
+
+ homepage = "https://github.com/lanl/PENNANT"
+ url = "https://github.com/lanl/PENNANT/archive/pennant_v0.9.tar.gz"
+ tags = ['proxy-app']
+
+ version('0.9', '4f21ba3836b2721436277308c2e33f45')
+ version('0.8', 'a1afff4914fef8140c3024a02d7c993c')
+ version('0.7', 'd642a030d5388f65f799504803794a4e')
+ version('0.6', '8ab2d4b47ec9870643bfe6f262cd47a4')
+ version('0.5', '534547878c698b9926e2886c74e10831')
+ version('0.4', '0f67d8da0a92bd42d92a4823d3e4dbe1')
+
+ variant('mpi', default=True, description='Build with MPI support')
+ variant('openmp', default=True, description='Build with OpenMP support')
+ variant('debug', default=False, description='Enable debug')
+
+ depends_on('mpi', when='+mpi')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('Makefile')
+ debug = '-g'
+ opt = '-O3'
+
+ if self.compiler.name == 'intel':
+ opt += ' -fast -fno-alias'
+ if self.compiler.name == 'pgi':
+ opt += ' -fastsse'
+
+ makefile.filter(
+ 'CXXFLAGS_DEBUG .*',
+ 'CXXFLAGS_DEBUG := {0}'.format(debug))
+ makefile.filter(
+ 'CXXFLAGS_OPT .*',
+ 'CXXFLAGS_OPT := {0}'.format(opt))
+ makefile.filter(
+ 'CXXFLAGS_OPENMP .*',
+ 'CXXFLAGS_OPENMP := {0}'.format(self.compiler.openmp_flag))
+
+ if '+mpi' in spec:
+ makefile.filter(
+ 'CXX .*',
+ 'CXX := {0}'.format(spec['mpi'].mpicxx))
+ else:
+ makefile.filter('-DUSE_MPI', '#')
+ makefile.filter('CXX .*', 'CXX := c++')
+
+ if '+openmp' not in spec:
+ makefile.filter('.*CXXFLAGS_OPENMP.*', '#')
+
+ if '+debug' in spec:
+ makefile.filter(
+ '.*(CXXFLAGS_OPT).*',
+ 'CXXFLAGS := $(CXXFLAGS_DEBUG)')
+
+ def install(self, spec, prefix):
+
+ def install_dir(dirname):
+ install_tree(dirname, join_path(prefix, dirname))
+
+ mkdirp(prefix.bin)
+ install('build/pennant', prefix.bin)
+ install_dir('doc')
+ install_dir('test')
+ install('LICENSE', prefix)
+ install('README', prefix)
diff --git a/var/spack/repos/builtin/packages/perl-math-cdf/package.py b/var/spack/repos/builtin/packages/perl-math-cdf/package.py
new file mode 100644
index 0000000000..6d7d195dea
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-math-cdf/package.py
@@ -0,0 +1,35 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PerlMathCdf(PerlPackage):
+ """Generate probabilities and quantiles from several statistical
+ probability functions"""
+
+ homepage = "http://search.cpan.org/~callahan/Math-CDF-0.1/CDF.pm"
+ url = "http://search.cpan.org/CPAN/authors/id/C/CA/CALLAHAN/Math-CDF-0.1.tar.gz"
+
+ version('0.1', '7866c7b6b9d27f0ce4b7637334478ab7')
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index d9952cc936..1e5e93a2f4 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -93,6 +93,23 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
'-Dloclibpth=' + self.spec['gdbm'].prefix.lib,
]
+ # Extensions are installed into their private tree via
+ # `INSTALL_BASE`/`--install_base` (see [1]) which results in a
+ # "predictable" installation tree that sadly does not match the
+ # Perl core's @INC structure. This means that when activation
+ # merges the extension into the extendee[2], the directory tree
+ # containing the extensions is not on @INC and the extensions can
+ # not be found.
+ #
+ # This bit prepends @INC with the directory that is used when
+ # extensions are activated [3].
+ #
+ # [1] https://metacpan.org/pod/ExtUtils::MakeMaker#INSTALL_BASE
+ # [2] via the activate method in the PackageBase class
+ # [3] https://metacpan.org/pod/distribution/perl/INSTALL#APPLLIB_EXP
+ config_args.append('-Accflags=-DAPPLLIB_EXP=\\"' +
+ self.prefix.lib.perl5 + '\\"')
+
# Discussion of -fPIC for Intel at:
# https://github.com/LLNL/spack/pull/3081 and
# https://github.com/LLNL/spack/pull/4416
@@ -130,10 +147,6 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
make()
make('install')
- def setup_environment(self, spack_env, run_env):
- """Set PERL5LIB to support activation of Perl packages"""
- run_env.set('PERL5LIB', join_path(self.prefix, 'lib', 'perl5'))
-
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""Set PATH and PERL5LIB to include the extension and
any other perl extensions it depends on,
@@ -143,8 +156,8 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
for d in dependent_spec.traverse(
deptype=('build', 'run'), deptype_query='run'):
if d.package.extends(self.spec):
- perl_lib_dirs.append(join_path(d.prefix, 'lib', 'perl5'))
- perl_bin_dirs.append(join_path(d.prefix, 'bin'))
+ perl_lib_dirs.append(d.prefix.lib.perl5)
+ perl_bin_dirs.append(d.prefix.bin)
perl_bin_path = ':'.join(perl_bin_dirs)
perl_lib_path = ':'.join(perl_lib_dirs)
spack_env.prepend_path('PATH', perl_bin_path)
@@ -159,10 +172,10 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
"""
# perl extension builds can have a global perl executable function
- module.perl = Executable(join_path(self.spec.prefix.bin, 'perl'))
+ module.perl = self.spec['perl'].command
# Add variables for library directory
- module.perl_lib_dir = join_path(dependent_spec.prefix, 'lib', 'perl5')
+ module.perl_lib_dir = dependent_spec.prefix.lib.perl5
# Make the site packages directory for extensions,
# if it does not exist already.
@@ -179,7 +192,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
# Find the actual path to the installed Config.pm file.
- perl = Executable(join_path(prefix.bin, 'perl'))
+ perl = self.spec['perl'].command
config_dot_pm = perl('-MModule::Loaded', '-MConfig', '-e',
'print is_loaded(Config)', output=str)
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 1002211810..d4ea674577 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -100,8 +100,10 @@ class Petsc(Package):
# Other dependencies
depends_on('boost', when='@:3.5+boost')
- depends_on('metis@5:~int64', when='+metis~int64')
- depends_on('metis@5:+int64', when='+metis+int64')
+ depends_on('metis@5:~int64+real64', when='+metis~int64+double')
+ depends_on('metis@5:+int64', when='+metis+int64~double')
+ depends_on('metis@5:~int64+real64', when='+metis~int64+double')
+ depends_on('metis@5:+int64', when='+metis+int64~double')
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('parmetis', when='+metis+mpi')
diff --git a/var/spack/repos/builtin/packages/pgdspider/package.py b/var/spack/repos/builtin/packages/pgdspider/package.py
new file mode 100644
index 0000000000..60dfdc12f4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pgdspider/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os.path
+
+
+class Pgdspider(Package):
+ """"PGDSpider is a powerful automated data conversion tool for population
+ genetic and genomics programs"""
+
+ homepage = "http://www.cmpg.unibe.ch/software/PGDSpider"
+ url = "http://www.cmpg.unibe.ch/software/PGDSpider/PGDSpider_2.1.1.2.zip"
+
+ version('2.1.1.2', '170e5b4a002277ff66866486da920693')
+
+ depends_on('java', type=('build', 'run'))
+ depends_on('bcftools')
+ depends_on('bwa')
+ depends_on('samtools')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ jar_file = 'PGDSpider{0}-cli.jar'.format(self.version.up_to(1))
+ install(jar_file, prefix.bin)
+
+ script_sh = join_path(os.path.dirname(__file__), "pgdspider.sh")
+ script = prefix.bin.pgdspider
+ install(script_sh, script)
+ set_executable(script)
+
+ java = self.spec['java'].prefix.bin.java
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ filter_file('^java', java, script, **kwargs)
+ filter_file('pgdspider.jar', join_path(prefix.bin, jar_file),
+ script, **kwargs)
diff --git a/var/spack/repos/builtin/packages/pgdspider/pgdspider.sh b/var/spack/repos/builtin/packages/pgdspider/pgdspider.sh
new file mode 100644
index 0000000000..5ac0f66c08
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pgdspider/pgdspider.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# convenience wrapper for the astral jar file
+java $JAVA_ARGS $JAVA_OPTS -jar pgdspider.jar "$@"
diff --git a/var/spack/repos/builtin/packages/phylip/package.py b/var/spack/repos/builtin/packages/phylip/package.py
new file mode 100644
index 0000000000..39bcd3c1e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/phylip/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Phylip(Package):
+ """PHYLIP (the PHYLogeny Inference Package) is a package of programs for
+ inferring phylogenies (evolutionary trees)."""
+
+ homepage = "http://evolution.genetics.washington.edu/phylip/"
+ url = "http://evolution.gs.washington.edu/phylip/download/phylip-3.696.tar.gz"
+
+ version('3.696', 'dbe5abc26f6089ead3dba41c2db526ee')
+
+ def install(self, spec, prefix):
+ with working_dir('src'):
+ if self.spec.satisfies('platform=darwin'):
+ make('all', '-f', 'Makefile.osx')
+ make('put', '-f', 'Makefile.osx')
+ else:
+ make('all', '-f', 'Makefile.unx')
+ make('put', '-f', 'Makefile.unx')
+ install_tree('exe', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/picard/package.py b/var/spack/repos/builtin/packages/picard/package.py
index 3705c13f75..f03561a5a7 100644
--- a/var/spack/repos/builtin/packages/picard/package.py
+++ b/var/spack/repos/builtin/packages/picard/package.py
@@ -44,7 +44,7 @@ class Picard(Package):
version('1.140', '308f95516d94c1f3273a4e7e2b315ec2',
url='https://github.com/broadinstitute/picard/releases/download/1.140/picard-tools-1.140.zip')
- depends_on('jdk@8:', type='run')
+ depends_on('java@8:', type='run')
def install(self, spec, prefix):
mkdirp(prefix.bin)
@@ -63,7 +63,7 @@ class Picard(Package):
# Munge the helper script to explicitly point to java and the
# jar file.
- java = join_path(self.spec['jdk'].prefix, 'bin', 'java')
+ java = join_path(self.spec['java'].prefix, 'bin', 'java')
kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
filter_file('^java', java, script, **kwargs)
filter_file('picard.jar', join_path(prefix.bin, 'picard.jar'),
diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py
index f79ff7eec4..e4be597f0f 100644
--- a/var/spack/repos/builtin/packages/pidx/package.py
+++ b/var/spack/repos/builtin/packages/pidx/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Pidx(Package):
+class Pidx(CMakePackage):
"""PIDX Parallel I/O Library.
PIDX is an efficient parallel I/O library that reads and writes
@@ -37,11 +37,5 @@ class Pidx(Package):
version('1.0', git='https://github.com/sci-visus/PIDX.git',
commit='6afa1cf71d1c41263296dc049c8fabaf73c296da')
- depends_on('cmake', type='build')
- depends_on("mpi")
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make("install")
+ depends_on('cmake@2.8.4:', type='build')
+ depends_on('mpi')
diff --git a/var/spack/repos/builtin/packages/piranha/package.py b/var/spack/repos/builtin/packages/piranha/package.py
index 8d684ce277..4bc4d5f894 100644
--- a/var/spack/repos/builtin/packages/piranha/package.py
+++ b/var/spack/repos/builtin/packages/piranha/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Piranha(Package):
+class Piranha(CMakePackage):
"""Piranha is a computer-algebra library for the symbolic manipulation of
sparse multivariate polynomials and other closely-related symbolic objects
(such as Poisson series)."""
@@ -40,7 +40,7 @@ class Piranha(Package):
description='Build the Python bindings')
# Build dependencies
- depends_on('cmake@3.0:', type='build')
+ depends_on('cmake@3.2.0:', type='build')
extends('python', when='+pyranha')
depends_on('python@2.6:', type='build', when='+pyranha')
@@ -53,21 +53,8 @@ class Piranha(Package):
depends_on('gmp') # mpir is a drop-in replacement for this
depends_on('mpfr') # Could also be built against mpir
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
- # Python bindings
- options.extend([
- '-DBUILD_PYRANHA=%s' % (
- 'ON' if '+python' in spec else 'OFF'),
+ def cmake_args(self):
+ return [
+ '-DBUILD_PYRANHA=%s' % ('ON' if '+python' in self.spec else 'OFF'),
'-DBUILD_TESTS:BOOL=ON',
- ])
-
- with working_dir('spack-build', create=True):
- cmake('..', *options)
-
- make()
- make('install')
- if self.run_tests:
- make('test')
+ ]
diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py
index dfb6608cf3..39306e33cd 100644
--- a/var/spack/repos/builtin/packages/pkg-config/package.py
+++ b/var/spack/repos/builtin/packages/pkg-config/package.py
@@ -44,15 +44,18 @@ class PkgConfig(AutotoolsPackage):
parallel = False
- @when('platform=cray')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
"""spack built pkg-config on cray's requires adding /usr/local/
and /usr/lib64/ to PKG_CONFIG_PATH in order to access cray '.pc'
- files."""
- spack_env.append_path('PKG_CONFIG_PATH', '/usr/lib64/pkgconfig')
- spack_env.append_path('PKG_CONFIG_PATH', '/usr/local/lib64/pkgconfig')
+ files.
+ Adds the ACLOCAL path for autotools."""
spack_env.append_path('ACLOCAL_PATH',
join_path(self.prefix.share, 'aclocal'))
+ if 'platform=cray' in self.spec:
+ spack_env.append_path('PKG_CONFIG_PATH',
+ '/usr/lib64/pkgconfig')
+ spack_env.append_path('PKG_CONFIG_PATH',
+ '/usr/local/lib64/pkgconfig')
def configure_args(self):
config_args = ['--enable-shared']
diff --git a/var/spack/repos/builtin/packages/pkgconf/package.py b/var/spack/repos/builtin/packages/pkgconf/package.py
new file mode 100644
index 0000000000..f74cbd001a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/pkgconf/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Pkgconf(AutotoolsPackage):
+ """pkgconf is a program which helps to configure compiler and linker
+ flags for development frameworks. It is similar to pkg-config from
+ freedesktop.org, providing additional functionality while also
+ maintaining compatibility."""
+
+ homepage = "http://pkgconf.org/"
+ url = "https://distfiles.dereferenced.org/pkgconf/pkgconf-1.3.8.tar.xz"
+
+ version('1.3.8', '484ba3360d983ce07416843d5bc916a8')
+
+ @run_after('install')
+ def link_pkg_config(self):
+ symlink('pkgconf', '{0}/pkg-config'.format(self.prefix.bin))
+ symlink('pkgconf.1',
+ '{0}/pkg-config.1'.format(self.prefix.share.man.man1))
diff --git a/var/spack/repos/builtin/packages/plink/package.py b/var/spack/repos/builtin/packages/plink/package.py
new file mode 100644
index 0000000000..a519f30184
--- /dev/null
+++ b/var/spack/repos/builtin/packages/plink/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Plink(Package):
+ """PLINK is a free, open-source whole genome association analysis toolset,
+ designed to perform a range of basic, large-scale analyses in a
+ computationally efficient manner."""
+
+ homepage = "https://www.cog-genomics.org/plink/1.9/"
+
+ version('1.9', 'a2325881594856c0f1b7523290d1e04f',
+ url='https://www.cog-genomics.org/static/bin/plink170815/plink_linux_x86_64.zip')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('plink', prefix.bin)
+ install('prettify', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/pngwriter/package.py b/var/spack/repos/builtin/packages/pngwriter/package.py
index 664421ceab..1f7c20575f 100644
--- a/var/spack/repos/builtin/packages/pngwriter/package.py
+++ b/var/spack/repos/builtin/packages/pngwriter/package.py
@@ -38,7 +38,7 @@ class Pngwriter(CMakePackage):
homepage = "http://pngwriter.sourceforge.net/"
url = "https://github.com/pngwriter/pngwriter/archive/0.5.6.tar.gz"
- version('dev', branch='dev',
+ version('develop', branch='dev',
git='https://github.com/pngwriter/pngwriter.git')
version('master', branch='master',
git='https://github.com/pngwriter/pngwriter.git')
diff --git a/var/spack/repos/builtin/packages/poamsa/package.py b/var/spack/repos/builtin/packages/poamsa/package.py
new file mode 100644
index 0000000000..3148a10bbd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/poamsa/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Poamsa(MakefilePackage):
+ """POA is Partial Order Alignment, a fast program for multiple sequence
+ alignment in bioinformatics. Its advantages are speed, scalability,
+ sensitivity, and the superior ability to handle branching / indels
+ in the alignment."""
+
+ homepage = "https://sourceforge.net/projects/poamsa"
+ url = "https://downloads.sourceforge.net/project/poamsa/poamsa/2.0/poaV2.tar.gz"
+
+ version('2.0', '9e2eb270d4867114406f53dab1311b2b')
+
+ def url_for_version(self, version):
+ url = "https://downloads.sourceforge.net/project/poamsa/poamsa/{0}/poaV{1}.tar.gz"
+ return url.format(version.dotted, version.up_to(1))
+
+ def build(self, spec, prefix):
+ make('poa')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.lib)
+ install('poa', prefix.bin)
+ install('liblpo.a', prefix.lib)
diff --git a/var/spack/repos/builtin/packages/portage/package.py b/var/spack/repos/builtin/packages/portage/package.py
index 92e4266552..0934076ab9 100644
--- a/var/spack/repos/builtin/packages/portage/package.py
+++ b/var/spack/repos/builtin/packages/portage/package.py
@@ -36,19 +36,11 @@ class Portage(CMakePackage):
version('develop', git='https://github.com/laristra/portage', branch='master', submodules=True)
- variant('debug', default=False, description='Build debug version')
variant('mpi', default=True, description='Support MPI')
depends_on("cmake@3.1:", type='build')
depends_on('mpi', when='+mpi')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = ['-DENABLE_UNIT_TESTS=ON', '-DENABLE_APP_TESTS=ON']
diff --git a/var/spack/repos/builtin/packages/preseq/package.py b/var/spack/repos/builtin/packages/preseq/package.py
new file mode 100644
index 0000000000..87779bcbac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/preseq/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Preseq(MakefilePackage):
+ """The preseq package is aimed at predicting and estimating the complexity
+ of a genomic sequencing library, equivalent to predicting and
+ estimating the number of redundant reads from a given sequencing depth
+ and how many will be expected from additional sequencing using an
+ initial sequencing experiment."""
+
+ homepage = "https://github.com/smithlabcode/preseq"
+ url = "https://github.com/smithlabcode/preseq/releases/download/v2.0.2/preseq_v2.0.2.tar.bz2"
+
+ version('2.0.2', '9f2a7b597c9f08b821db6ee55e2ea39c')
+
+ depends_on('samtools')
+ depends_on('gsl')
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.set('PREFIX', self.prefix)
diff --git a/var/spack/repos/builtin/packages/price/package.py b/var/spack/repos/builtin/packages/price/package.py
new file mode 100644
index 0000000000..df674f4f6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/price/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Price(MakefilePackage):
+ """PRICE (Paired-Read Iterative Contig Extension): a de novo genome
+ assembler implemented in C++."""
+
+ homepage = "http://derisilab.ucsf.edu/software/price/"
+ url = "http://derisilab.ucsf.edu/software/price/PriceSource140408.tar.gz"
+
+ version('140408', '2880274a514c34b812718b13a620813e')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('PriceTI', prefix.bin)
+ install('PriceSeqFilter', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/probconsrna/package.py b/var/spack/repos/builtin/packages/probconsrna/package.py
new file mode 100644
index 0000000000..4973ced565
--- /dev/null
+++ b/var/spack/repos/builtin/packages/probconsrna/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Probconsrna(Package):
+ """Experimental version of PROBCONS with parameters estimated via
+ unsupervised training on BRAliBASE """
+
+ homepage = "http://probcons.stanford.edu/"
+ url = "http://probcons.stanford.edu/probconsRNA.tar.gz"
+
+ version('2005-6-7', '2aa13012124208ca5dd6b0a1d508208d')
+
+ def install(self, build, prefix):
+ mkdirp(prefix.bin)
+ install('compare', prefix.bin)
+ install('makegnuplot', prefix.bin)
+ install('probcons', prefix.bin)
+ # needed for tcoffee
+ install('probcons', prefix.bin.probconsRNA)
+ install('project', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index 50b190f70e..f6272f3fe8 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -25,31 +25,30 @@
from spack import *
-class Protobuf(AutotoolsPackage):
+class Protobuf(CMakePackage):
"""Google's data interchange format."""
homepage = "https://developers.google.com/protocol-buffers"
url = "https://github.com/google/protobuf/archive/v3.2.0.tar.gz"
+ root_cmakelists_dir = "cmake"
+ version('3.4.0', '4f47de212ef665ea619f5f97083c6781')
version('3.2.0', '61d899b8369781f6dd1e62370813392d')
version('3.1.0', '14a532a7538551d5def317bfca41dace')
version('3.0.2', '845b39e4b7681a2ddfd8c7f528299fbb')
- version('2.5.0', '9c21577a03adc1879aba5b52d06e25cf')
+ # does not build with CMake:
+ # version('2.5.0', '9c21577a03adc1879aba5b52d06e25cf')
- depends_on('automake', type='build')
- depends_on('autoconf', type='build')
- depends_on('libtool', type='build')
- depends_on('m4', type='build')
+ depends_on('zlib')
conflicts('%gcc@:4.6') # Requires c++11
- variant('shared', default=True, description='Build shared libraries.')
+ # first fixed in 3.4.0: https://github.com/google/protobuf/pull/3406
+ patch('pkgconfig.patch', when='@:3.3.2')
- def configure_args(self):
- if '+shared' in self.spec:
- return ['--enable-shared=yes',
- '--enable-static=no']
- else:
- return ['--enable-shared=no',
- '--enable-static=yes',
- '--with-pic=yes']
+ def cmake_args(self):
+ args = [
+ '-Dprotobuf_BUILD_TESTS:BOOL=OFF',
+ '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON'
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/protobuf/pkgconfig.patch b/var/spack/repos/builtin/packages/protobuf/pkgconfig.patch
new file mode 100644
index 0000000000..a0e8b4b3b7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/protobuf/pkgconfig.patch
@@ -0,0 +1,58 @@
+diff --git a/cmake/install.cmake b/cmake/install.cmake
+index 28dc90d..441bf55 100644
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -1,5 +1,10 @@
+ include(GNUInstallDirs)
+
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
++ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
++
+ foreach(_library
+ libprotobuf-lite
+ libprotobuf
+@@ -17,6 +22,8 @@ endforeach()
+ install(TARGETS protoc EXPORT protobuf-targets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++
+ file(STRINGS extract_includes.bat.in _extract_strings
+ REGEX "^copy")
+ foreach(_extract_string ${_extract_strings})
+diff --git a/cmake/protobuf-lite.pc.cmake b/cmake/protobuf-lite.pc.cmake
+new file mode 100644
+index 0000000..cbe5426
+--- /dev/null
++++ b/cmake/protobuf-lite.pc.cmake
+@@ -0,0 +1,11 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: Protocol Buffers
++Description: Google's Data Interchange Format
++Version: @protobuf_VERSION@
++Libs: -L${libdir} -lprotobuf-lite @CMAKE_THREAD_LIBS_INIT@
++Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@
++Conflicts: protobuf
+diff --git a/cmake/protobuf.pc.cmake b/cmake/protobuf.pc.cmake
+new file mode 100644
+index 0000000..2e30763
+--- /dev/null
++++ b/cmake/protobuf.pc.cmake
+@@ -0,0 +1,11 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: Protocol Buffers
++Description: Google's Data Interchange Format
++Version: @protobuf_VERSION@
++Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@
++Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@
++Conflicts: protobuf-lite
diff --git a/var/spack/repos/builtin/packages/pruners-ninja/package.py b/var/spack/repos/builtin/packages/pruners-ninja/package.py
index 660512380b..558f59342b 100644
--- a/var/spack/repos/builtin/packages/pruners-ninja/package.py
+++ b/var/spack/repos/builtin/packages/pruners-ninja/package.py
@@ -31,6 +31,7 @@ class PrunersNinja(AutotoolsPackage):
homepage = "https://github.com/PRUNERS/NINJA"
url = "https://github.com/PRUNERS/NINJA/releases/download/v1.0.0/NINJA-1.0.0.tar.gz"
+ version("1.0.1", "f0728cad61d8f1f970dffb7bb430addb")
version("1.0.0", "fee53c4712ac521ebec3cd8692e5185a")
depends_on("mpi")
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
index 41633ffceb..3c50a8413c 100644
--- a/var/spack/repos/builtin/packages/psi4/package.py
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -26,7 +26,7 @@ from spack import *
import os
-class Psi4(Package):
+class Psi4(CMakePackage):
"""Psi4 is an open-source suite of ab initio quantum chemistry
programs designed for efficient, high-accuracy simulations of
a variety of molecular properties."""
@@ -36,20 +36,16 @@ class Psi4(Package):
version('0.5', '53041b8a9be3958384171d0d22f9fdd0')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
+
# Required dependencies
depends_on('blas')
depends_on('lapack')
- depends_on('boost'
- '+chrono'
- '+filesystem'
- '+python'
- '+regex'
- '+serialization'
- '+system'
- '+timer'
- '+thread')
+ depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread')
depends_on('python')
- depends_on('cmake', type='build')
+ depends_on('cmake@3.3:', type='build')
depends_on('py-numpy', type=('build', 'run'))
# Optional dependencies
@@ -59,8 +55,10 @@ class Psi4(Package):
# depends_on('pcm-solver')
# depends_on('chemps2')
- def install(self, spec, prefix):
- cmake_args = [
+ def cmake_args(self):
+ spec = self.spec
+
+ return [
'-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()),
'-DBLAS_LIBRARIES={0}'.format(spec['blas'].libs.joined()),
'-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()),
@@ -71,16 +69,7 @@ class Psi4(Package):
'-DENABLE_CHEMPS2=OFF'
]
- cmake_args.extend(std_cmake_args)
-
- with working_dir('spack-build', create=True):
- cmake('..', *cmake_args)
-
- make()
- make('install')
-
- self.filter_compilers(spec, prefix)
-
+ @run_after('install')
def filter_compilers(self, spec, prefix):
"""Run after install to tell the configuration files to
use the compilers that Spack built the package with.
diff --git a/var/spack/repos/builtin/packages/py-3to2/package.py b/var/spack/repos/builtin/packages/py-3to2/package.py
index e1d939d474..cc2986a7b3 100644
--- a/var/spack/repos/builtin/packages/py-3to2/package.py
+++ b/var/spack/repos/builtin/packages/py-3to2/package.py
@@ -30,6 +30,6 @@ class Py3to2(PythonPackage):
for Python version 3.x into Python version 2.x."""
homepage = "https://pypi.python.org/pypi/3to2"
- url = "https://pypi.python.org/packages/source/3/3to2/3to2-1.1.1.zip"
+ url = "https://pypi.io/packages/source/3/3to2/3to2-1.1.1.zip"
version('1.1.1', 'cbeed28e350dbdaef86111ace3052824')
diff --git a/var/spack/repos/builtin/packages/py-apache-libcloud/package.py b/var/spack/repos/builtin/packages/py-apache-libcloud/package.py
index bf2f309cff..2498a469f1 100644
--- a/var/spack/repos/builtin/packages/py-apache-libcloud/package.py
+++ b/var/spack/repos/builtin/packages/py-apache-libcloud/package.py
@@ -29,7 +29,8 @@ class PyApacheLibcloud(PythonPackage):
"""Python library for multiple cloud provider APIs"""
homepage = "http://libcloud.apache.org"
+ url = "https://pypi.io/packages/source/a/apache-libcloud/apache-libcloud-1.2.1.tar.gz"
- version('1.2.1', '912e6fb1f2d13f7d3b58ee982b9f9d1f', url="https://pypi.python.org/packages/dd/b5/7b8b5796177345b6a7c1f3d4fda9fbbe9aeef000ac33f3aac06f176845d0/apache-libcloud-1.2.1.tar.gz")
+ version('1.2.1', '912e6fb1f2d13f7d3b58ee982b9f9d1f')
depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-apipkg/package.py b/var/spack/repos/builtin/packages/py-apipkg/package.py
new file mode 100644
index 0000000000..2e125cb1a9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-apipkg/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyApipkg(PythonPackage):
+ """apipkg: namespace control and lazy-import mechanism"""
+
+ homepage = "https://pypi.python.org/pypi/apipkg"
+ url = "https://pypi.io/packages/source/a/apipkg/apipkg-1.4.tar.gz"
+
+ version('1.4', '17e5668601a2322aff41548cb957e7c8')
+
+ depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py
index ff35e98d80..ba9b9600d3 100644
--- a/var/spack/repos/builtin/packages/py-argcomplete/package.py
+++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py
@@ -29,7 +29,7 @@ class PyArgcomplete(PythonPackage):
"""Bash tab completion for argparse."""
homepage = "https://pypi.python.org/pypi/argcomplete"
- url = "https://pypi.python.org/packages/source/a/argcomplete/argcomplete-1.1.1.tar.gz"
+ url = "https://pypi.io/packages/source/a/argcomplete/argcomplete-1.1.1.tar.gz"
version('1.1.1', '89a3839096c9f991ad33828e72d21abf')
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index 27358c9467..d1d6fcc0e8 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -31,7 +31,7 @@ class PyAstropy(PythonPackage):
Python astronomy packages."""
homepage = 'http://www.astropy.org/'
- url = 'https://pypi.python.org/packages/source/a/astropy/astropy-1.1.2.tar.gz'
+ url = 'https://pypi.io/packages/source/a/astropy/astropy-1.1.2.tar.gz'
version('1.1.2', 'cbe32023b5b1177d1e2498a0d00cda51')
version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d')
diff --git a/var/spack/repos/builtin/packages/py-biom-format/package.py b/var/spack/repos/builtin/packages/py-biom-format/package.py
new file mode 100644
index 0000000000..2d61507bd0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-biom-format/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyBiomFormat(PythonPackage):
+ """The BIOM file format (canonically pronounced biome) is designed to be
+ a general-use format for representing biological sample by observation
+ contingency tables."""
+
+ homepage = "https://pypi.python.org/pypi/biom-format/2.1.6"
+ url = "https://pypi.io/packages/source/b/biom-format/biom-format-2.1.6.tar.gz"
+
+ version('2.1.6', '1dd4925b74c56e8ee864d5e1973068de')
+
+ variant('h5py', default=True, description='For use with BIOM 2.0+ files')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-cython', type='build')
+ depends_on('py-h5py', type=('build', 'run'), when='+h5py')
+ depends_on('py-click', type=('build', 'run'))
+ depends_on('py-numpy@1.3.0:', type=('build', 'run'))
+ depends_on('py-future@0.16.0:', type=('build', 'run'))
+ depends_on('py-scipy@0.13.0:', type=('build', 'run'))
+ depends_on('py-pandas@0.19.2:', type=('build', 'run'))
+ depends_on('py-six@1.10.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-bleach/package.py b/var/spack/repos/builtin/packages/py-bleach/package.py
index 628b58cd0c..b469a12b60 100644
--- a/var/spack/repos/builtin/packages/py-bleach/package.py
+++ b/var/spack/repos/builtin/packages/py-bleach/package.py
@@ -29,7 +29,7 @@ class PyBleach(PythonPackage):
"""An easy whitelist-based HTML-sanitizing tool."""
homepage = "http://github.com/mozilla/bleach"
- url = "https://pypi.python.org/packages/99/00/25a8fce4de102bf6e3cc76bc4ea60685b2fee33bde1b34830c70cacc26a7/bleach-1.5.0.tar.gz"
+ url = "https://pypi.io/packages/source/b/bleach/bleach-1.5.0.tar.gz"
version('1.5.0', 'b663300efdf421b3b727b19d7be9c7e7')
diff --git a/var/spack/repos/builtin/packages/py-blessings/package.py b/var/spack/repos/builtin/packages/py-blessings/package.py
index 39c6c16da1..d4d509f205 100644
--- a/var/spack/repos/builtin/packages/py-blessings/package.py
+++ b/var/spack/repos/builtin/packages/py-blessings/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyBlessings(PythonPackage):
"""A nicer, kinder way to write to the terminal """
homepage = "https://github.com/erikrose/blessings"
- url = "https://pypi.python.org/packages/source/b/blessings/blessings-1.6.tar.gz"
+ url = "https://pypi.io/packages/source/b/blessings/blessings-1.6.tar.gz"
version('1.6', '4f552a8ebcd4982693c92571beb99394')
diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py
index 99177ef98a..d8958e1208 100644
--- a/var/spack/repos/builtin/packages/py-bottleneck/package.py
+++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyBottleneck(PythonPackage):
"""A collection of fast NumPy array functions written in Cython."""
homepage = "https://pypi.python.org/pypi/Bottleneck/1.0.0"
- url = "https://pypi.python.org/packages/source/B/Bottleneck/Bottleneck-1.0.0.tar.gz"
+ url = "https://pypi.io/packages/source/B/Bottleneck/Bottleneck-1.0.0.tar.gz"
version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2')
diff --git a/var/spack/repos/builtin/packages/py-cdat-lite/package.py b/var/spack/repos/builtin/packages/py-cdat-lite/package.py
index cec2ce1fbc..257abc33f8 100644
--- a/var/spack/repos/builtin/packages/py-cdat-lite/package.py
+++ b/var/spack/repos/builtin/packages/py-cdat-lite/package.py
@@ -40,3 +40,14 @@ class PyCdatLite(PythonPackage):
depends_on("python@2.5:2.8", type=('build', 'run'))
depends_on("py-numpy", type=('build', 'run'))
depends_on('py-setuptools', type='build')
+
+ phases = ['install']
+
+ def install(self, spec, prefix):
+ """Install everything from build directory."""
+ install_args = self.install_args(spec, prefix)
+ # Combine all phases into a single setup.py command,
+ # otherwise extensions are rebuilt without rpath by install phase:
+ self.setup_py('build_ext', '--rpath=%s' % ":".join(self.rpath),
+ 'build_py', 'build_scripts',
+ 'install', *install_args)
diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py
index a1bf48ca92..4a41241d80 100644
--- a/var/spack/repos/builtin/packages/py-csvkit/package.py
+++ b/var/spack/repos/builtin/packages/py-csvkit/package.py
@@ -30,7 +30,7 @@ class PyCsvkit(PythonPackage):
formats"""
homepage = 'http://csvkit.rtfd.org/'
- url = "https://pypi.python.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz"
+ url = "https://pypi.io/packages/source/c/csvkit/csvkit-0.9.1.tar.gz"
version('0.9.1', '48d78920019d18846933ee969502fff6')
diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py
index 6141505995..0b27ab80a5 100644
--- a/var/spack/repos/builtin/packages/py-dask/package.py
+++ b/var/spack/repos/builtin/packages/py-dask/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyDask(PythonPackage):
"""Minimal task scheduling abstraction"""
homepage = "https://github.com/dask/dask/"
- url = "https://pypi.python.org/packages/source/d/dask/dask-0.8.1.tar.gz"
+ url = "https://pypi.io/packages/source/d/dask/dask-0.8.1.tar.gz"
version('0.8.1', '5dd8e3a3823b3bc62c9a6d192e2cb5b4')
diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py
index 08d43a0ad0..deeb3197f5 100644
--- a/var/spack/repos/builtin/packages/py-dateutil/package.py
+++ b/var/spack/repos/builtin/packages/py-dateutil/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyDateutil(PythonPackage):
"""Extensions to the standard Python datetime module."""
homepage = "https://pypi.python.org/pypi/dateutil"
- url = "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz"
+ url = "https://pypi.io/packages/source/p/python-dateutil/python-dateutil-2.4.0.tar.gz"
version('2.4.0', '75714163bb96bedd07685cdb2071b8bc')
version('2.4.2', '4ef68e1c485b09e9f034e10473e5add2')
diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py
index a5c20d62a1..c6b7ddfa99 100644
--- a/var/spack/repos/builtin/packages/py-dbf/package.py
+++ b/var/spack/repos/builtin/packages/py-dbf/package.py
@@ -30,6 +30,6 @@ class PyDbf(PythonPackage):
.dbf files (including memos)"""
homepage = 'https://pypi.python.org/pypi/dbf'
- url = "https://pypi.python.org/packages/source/d/dbf/dbf-0.96.005.tar.gz"
+ url = "https://pypi.io/packages/source/d/dbf/dbf-0.96.005.tar.gz"
version('0.96.005', 'bce1a1ed8b454a30606e7e18dd2f8277')
diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py
index b30de06246..854fe55e52 100644
--- a/var/spack/repos/builtin/packages/py-decorator/package.py
+++ b/var/spack/repos/builtin/packages/py-decorator/package.py
@@ -30,7 +30,7 @@ class PyDecorator(PythonPackage):
for the average programmer, and to popularize decorators by showing
various non-trivial examples."""
homepage = "https://github.com/micheles/decorator"
- url = "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.9.tar.gz"
+ url = "https://pypi.io/packages/source/d/decorator/decorator-4.0.9.tar.gz"
version('4.0.9', 'f12c5651ccd707e12a0abaa4f76cd69a')
diff --git a/var/spack/repos/builtin/packages/py-deeptools/package.py b/var/spack/repos/builtin/packages/py-deeptools/package.py
new file mode 100644
index 0000000000..e4e1ec2583
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-deeptools/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyDeeptools(PythonPackage):
+ """deepTools addresses the challenge of handling the large amounts of data
+ that are now routinely generated from DNA sequencing centers."""
+
+ homepage = "https://pypi.io/packages/source/d/deepTools"
+ url = "https://pypi.io/packages/source/d/deepTools/deepTools-2.5.2.tar.gz"
+
+ version('2.5.2', 'ba8a44c128c6bb1ed4ebdb20bf9ae9c2')
+
+ depends_on('python@2.7:', type=('build', 'run'))
+ depends_on('py-setuptools', type='build')
+ depends_on('py-numpy@1.9.0:', type=('build', 'run'))
+ depends_on('py-scipy@0.17.0:', type=('build', 'run'))
+ depends_on('py-py2bit@0.2.0:', type=('build', 'run'))
+ depends_on('py-pybigwig@0.2.1:', type=('build', 'run'))
+ depends_on('py-pysam@0.8.2:', type=('build', 'run'))
+ depends_on('py-matplotlib@1.4.0:', type=('build', 'run'))
+ depends_on('py-numpydoc@0.5:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py
index 2410244919..4b8a24c673 100644
--- a/var/spack/repos/builtin/packages/py-emcee/package.py
+++ b/var/spack/repos/builtin/packages/py-emcee/package.py
@@ -30,7 +30,7 @@ class PyEmcee(PythonPackage):
Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler."""
homepage = "http://dan.iel.fm/emcee/current/"
- url = "https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz"
+ url = "https://pypi.io/packages/source/e/emcee/emcee-2.1.0.tar.gz"
version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7')
diff --git a/var/spack/repos/builtin/packages/py-entrypoints/package.py b/var/spack/repos/builtin/packages/py-entrypoints/package.py
index f93092b317..1df5e8bdc1 100644
--- a/var/spack/repos/builtin/packages/py-entrypoints/package.py
+++ b/var/spack/repos/builtin/packages/py-entrypoints/package.py
@@ -23,31 +23,17 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-from spack.package import PackageBase
class PyEntrypoints(PythonPackage):
"""Discover and load entry points from installed packages."""
homepage = "https://pypi.python.org/pypi/entrypoints"
- url = "https://pypi.python.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/entrypoints-0.2.2-py2.py3-none-any.whl"
+ url = "https://pypi.io/packages/source/e/entrypoints/entrypoints-0.2.3.tar.gz"
import_modules = ['entrypoints']
- version('0.2.2', '73bd7ce92c19b25dc5a20aff41be996a', expand=False)
+ version('0.2.3', '0d3ad1b0130d91e3596ef3a59f25a56c')
depends_on('python@2.7:', type=('build', 'run'))
-
- depends_on('py-pip', type='build')
depends_on('py-configparser', when='^python@:2.8', type=('build', 'run'))
-
- phases = ['install']
-
- def install(self, spec, prefix):
- pip = which('pip')
- pip('install', self.stage.archive_file, '--prefix={0}'.format(prefix))
-
- run_after('install')(PackageBase._run_default_install_time_test_callbacks)
-
- # Check that self.prefix is there after installation
- run_after('install')(PackageBase.sanity_check_prefix)
diff --git a/var/spack/repos/builtin/packages/py-epydoc/package.py b/var/spack/repos/builtin/packages/py-epydoc/package.py
index 93a6018acb..c10ba2a635 100644
--- a/var/spack/repos/builtin/packages/py-epydoc/package.py
+++ b/var/spack/repos/builtin/packages/py-epydoc/package.py
@@ -29,6 +29,6 @@ class PyEpydoc(PythonPackage):
"""Epydoc is a tool for generating API documentation documentation for
Python modules, based on their docstrings."""
homepage = "https://pypi.python.org/pypi/epydoc"
- url = "https://pypi.python.org/packages/source/e/epydoc/epydoc-3.0.1.tar.gz"
+ url = "https://pypi.io/packages/source/e/epydoc/epydoc-3.0.1.tar.gz"
version('3.0.1', '36407974bd5da2af00bf90ca27feeb44')
diff --git a/var/spack/repos/builtin/packages/py-execnet/package.py b/var/spack/repos/builtin/packages/py-execnet/package.py
new file mode 100644
index 0000000000..dbfa15007e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-execnet/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyExecnet(PythonPackage):
+ """execnet provides a share-nothing model with channel-send/receive
+ communication for distributing execution across many Python interpreters
+ across version, platform and network barriers."""
+
+ homepage = "http://codespeak.net/execnet"
+ url = "https://pypi.io/packages/source/e/execnet/execnet-1.4.1.tar.gz"
+
+ version('1.4.1', '0ff84b6c79d0dafb7e2971629c4d127a')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-apipkg@1.4:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-fastaindex/package.py b/var/spack/repos/builtin/packages/py-fastaindex/package.py
new file mode 100644
index 0000000000..6e98f4c5a4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-fastaindex/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyFastaindex(PythonPackage):
+ """FastA index (.fai) handler compatible with samtools faidx is extended
+ with 4 columns storing counts for A, C, G & T for each sequence.."""
+
+ homepage = "https://github.com/lpryszcz/FastaIndex"
+ url = "https://pypi.io/packages/source/F/FastaIndex/FastaIndex-0.11rc7.tar.gz"
+
+ version('0.11rc7', '882c973d968d9db596edfd0fbb07e3a8')
+
+ depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-faststructure/package.py b/var/spack/repos/builtin/packages/py-faststructure/package.py
new file mode 100644
index 0000000000..5085c33af0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-faststructure/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyFaststructure(PythonPackage):
+ """FastStructure is a fast algorithm for inferring population structure
+ from large SNP genotype data."""
+
+ homepage = "https://github.com/rajanil/fastStructure"
+ url = "https://github.com/rajanil/fastStructure/archive/v1.0.tar.gz"
+
+ version('1.0', '5cbb76e7d49e27a57046ab641b666f97')
+
+ depends_on('py-cython', type='build')
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('gsl')
diff --git a/var/spack/repos/builtin/packages/py-funcsigs/package.py b/var/spack/repos/builtin/packages/py-funcsigs/package.py
index 7d173842d1..d51e797ac2 100644
--- a/var/spack/repos/builtin/packages/py-funcsigs/package.py
+++ b/var/spack/repos/builtin/packages/py-funcsigs/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyFuncsigs(PythonPackage):
"""Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2."""
homepage = "https://pypi.python.org/pypi/funcsigs"
- url = "https://pypi.python.org/packages/source/f/funcsigs/funcsigs-0.4.tar.gz"
+ url = "https://pypi.io/packages/source/f/funcsigs/funcsigs-0.4.tar.gz"
version('0.4', 'fb1d031f284233e09701f6db1281c2a5')
diff --git a/var/spack/repos/builtin/packages/py-functools32/package.py b/var/spack/repos/builtin/packages/py-functools32/package.py
index a01b022df5..658aab5b4e 100644
--- a/var/spack/repos/builtin/packages/py-functools32/package.py
+++ b/var/spack/repos/builtin/packages/py-functools32/package.py
@@ -30,6 +30,6 @@ class PyFunctools32(PythonPackage):
PyPy."""
homepage = "https://github.com/MiCHiLU/python-functools32"
- url = "https://pypi.python.org/packages/source/f/functools32/functools32-3.2.3-2.tar.gz"
+ url = "https://pypi.io/packages/source/f/functools32/functools32-3.2.3-2.tar.gz"
version('3.2.3-2', '09f24ffd9af9f6cd0f63cb9f4e23d4b2')
diff --git a/var/spack/repos/builtin/packages/py-git2/package.py b/var/spack/repos/builtin/packages/py-git2/package.py
index 5adafe1f96..d5b5bd28f0 100644
--- a/var/spack/repos/builtin/packages/py-git2/package.py
+++ b/var/spack/repos/builtin/packages/py-git2/package.py
@@ -31,9 +31,9 @@ class PyGit2(PythonPackage):
"""
homepage = "http://www.pygit2.org/"
+ url = "https://pypi.io/packages/source/p/pygit2/pygit2-0.24.1.tar.gz"
- version('0.24.1', 'dd98b6a9fded731e36ca5a40484c8545',
- url="https://pypi.python.org/packages/aa/56/84dcce942a48d4b7b970cfb7a779b8db1d904e5ec5f71e7a67a63a23a4e2/pygit2-0.24.1.tar.gz")
+ version('0.24.1', 'dd98b6a9fded731e36ca5a40484c8545')
extends('python')
depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index 9838f56db5..5a5c02338c 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -30,7 +30,7 @@ class PyH5py(PythonPackage):
HDF5 library from Python."""
homepage = "https://pypi.python.org/pypi/h5py"
- url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz"
+ url = "https://pypi.io/packages/source/h/h5py/h5py-2.4.0.tar.gz"
version('2.6.0', 'ec476211bd1de3f5ac150544189b0bf4')
version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74')
diff --git a/var/spack/repos/builtin/packages/py-html5lib/package.py b/var/spack/repos/builtin/packages/py-html5lib/package.py
index 05a5f5ceea..e219450f83 100644
--- a/var/spack/repos/builtin/packages/py-html5lib/package.py
+++ b/var/spack/repos/builtin/packages/py-html5lib/package.py
@@ -29,7 +29,7 @@ class PyHtml5lib(PythonPackage):
"""HTML parser based on the WHATWG HTML specification."""
homepage = "https://github.com/html5lib/html5lib-python"
- url = "https://pypi.python.org/packages/ae/ae/bcb60402c60932b32dfaf19bb53870b29eda2cd17551ba5639219fb5ebf9/html5lib-0.9999999.tar.gz"
+ url = "https://pypi.io/packages/source/h/html5lib/html5lib-0.9999999.tar.gz"
version('0.9999999', 'ef43cb05e9e799f25d65d1135838a96f')
diff --git a/var/spack/repos/builtin/packages/py-igraph/package.py b/var/spack/repos/builtin/packages/py-igraph/package.py
new file mode 100644
index 0000000000..7d9c408678
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-igraph/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyIgraph(PythonPackage):
+ """igraph is a collection of network analysis tools with the emphasis on
+ efficiency, portability and ease of use."""
+
+ homepage = "http://igraph.org/"
+ url = "http://igraph.org/nightly/get/python/python-igraph-0.7.0.tar.gz"
+
+ version('0.7.0', '32a3238cb9041b1686d7d0ba152235bf')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('igraph')
diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py
index b4b51f67f0..23961d3144 100644
--- a/var/spack/repos/builtin/packages/py-iminuit/package.py
+++ b/var/spack/repos/builtin/packages/py-iminuit/package.py
@@ -29,7 +29,7 @@ class PyIminuit(PythonPackage):
"""Interactive IPython-Friendly Minimizer based on SEAL Minuit2."""
homepage = "https://pypi.python.org/pypi/iminuit"
- url = "https://pypi.python.org/packages/source/i/iminuit/iminuit-1.2.tar.gz"
+ url = "https://pypi.io/packages/source/i/iminuit/iminuit-1.2.tar.gz"
version('1.2', '4701ec472cae42015e26251703e6e984')
diff --git a/var/spack/repos/builtin/packages/py-jpype/package.py b/var/spack/repos/builtin/packages/py-jpype/package.py
index b82a43ca2f..b9117f7536 100644
--- a/var/spack/repos/builtin/packages/py-jpype/package.py
+++ b/var/spack/repos/builtin/packages/py-jpype/package.py
@@ -39,6 +39,6 @@ class PyJpype(PythonPackage):
depends_on('python@2.6:')
depends_on('py-setuptools', type='build')
- depends_on('jdk', type=('build', 'run'))
+ depends_on('java', type=('build', 'run'))
# extra requirements
# depends_on('py-numpy@1.6:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-jsonschema/package.py b/var/spack/repos/builtin/packages/py-jsonschema/package.py
index 8a69361bab..2a72c9492a 100644
--- a/var/spack/repos/builtin/packages/py-jsonschema/package.py
+++ b/var/spack/repos/builtin/packages/py-jsonschema/package.py
@@ -29,7 +29,7 @@ class PyJsonschema(PythonPackage):
"""Jsonschema: An(other) implementation of JSON Schema for Python."""
homepage = "http://github.com/Julian/jsonschema"
- url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz"
+ url = "https://pypi.io/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz"
version('2.5.1', '374e848fdb69a3ce8b7e778b47c30640')
diff --git a/var/spack/repos/builtin/packages/py-lazyarray/package.py b/var/spack/repos/builtin/packages/py-lazyarray/package.py
index 2af2624243..7ab655a20e 100644
--- a/var/spack/repos/builtin/packages/py-lazyarray/package.py
+++ b/var/spack/repos/builtin/packages/py-lazyarray/package.py
@@ -32,7 +32,8 @@ class PyLazyarray(PythonPackage):
homepage = "http://bitbucket.org/apdavison/lazyarray/"
url = "https://pypi.io/packages/source/l/lazyarray/lazyarray-0.2.8.tar.gz"
- version('0.2.8', '8e0072f0892b9fc0516e7048f96e9d74')
+ version('0.2.10', '336033357459e66cbca5543bf003a2ba')
+ version('0.2.8', '8e0072f0892b9fc0516e7048f96e9d74')
depends_on('py-numpy@1.3:', type=('build', 'run'))
depends_on('py-numpy@1.5:', type=('build', 'run'), when='^python@3:')
diff --git a/var/spack/repos/builtin/packages/py-lit/package.py b/var/spack/repos/builtin/packages/py-lit/package.py
index 711986ae3f..6d9dbf4830 100644
--- a/var/spack/repos/builtin/packages/py-lit/package.py
+++ b/var/spack/repos/builtin/packages/py-lit/package.py
@@ -32,7 +32,7 @@ class PyLit(PythonPackage):
interface as possible."""
homepage = "https://pypi.python.org/pypi/lit"
- url = "https://pypi.python.org/packages/5b/a0/dbed2c8dfb220eb9a5a893257223cd0ff791c0fbc34ce2f1a957fa4b6c6f/lit-0.5.0.tar.gz"
+ url = "https://pypi.io/packages/source/l/lit/lit-0.5.0.tar.gz"
version('0.5.0', '8144660cc692be8fb903395a5f06564d')
diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py
index 12f606588d..a9963c340f 100644
--- a/var/spack/repos/builtin/packages/py-lockfile/package.py
+++ b/var/spack/repos/builtin/packages/py-lockfile/package.py
@@ -37,7 +37,7 @@ class PyLockfile(PythonPackage):
possibilities it provides than as production-quality code.
"""
homepage = "https://pypi.python.org/pypi/lockfile"
- url = "https://pypi.python.org/packages/source/l/lockfile/lockfile-0.10.2.tar.gz"
+ url = "https://pypi.io/packages/source/l/lockfile/lockfile-0.10.2.tar.gz"
version('0.10.2', '1aa6175a6d57f082cd12e7ac6102ab15')
diff --git a/var/spack/repos/builtin/packages/py-logilab-common/package.py b/var/spack/repos/builtin/packages/py-logilab-common/package.py
index ab71df7689..925c24a66b 100644
--- a/var/spack/repos/builtin/packages/py-logilab-common/package.py
+++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyLogilabCommon(PythonPackage):
"""Common modules used by Logilab projects"""
homepage = "https://www.logilab.org/project/logilab-common"
- url = "https://pypi.python.org/packages/a7/31/1650d23e44794d46935d82b86e73454cc83b814cbe1365260ccce8a2f4c6/logilab-common-1.2.0.tar.gz"
+ url = "https://pypi.io/packages/source/l/logilab-common/logilab-common-1.2.0.tar.gz"
version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b')
diff --git a/var/spack/repos/builtin/packages/py-macholib/package.py b/var/spack/repos/builtin/packages/py-macholib/package.py
new file mode 100644
index 0000000000..80d9ee4a53
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-macholib/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyMacholib(PythonPackage):
+ """Python package for Mach-O header analysis and editing"""
+
+ homepage = "https://pypi.python.org/pypi/macholib"
+ url = "https://pypi.io/packages/source/m/macholib/macholib-1.8.tar.gz"
+
+ version('1.8', '65af8f20dada7bdb2a142afbec51330e')
+
+ depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-machotools/package.py b/var/spack/repos/builtin/packages/py-machotools/package.py
new file mode 100644
index 0000000000..ec0e1f364c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-machotools/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyMachotools(PythonPackage):
+ """Python package for editing Mach-O headers using macholib"""
+
+ homepage = "https://pypi.python.org/pypi/machotools"
+ url = "https://pypi.io/packages/source/m/machotools/machotools-0.2.0.tar.gz"
+
+ version('0.2.0', 'bcc68332c4a80b4f84ec9c8083465416')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-macholib', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-macs2/package.py b/var/spack/repos/builtin/packages/py-macs2/package.py
index d4bfd1b0f4..8f6b4cb27a 100644
--- a/var/spack/repos/builtin/packages/py-macs2/package.py
+++ b/var/spack/repos/builtin/packages/py-macs2/package.py
@@ -30,7 +30,7 @@ class PyMacs2(PythonPackage):
"""MACS2 Model-based Analysis of ChIP-Seq"""
homepage = "https://github.com/taoliu/MACS"
- url = "https://pypi.python.org/packages/9f/99/a8ac96b357f6b0a6f559fe0f5a81bcae12b98579551620ce07c5183aee2c/MACS2-2.1.1.20160309.tar.gz"
+ url = "https://pypi.io/packages/source/M/MACS2/MACS2-2.1.1.20160309.tar.gz"
version('2.1.1.20160309', '2008ba838f83f34f8e0fddefe2a3a0159f4a740707c68058f815b31ddad53d26')
diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py
index b1ea98d963..481c36818b 100644
--- a/var/spack/repos/builtin/packages/py-mako/package.py
+++ b/var/spack/repos/builtin/packages/py-mako/package.py
@@ -30,7 +30,7 @@ class PyMako(PythonPackage):
ideas from the existing templating languages."""
homepage = "https://pypi.python.org/pypi/mako"
- url = "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz"
+ url = "https://pypi.io/packages/source/M/Mako/Mako-1.0.1.tar.gz"
version('1.0.4', 'c5fc31a323dd4990683d2f2da02d4e20')
version('1.0.1', '9f0aafd177b039ef67b90ea350497a54')
diff --git a/var/spack/repos/builtin/packages/py-misopy/package.py b/var/spack/repos/builtin/packages/py-misopy/package.py
new file mode 100644
index 0000000000..3bfba1cc30
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-misopy/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyMisopy(PythonPackage):
+ """MISO (Mixture of Isoforms) is a probabilistic framework that
+ quantitates the expression level of alternatively spliced genes from
+ RNA-Seq data, and identifies differentially regulated isoforms or exons
+ across samples."""
+
+ homepage = "http://miso.readthedocs.io/en/fastmiso/"
+ url = "https://pypi.io/packages/source/m/misopy/misopy-0.5.4.tar.gz"
+
+ version('0.5.4', 'fe0c9c2613304defbdead12ea99e4194')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('python@2.6:', type=('build', 'run'))
+ depends_on('py-numpy@1.5.0:', type=('build', 'run'))
+ depends_on('py-scipy@0.9.0:', type=('build', 'run'))
+ depends_on('py-pysam@0.6.0:', type=('build', 'run'))
+ depends_on('py-matplotlib', type=('build', 'run'))
+ depends_on('samtools')
+ depends_on('bedtools2')
diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py
index f5653117d9..abb8abc125 100644
--- a/var/spack/repos/builtin/packages/py-mock/package.py
+++ b/var/spack/repos/builtin/packages/py-mock/package.py
@@ -31,7 +31,7 @@ class PyMock(PythonPackage):
they have been used."""
homepage = "https://github.com/testing-cabal/mock"
- url = "https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz"
+ url = "https://pypi.io/packages/source/m/mock/mock-1.3.0.tar.gz"
version('2.0.0', '0febfafd14330c9dcaa40de2d82d40ad')
version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb')
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
index a2ca9d83d8..0d57375787 100644
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -33,7 +33,7 @@ class PyMpi4py(PythonPackage):
"""
homepage = "https://pypi.python.org/pypi/mpi4py"
- url = "https://pypi.python.org/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz"
+ url = "https://pypi.io/packages/source/m/mpi4py/mpi4py-1.3.1.tar.gz"
version('2.0.0', '4f7d8126d7367c239fd67615680990e3')
version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c')
diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py
index 7b57ec4d73..aa00488016 100644
--- a/var/spack/repos/builtin/packages/py-mpmath/package.py
+++ b/var/spack/repos/builtin/packages/py-mpmath/package.py
@@ -28,6 +28,6 @@ from spack import *
class PyMpmath(PythonPackage):
"""A Python library for arbitrary-precision floating-point arithmetic."""
homepage = "http://mpmath.org"
- url = "https://pypi.python.org/packages/source/m/mpmath/mpmath-all-0.19.tar.gz"
+ url = "https://pypi.io/packages/source/m/mpmath/mpmath-all-0.19.tar.gz"
version('0.19', 'd1b7e19dd6830d0d7b5e1bc93d46c02c')
diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py
index 1c5864ed91..f3c5a88897 100644
--- a/var/spack/repos/builtin/packages/py-nestle/package.py
+++ b/var/spack/repos/builtin/packages/py-nestle/package.py
@@ -29,7 +29,7 @@ class PyNestle(PythonPackage):
"""Nested sampling algorithms for evaluating Bayesian evidence."""
homepage = "http://kbarbary.github.io/nestle/"
- url = "https://pypi.python.org/packages/source/n/nestle/nestle-0.1.1.tar.gz"
+ url = "https://pypi.io/packages/source/n/nestle/nestle-0.1.1.tar.gz"
version('0.1.1', '4875c0f9a0a8e263c1d7f5fa6ce604c5')
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
index 6ddff5988f..1d8dfa6b53 100644
--- a/var/spack/repos/builtin/packages/py-networkx/package.py
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -29,9 +29,10 @@ class PyNetworkx(PythonPackage):
"""NetworkX is a Python package for the creation, manipulation, and study
of the structure, dynamics, and functions of complex networks."""
homepage = "http://networkx.github.io/"
- url = "https://pypi.python.org/packages/source/n/networkx/networkx-1.11.tar.gz"
+ url = "https://pypi.io/packages/source/n/networkx/networkx-1.11.tar.gz"
version('1.11', '6ef584a879e9163013e9a762e1cf7cd1')
+ version('1.10', 'eb7a065e37250a4cc009919dacfe7a9d')
depends_on('py-decorator', type=('build', 'run'))
depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py
index 57250b645b..58090ae674 100644
--- a/var/spack/repos/builtin/packages/py-numexpr/package.py
+++ b/var/spack/repos/builtin/packages/py-numexpr/package.py
@@ -28,10 +28,9 @@ from spack import *
class PyNumexpr(PythonPackage):
"""Fast numerical expression evaluator for NumPy"""
homepage = "https://pypi.python.org/pypi/numexpr"
- url = "https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.6.tar.gz"
+ url = "https://pypi.io/packages/source/n/numexpr/numexpr-2.6.1.tar.gz"
- version('2.6.1', '6365245705b446426df9543ad218dd8e',
- url="https://pypi.python.org/packages/c6/f0/11628fa4d332d8fe9ab0ba8e9bfe0e065fb6b5324859171ee72d84e079c0/numexpr-2.6.1.tar.gz")
+ version('2.6.1', '6365245705b446426df9543ad218dd8e')
version('2.5', '84f66cced45ba3e30dcf77a937763aaa')
version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd')
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index 177a55fd1d..76ccb1a4a9 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -34,7 +34,7 @@ class PyNumpy(PythonPackage):
number capabilities"""
homepage = "http://www.numpy.org/"
- url = "https://pypi.io/packages/source/n/numpy/numpy-1.9.1.tar.gz"
+ url = "https://pypi.io/packages/source/n/numpy/numpy-1.13.1.zip"
install_time_test_callbacks = ['install_test', 'import_module_test']
@@ -48,18 +48,16 @@ class PyNumpy(PythonPackage):
# FIXME: numpy._build_utils and numpy.core.code_generators failed to import
# FIXME: Is this expected?
- version('1.13.0', 'fd044f0b8079abeaf5e6d2e93b2c1d03',
- url="https://pypi.io/packages/source/n/numpy/numpy-1.13.0.zip")
- version('1.12.1', 'c75b072a984028ac746a6a332c209a91',
- url="https://pypi.io/packages/source/n/numpy/numpy-1.12.1.zip")
- version('1.12.0', '33e5a84579f31829bbbba084fe0a4300',
- url="https://pypi.io/packages/source/n/numpy/numpy-1.12.0.zip")
- version('1.11.2', '03bd7927c314c43780271bf1ab795ebc')
- version('1.11.1', '2f44a895a8104ffac140c3a70edbd450')
- version('1.11.0', 'bc56fb9fc2895aa4961802ffbdb31d0b')
- version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad')
- version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645')
- version('1.9.1', '78842b73560ec378142665e712ae4ad9')
+ version('1.13.1', '2c3c0f4edf720c3a7b525dacc825b9ae')
+ version('1.13.0', 'fd044f0b8079abeaf5e6d2e93b2c1d03')
+ version('1.12.1', 'c75b072a984028ac746a6a332c209a91')
+ version('1.12.0', '33e5a84579f31829bbbba084fe0a4300')
+ version('1.11.2', '8308cc97be154d2f64a2387ea863c2ac')
+ version('1.11.1', '5caa3428b24aaa07e72c79d115140e46')
+ version('1.11.0', '19ce5c4eb16d663a0713daf0018a3021')
+ version('1.10.4', '510ffc322c635511e7be95d225b6bcbb')
+ version('1.9.2', 'e80c19d2fb25af576460bb7dac31c59a')
+ version('1.9.1', '223532d8e1bdaff5d30936439701d6e1')
variant('blas', default=True, description='Build with BLAS support')
variant('lapack', default=True, description='Build with LAPACK support')
diff --git a/var/spack/repos/builtin/packages/py-pathspec/package.py b/var/spack/repos/builtin/packages/py-pathspec/package.py
index e9ff10b109..f939865367 100644
--- a/var/spack/repos/builtin/packages/py-pathspec/package.py
+++ b/var/spack/repos/builtin/packages/py-pathspec/package.py
@@ -30,8 +30,8 @@ class PyPathspec(PythonPackage):
making it easier to write, find and run tests."""
homepage = "https://pypi.python.org/pypi/pathspec"
+ url = "https://pypi.io/packages/source/p/pathspec/pathspec-0.3.4.tar.gz"
- version('0.3.4', '2a4af9bf2dee98845d583ec61a00d05d',
- url='https://pypi.python.org/packages/14/9d/c9d790d373d6f6938d793e9c549b87ad8670b6fa7fc6176485e6ef11c1a4/pathspec-0.3.4.tar.gz')
+ version('0.3.4', '2a4af9bf2dee98845d583ec61a00d05d')
depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-periodictable/package.py b/var/spack/repos/builtin/packages/py-periodictable/package.py
index 84d6479fc4..e7e67de871 100644
--- a/var/spack/repos/builtin/packages/py-periodictable/package.py
+++ b/var/spack/repos/builtin/packages/py-periodictable/package.py
@@ -30,7 +30,7 @@ class PyPeriodictable(PythonPackage):
making it easier to write, find and run tests."""
homepage = "https://pypi.python.org/pypi/periodictable"
- url = "https://pypi.python.org/packages/source/p/periodictable/periodictable-1.4.1.tar.gz"
+ url = "https://pypi.io/packages/source/p/periodictable/periodictable-1.4.1.tar.gz"
version('1.4.1', '7246b63cc0b6b1be6e86b6616f9e866e')
diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py
index 888890037c..8e2d56755d 100644
--- a/var/spack/repos/builtin/packages/py-petsc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py
@@ -29,10 +29,10 @@ class PyPetsc4py(PythonPackage):
"""This package provides Python bindings for the PETSc package.
"""
homepage = "https://pypi.python.org/pypi/petsc4py"
- url = "https://pypi.python.org/packages/b3/d5/84a71e3ccc13bf90b5055d264e5b256d161ae513392d0f28e8a7ac80d15c/petsc4py-3.7.0.tar.gz"
+ url = "https://pypi.io/packages/source/p/petsc4py/petsc4py-3.7.0.tar.gz"
version('3.7.0', '816a20040a6a477bd637f397c9fb5b6d')
depends_on('py-setuptools', type='build')
depends_on('py-mpi4py', type=('build', 'run'))
- depends_on('petsc+mpi')
+ depends_on('petsc+mpi')
diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py
index 656c9a15f2..ba6e7b9c67 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -33,7 +33,7 @@ class PyPillow(PythonPackage):
capabilities."""
homepage = "https://python-pillow.org/"
- url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
+ url = "https://pypi.io/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
# TODO: This version should be deleted once the next release comes out.
# TODO: It fixes a bug that prevented us from linking to Tk/Tcl.
diff --git a/var/spack/repos/builtin/packages/py-pipits/package.py b/var/spack/repos/builtin/packages/py-pipits/package.py
new file mode 100644
index 0000000000..88a629cc2e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pipits/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPipits(PythonPackage):
+ """Automated pipeline for analyses of fungal ITS from the Illumina"""
+
+ homepage = "https://github.com/hsgweon/pipits"
+ url = "https://github.com/hsgweon/pipits/archive/1.5.0.tar.gz"
+
+ version('1.5.0', '3f9b52bd7ffbcdb96d7bec150275070a')
+
+ depends_on('python@:2.999', type=('build', 'run'))
+ depends_on('py-biom-format', type=('build', 'run'))
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('java', type=('build', 'run'))
+ depends_on('hmmer')
+ depends_on('fastx-toolkit')
+ depends_on('vsearch')
+ depends_on('itsx')
+ depends_on('rdp-classifier')
+
+ resource(
+ name='UNITE_retrained',
+ url='http://sourceforge.net/projects/pipits/files/UNITE_retrained_28.06.2017.tar.gz',
+ destination='refdb'
+ )
+
+ resource(
+ name='uchime_reference_dataset_01.01.2016.fasta',
+ url='https://unite.ut.ee/sh_files/uchime_reference_dataset_01.01.2016.zip',
+ destination=join_path('refdb', 'uchime_reference_dataset_01.01.2016')
+ )
+
+ resource(
+ name='warcup_retrained_V2',
+ url='https://sourceforge.net/projects/pipits/files/warcup_retrained_V2.tar.gz',
+ destination='refdb'
+ )
+
+ @run_after('install')
+ def install_db(self):
+ install_tree(join_path(self.stage.source_path, 'refdb'),
+ self.prefix.refdb)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('PIPITS_UNITE_REFERENCE_DATA_CHIMERA', join_path(
+ self.prefix, 'refdb',
+ 'uchime_reference_dataset_01.01.2016',
+ 'uchime_reference_dataset_01.01.2016.fasta'))
+ run_env.set('PIPITS_UNITE_RETRAINED_DIR',
+ self.prefix.refdb.UNITE_retrained)
+ run_env.set('PIPITS_WARCUP_RETRAINED_DIR',
+ self.prefix.refdb.warcup_retrained_V2)
+ run_env.set('PIPITS_RDP_CLASSIFIER_JAR', join_path(
+ self.spec['rdp-classifier'].prefix.bin,
+ 'classifier.jar'))
diff --git a/var/spack/repos/builtin/packages/py-pmw/package.py b/var/spack/repos/builtin/packages/py-pmw/package.py
index e7317bae0c..a0dd79b0e4 100644
--- a/var/spack/repos/builtin/packages/py-pmw/package.py
+++ b/var/spack/repos/builtin/packages/py-pmw/package.py
@@ -29,6 +29,6 @@ class PyPmw(PythonPackage):
"""Pmw is a toolkit for building high-level compound widgets, or
megawidgets, constructed using other widgets as component parts."""
homepage = "https://pypi.python.org/pypi/Pmw"
- url = "https://pypi.python.org/packages/source/P/Pmw/Pmw-2.0.0.tar.gz"
+ url = "https://pypi.io/packages/source/P/Pmw/Pmw-2.0.0.tar.gz"
version('2.0.0', 'c7c3f26c4f5abaa99807edefee578fc0')
diff --git a/var/spack/repos/builtin/packages/py-ppft/package.py b/var/spack/repos/builtin/packages/py-ppft/package.py
index 07681c57e2..da96ba458e 100644
--- a/var/spack/repos/builtin/packages/py-ppft/package.py
+++ b/var/spack/repos/builtin/packages/py-ppft/package.py
@@ -29,7 +29,7 @@ class PyPpft(PythonPackage):
"""Distributed and parallel python """
homepage = "https://github.com/uqfoundation/ppft"
- url = "https://pypi.org/packages/source/p/ppft/ppft-1.6.4.7.1.zip"
+ url = "https://pypi.io/packages/source/p/ppft/ppft-1.6.4.7.1.zip"
version('1.6.4.7.1', '2b196a03bfbc102773f849c6b21e617b')
version('1.6.4.6', 'e533432bfba4b5a523a07d58011df209')
diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py
index 12bf2e7cfa..53e1ec75b6 100644
--- a/var/spack/repos/builtin/packages/py-prettytable/package.py
+++ b/var/spack/repos/builtin/packages/py-prettytable/package.py
@@ -32,7 +32,7 @@ class PyPrettytable(PythonPackage):
"""
homepage = "https://code.google.com/archive/p/prettytable/"
- url = "https://pypi.python.org/packages/e0/a1/36203205f77ccf98f3c6cf17cf068c972e6458d7e58509ca66da949ca347/prettytable-0.7.2.tar.gz"
+ url = "https://pypi.io/packages/source/p/prettytable/prettytable-0.7.2.tar.gz"
version('0.7.2', 'a6b80afeef286ce66733d54a0296b13b')
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
index 3d474586fb..32421e959e 100644
--- a/var/spack/repos/builtin/packages/py-protobuf/package.py
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -34,7 +34,7 @@ class PyProtobuf(PythonPackage):
and using a variety of languages."""
homepage = 'https://developers.google.com/protocol-buffers/'
- url = 'https://pypi.python.org/packages/source/p/protobuf/protobuf-3.0.0b2.tar.gz'
+ url = 'https://pypi.io/packages/source/p/protobuf/protobuf-3.0.0b2.tar.gz'
version('3.0.0b2', 'f0d3bd2394345a9af4a277cd0302ae83')
version('2.6.1', '6bf843912193f70073db7f22e2ea55e2')
diff --git a/var/spack/repos/builtin/packages/py-psutil/package.py b/var/spack/repos/builtin/packages/py-psutil/package.py
index f7b96da772..f1524e56c2 100644
--- a/var/spack/repos/builtin/packages/py-psutil/package.py
+++ b/var/spack/repos/builtin/packages/py-psutil/package.py
@@ -31,7 +31,7 @@ class PyPsutil(PythonPackage):
in Python."""
homepage = "https://pypi.python.org/pypi/psutil"
- url = "https://pypi.python.org/packages/d9/c8/8c7a2ab8ec108ba9ab9a4762c5a0d67c283d41b13b5ce46be81fdcae3656/psutil-5.0.1.tar.gz"
+ url = "https://pypi.io/packages/source/p/psutil/psutil-5.0.1.tar.gz"
version('5.0.1', '153dc8be94badc4072016ceeac7808dc')
diff --git a/var/spack/repos/builtin/packages/py-py2bit/package.py b/var/spack/repos/builtin/packages/py-py2bit/package.py
new file mode 100644
index 0000000000..d48fb7e9b9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-py2bit/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPy2bit(PythonPackage):
+ """A package for accessing 2bit files using lib2bit."""
+
+ homepage = "https://pypi.python.org/pypi/py2bit"
+ url = "https://pypi.io/packages/source/p/py2bit/py2bit-0.2.1.tar.gz"
+
+ version('0.2.1', 'eaf5b1c80a0bbf0b35af1f002f83a556')
+
+ depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-pybigwig/package.py b/var/spack/repos/builtin/packages/py-pybigwig/package.py
new file mode 100644
index 0000000000..4d96ba58c0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pybigwig/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPybigwig(PythonPackage):
+ """A package for accessing bigWig files using libBigWig."""
+
+ homepage = "https://pypi.python.org/pypi/pyBigWig"
+ url = "https://pypi.io/packages/source/p/pyBigWig/pyBigWig-0.3.4.tar.gz"
+
+ version('0.3.4', '8e0a91e26e87eeaa071408a3a749bfa9')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('curl', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py
new file mode 100644
index 0000000000..0fabae48bc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pybind11/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPybind11(CMakePackage):
+ """pybind11 -- Seamless operability between C++11 and Python.
+ pybind11 is a lightweight header-only library that exposes C++ types in
+ Python and vice versa, mainly to create Python bindings of existing C++
+ code. Its goals and syntax are similar to the excellent Boost.Python
+ library by David Abrahams: to minimize boilerplate code in traditional
+ extension modules by inferring type information using compile-time
+ introspection."""
+
+ homepage = "https://pybind11.readthedocs.io"
+ url = "https://github.com/pybind/pybind11/archive/v2.1.0.tar.gz"
+
+ version('2.1.1', '5518988698df937ccee53fb6ba91d12a')
+ version('2.1.0', '3cf07043d677d200720c928569635e12')
+
+ depends_on('py-pytest', type=('build'))
+
+ extends('python')
+
+ def cmake_args(self):
+ args = []
+ args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s'
+ % self.spec['python'].command.path)
+ return args
diff --git a/var/spack/repos/builtin/packages/py-pycrypto/package.py b/var/spack/repos/builtin/packages/py-pycrypto/package.py
index 65d78dc75d..0c24ceb242 100644
--- a/var/spack/repos/builtin/packages/py-pycrypto/package.py
+++ b/var/spack/repos/builtin/packages/py-pycrypto/package.py
@@ -30,7 +30,7 @@ class PyPycrypto(PythonPackage):
"""The Python Cryptography Toolkit"""
homepage = "https://www.dlitz.net/software/pycrypto/"
- url = "https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz"
+ url = "https://pypi.io/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz"
version('2.6.1', '55a61a054aa66812daf5161a0d5d7eda')
diff --git a/var/spack/repos/builtin/packages/py-pycurl/package.py b/var/spack/repos/builtin/packages/py-pycurl/package.py
index 91a1648d3b..4d9164b269 100644
--- a/var/spack/repos/builtin/packages/py-pycurl/package.py
+++ b/var/spack/repos/builtin/packages/py-pycurl/package.py
@@ -30,7 +30,7 @@ class PyPycurl(PythonPackage):
objects identified by a URL from a Python program."""
homepage = "http://pycurl.io/"
- url = "https://pypi.python.org/packages/source/p/pycurl/pycurl-7.43.0.tar.gz"
+ url = "https://pypi.io/packages/source/p/pycurl/pycurl-7.43.0.tar.gz"
version('7.43.0', 'c94bdba01da6004fa38325e9bd6b9760')
diff --git a/var/spack/repos/builtin/packages/py-pydatalog/package.py b/var/spack/repos/builtin/packages/py-pydatalog/package.py
index 6a51f5dc20..270847f5dc 100644
--- a/var/spack/repos/builtin/packages/py-pydatalog/package.py
+++ b/var/spack/repos/builtin/packages/py-pydatalog/package.py
@@ -28,6 +28,6 @@ from spack import *
class PyPydatalog(PythonPackage):
"""pyDatalog adds logic programming to Python."""
homepage = 'https://pypi.python.org/pypi/pyDatalog/'
- url = 'https://pypi.python.org/packages/09/0b/2670eb9c0027aacfb5b5024ca75e5fee2f1261180ab8797108ffc941158a/pyDatalog-0.17.1.zip'
+ url = 'https://pypi.io/packages/source/p/pyDatalog/pyDatalog-0.17.1.zip'
version('0.17.1', '6b2682301200068d208d6f2d01723939')
diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py
index 23c8b4ef90..e1d074edae 100644
--- a/var/spack/repos/builtin/packages/py-pyelftools/package.py
+++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py
@@ -29,6 +29,6 @@ class PyPyelftools(PythonPackage):
"""A pure-Python library for parsing and analyzing ELF files and DWARF
debugging information"""
homepage = "https://pypi.python.org/pypi/pyelftools"
- url = "https://pypi.python.org/packages/source/p/pyelftools/pyelftools-0.23.tar.gz"
+ url = "https://pypi.io/packages/source/p/pyelftools/pyelftools-0.23.tar.gz"
version('0.23', 'aa7cefa8bd2f63d7b017440c9084f310')
diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py
index 4df0e09c9f..a251529410 100644
--- a/var/spack/repos/builtin/packages/py-pylint/package.py
+++ b/var/spack/repos/builtin/packages/py-pylint/package.py
@@ -28,10 +28,11 @@ from spack import *
class PyPylint(PythonPackage):
"""array processing for numbers, strings, records, and objects."""
homepage = "https://pypi.python.org/pypi/pylint"
- url = "https://pypi.python.org/packages/source/p/pylint/pylint-1.4.1.tar.gz"
+ url = "https://pypi.io/packages/source/p/pylint/pylint-1.7.2.tar.gz"
- version('1.4.1', 'df7c679bdcce5019389038847e4de622')
+ version('1.7.2', '27ee752cdcfacb05bf4940947e6b35c6')
version('1.4.3', '5924c1c7ca5ca23647812f5971d0ea44')
+ version('1.4.1', 'df7c679bdcce5019389038847e4de622')
extends('python', ignore=r'bin/pytest')
depends_on('py-six', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-pypeflow/package.py b/var/spack/repos/builtin/packages/py-pypeflow/package.py
new file mode 100644
index 0000000000..8741b731f5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pypeflow/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPypeflow(PythonPackage):
+ """pypeFLOW is light weight and reusable make / flow data process
+ library written in Python."""
+
+ homepage = "https://github.com/PacificBiosciences/pypeFLOW"
+ url = "https://github.com/PacificBiosciences/pypeFLOW"
+
+ version('2017-05-04',
+ git='https://github.com/PacificBiosciences/pypeFLOW.git',
+ commit='f23a1b290876bbdf130611000934ae4247158073')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-networkx@1.7:1.11', type=['build', 'run'])
diff --git a/var/spack/repos/builtin/packages/py-pyrad/package.py b/var/spack/repos/builtin/packages/py-pyrad/package.py
new file mode 100644
index 0000000000..05142e26b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyrad/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPyrad(PythonPackage):
+ """RADseq for phylogenetics & introgression analyses"""
+
+ homepage = "http://dereneaton.com/software/pyrad/"
+ url = "https://github.com/dereneaton/pyrad/archive/3.0.66.tar.gz"
+
+ version('3.0.66', '19b8bcd73a574f8a25582d6e8978f0aa')
+
+ depends_on('python@:2.999', type=('build', 'run'))
+ depends_on('py-setuptools', type='build')
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('vsearch')
+ depends_on('muscle')
diff --git a/var/spack/repos/builtin/packages/py-pysam/package.py b/var/spack/repos/builtin/packages/py-pysam/package.py
new file mode 100644
index 0000000000..cf470ea564
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pysam/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPysam(PythonPackage):
+ """A python module for reading, manipulating and writing genomic data
+ sets."""
+
+ homepage = "https://pypi.python.org/pypi/pysam"
+ url = "https://pypi.io/packages/source/p/pysam/pysam-0.11.2.2.tar.gz"
+
+ version('0.11.2.2', '56230cd5f55b503845915b76c22d620a')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-cython@0.21:', type='build')
+ depends_on('bcftools')
diff --git a/var/spack/repos/builtin/packages/py-pyscaf/package.py b/var/spack/repos/builtin/packages/py-pyscaf/package.py
new file mode 100644
index 0000000000..93f6b6afdd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pyscaf/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPyscaf(PythonPackage):
+ """pyScaf orders contigs from genome assemblies utilising several types of
+ information"""
+
+ homepage = "https://pypi.python.org/pypi/pyScaf"
+ url = "https://pypi.io/packages/source/p/pyScaf/pyScaf-0.12a4.tar.gz"
+
+ version('0.12a4', 'c67526747eb04d1e28279ac310916d40')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-fastaindex', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py
index 7735fc28df..aff69b46d6 100644
--- a/var/spack/repos/builtin/packages/py-pyside/package.py
+++ b/var/spack/repos/builtin/packages/py-pyside/package.py
@@ -29,7 +29,7 @@ import os
class PyPyside(PythonPackage):
"""Python bindings for Qt."""
homepage = "https://pypi.python.org/pypi/pyside"
- url = "https://pypi.python.org/packages/source/P/PySide/PySide-1.2.2.tar.gz"
+ url = "https://pypi.io/packages/source/P/PySide/PySide-1.2.2.tar.gz"
version('1.2.4', '3cb7174c13bd45e3e8f77638926cb8c0') # rpath problems
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d', preferred=True)
diff --git a/var/spack/repos/builtin/packages/py-pytest-xdist/package.py b/var/spack/repos/builtin/packages/py-pytest-xdist/package.py
new file mode 100644
index 0000000000..f82fa13039
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pytest-xdist/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyPytestXdist(PythonPackage):
+ """py.test xdist plugin for distributed testing and loop-on-failing mode"""
+
+ homepage = "https://github.com/pytest-dev/pytest-xdist"
+ url = "https://pypi.io/packages/source/p/pytest-xdist/pytest-xdist-1.16.0.tar.gz"
+
+ version('1.16.0', '68dabf856981ad93b14960b098b05bff')
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-execnet@1.1:', type=('build', 'run'))
+ depends_on('py-pytest@2.7.0:', type=('build', 'run'))
+ depends_on('py-py@1.4.22:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-python-daemon/package.py b/var/spack/repos/builtin/packages/py-python-daemon/package.py
index 3e61231c8e..858c57b7d9 100644
--- a/var/spack/repos/builtin/packages/py-python-daemon/package.py
+++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py
@@ -38,7 +38,7 @@ class PyPythonDaemon(PythonPackage):
to enter a daemon state.
"""
homepage = "https://pypi.python.org/pypi/python-daemon/"
- url = "https://pypi.python.org/packages/source/p/python-daemon/python-daemon-2.0.5.tar.gz"
+ url = "https://pypi.io/packages/source/p/python-daemon/python-daemon-2.0.5.tar.gz"
version('2.0.5', '73e7f49f525c51fa4a995aea4d80de41')
diff --git a/var/spack/repos/builtin/packages/py-readme-renderer/package.py b/var/spack/repos/builtin/packages/py-readme-renderer/package.py
index e090d6a6bd..709851aed5 100644
--- a/var/spack/repos/builtin/packages/py-readme-renderer/package.py
+++ b/var/spack/repos/builtin/packages/py-readme-renderer/package.py
@@ -30,7 +30,7 @@ class PyReadmeRenderer(PythonPackage):
for Warehouse."""
homepage = "https://github.com/pypa/readme_renderer"
- url = "https://pypi.python.org/packages/f2/6e/ef1bc3a24eb14e14574aba9dc1bd50bc9a5e7cc880e8ff9cadd385b4fb37/readme_renderer-16.0.tar.gz"
+ url = "https://pypi.io/packages/source/r/readme_renderer/readme_renderer-16.0.tar.gz"
version('16.0', '70321cea986956bcf2deef9981569f39')
diff --git a/var/spack/repos/builtin/packages/py-regex/package.py b/var/spack/repos/builtin/packages/py-regex/package.py
new file mode 100644
index 0000000000..a13dd01919
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-regex/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class PyRegex(PythonPackage):
+ """Alternative regular expression module, to replace re."""
+
+ homepage = "https://pypi.python.org/pypi/regex/"
+ url = "https://pypi.io/packages/source/r/regex/regex-2017.07.11.tar.gz"
+
+ version('2017.07.11', '95f81ebb5273c7ad9a0c4d1ac5a94eb4')
+
+ depends_on('py-setuptools', type='build')
diff --git a/var/spack/repos/builtin/packages/py-restview/package.py b/var/spack/repos/builtin/packages/py-restview/package.py
index d953650003..5ab66a9ba3 100644
--- a/var/spack/repos/builtin/packages/py-restview/package.py
+++ b/var/spack/repos/builtin/packages/py-restview/package.py
@@ -29,7 +29,7 @@ class PyRestview(PythonPackage):
"""A viewer for ReStructuredText documents that renders them on the fly."""
homepage = "https://mg.pov.lt/restview/"
- url = "https://pypi.python.org/packages/source/r/restview/restview-2.6.1.tar.gz"
+ url = "https://pypi.io/packages/source/r/restview/restview-2.6.1.tar.gz"
version('2.6.1', 'ac8b70e15b8f1732d1733d674813666b')
diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py
index aa3ac66775..a0d020f427 100644
--- a/var/spack/repos/builtin/packages/py-rpy2/package.py
+++ b/var/spack/repos/builtin/packages/py-rpy2/package.py
@@ -33,7 +33,7 @@ class PyRpy2(PythonPackage):
"""
homepage = "https://pypi.python.org/pypi/rpy2"
- url = "https://pypi.python.org/packages/source/r/rpy2/rpy2-2.5.4.tar.gz"
+ url = "https://pypi.io/packages/source/r/rpy2/rpy2-2.5.4.tar.gz"
version('2.5.4', '115a20ac30883f096da2bdfcab55196d')
version('2.5.6', 'a36e758b633ce6aec6a5f450bfee980f')
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
index 5ca6e3ebf0..f164a3a25f 100644
--- a/var/spack/repos/builtin/packages/py-scikit-image/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -30,7 +30,7 @@ class PyScikitImage(PythonPackage):
filtering, warping, color manipulation, object detection, etc."""
homepage = "http://scikit-image.org/"
- url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz"
+ url = "https://pypi.io/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz"
version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1')
diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
index 9817ff815b..0d2a9a155c 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
@@ -35,8 +35,8 @@ class PyScikitLearn(PythonPackage):
version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d')
version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e')
version('0.17.1', 'a2f8b877e6d99b1ed737144f5a478dfc')
+ version('0.13.1', 'acba398e1d46274b8470f40d0926e6a4')
depends_on('python@2.6:2.8,3.3:')
- depends_on('py-setuptools', type='build')
depends_on('py-numpy@1.6.1:', type=('build', 'run'))
depends_on('py-scipy@0.9:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index 919b7508a6..6e2ef327e3 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -31,7 +31,7 @@ class PyScipy(PythonPackage):
as routines for numerical integration and optimization."""
homepage = "http://www.scipy.org/"
- url = "https://pypi.io/packages/source/s/scipy/scipy-0.18.1.tar.gz"
+ url = "https://pypi.io/packages/source/s/scipy/scipy-0.19.1.tar.gz"
install_time_test_callbacks = ['install_test', 'import_module_test']
@@ -49,6 +49,9 @@ class PyScipy(PythonPackage):
'scipy.special._precompute'
]
+ # See https://github.com/LLNL/spack/issues/2737
+ version('0.19.1', '6b4d91b62f1926282b127194a06b72b3',
+ url="https://pypi.io/packages/source/s/scipy/scipy-0.19.1.tar.gz")
version('0.19.0', '91b8396231eec780222a57703d3ec550',
url="https://pypi.io/packages/source/s/scipy/scipy-0.19.0.zip")
version('0.18.1', '5fb5fb7ccb113ab3a039702b6c2f3327')
diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py
index c04f8a2755..2f6f40df3a 100644
--- a/var/spack/repos/builtin/packages/py-shiboken/package.py
+++ b/var/spack/repos/builtin/packages/py-shiboken/package.py
@@ -29,7 +29,7 @@ import os
class PyShiboken(PythonPackage):
"""Shiboken generates bindings for C++ libraries using CPython."""
homepage = "https://shiboken.readthedocs.org/"
- url = "https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz"
+ url = "https://pypi.io/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz"
version('1.2.2', '345cfebda221f525842e079a6141e555')
diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py
index 8c1a5c026f..35b7286b9d 100644
--- a/var/spack/repos/builtin/packages/py-slepc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py
@@ -29,7 +29,7 @@ class PySlepc4py(PythonPackage):
"""This package provides Python bindings for the SLEPc package.
"""
homepage = "https://pypi.python.org/pypi/slepc4py"
- url = "https://pypi.python.org/packages/b4/dd/116fbdf865f6f9eda779c5d31bc5b68f37ef3dd5dbfc3feb4aaba1565560/slepc4py-3.7.0.tar.gz"
+ url = "https://pypi.io/packages/source/s/slepc4py/slepc4py-3.7.0.tar.gz"
version('3.7.0', 'c4775e88b0825c7313629c01de60ecb2')
diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py
index c2ff03c1a9..e5f5165fb2 100644
--- a/var/spack/repos/builtin/packages/py-sncosmo/package.py
+++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py
@@ -30,7 +30,7 @@ class PySncosmo(PythonPackage):
analysis."""
homepage = "http://sncosmo.readthedocs.io/"
- url = "https://pypi.python.org/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz"
+ url = "https://pypi.io/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz"
version('1.2.0', '028e6d1dc84ab1c17d2f3b6378b2cb1e')
diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py
index ba4c4badcc..1dbf581eb7 100644
--- a/var/spack/repos/builtin/packages/py-sphinx/package.py
+++ b/var/spack/repos/builtin/packages/py-sphinx/package.py
@@ -40,6 +40,7 @@ class PySphinx(PythonPackage):
'sphinx.environment.collectors', 'sphinx.environment.adapters'
]
+ version('1.6.3', 'c5ad61f4e0974375ca2c2b58ef8d5411')
version('1.6.1', '26cb1cdca7aa4afc8c925d926b6268e7')
version('1.5.5', 'f9581b3556df9722143c47290273bcf8')
version('1.4.5', '5c2cd2dac45dfa6123d067e32a89e89a')
@@ -63,10 +64,20 @@ class PySphinx(PythonPackage):
depends_on('py-alabaster@0.7.0:0.7.999', type=('build', 'run'))
depends_on('py-imagesize', when='@1.4:', type=('build', 'run'))
depends_on('py-requests@2.0.0:', type=('build', 'run'))
- depends_on('py-typing', type=('build', 'run'))
- depends_on('py-sphinxcontrib-websupport', type=('build', 'run'))
depends_on('py-sphinx-rtd-theme@0.1:', type=('build', 'run')) # optional as of 1.4
+ # Sphinx v1.6+ no longer includes websupport by default:
+ # http://www.sphinx-doc.org/en/stable/changes.html
+ depends_on('py-sphinxcontrib-websupport', when='@1.6:',
+ type=('build', 'run'))
+ # TODO: incorporate the proper dependencies when concretizer is capable
+ # Build dep for 1.6.1 all python (bug), see:
+ # https://github.com/sphinx-doc/sphinx/pull/3789
+ # depends_on('py-typing', when='@1.6.1', type=('build', 'run'))
+ # depends_on('py-typing', when='@1.6.2:^python@2.7:3.4',
+ # type=('build', 'run'))
+ depends_on('py-typing', when='@1.6:', type=('build', 'run'))
+
# TODO: Add a 'test' deptype
# depends_on('py-pytest', type='test')
# depends_on('py-mock', type='test')
diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py
index 81ea2790ab..12d868660f 100644
--- a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py
+++ b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py
@@ -29,6 +29,6 @@ class PySqlalchemy(PythonPackage):
"""The Python SQL Toolkit and Object Relational Mapper"""
homepage = 'http://www.sqlalchemy.org/'
- url = "https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz"
+ url = "https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz"
version('1.0.12', '6d19ef29883bbebdcac6613cf391cac4')
diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py
index 8f82bcc009..8ab3e60a9b 100644
--- a/var/spack/repos/builtin/packages/py-sympy/package.py
+++ b/var/spack/repos/builtin/packages/py-sympy/package.py
@@ -28,7 +28,7 @@ from spack import *
class PySympy(PythonPackage):
"""SymPy is a Python library for symbolic mathematics."""
homepage = "https://pypi.python.org/pypi/sympy"
- url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz"
+ url = "https://pypi.io/packages/source/s/sympy/sympy-0.7.6.tar.gz"
version('0.7.6', '3d04753974306d8a13830008e17babca')
version('1.0', '43e797de799f00f9e8fd2307dba9fab1')
diff --git a/var/spack/repos/builtin/packages/py-tappy/package.py b/var/spack/repos/builtin/packages/py-tappy/package.py
index 1f7b94cbe2..36e22f71e1 100644
--- a/var/spack/repos/builtin/packages/py-tappy/package.py
+++ b/var/spack/repos/builtin/packages/py-tappy/package.py
@@ -29,7 +29,7 @@ class PyTappy(PythonPackage):
"""Python TAP interface module for unit tests"""
homepage = "https://github.com/mblayman/tappy"
# base https://pypi.python.org/pypi/cffi
- url = "https://pypi.python.org/packages/source/t/tap.py/tap.py-1.6.tar.gz"
+ url = "https://pypi.io/packages/source/t/tap.py/tap.py-1.6.tar.gz"
version('1.6', 'c8bdb93ad66e05f939905172a301bedf')
diff --git a/var/spack/repos/builtin/packages/py-theano/package.py b/var/spack/repos/builtin/packages/py-theano/package.py
index e1bbb136d0..0e1275700d 100644
--- a/var/spack/repos/builtin/packages/py-theano/package.py
+++ b/var/spack/repos/builtin/packages/py-theano/package.py
@@ -33,13 +33,14 @@ class PyTheano(PythonPackage):
url = "https://pypi.io/packages/source/T/Theano/Theano-0.8.2.tar.gz"
version('0.8.2', 'f2d0dfe7df141115201077cd933b2c52')
+ version('master', git='https://github.com/Theano/Theano.git', branch='master')
variant('gpu', default=False,
description='Builds with support for GPUs via CUDA and cuDNN')
depends_on('python@2.6:2.8,3.3:')
- depends_on('py-setuptools', type='build')
+ depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-scipy@0.11:', type=('build', 'run'))
depends_on('py-numpy@1.7.1:', type=('build', 'run'))
depends_on('py-six@1.9.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py
index 0beb3f436b..1184b49e3c 100644
--- a/var/spack/repos/builtin/packages/py-twisted/package.py
+++ b/var/spack/repos/builtin/packages/py-twisted/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyTwisted(PythonPackage):
"""An asynchronous networking framework written in Python"""
homepage = "https://twistedmatrix.com/"
- url = "https://pypi.python.org/packages/source/T/Twisted/Twisted-15.3.0.tar.bz2"
+ url = "https://pypi.io/packages/source/T/Twisted/Twisted-15.3.0.tar.bz2"
version('15.4.0', '5337ffb6aeeff3790981a2cd56db9655')
version('15.3.0', 'b58e83da2f00b3352afad74d0c5c4599')
diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py
index 609688f8a1..c0cdbf9339 100644
--- a/var/spack/repos/builtin/packages/py-unittest2/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2/package.py
@@ -30,7 +30,7 @@ class PyUnittest2(PythonPackage):
testing framework in Python 2.7 and onwards."""
homepage = "https://pypi.python.org/pypi/unittest2"
- url = "https://pypi.python.org/packages/source/u/unittest2/unittest2-1.1.0.tar.gz"
+ url = "https://pypi.io/packages/source/u/unittest2/unittest2-1.1.0.tar.gz"
version('1.1.0', 'f72dae5d44f091df36b6b513305ea000')
diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
index d48ddc8a54..ea8a9927e5 100644
--- a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
@@ -31,7 +31,7 @@ class PyUnittest2py3k(PythonPackage):
version of unittest2."""
homepage = "https://pypi.python.org/pypi/unittest2py3k"
- url = "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-0.5.1.tar.gz"
+ url = "https://pypi.io/packages/source/u/unittest2py3k/unittest2py3k-0.5.1.tar.gz"
version('0.5.1', '8824ff92044310d9365f90d892bf0f09')
diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py
index ea39b89084..4b662a0f1e 100644
--- a/var/spack/repos/builtin/packages/py-urwid/package.py
+++ b/var/spack/repos/builtin/packages/py-urwid/package.py
@@ -28,7 +28,7 @@ from spack import *
class PyUrwid(PythonPackage):
"""A full-featured console UI library"""
homepage = "http://urwid.org/"
- url = "https://pypi.python.org/packages/source/u/urwid/urwid-1.3.0.tar.gz"
+ url = "https://pypi.io/packages/source/u/urwid/urwid-1.3.0.tar.gz"
version('1.3.0', 'a989acd54f4ff1a554add464803a9175')
diff --git a/var/spack/repos/builtin/packages/py-vcversioner/package.py b/var/spack/repos/builtin/packages/py-vcversioner/package.py
index daa2d3caf2..33be558e3c 100644
--- a/var/spack/repos/builtin/packages/py-vcversioner/package.py
+++ b/var/spack/repos/builtin/packages/py-vcversioner/package.py
@@ -29,7 +29,7 @@ class PyVcversioner(PythonPackage):
"""Vcversioner: Take version numbers from version control."""
homepage = "https://github.com/habnabit/vcversioner"
- url = "https://pypi.python.org/packages/source/v/vcversioner/vcversioner-2.16.0.0.tar.gz"
+ url = "https://pypi.io/packages/source/v/vcversioner/vcversioner-2.16.0.0.tar.gz"
version('2.16.0.0', 'aab6ef5e0cf8614a1b1140ed5b7f107d')
diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py
index af8dec00da..4bf87a46ca 100644
--- a/var/spack/repos/builtin/packages/py-xlrd/package.py
+++ b/var/spack/repos/builtin/packages/py-xlrd/package.py
@@ -30,6 +30,6 @@ class PyXlrd(PythonPackage):
spreadsheet files"""
homepage = 'http://www.python-excel.org/'
- url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.4.tar.gz"
+ url = "https://pypi.io/packages/source/x/xlrd/xlrd-0.9.4.tar.gz"
version('0.9.4', '911839f534d29fe04525ef8cd88fe865')
diff --git a/var/spack/repos/builtin/packages/qbox/package.py b/var/spack/repos/builtin/packages/qbox/package.py
new file mode 100644
index 0000000000..6ffb27e197
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qbox/package.py
@@ -0,0 +1,93 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import shutil
+from spack import *
+
+
+class Qbox(MakefilePackage):
+ """Qbox is a C++/MPI scalable parallel implementation of first-principles
+ molecular dynamics (FPMD) based on the plane-wave, pseudopotential
+ formalism. Qbox is designed for operation on large parallel computers."""
+
+ homepage = "http://qboxcode.org/"
+ url = "http://qboxcode.org/download/qbox-1.63.7.tgz"
+
+ version('1.63.7', '6b0cf5656f816a1a59e22b268387af33')
+ version('1.63.5', 'da3161ab6a455793f2133dd03c04077c')
+ version('1.63.4', '8596f32c8fb7e7baa96571c655aaee07')
+ version('1.63.2', '55e8f13f37c8e1f43ca831791e3af1da')
+ version('1.63.0', '1436c884c553ab026b7f787307e5e6ed')
+ version('1.62.3', 'f07e038ab92b85956794e91a40346dbf')
+ version('1.60.9', '53b0df612e56bb65e8220d9d9dc8d395')
+ version('1.60.4', '060846c9fa03b1f3d7d5ce24a9491de2')
+ version('1.60.0', '3856cdc38a27dc17705844c4b9241a21')
+ version('1.58.0', 'ec0e6b79fa0ed06742212b1142e36b6a')
+ version('1.56.2', 'df7a4217d059a5d351d92e480ed14112')
+ version('1.54.4', '8f1a23af7d871317de93810b664ad3aa')
+ version('1.54.2', 'aeefee061255dbb36ca7e49378f63ad5')
+ version('1.52.3', '1862f2b2056cdf49ec4f746d45a7f1a6')
+ version('1.52.2', 'e406deb4c46176f1c15c226868bf61e2')
+ version('1.50.4', 'b06ff877257884e4fac321fb5a486266')
+ version('1.50.2', '171660b1bb5e57637f019fef055fb764')
+ version('1.50.1', '1da528b39da134f86f134432e8fada79')
+ version('1.47.0', '86f402651d440e05adc94168d6105da7')
+ version('1.45.3', '73b99a73dcbb1b5be9f66f3284750205')
+ version('1.45.1', '59e0c2583769b7586981c0d6ffa1b267')
+ version('1.45.0', '2c5bfbadfffd330c8c2fe294a10a08e4')
+ version('1.44.0', 'c46a2f0f68fe9229aa77779da188cea9')
+
+ depends_on('mpi')
+ depends_on('blas')
+ depends_on('scalapack')
+ depends_on('fftw')
+ depends_on('xerces-c')
+
+ build_directory = 'src'
+
+ def edit(self, spec, prefix):
+ with open('src/spack.mk', 'w') as mkfile:
+ mkfile.write('CXX = {0}\n'.format(spec['mpi'].mpicxx))
+ mkfile.write('LD = $(CXX)\n')
+ qbox_libs = spec['fftw'].libs + spec['xerces-c'].libs + \
+ spec['scalapack'].libs + spec['blas'].libs
+ mkfile.write('LDFLAGS = {0}\n'.format(qbox_libs.ld_flags))
+ mkfile.write('DFLAGS = {0}\n'.format(' -D'.join((
+ '',
+ '_LARGEFILE_SOURCE', 'USE_MPI', 'USE_XERCES',
+ 'XERCESC_3', 'MPICH_IGNORE_CXX_SEEK', 'SCALAPACK',
+ 'USE_FFTW3', 'FFTWMEASURE', 'FFTW3_2D', 'ADD_',
+ ))))
+ mkfile.write('CXXFLAGS = {0}\n'.format(' '.join((
+ '-g', '-O3', '$(DFLAGS)',
+ ))))
+ filter_file('$(TARGET)', 'spack', 'src/Makefile', string=True)
+
+ def install(self, spec, prefix):
+ mkdir(prefix.src)
+ install('src/qb', prefix.src)
+ shutil.move('test', prefix)
+ shutil.move('xml', prefix)
+ shutil.move('util', prefix)
diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py
index 308b0521fa..aaad704d66 100644
--- a/var/spack/repos/builtin/packages/qhull/package.py
+++ b/var/spack/repos/builtin/packages/qhull/package.py
@@ -43,4 +43,6 @@ class Qhull(CMakePackage):
version('2012.1', 'd0f978c0d8dfb2e919caefa56ea2953c',
url="http://www.qhull.org/download/qhull-2012.1-src.tgz")
+ patch('qhull-unused-intel-17.02.patch', when='@2015.2')
+
depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/qhull/qhull-unused-intel-17.02.patch b/var/spack/repos/builtin/packages/qhull/qhull-unused-intel-17.02.patch
new file mode 100644
index 0000000000..70eb3bd722
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qhull/qhull-unused-intel-17.02.patch
@@ -0,0 +1,18 @@
+--- a/src/libqhull_r/qhull_ra.h 2017-06-30 14:24:52.252635925 +0200
++++ b/src/libqhull_r/qhull_ra.h 2017-06-30 14:25:27.356635296 +0200
+@@ -101,13 +101,8 @@
+
+ */
+
+-#if defined(__cplusplus) && defined(__INTEL_COMPILER) && !defined(QHULL_OS_WIN)
+-template <typename T>
+-inline void qhullUnused(T &x) { (void)x; }
+-# define QHULL_UNUSED(x) qhullUnused(x);
+-#else
+-# define QHULL_UNUSED(x) (void)x;
+-#endif
++#define QHULL_UNUSED(x) (void)x;
++
+
+ /***** -libqhull_r.c prototypes (alphabetical after qhull) ********************/
+
diff --git a/var/spack/repos/builtin/packages/qmd-progress/package.py b/var/spack/repos/builtin/packages/qmd-progress/package.py
new file mode 100644
index 0000000000..09bb45e1a9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qmd-progress/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017, Los Alamos National Security, LLC
+# Produced at the Los Alamos National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class QmdProgress(CMakePackage):
+ """PROGRESS: Parallel, Rapid O(N) and Graph-based Recursive Electronic
+ Structure Solver.
+ This library is focused on the development of general solvers that are
+ commonly used in quantum chemistry packages."""
+
+ homepage = "https://github.com/lanl/qmd-progress"
+ url = "https://github.com/lanl/qmd-progress"
+
+ version('develop', git='https://github.com/lanl/qmd-progress', branch='master')
+ version('1.0.0', git='https://github.com/lanl/qmd-progress', tag='v1.0.0')
+
+ variant('graphlib', default=False, description='Build with Metis Suppport')
+ variant('mpi', default=True, description='Build with MPI Support')
+
+ depends_on('bml')
+ depends_on('mpi', when='+mpi')
+ depends_on('metis', when='+graphlib')
+
+ def cmake_args(self):
+ spec = self.spec
+ args = ['-DCMAKE_Fortran_FLAGS=-ffree-line-length-none']
+ if '+mpi' in spec:
+ args.append('-DPROGRESS_MPI=yes')
+ args.append('-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc)
+ args.append('-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx)
+ args.append('-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc)
+ else:
+ args.append('-DPROGRESS_MPI=no')
+ if '+graphlib' in spec:
+ args.append('-DPROGRESS_GRAPHLIB=yes')
+ else:
+ args.append('-DPROGRESS_GRAPHLIB=no')
+
+ return args
diff --git a/var/spack/repos/builtin/packages/qt-creator/package.py b/var/spack/repos/builtin/packages/qt-creator/package.py
index a3f50004ae..4b3054b7b6 100644
--- a/var/spack/repos/builtin/packages/qt-creator/package.py
+++ b/var/spack/repos/builtin/packages/qt-creator/package.py
@@ -23,24 +23,36 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
-class QtCreator(Package):
+class QtCreator(QMakePackage):
"""The Qt Creator IDE."""
homepage = 'https://www.qt.io/ide/'
- url = 'http://download.qt.io/official_releases/qtcreator/4.1/4.1.0/qt-creator-opensource-src-4.1.0.tar.gz'
+ url = 'http://download.qt.io/official_releases/qtcreator/4.3/4.3.1/qt-creator-opensource-src-4.3.1.tar.gz'
list_url = 'http://download.qt.io/official_releases/qtcreator/'
list_depth = 2
- version('4.1.0', '657727e4209befa4bf5889dff62d9e0a')
+ version('4.3.1', '6769ea47f287e2d9e30ff92acb899eef')
+ version('4.1.0', '657727e4209befa4bf5889dff62d9e0a')
- depends_on("qt")
+ depends_on('qt@5.6.0:+opengl')
+ # Qt Creator comes bundled with its own copy of sqlite. Qt has a build
+ # dependency on Python, which has a dependency on sqlite. If Python is
+ # built with a different version of sqlite than the bundled copy, it will
+ # cause symbol conflict. Force Spack to build with the same version of
+ # sqlite as the bundled copy.
+ depends_on('sqlite@3.8.10.2')
- def install(self, spec, prefix):
- os.environ['INSTALL_ROOT'] = self.prefix
- qmake = which('qmake')
- qmake('-r')
- make()
- make("install")
+ # Qt Creator 4.3.0+ requires a C++14 compiler
+ conflicts('%gcc@:4.8', when='@4.3.0:')
+
+ def url_for_version(self, version):
+ url = 'http://download.qt.io/official_releases/qtcreator/{0}/{1}/qt-creator-opensource-src-{1}.tar.gz'
+ return url.format(version.up_to(2), version)
+
+ def setup_environment(self, spack_env, run_env):
+ spack_env.set('INSTALL_ROOT', self.prefix)
+
+ def qmake_args(self):
+ return ['-r']
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 088ac5d763..e872a53013 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -36,6 +36,7 @@ class Qt(Package):
list_url = 'http://download.qt.io/archive/qt/'
list_depth = 3
+ version('5.9.1', '77b4af61c49a09833d4df824c806acaf')
version('5.9.0', '9c8bc8b828c2b56721980368266df9d9')
version('5.8.0', 'a9f2494f75f966e2f22358ec367d8f41')
version('5.7.1', '031fb3fd0c3cc0f1082644492683f18d')
@@ -52,8 +53,6 @@ class Qt(Package):
# OpenSpeedShop project
variant('krellpatch', default=False,
description="Build with openspeedshop based patch.")
- variant('mesa', default=False,
- description="Depend on mesa.")
variant('gtk', default=False,
description="Build with gtkplus.")
variant('webkit', default=False,
@@ -64,7 +63,7 @@ class Qt(Package):
description="Build with D-Bus support.")
variant('phonon', default=False,
description="Build with phonon support.")
- variant('opengl', default=True,
+ variant('opengl', default=False,
description="Build with OpenGL support.")
patch('qt3krell.patch', when='@3.3.8b+krellpatch')
@@ -108,7 +107,7 @@ class Qt(Package):
depends_on("python", when='@5.7.0:', type='build')
# OpenGL hardware acceleration
- depends_on("mesa", when='@4:+mesa')
+ depends_on("mesa", when='@4:+opengl')
depends_on("libxcb", when=sys.platform != 'darwin')
depends_on("libx11", when=sys.platform != 'darwin')
@@ -130,9 +129,9 @@ class Qt(Package):
url = self.list_url
if version >= Version('4.0'):
- url += version.up_to(2) + '/'
+ url += str(version.up_to(2)) + '/'
else:
- url += version.up_to(1) + '/'
+ url += str(version.up_to(1)) + '/'
if version >= Version('4.8'):
url += str(version) + '/'
diff --git a/var/spack/repos/builtin/packages/qtgraph/package.py b/var/spack/repos/builtin/packages/qtgraph/package.py
new file mode 100644
index 0000000000..d80ee59bdd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qtgraph/package.py
@@ -0,0 +1,73 @@
+##############################################################################
+# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+##############################################################################
+# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Qtgraph(QMakePackage):
+ """The baseline library used in the CUDA-centric Open|SpeedShop Graphical
+ User Interface (GUI) which allows Graphviz DOT formatted data to be
+ imported into a Qt application by wrapping the Graphviz libcgraph and
+ libgvc within the Qt Graphics View Framework."""
+
+ homepage = "https://github.com/OpenSpeedShop/QtGraph"
+
+ url = "https://github.com/OpenSpeedShop/QtGraph.git"
+ version('1.0.0', branch='master',
+ git='https://github.com/OpenSpeedShop/QtGraph.git')
+
+ # qtgraph depends on these packages
+ depends_on('qt@4.8.6:')
+ depends_on('graphviz')
+
+ def setup_environment(self, spack_env, run_env):
+ """Set up the compile and runtime environments for a package."""
+ spack_env.set('GRAPHVIZ_ROOT', self.spec['graphviz'].prefix)
+ spack_env.set('INSTALL_ROOT', self.prefix)
+
+ # The implementor has set up the library and include paths in
+ # a non-conventional way. We reflect that here.
+ run_env.prepend_path(
+ 'LD_LIBRARY_PATH', join_path(
+ self.prefix.lib64,
+ '{0}'.format(self.spec['qt'].version.up_to(3))))
+
+ run_env.prepend_path('CPATH', self.prefix.include.QtGraph)
diff --git a/var/spack/repos/builtin/packages/quinoa/package.py b/var/spack/repos/builtin/packages/quinoa/package.py
new file mode 100644
index 0000000000..de04e6407c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/quinoa/package.py
@@ -0,0 +1,56 @@
+##############################################################################
+# Copyright (c) 2017, Los Alamos National Security, LLC
+# Produced at the Los Alamos National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Quinoa(CMakePackage):
+ """Quinoa is a set of computational tools that enables research and
+ numerical analysis in fluid dynamics. At this time it is a test-bed
+ to experiment with various algorithms using fully asynchronous runtime
+ systems.
+ """
+
+ homepage = "http://quinoacomputing.org"
+ url = "https://github.com/quinoacomputing/quinoa/tarball/quinoa_v0.1"
+
+ version('develop', git='https://github.com/quinoacomputing/quinoa', branch='master')
+
+ depends_on('hdf5+mpi')
+ depends_on("charm backend=mpi")
+ depends_on("trilinos+exodus")
+ depends_on("boost")
+ depends_on("hypre~internal-superlu")
+ depends_on("random123")
+ depends_on("netlib-lapack+lapacke")
+ depends_on("mad-numdiff")
+ depends_on("h5part")
+ depends_on("boostmplcartesianproduct")
+ depends_on("tut")
+ depends_on("pugixml")
+ depends_on("pstreams")
+ depends_on("pegtl")
+
+ root_cmakelists_dir = 'src'
diff --git a/var/spack/repos/builtin/packages/qwt/package.py b/var/spack/repos/builtin/packages/qwt/package.py
new file mode 100644
index 0000000000..10ca44e1c3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qwt/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Qwt(QMakePackage):
+ """The Qwt library contains GUI Components and utility classes which are
+ primarily useful for programs with a technical background. Beside a
+ framework for 2D plots it provides scales, sliders, dials, compasses,
+ thermometers, wheels and knobs to control or display values, arrays, or
+ ranges of type double.
+ """
+ homepage = "http://qwt.sourceforge.net/"
+ url = "https://sourceforge.net/projects/qwt/files/qwt/6.1.3/qwt-6.1.3.tar.bz2"
+
+ version('6.1.3', '19d1f5fa5e22054d22ee3accc37c54ba')
+ version('5.2.2', '70d77e4008a6cc86763737f0f24726ca')
+
+ depends_on('qt+opengl')
+ # Qwt 6.1.1 and older use a constant that was removed in Qt 5.4
+ # https://bugs.launchpad.net/ubuntu/+source/qwt-qt5/+bug/1485213
+ depends_on('qt@:5.3', when='@:6.1.1')
+
+ def patch(self):
+ # Subvert hardcoded prefix
+ filter_file(r'/usr/local/qwt-\$\$(QWT_)?VERSION.*',
+ self.prefix, 'qwtconfig.pri')
diff --git a/var/spack/repos/builtin/packages/r-ada/package.py b/var/spack/repos/builtin/packages/r-ada/package.py
new file mode 100644
index 0000000000..27b1f8c95a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-ada/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RAda(RPackage):
+ """Performs discrete, real, and gentle boost under both exponential
+ and logistic loss on a given data set."""
+
+ homepage = "https://cran.r-project.org/web/packages/ada/index.html"
+ url = "https://cran.r-project.org/src/contrib/ada_2.0-5.tar.gz"
+
+ version('2.0-5', '25ac0dc2650fba9e19f3d15c7c6721c1')
+
+ depends_on('r-rpart', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/r-corpcor/package.py b/var/spack/repos/builtin/packages/r-corpcor/package.py
new file mode 100644
index 0000000000..09798cbd2d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-corpcor/package.py
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RCorpcor(RPackage):
+ """Efficient Estimation of Covariance and (Partial) Correlation"""
+
+ homepage = "https://cran.r-project.org/package=corpcor"
+ url = "https://cran.r-project.org/src/contrib/corpcor_1.6.9.tar.gz"
+
+ version('1.6.9', '7f447d9f389e5d7dedb5fe5baedca925')
diff --git a/var/spack/repos/builtin/packages/r-mvtnorm/package.py b/var/spack/repos/builtin/packages/r-mvtnorm/package.py
index 31933e70a3..2df9206a63 100644
--- a/var/spack/repos/builtin/packages/r-mvtnorm/package.py
+++ b/var/spack/repos/builtin/packages/r-mvtnorm/package.py
@@ -30,6 +30,7 @@ class RMvtnorm(RPackage):
deviates and densities."""
homepage = "http://mvtnorm.r-forge.r-project.org/"
- url = "https://cran.r-project.org/src/contrib/mvtnorm_1.0-5.tar.gz"
+ url = "https://cran.r-project.org/src/contrib/mvtnorm_1.0-6.tar.gz"
+ version('1.0-6', 'cb69426868fd3e330412b8491901d9d4')
version('1.0-5', '5894dd3969bbfa26f4862c45f9a48a52')
diff --git a/var/spack/repos/builtin/packages/r-rcpp/package.py b/var/spack/repos/builtin/packages/r-rcpp/package.py
index f89a378524..b77fffb1a0 100644
--- a/var/spack/repos/builtin/packages/r-rcpp/package.py
+++ b/var/spack/repos/builtin/packages/r-rcpp/package.py
@@ -39,6 +39,8 @@ class RRcpp(RPackage):
homepage = "http://dirk.eddelbuettel.com/code/rcpp.html"
url = "https://cran.r-project.org/src/contrib/Rcpp_0.12.9.tar.gz"
+ version('0.12.12', '97b36a3b567e3438067c4a7d0075fd90')
+ version('0.12.11', 'ea1710213cbb1d91b1d0318e6fa9aa37')
version('0.12.9', '691c49b12794507288b728ede03668a5')
version('0.12.6', 'db4280fb0a79cd19be73a662c33b0a8b')
version('0.12.5', 'f03ec05b4e391cc46e7ce330e82ff5e2')
diff --git a/var/spack/repos/builtin/packages/r-rjava/package.py b/var/spack/repos/builtin/packages/r-rjava/package.py
index 7baab54baa..55d8282cd7 100644
--- a/var/spack/repos/builtin/packages/r-rjava/package.py
+++ b/var/spack/repos/builtin/packages/r-rjava/package.py
@@ -34,4 +34,4 @@ class RRjava(RPackage):
version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a')
- depends_on('jdk')
+ depends_on('java')
diff --git a/var/spack/repos/builtin/packages/r-rpart/package.py b/var/spack/repos/builtin/packages/r-rpart/package.py
index ea857ad926..9d2ed2df4d 100644
--- a/var/spack/repos/builtin/packages/r-rpart/package.py
+++ b/var/spack/repos/builtin/packages/r-rpart/package.py
@@ -31,7 +31,9 @@ class RRpart(RPackage):
homepage = "https://cran.r-project.org/package=rpart"
url = "https://cran.r-project.org/src/contrib/rpart_4.1-10.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/rpart"
+ version('4.1-11', 'f77b37cddf7e9a7b5993a52a750b8817')
version('4.1-10', '15873cded4feb3ef44d63580ba3ca46e')
depends_on('r@2.15.0:')
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py
index a5e89cdfc1..886a238b06 100644
--- a/var/spack/repos/builtin/packages/r/package.py
+++ b/var/spack/repos/builtin/packages/r/package.py
@@ -40,6 +40,7 @@ class R(AutotoolsPackage):
extendable = True
+ version('3.4.1', '3a79c01dc0527c62e80ffb1c489297ea')
version('3.4.0', '75083c23d507b9c16d5c6afbd7a827e7')
version('3.3.3', '0ac211ec15e813a24f8f4a5a634029a4')
version('3.3.2', '2437014ef40641cdc9673e89c040b7a8')
@@ -83,7 +84,7 @@ class R(AutotoolsPackage):
depends_on('libxt', when='+X')
depends_on('curl')
depends_on('pcre')
- depends_on('jdk')
+ depends_on('java')
patch('zlib.patch', when='@:3.3.2')
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index b01f9570fe..0fba029cab 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -25,14 +25,10 @@
from spack import *
-class Raja(Package):
+class Raja(CMakePackage):
"""RAJA Parallel Framework."""
homepage = "http://software.llnl.gov/RAJA/"
version('git', git='https://github.com/LLNL/RAJA.git', branch="master")
- def install(self, spec, prefix):
- with working_dir('build', create=True):
- cmake('..', *std_cmake_args)
- make()
- make('install')
+ depends_on('cmake@3.3:', type='build')
diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py
index 5875312a7b..e7ba7abb4a 100644
--- a/var/spack/repos/builtin/packages/ravel/package.py
+++ b/var/spack/repos/builtin/packages/ravel/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Ravel(Package):
+class Ravel(CMakePackage):
"""Ravel is a parallel communication trace visualization tool that
orders events according to logical time."""
@@ -41,7 +41,5 @@ class Ravel(Package):
depends_on('otf2')
depends_on('qt@5:')
- def install(self, spec, prefix):
- cmake('-Wno-dev', *std_cmake_args)
- make()
- make("install")
+ def cmake_args(self):
+ return ['-Wno-dev']
diff --git a/var/spack/repos/builtin/packages/raxml/package.py b/var/spack/repos/builtin/packages/raxml/package.py
new file mode 100644
index 0000000000..198347b0c1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/raxml/package.py
@@ -0,0 +1,107 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class Raxml(Package):
+ """RAxML (Randomized Axelerated Maximum Likelihood) is a program for
+ sequential and parallel Maximum Likelihood based inference of large
+ phylogenetic trees."""
+
+ homepage = "https://sco.h-its.org/exelixis/web/software/raxml"
+ url = "https://github.com/stamatak/standard-RAxML/archive/v8.2.11.tar.gz"
+
+ version('8.2.11', '6bd5c4e1f93003ccf13c9b59a5d080ab')
+
+ variant('mpi', default=True, description='Enable MPI parallel support')
+ variant('pthreads', default=False, description='Enable pthreads version')
+ variant('sse', default=True, description='Enable SSE in order to substantially speed up execution')
+ variant('avx', default=False, description='Enable AVX in order to substantially speed up execution')
+
+ depends_on('mpi', when='+mpi')
+
+ # Compiles with either GCC or ICC.
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ files = glob.iglob("Makefile.*")
+ for file in files:
+ makefile = FileFilter(file)
+ makefile.filter('gcc', spack_cc)
+
+ if '+mpi' and '+avx' and '+pthreads' in spec:
+ make('-f', 'Makefile.AVX.HYBRID.gcc')
+ install('raxmlHPC-HYBRID-AVX', prefix.bin)
+
+ elif '+mpi' and '+sse' and '+pthreads' in spec:
+ make('-f', 'Makefile.SSE3.HYBRID.gcc')
+ install('raxmlHPC-HYBRID-SSE3', prefix.bin)
+
+ elif '+mpi' and '+pthreads' in spec:
+ make('-f', 'Makefile.HYBRID.gcc')
+ install('raxmlHPC-HYBRID', prefix.bin)
+
+ elif '+mpi' and '+avx' in spec:
+ make('-f', 'Makefile.AVX.MPI.gcc')
+ install('raxmlHPC-MPI-AVX', prefix.bin)
+
+ elif '+mpi' and '+sse' in spec:
+ make('-f', 'Makefile.SSE3.MPI.gcc')
+ install('raxmlHPC-MPI-SSE3', prefix.bin)
+
+ elif '+mpi' in spec:
+ make('-f', 'Makefile.MPI.gcc')
+ install('raxmlHPC-MPI', prefix.bin)
+
+ elif '+pthreads' and '+avx' in spec:
+ make('-f', 'Makefile.AVX.PTHREADS.gcc')
+ install('raxmlHPC-PTHREADS-AVX', prefix.bin)
+
+ elif '+pthreads' and '+sse' in spec:
+ make('-f', 'Makefile.SSE3.PTHREADS.gcc')
+ install('raxmlHPC-PTHREADS-SSE3', prefix.bin)
+
+ elif '+pthreads' in spec:
+ make('-f', 'Makefile.PTHREADS.gcc')
+ install('raxmlHPC-PTHREADS', prefix.bin)
+
+ elif '+sse' in spec:
+ make('-f', 'Makefile.SSE3.gcc')
+ install('raxmlHPC-SSE3', prefix.bin)
+
+ elif '+avx' in spec:
+ make('-f', 'Makefile.AVX.gcc')
+ install('raxmlHPC-AVX', prefix.bin)
+
+ else:
+ make('-f', 'Makefile.gcc')
+ install('raxmlHPC', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/ray/package.py b/var/spack/repos/builtin/packages/ray/package.py
new file mode 100644
index 0000000000..7056b59454
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ray/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Ray(CMakePackage):
+ """Parallel genome assemblies for parallel DNA sequencing"""
+
+ homepage = "http://denovoassembler.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/denovoassembler/Ray-2.3.1.tar.bz2"
+
+ version('2.3.1', '82f693c4db60af4328263c9279701009')
+
+ depends_on('mpi')
+
+ @run_after('build')
+ def make(self):
+ mkdirp(prefix.bin)
+ make('PREFIX=%s' % prefix.bin)
+
+ def install(self, spec, prefix):
+ make('install')
diff --git a/var/spack/repos/builtin/packages/rdp-classifier/package.py b/var/spack/repos/builtin/packages/rdp-classifier/package.py
new file mode 100644
index 0000000000..49cc367c8d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rdp-classifier/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class RdpClassifier(Package):
+ """The RDP Classifier is a naive Bayesian classifier that can rapidly and
+ accurately provides taxonomic assignments from domain to genus, with
+ confidence estimates for each assignment. """
+
+ homepage = "http://rdp.cme.msu.edu/"
+ url = "https://downloads.sourceforge.net/project/rdp-classifier/rdp-classifier/rdp_classifier_2.12.zip"
+
+ version('2.12', '7fdfa33512629810f0ff06b905642ddd')
+
+ depends_on('java', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install(join_path('dist', 'classifier.jar'), prefix.bin)
+ install_tree(join_path('dist', 'lib'), prefix.bin.lib)
+ install(join_path('lib', 'junit-4.8.2.jar'), prefix.bin.lib)
+ install_tree('src', prefix.src)
diff --git a/var/spack/repos/builtin/packages/redundans/package.py b/var/spack/repos/builtin/packages/redundans/package.py
new file mode 100644
index 0000000000..0e801f556f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/redundans/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Redundans(Package):
+ """Redundans pipeline assists an assembly of heterozygous genomes."""
+
+ homepage = "https://github.com/Gabaldonlab/redundans"
+ url = "https://github.com/Gabaldonlab/redundans/archive/v0.13c.tar.gz"
+
+ version('0.13c', '2003fb7c70521f5e430553686fd1a594')
+
+ depends_on('python', type=('build', 'run'))
+ depends_on('py-pyscaf', type=('build', 'run'))
+ depends_on('py-fastaindex', type=('build', 'run'))
+ depends_on('perl', type=('build', 'run'))
+ depends_on('sspace-standard')
+ depends_on('bwa')
+ depends_on('last')
+ depends_on('gapcloser')
+ depends_on('parallel')
+ depends_on('snap-berkeley')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('redundans.py', prefix.bin)
+ with working_dir('bin'):
+ install('fasta2homozygous.py', prefix.bin)
+ install('fasta2split.py', prefix.bin)
+ install('fastq2insert_size.py', prefix.bin)
+ install('fastq2mates.py', prefix.bin)
+ install('fastq2shuffled.py', prefix.bin)
+ install('fastq2sspace.py', prefix.bin)
+ install('filterReads.py', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/relion/package.py b/var/spack/repos/builtin/packages/relion/package.py
index dfb93cd943..23b1834fbc 100644
--- a/var/spack/repos/builtin/packages/relion/package.py
+++ b/var/spack/repos/builtin/packages/relion/package.py
@@ -40,6 +40,10 @@ class Relion(CMakePackage):
variant('cuda', default=False, description="enable compute on gpu")
variant('double', default=False, description="double precision (cpu) code")
variant('double-gpu', default=False, description="double precision (gpu) code")
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebInfo',
+ 'Profiling', 'Benchmarking'))
depends_on('mpi')
depends_on('fftw+float+double')
diff --git a/var/spack/repos/builtin/packages/revbayes/package.py b/var/spack/repos/builtin/packages/revbayes/package.py
new file mode 100644
index 0000000000..3498ddd952
--- /dev/null
+++ b/var/spack/repos/builtin/packages/revbayes/package.py
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Revbayes(CMakePackage):
+ """Bayesian phylogenetic inference using probabilistic graphical models
+ and an interpreted language."""
+
+ homepage = "https://revbayes.github.io"
+ url = "https://github.com/revbayes/revbayes/archive/v1.0.4-release.tar.gz"
+
+ version('1.0.4', '5d6de96bcb3b2686b270856de3555a58')
+
+ variant('mpi', default=True, description='Enable MPI parallel support')
+
+ depends_on('boost')
+ depends_on('mpi', when='+mpi')
+
+ conflicts('%gcc@7.1.0:')
+
+ root_cmakelists_dir = 'projects/cmake/build'
+
+ @run_before('cmake')
+ def regenerate(self):
+ with working_dir(join_path('projects', 'cmake')):
+ mkdirp('build')
+ edit = FileFilter('regenerate.sh')
+ edit.filter('boost="true"', 'boost="false"')
+ if '+mpi' in self.spec:
+ edit.filter('mpi="false"', 'mpi="true"')
+ regenerate = Executable('./regenerate.sh')
+ regenerate()
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ if '+mpi' in spec:
+ install('rb-mpi', prefix.bin)
+ else:
+ install('rb', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/rhash/package.py b/var/spack/repos/builtin/packages/rhash/package.py
new file mode 100644
index 0000000000..94af243ae5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rhash/package.py
@@ -0,0 +1,78 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+import glob
+from spack import *
+
+
+class Rhash(MakefilePackage):
+ """RHash is a console utility for computing and verifying hash sums of
+ files. It supports CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger,
+ TTH, Torrent BTIH, AICH, ED2K, GOST R 34.11-94, RIPEMD-160, HAS-160,
+ EDON-R 256/512, WHIRLPOOL and SNEFRU hash sums."""
+
+ homepage = "https://sourceforge.net/projects/rhash/"
+ url = "https://github.com/rhash/RHash/archive/v1.3.5.tar.gz"
+
+ version('1.3.5', 'f586644019c10c83c6b6835de4b99e74')
+
+ # For macOS build instructions, see:
+ # https://github.com/Homebrew/homebrew-core/blob/master/Formula/rhash.rb
+
+ def build(self, spec, prefix):
+ # Doesn't build shared libraries by default
+ make()
+
+ if spec.satisfies('platform=darwin'):
+ make('-C', 'librhash', 'dylib')
+ else:
+ make('lib-shared')
+
+ def check(self):
+ # Makefile has both `test` and `check` targets:
+ #
+ # * `test` - used to test that the build is working properly
+ # * `check` - used to check that the tarball is ready for upload
+ #
+ # Default implmentation is to run both `make test` and `make check`.
+ # `test` passes, but `check` fails, so only run `test`.
+ make('test')
+ make('test-static-lib')
+
+ if not self.spec.satisfies('platform=darwin'):
+ make('test-shared')
+ make('test-shared-lib')
+
+ def install(self, spec, prefix):
+ # Some things are installed to $(DESTDIR)$(PREFIX) while other things
+ # are installed to $DESTDIR/etc.
+ make('install', 'DESTDIR={0}'.format(prefix), 'PREFIX=')
+ make('install-lib-static', 'DESTDIR={0}'.format(prefix), 'PREFIX=')
+
+ if spec.satisfies('platform=darwin'):
+ libs = glob.glob('librhash/*.dylib')
+ for lib in libs:
+ install(lib, prefix.lib)
+ else:
+ make('install-lib-shared', 'DESTDIR={0}'.format(prefix), 'PREFIX=')
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
index b5f6ce89fe..dfd7ba3e25 100644
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -99,12 +99,6 @@ class Root(CMakePackage):
# See https://sft.its.cern.ch/jira/browse/ROOT-7517
conflicts('%intel')
- def build_type(self):
- if '+debug' in self.spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
args = [
'-Dcocoa=OFF',
diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py
index 0e2265f571..8ba397df55 100644
--- a/var/spack/repos/builtin/packages/rose/package.py
+++ b/var/spack/repos/builtin/packages/rose/package.py
@@ -60,7 +60,7 @@ class Rose(Package):
variant('fortran', default=False, description='Enable fortran language support')
variant('java', default=False, description='Enable java language support')
- depends_on('jdk', when='+java')
+ depends_on('java', when='+java')
variant('z3', default=False, description='Enable z3 theorem prover')
depends_on('z3', when='+z3')
diff --git a/var/spack/repos/builtin/packages/rr/package.py b/var/spack/repos/builtin/packages/rr/package.py
new file mode 100644
index 0000000000..5337d7eef4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rr/package.py
@@ -0,0 +1,66 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Rr(CMakePackage):
+ """Application execution recorder, player and debugger"""
+ homepage = "http://rr-project.org/"
+ url = "https://github.com/mozilla/rr/archive/4.5.0.tar.gz"
+
+ version('4.5.0', '1ec0aed0559b81143f59a200eeb302ef')
+ version('4.4.0', '6d1cbb4fafbf6711114369907cf1efb1')
+ version('4.3.0', '31470564e8b7eb317f619e4ef2244082')
+
+ depends_on('gdb')
+ depends_on('git')
+ depends_on('zlib')
+ # depends_on('capnproto', when='@4.6:') # not yet in spack
+ # depends_on('libcapnp') # needed for future releases
+ depends_on('pkg-config', type='build')
+ depends_on('py-pexpect', type='build') # actually tests
+
+ # rr needs architecture Nehalem and beyond, how can spack
+ # test this?
+
+ # Only 'Release' is supported at the moment
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Release'))
+
+ def patch(self):
+ # because otherwise CMake would try and fail to set RPATH of
+ # rr_exec_stub
+ filter_file(
+ r'^(install\(TARGETS .*)\s*rr_exec_stub', r'\1', 'CMakeLists.txt')
+
+ def cmake_args(self):
+ return ['-Ddisable32bit=ON']
+
+ @run_after('install')
+ def install_stub(self):
+ with working_dir(self.build_directory):
+ mkdirp(self.prefix.bin)
+ install('bin/rr_exec_stub', self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/rsbench/package.py b/var/spack/repos/builtin/packages/rsbench/package.py
new file mode 100644
index 0000000000..7e4027d2d4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rsbench/package.py
@@ -0,0 +1,66 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Rsbench(MakefilePackage):
+ """A mini-app to represent the multipole resonance representation lookup
+ cross section algorithm."""
+
+ homepage = "https://github.com/ANL-CESAR/RSBench"
+ url = "https://github.com/ANL-CESAR/RSBench/archive/v2.tar.gz"
+
+ version('2', '15a3ac5ea72529ac1ed9ed016ee68b4f')
+ version('0', '3427634dc5e7cd904d88f9955b371757')
+
+ tags = ['proxy-app']
+
+ build_directory = 'src'
+
+ @property
+ def build_targets(self):
+ targets = []
+
+ cflags = '-std=gnu99'
+ ldflags = '-lm'
+
+ if self.compiler.name == 'gcc':
+ cflags += ' -ffast-math '
+ elif self.compiler.name == 'intel':
+ cflags += ' -xhost -ansi-alias -no-prec-div '
+ elif self.compiler.name == 'pgi':
+ cflags += ' -fastsse '
+
+ cflags += self.compiler.openmp_flag
+
+ targets.append('CFLAGS={0}'.format(cflags))
+ targets.append('LDFLAGS={0}'.format(ldflags))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('src/rsbench', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/rsem/package.py b/var/spack/repos/builtin/packages/rsem/package.py
new file mode 100644
index 0000000000..805a71e0d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rsem/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Rsem(MakefilePackage):
+ """RSEM is a software package for estimating gene and isoform expression
+ levels from RNA-Seq data."""
+
+ homepage = "http://deweylab.github.io/RSEM/"
+ url = "https://github.com/deweylab/RSEM/archive/v1.3.0.tar.gz"
+
+ version('1.3.0', '9728161625d339d022130e2428604bf5')
+
+ depends_on('r', type=('build', 'run'))
+ depends_on('perl', type=('build', 'run'))
+ depends_on('python', type=('build', 'run'))
+ depends_on('bowtie')
+ depends_on('bowtie2')
+ depends_on('star')
+
+ def install(self, spec, prefix):
+ make('install', 'DESTDIR=%s' % prefix, 'prefix=')
diff --git a/var/spack/repos/builtin/packages/rtags/add_string_iterator_erase_compile_check.patch b/var/spack/repos/builtin/packages/rtags/add_string_iterator_erase_compile_check.patch
new file mode 100644
index 0000000000..98ec67df5f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rtags/add_string_iterator_erase_compile_check.patch
@@ -0,0 +1,67 @@
+From e0cb0bfba240669e27d77ea4ac17a90fde1a03fd Mon Sep 17 00:00:00 2001
+From: Anders Bakken <agbakken@gmail.com>
+Date: Thu, 27 Jul 2017 20:55:19 -0700
+Subject: [PATCH] Add a compile test for proper c++11 support for std::string
+ and work around deficient stls.
+
+---
+ rct.cmake | 10 ++++++++++
+ rct/String.h | 10 ++++++++++
+ rct/rct-config.h.in | 1 +
+ 3 files changed, 21 insertions(+)
+
+diff --git a/src/rct/rct.cmake b/src/rct/rct.cmake
+index da102d2..30da945 100644
+--- a/src/rct/rct.cmake
++++ b/src/rct/rct.cmake
+@@ -287,6 +287,16 @@ check_cxx_source_runs("
+ return 0;
+ }" HAVE_UNORDERDED_MAP_WORKING_MOVE_CONSTRUCTOR)
+
++check_cxx_source_runs("
++ #include <string>
++
++ int main(int, char **)
++ {
++ std::string str = \"foobar testing\";
++ std::string::iterator it = str.erase(str.begin(), str.end());
++ return 0;
++ }" HAVE_STRING_ITERATOR_ERASE)
++
+ unset(CMAKE_REQUIRED_FLAGS)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+
+diff --git a/src/rct/rct/String.h b/src/rct/rct/String.h
+index f8b9dbc..31b2012 100644
+--- a/src/rct/rct/String.h
++++ b/src/rct/rct/String.h
+@@ -454,7 +454,17 @@ class String
+
+ iterator erase(const_iterator begin, const_iterator end)
+ {
++#ifdef HAVE_STRING_ITERATOR_ERASE
+ return mString.erase(begin, end);
++#else
++ if (begin >= end) {
++ return mString.end();
++ }
++
++ const size_t offset = begin - mString.begin();
++ mString.erase(offset, end - begin);
++ return mString.begin() + offset;
++#endif
+ }
+
+ String& erase(size_t index = 0, size_t count = npos)
+diff --git a/src/rct/rct/rct-config.h.in b/src/rct/rct/rct-config.h.in
+index 9c67e2f..87c5b7c 100644
+--- a/src/rct/rct/rct-config.h.in
++++ b/src/rct/rct/rct-config.h.in
+@@ -20,6 +20,7 @@
+ #cmakedefine HAVE_SHMDEST
+ #cmakedefine HAVE_SCRIPTENGINE
+ #cmakedefine HAVE_UNORDERDED_MAP_WORKING_MOVE_CONSTRUCTOR
++#cmakedefine HAVE_HAVE_STRING_ITERATOR_ERASE
+ #if !defined(HAVE_EPOLL) && !defined(HAVE_KQUEUE)
+ #cmakedefine HAVE_SELECT
+ #endif
diff --git a/var/spack/repos/builtin/packages/rtags/package.py b/var/spack/repos/builtin/packages/rtags/package.py
new file mode 100644
index 0000000000..e212ea108c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rtags/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Rtags(CMakePackage):
+ """RTags is a client/server application that indexes C/C++ code"""
+
+ homepage = "https://github.com/Andersbakken/rtags/"
+ url = "https://andersbakken.github.io/rtags-releases/rtags-2.12.tar.gz"
+
+ version('2.12', '84988aaff27915a79d4b4b57299f9a51')
+
+ depends_on("llvm@3.3: +clang")
+ depends_on("zlib")
+ depends_on("openssl")
+ depends_on("lua@5.3:")
+ depends_on("bash-completion")
+ depends_on("pkg-config", type='build')
+
+ patch("add_string_iterator_erase_compile_check.patch", when='@2.12')
+
+ def cmake_args(self):
+ args = ['-DCMAKE_EXPORT_COMPILE_COMMANDS=1',
+ '-DRTAGS_NO_ELISP_FILES=1',
+ ]
+ return args
diff --git a/var/spack/repos/builtin/packages/rtax/package.py b/var/spack/repos/builtin/packages/rtax/package.py
new file mode 100644
index 0000000000..c2b917a81e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/rtax/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Rtax(Package):
+ """Rapid and accurate taxonomic classification of short paired-end
+ sequence reads from the 16S ribosomal RNA gene"""
+
+ homepage = "https://github.com/davidsoergel/rtax"
+ url = "http://static.davidsoergel.com/rtax-0.984.tgz"
+
+ version('0.984', 'e9dbbe4b3c26b0f0f6c14a5fb46aa587')
+
+ depends_on('usearch')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('rtax', prefix.bin)
+ install_tree('scripts', prefix.bin.scripts)
+ install_tree('greengenes', prefix.bin.greengenes)
diff --git a/var/spack/repos/builtin/packages/sabre/package.py b/var/spack/repos/builtin/packages/sabre/package.py
new file mode 100644
index 0000000000..ecee1012f5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sabre/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Sabre(MakefilePackage):
+ """Sabre is a tool that will demultiplex barcoded reads into separate
+ files. It will work on both single-end and paired-end data in fastq
+ format. It simply compares the provided barcodes with each read and
+ separates the read into its appropriate barcode file, after stripping
+ the barcode from the read (and also stripping the quality values of
+ the barcode bases). If a read does not have a recognized barcode,
+ then it is put into the unknown file.
+ """
+
+ homepage = "https://github.com/najoshi/sabre"
+ url = "https://github.com/najoshi/sabre"
+
+ version('2013-09-27', git='https://github.com/najoshi/sabre.git', commit='039a55e500ba07b7e6432ea6ec2ddcfb3471d949')
+
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('sabre', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/salmon/package.py b/var/spack/repos/builtin/packages/salmon/package.py
new file mode 100644
index 0000000000..413eb9aebe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/salmon/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Salmon(CMakePackage):
+ """Salmon is a tool for quantifying the expression of transcripts using
+ RNA-seq data."""
+
+ homepage = "http://combine-lab.github.io/salmon/"
+ url = "https://github.com/COMBINE-lab/salmon/archive/v0.8.2.tar.gz"
+
+ version('0.8.2', 'ee512697bc44b13661a16d4e14cf0a00')
+
+ depends_on('boost')
+
+ def cmake_args(self):
+ args = ['-DBOOST_ROOT=%s' % self.spec['boost'].prefix]
+ return args
diff --git a/var/spack/repos/builtin/packages/sas/package.py b/var/spack/repos/builtin/packages/sas/package.py
index 5a7f1de1d5..050d6172d6 100644
--- a/var/spack/repos/builtin/packages/sas/package.py
+++ b/var/spack/repos/builtin/packages/sas/package.py
@@ -36,19 +36,10 @@ class Sas(CMakePackage):
version('0.1.4', '20d7311258f2a59c9367ae1576c392b6')
version('0.1.3', '1e6572afcc03318d16d7321d40eec0fd')
- variant('debug', default=False, description='Build debug version')
-
depends_on('python@2.7:')
depends_on('llvm@3.5:')
depends_on('cmake@2.8:', type='build')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
args = [
'-DLLVM_DEV_DIR=%s' % self.spec['llvm'].prefix
diff --git a/var/spack/repos/builtin/packages/satsuma2/package.py b/var/spack/repos/builtin/packages/satsuma2/package.py
new file mode 100644
index 0000000000..39abc714e0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/satsuma2/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Satsuma2(CMakePackage):
+ """Satsuma2 is an optimsed version of Satsuma, a tool to reliably align
+ large and complex DNA sequences providing maximum sensitivity (to find
+ all there is to find), specificity (to only find real homology) and
+ speed (to accomodate the billions of base pairs in vertebrate genomes).
+ """
+
+ homepage = "https://github.com/bioinfologics/satsuma2"
+ url = "https://github.com/bioinfologics/satsuma2"
+
+ version('2016-11-22', git='https://github.com/bioinfologics/satsuma2.git', commit='da694aeecf352e344b790bea4a7aaa529f5b69e6')
+
+ def install(self, spec, prefix):
+ install_tree(join_path('spack-build', 'bin'), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/savanna/package.py b/var/spack/repos/builtin/packages/savanna/package.py
new file mode 100644
index 0000000000..b7cd94ece0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/savanna/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+from distutils.dir_util import copy_tree
+
+
+class Savanna(MakefilePackage):
+ """CODARcode Savanna runtime framework for high performance,
+ workflow management using Swift/T and ADIOS.
+ """
+
+ homepage = "https://github.com/CODARcode/savanna"
+ url = "https://github.com/CODARcode/savanna/archive/v0.5.tar.gz"
+
+ version('develop', git='https://github.com/CODARcode/savanna.git',
+ branch='master', submodules=True)
+ version('0.5', git='https://github.com/CODARcode/savanna.git',
+ tag='0.5', submodules=True)
+
+ variant('tau', default=False, description='Enable TAU profiling support')
+
+ depends_on('mpi')
+ depends_on('stc')
+ depends_on('adios +fortran +zlib +sz +zfp +staging')
+ depends_on('mpix-launch-swift')
+ depends_on('tau', when='+tau')
+
+ def install(self, spec, prefix):
+ copy_tree('.', prefix)
diff --git a/var/spack/repos/builtin/packages/sbt/package.py b/var/spack/repos/builtin/packages/sbt/package.py
index 27be7cc54c..6747e51b3f 100644
--- a/var/spack/repos/builtin/packages/sbt/package.py
+++ b/var/spack/repos/builtin/packages/sbt/package.py
@@ -34,7 +34,7 @@ class Sbt(Package):
version('0.13.12', 'cec3071d46ef13334c8097cc3467ff28')
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
shutil.copytree('bin', join_path(prefix, 'bin'), symlinks=True)
diff --git a/var/spack/repos/builtin/packages/scala/package.py b/var/spack/repos/builtin/packages/scala/package.py
index dd1ab78f6b..35a49f6be5 100644
--- a/var/spack/repos/builtin/packages/scala/package.py
+++ b/var/spack/repos/builtin/packages/scala/package.py
@@ -40,7 +40,7 @@ class Scala(Package):
version('2.11.11', '3f5b76001f60cbc31111ddb81de5ea07')
version('2.20.6', 'd79dc9fdc627b73289306bdaec81ca98')
- depends_on('jdk')
+ depends_on('java')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/scalasca/package.py b/var/spack/repos/builtin/packages/scalasca/package.py
index 276cdf05a5..81c08802fa 100644
--- a/var/spack/repos/builtin/packages/scalasca/package.py
+++ b/var/spack/repos/builtin/packages/scalasca/package.py
@@ -63,4 +63,9 @@ class Scalasca(AutotoolsPackage):
config_args.append("--with-cube=%s" % spec['cube'].prefix.bin)
config_args.append("--with-otf2=%s" % spec['otf2'].prefix.bin)
+ if self.spec['mpi'].name == 'openmpi':
+ config_args.append("--with-mpi=openmpi")
+ elif self.spec.satisfies('^mpich@3:'):
+ config_args.append("--with-mpi=mpich3")
+
return config_args
diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py
index 5bf35c071c..6b65528f3c 100644
--- a/var/spack/repos/builtin/packages/scons/package.py
+++ b/var/spack/repos/builtin/packages/scons/package.py
@@ -27,7 +27,12 @@ from spack import *
class Scons(PythonPackage):
"""SCons is a software construction tool"""
+
homepage = "http://scons.org"
- url = "http://downloads.sourceforge.net/project/scons/scons/2.5.0/scons-2.5.0.tar.gz"
+ url = "https://pypi.io/packages/source/s/scons/scons-2.5.1.tar.gz"
+
+ version('2.5.1', '3eac81e5e8206304a9b4683c57665aa4')
+ version('2.5.0', 'bda5530a70a41a7831d83c8b191c021e')
- version('2.5.0', '9e00fa0df8f5ca5c5f5975b40e0ed354')
+ # Python 3 is not supported
+ depends_on('python@:2.8', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/scorep/gcc7.patch b/var/spack/repos/builtin/packages/scorep/gcc7.patch
new file mode 100644
index 0000000000..7383ee15ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scorep/gcc7.patch
@@ -0,0 +1,42 @@
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h 2017-08-15 14:52:18.458118812 +0200
+@@ -27,6 +27,11 @@
+ DECL_SECTION_NAME( decl ) = build_string( strlen( section ), section )
+ #endif
+
++#if SCOREP_GCC_PLUGIN_TARGET_VERSION < 7000
++#define SET_DECL_ALIGN( decl, align ) \
++ DECL_ALIGN( decl ) = ( align )
++#endif
++
+ #if SCOREP_GCC_PLUGIN_TARGET_VERSION >= 5000
+ #define varpool_finalize_decl( decl ) varpool_node::finalize_decl( decl )
+ #define cgraph_get_node( decl ) cgraph_node::get( decl )
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-08-15 14:52:56.220854113 +0200
+@@ -194,7 +194,7 @@
+ TREE_TYPE( region_descr_value ) );
+
+ /* Align the struct generously, so that it works for 32 and 64 bit */
+- DECL_ALIGN( region_descr_var ) = 64 * BITS_PER_UNIT;
++ SET_DECL_ALIGN( region_descr_var, 64 * BITS_PER_UNIT );
+ DECL_USER_ALIGN( region_descr_var ) = 1;
+
+ /* The struct is 64 bytes, because of reserved entries */
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h 2017-08-15 14:49:26.163888408 +0200
+@@ -23,6 +23,11 @@
+ #include "stringpool.h"
+ #include "basic-block.h"
+ #include "tree-ssa-alias.h"
++
++#if SCOREP_GCC_PLUGIN_TARGET_VERSION >= 7000
++#include "tree-vrp.h"
++#endif
++
+ #include "tree-ssanames.h"
+ #include "internal-fn.h"
+ #include "gimple-expr.h"
diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py
index d164c38f54..59665a482d 100644
--- a/var/spack/repos/builtin/packages/scorep/package.py
+++ b/var/spack/repos/builtin/packages/scorep/package.py
@@ -40,6 +40,8 @@ class Scorep(AutotoolsPackage):
version('1.4.2', '3b9a042b13bdd5836452354e6567f71e')
version('1.3', '9db6f957b7f51fa01377a9537867a55c')
+ patch('gcc7.patch')
+
##########
# Dependencies for SCORE-P are quite tight. See the homepage for more
# information.
@@ -88,5 +90,8 @@ class Scorep(AutotoolsPackage):
if '~shmem' in spec:
config_args.append("--without-shmem")
- config_args.extend(["CFLAGS=-fPIC", "CXXFLAGS=-fPIC"])
+ config_args.extend([
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
+ 'CXXFLAGS={0}'.format(self.compiler.pic_flag)
+ ])
return config_args
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 8071a9765f..b5903c2789 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -129,7 +129,9 @@ class Scotch(Package):
if self.spec.satisfies('platform=darwin'):
makefile_inc.extend([
'LIB = .dylib',
- 'CLIBFLAGS = -dynamiclib -fPIC',
+ 'CLIBFLAGS = -dynamiclib {0}'.format(
+ self.compiler.pic_flag
+ ),
'RANLIB = echo',
'AR = $(CC)',
'ARFLAGS = -dynamiclib $(LDFLAGS) -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % prefix.lib # noqa
@@ -137,12 +139,12 @@ class Scotch(Package):
else:
makefile_inc.extend([
'LIB = .so',
- 'CLIBFLAGS = -shared -fPIC',
+ 'CLIBFLAGS = -shared {0}'.format(self.compiler.pic_flag),
'RANLIB = echo',
'AR = $(CC)',
'ARFLAGS = -shared $(LDFLAGS) -o'
])
- cflags.append('-fPIC')
+ cflags.append(self.compiler.pic_flag)
else:
makefile_inc.extend([
'LIB = .a',
diff --git a/var/spack/repos/builtin/packages/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py
index f8fe72f110..1ab117721c 100644
--- a/var/spack/repos/builtin/packages/scr/package.py
+++ b/var/spack/repos/builtin/packages/scr/package.py
@@ -24,24 +24,123 @@
##############################################################################
from spack import *
+import os
+import shutil
-class Scr(Package):
+
+class Scr(CMakePackage):
"""SCR caches checkpoint data in storage on the compute nodes of a
Linux cluster to provide a fast, scalable checkpoint/restart
capability for MPI codes"""
- homepage = "https://computation.llnl.gov/project/scr/"
+ homepage = "http://computation.llnl.gov/projects/scalable-checkpoint-restart-for-mpi"
+
+ # NOTE: scr-v1.1.8 is built with autotools and is not properly build here.
+ # scr-v1.1.8 will be deprecated with the upcoming release of v1.2.0
+ # url = "https://github.com/LLNL/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz"
+ # version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e')
+
+ version('master', git='https://github.com/llnl/scr.git', branch='master')
+
+ depends_on('pdsh+static_modules', type=('build', 'run'))
+ depends_on('zlib')
+ depends_on('mpi')
+
+ variant('dtcmp', default=True,
+ description="Build with DTCMP. "
+ "Necessary to enable user directory naming at runtime")
+ depends_on('dtcmp', when="+dtcmp")
+
+ variant('libyogrt', default=True,
+ description="Build SCR with libyogrt for get_time_remaining.")
+ depends_on('libyogrt', when="+libyogrt")
+
+ # MySQL not yet in spack
+ # variant('mysql', default=True, decription="MySQL database for logging")
+ # depends_on('mysql', when="+mysql")
+
+ variant('scr_config', default='scr.conf',
+ description='Location for SCR to find its system config file. '
+ 'May be either absolute or relative to the install prefix')
+ variant('copy_config', default=None,
+ description='Location from which to copy SCR system config file. '
+ 'Must be an absolute path.')
+
+ variant('fortran', default=True,
+ description="Build SCR with fortran bindings")
+
+ variant('resource_manager', default='SLURM',
+ values=('SLURM', 'APRUN', 'PMIX', 'LSF', 'NONE'),
+ multi=False,
+ description="Resource manager for which to configure SCR.")
+
+ variant('async_api', default='NONE',
+ values=('NONE', 'CRAY_DW', 'IBM_BBAPI', 'INTEL_CPPR'),
+ multi=False,
+ description="Asynchronous data transfer API to use with SCR.")
+
+ variant('file_lock', default='FLOCK',
+ values=('FLOCK', 'FNCTL', 'NONE'),
+ multi=False,
+ description='File locking style for SCR.')
+
+ variant('cache_base', default='/tmp',
+ description='Compile time default location for checkpoint cache.')
+ variant('cntl_base', default='/tmp',
+ description='Compile time default location for control directory.')
+
+ def get_abs_path_rel_prefix(self, path):
+ # Return path if absolute, otherwise prepend prefix
+ if os.path.isabs(path):
+ return path
+ else:
+ return join_path(self.spec.prefix, path)
+
+ def cmake_args(self):
+ spec = self.spec
+ args = []
+
+ args.append('-DENABLE_FORTRAN={0}'.format('+fortran' in spec))
+
+ conf_path = self.get_abs_path_rel_prefix(
+ self.spec.variants['scr_config'].value)
+ args.append('-DCMAKE_SCR_CONFIG_FILE={0}'.format(conf_path))
+
+ # We uppercase the values for these to avoid unnecessary user error.
+ args.append('-DSCR_RESOURCE_MANAGER={0}'.format(
+ spec.variants['resource_manager'].value.upper()))
+
+ args.append('-DSCR_ASYNC_API={0}'.format(
+ spec.variants['async_api'].value.upper()))
+
+ args.append('-DSCR_FILE_LOCK={0}'.format(
+ spec.variants['file_lock'].value.upper()))
+
+ args.append('-DSCR_CACHE_BASE={0}'.format(
+ spec.variants['cache_base'].value))
+
+ args.append('-DSCR_CNTL_BASE={0}'.format(
+ spec.variants['cntl_base'].value))
+
+ args.append('-DWITH_PDSH_PREFIX={0}'.format(spec['pdsh'].prefix))
+
+ if "+dtcmp" in spec:
+ args.append('-DWITH_DTCMP_PREFIX={0}'.format(spec['dtcmp'].prefix))
+
+ if "+libyogrt" in spec:
+ args.append('-DWITH_YOGRT_PREFIX={0}'.format(
+ spec['libyogrt'].prefix))
- depends_on("mpi")
-# depends_on("dtcmp")
+ # if "+mysql" in spec:
+ # args.append('-DWITH_MYSQL_PREFIX={0}'.format(
+ # spec['mysql'].prefix))
- version('1.1-7', 'a5930e9ab27d1b7049447c2fd7734ebd',
- url='http://downloads.sourceforge.net/project/scalablecr/releases/scr-1.1-7.tar.gz')
- version('1.1.8', '6a0f11ad18e27fcfc00a271ff587b06e',
- url='https://github.com/hpc/scr/releases/download/v1.1.8/scr-1.1.8.tar.gz')
+ return args
- def install(self, spec, prefix):
- configure("--prefix=" + prefix,
- "--with-scr-config-file=" + prefix + "/etc/scr.conf")
- make()
- make("install")
+ @run_after('install')
+ def copy_config(self):
+ spec = self.spec
+ if spec.variants['copy_config'].value:
+ dest_path = self.get_abs_path_rel_prefix(
+ spec.variants['scr_config'].value)
+ shutil.copyfile(spec.variants['copy_config'].value, dest_path)
diff --git a/var/spack/repos/builtin/packages/sdl2/package.py b/var/spack/repos/builtin/packages/sdl2/package.py
index e841cd4da4..bb7f46d036 100644
--- a/var/spack/repos/builtin/packages/sdl2/package.py
+++ b/var/spack/repos/builtin/packages/sdl2/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Sdl2(Package):
+class Sdl2(CMakePackage):
"""Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and
graphics hardware via OpenGL and Direct3D."""
@@ -35,11 +35,4 @@ class Sdl2(Package):
version('2.0.5', 'd4055424d556b4a908aa76fad63abd3c')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
-
- make()
- make('install')
+ depends_on('cmake@2.8.5:', type='build')
diff --git a/var/spack/repos/builtin/packages/seqprep/package.py b/var/spack/repos/builtin/packages/seqprep/package.py
new file mode 100644
index 0000000000..728b47167b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/seqprep/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Seqprep(MakefilePackage):
+ """SeqPrep is a program to merge paired end Illumina reads that are
+ overlapping into a single longer read."""
+
+ homepage = "https://github.com/jstjohn/SeqPrep"
+ url = "https://github.com/jstjohn/SeqPrep/archive/v1.3.2.tar.gz"
+
+ version('1.3.2', 'b6a4f5491dfdb0ce38bf791454151468')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('SeqPrep', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py
index 3d8e228548..250a6f498f 100644
--- a/var/spack/repos/builtin/packages/serf/package.py
+++ b/var/spack/repos/builtin/packages/serf/package.py
@@ -25,31 +25,67 @@
from spack import *
-class Serf(Package):
+class Serf(SConsPackage):
"""Apache Serf - a high performance C-based HTTP client library
built upon the Apache Portable Runtime (APR) library"""
homepage = 'https://serf.apache.org/'
- url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2'
+ url = 'https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2'
+ version('1.3.9', '26015c63e3bbb108c1689bf2090e4c26351db674')
version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446')
+ variant('debug', default=False,
+ description='Enable debugging info and strict compile warnings')
+
+ depends_on('scons@2.3.0:', type='build')
+
depends_on('apr')
depends_on('apr-util')
- depends_on('scons', type='build')
- depends_on('expat')
depends_on('openssl')
depends_on('zlib')
- def install(self, spec, prefix):
- options = ['PREFIX=%s' % prefix]
- options.append('APR=%s' % spec['apr'].prefix)
- options.append('APU=%s' % spec['apr-util'].prefix)
- options.append('OPENSSL=%s' % spec['openssl'].prefix)
- options.append('LINKFLAGS=-L%s/lib -L%s/lib' %
- (spec['expat'].prefix, spec['zlib'].prefix))
- options.append('CPPFLAGS=-I%s/include -I%s/include' %
- (spec['expat'].prefix, spec['zlib'].prefix))
-
- scons(*options)
- scons('install')
+ def build_args(self, spec, prefix):
+ args = [
+ 'PREFIX={0}'.format(prefix),
+ 'APR={0}'.format(spec['apr'].prefix),
+ 'APU={0}'.format(spec['apr-util'].prefix),
+ 'OPENSSL={0}'.format(spec['openssl'].prefix),
+ 'ZLIB={0}'.format(spec['zlib'].prefix),
+ ]
+
+ if '+debug' in spec:
+ args.append('DEBUG=yes')
+ else:
+ args.append('DEBUG=no')
+
+ # SCons doesn't pass Spack environment variables to the
+ # execution environment. Therefore, we can't use Spack's compiler
+ # wrappers. Use the actual compilers. SCons seems to RPATH things
+ # on its own anyway.
+ args.append('CC={0}'.format(self.compiler.cc))
+
+ return args
+
+ def test(self):
+ # FIXME: Several test failures:
+ #
+ # There were 14 failures:
+ # 1) test_ssl_trust_rootca
+ # 2) test_ssl_certificate_chain_with_anchor
+ # 3) test_ssl_certificate_chain_all_from_server
+ # 4) test_ssl_no_servercert_callback_allok
+ # 5) test_ssl_large_response
+ # 6) test_ssl_large_request
+ # 7) test_ssl_client_certificate
+ # 8) test_ssl_future_server_cert
+ # 9) test_setup_ssltunnel
+ # 10) test_ssltunnel_basic_auth
+ # 11) test_ssltunnel_basic_auth_server_has_keepalive_off
+ # 12) test_ssltunnel_basic_auth_proxy_has_keepalive_off
+ # 13) test_ssltunnel_basic_auth_proxy_close_conn_on_200resp
+ # 14) test_ssltunnel_digest_auth
+ #
+ # These seem to be related to:
+ # https://groups.google.com/forum/#!topic/serf-dev/YEFTTdF1Qwc
+ scons('check')
diff --git a/var/spack/repos/builtin/packages/shapeit/package.py b/var/spack/repos/builtin/packages/shapeit/package.py
new file mode 100644
index 0000000000..a3f79c6255
--- /dev/null
+++ b/var/spack/repos/builtin/packages/shapeit/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Shapeit(Package):
+ """SHAPEIT is a fast and accurate method for estimation of haplotypes (aka
+ phasing) from genotype or sequencing data."""
+
+ homepage = "https://mathgen.stats.ox.ac.uk/genetics_software/shapeit/shapeit.html"
+ url = "https://mathgen.stats.ox.ac.uk/genetics_software/shapeit/shapeit.v2.r837.GLIBCv2.12.Linux.dynamic.tgz"
+
+ version('2.837', '895873bb655a0a985cbfd870fdd1dd60')
+
+ def url_for_version(self, version):
+ url = 'https://mathgen.stats.ox.ac.uk/genetics_software/shapeit/shapeit.v{0}.r{1}.GLIBCv2.12.Linux.dynamic.tgz'
+ return url.format(version[0], version[1])
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir('bin'):
+ install('shapeit', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/shared-mime-info/package.py b/var/spack/repos/builtin/packages/shared-mime-info/package.py
index b7d9deb5f7..ef920c797b 100644
--- a/var/spack/repos/builtin/packages/shared-mime-info/package.py
+++ b/var/spack/repos/builtin/packages/shared-mime-info/package.py
@@ -39,6 +39,7 @@ class SharedMimeInfo(AutotoolsPackage):
depends_on('glib')
depends_on('libxml2')
depends_on('intltool', type='build')
+ depends_on('pkg-config@0.9.0:', type='build')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.prepend_path("XDG_DATA_DIRS",
diff --git a/var/spack/repos/builtin/packages/shortstack/package.py b/var/spack/repos/builtin/packages/shortstack/package.py
new file mode 100644
index 0000000000..8feb671013
--- /dev/null
+++ b/var/spack/repos/builtin/packages/shortstack/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Shortstack(Package):
+ """ShortStack is a tool developed to process and analyze smallRNA-seq data
+ with respect to a reference genome, and output a comprehensive and
+ informative annotation of all discovered small RNA genes."""
+
+ homepage = "http://sites.psu.edu/axtell/software/shortstack/"
+ url = "https://github.com/MikeAxtell/ShortStack/archive/v3.8.3.tar.gz"
+
+ version('3.8.3', '3f21f494f799039f3fa88ea343f2d20d')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('samtools')
+ depends_on('viennarna')
+ depends_on('bowtie')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('ShortStack', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sickle/package.py b/var/spack/repos/builtin/packages/sickle/package.py
new file mode 100644
index 0000000000..eee50d39aa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sickle/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Sickle(MakefilePackage):
+ """Sickle is a tool that uses sliding windows along with quality and
+ length thresholds to determine when quality is sufficiently low to trim
+ the 3'-end of reads and also determines when the quality is
+ sufficiently high enough to trim the 5'-end of reads."""
+
+ homepage = "https://github.com/najoshi/sickle"
+ url = "https://github.com/najoshi/sickle/archive/v1.33.tar.gz"
+
+ version('1.33', '9e2ba812183e1515198c9e15c4cd2cd7')
+
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('sickle', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/signalp/package.py b/var/spack/repos/builtin/packages/signalp/package.py
new file mode 100644
index 0000000000..78caa33452
--- /dev/null
+++ b/var/spack/repos/builtin/packages/signalp/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Signalp(Package):
+ """SignalP predicts the presence and location of signal peptide cleavage
+ sites in amino acid sequences from different organisms: Gram-positive
+ bacteria, Gram-negative bacteria, and eukaryotes.
+ Note: A manual download is required for SignalP.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "http://www.cbs.dtu.dk/services/SignalP/"
+ url = "file://{0}/signalp-4.1f.Linux.tar.gz".format(os.getcwd())
+
+ version('4.1f', 'a9aeb66259202649c959846f3f4d9744')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('gnuplot')
+
+ def patch(self):
+ edit = FileFilter('signalp')
+ edit.filter("ENV{SIGNALP} = .*",
+ "ENV{SIGNALP} = '%s'" % self.prefix)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.share.man)
+ install('signalp', prefix)
+ install('signalp.1', prefix.share.man)
+ install_tree('bin', prefix.bin)
+ install_tree('lib', prefix.lib)
+ install_tree('syn', prefix.syn)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PATH', prefix)
diff --git a/var/spack/repos/builtin/packages/simplemoc/package.py b/var/spack/repos/builtin/packages/simplemoc/package.py
new file mode 100644
index 0000000000..0472215800
--- /dev/null
+++ b/var/spack/repos/builtin/packages/simplemoc/package.py
@@ -0,0 +1,68 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Simplemoc(MakefilePackage):
+ """The purpose of this mini-app is to demonstrate the performance
+ characterterics and viability of the Method of Characteristics (MOC)
+ for 3D neutron transport calculations in the context of full scale
+ light water reactor simulation."""
+
+ homepage = "https://github.com/ANL-CESAR/SimpleMOC/"
+ url = "https://github.com/ANL-CESAR/SimpleMOC/archive/master.tar.gz"
+
+ version('1.0', 'd8827221a4ae76e9766a32e16d143e60')
+
+ tags = ['proxy-app']
+
+ variant('mpi', default=True, description='Build with MPI support')
+
+ depends_on('mpi', when='+mpi')
+
+ build_directory = 'src'
+
+ @property
+ def build_targets(self):
+
+ targets = []
+
+ cflags = '-std=gnu99'
+ ldflags = '-lm'
+
+ if self.compiler.name == 'gcc' or self.compiler.name == 'intel':
+ cflags += ' ' + self.compiler.openmp_flag
+ if '+mpi' in self.spec:
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+
+ targets.append('CFLAGS={0}'.format(cflags))
+ targets.append('LDFLAGS={0}'.format(ldflags))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('src/SimpleMOC', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/singularity/package.py b/var/spack/repos/builtin/packages/singularity/package.py
new file mode 100644
index 0000000000..61acf56463
--- /dev/null
+++ b/var/spack/repos/builtin/packages/singularity/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Singularity(AutotoolsPackage):
+ """Singularity is a container platform focused on supporting 'Mobility of
+ Compute'"""
+
+ homepage = "http://singularity.lbl.gov/"
+ url = "https://github.com/singularityware/singularity/archive/2.3.1.tar.gz"
+
+ version('2.3.1', '292ff7fe3db09c854b8accf42f763f62')
+
+ depends_on('m4', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index 934b173b2d..2b4b03147d 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -32,7 +32,7 @@ class Slepc(Package):
"""
homepage = "http://www.grycap.upv.es/slepc"
- url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
+ url = "http://slepc.upv.es/download/distrib/slepc-3.6.2.tar.gz"
version('3.7.4', '2fb782844e3bc265a8d181c3c3e2632a4ca073111c874c654f1365d33ca2eb8a')
version('3.7.3', '3ef9bcc645a10c1779d56b3500472ceb66df692e389d635087d30e7c46424df9')
diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py
new file mode 100644
index 0000000000..626f43c6c5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/slurm/package.py
@@ -0,0 +1,109 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Slurm(AutotoolsPackage):
+ """Slurm is an open source, fault-tolerant, and highly scalable cluster
+ management and job scheduling system for large and small Linux clusters.
+
+ Slurm requires no kernel modifications for its operation and is relatively
+ self-contained. As a cluster workload manager, Slurm has three key
+ functions. First, it allocates exclusive and/or non-exclusive access to
+ resources (compute nodes) to users for some duration of time so they can
+ perform work. Second, it provides a framework for starting, executing,
+ and monitoring work (normally a parallel job) on the set of allocated
+ nodes. Finally, it arbitrates contention for resources by managing a
+ queue of pending work.
+ """
+
+ homepage = 'https://slurm.schedmd.com'
+ url = 'https://github.com/SchedMD/slurm/archive/slurm-17-02-6-1.tar.gz'
+
+ version('17-02-6-1', '8edbb9ad41819464350d9de013367020')
+
+ variant('gtk', default=False, description='Enable GTK+ support')
+ variant('mariadb', default=False, description='Use MariaDB instead of MySQL')
+
+ variant('hwloc', default=False, description='Enable hwloc support')
+ variant('hdf5', default=False, description='Enable hdf5 support')
+ variant('readline', default=True, description='Enable readline support')
+
+ # TODO: add variant for BG/Q and Cray support
+
+ # TODO: add support for checkpoint/restart (BLCR)
+
+ # TODO: add support for lua
+
+ depends_on('curl')
+ depends_on('glib')
+ depends_on('json-c')
+ depends_on('lz4')
+ depends_on('munge')
+ depends_on('openssl')
+ depends_on('pkg-config', type='build')
+ depends_on('readline')
+ depends_on('zlib')
+
+ depends_on('gtkplus+X', when='+gtk')
+ depends_on('hdf5', when='+hdf5')
+ depends_on('hwloc', when='+hwloc')
+ depends_on('mariadb', when='+mariadb')
+
+ def configure_args(self):
+
+ spec = self.spec
+
+ args = [
+ '--with-libcurl={0}'.format(spec['curl'].prefix),
+ '--with-json={0}'.format(spec['json-c'].prefix),
+ '--with-lz4={0}'.format(spec['lz4'].prefix),
+ '--with-munge={0}'.format(spec['munge'].prefix),
+ '--with-ssl={0}'.format(spec['openssl'].prefix),
+ '--with-zlib={0}'.format(spec['zlib'].prefix),
+ ]
+
+ if '~gtk' in spec:
+ args.append('--disable-gtktest')
+
+ if '+readline' in spec:
+ args.append('--with-readline={0}'.format(spec['readline'].prefix))
+ else:
+ args.append('--without-readline')
+
+ if '+hdf5' in spec:
+ args.append(
+ '--with-hdf5={0}'.format(spec['hdf5'].prefix.bin.h5cc)
+ )
+ else:
+ args.append('--without-hdf5')
+
+ if '+hwloc' in spec:
+ args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
+ else:
+ args.append('--without-hwloc')
+
+ return args
diff --git a/var/spack/repos/builtin/packages/smalt/package.py b/var/spack/repos/builtin/packages/smalt/package.py
new file mode 100644
index 0000000000..c19f3d040a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/smalt/package.py
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Smalt(AutotoolsPackage):
+ """SMALT aligns DNA sequencing reads with a reference genome."""
+
+ homepage = "http://www.sanger.ac.uk/science/tools/smalt-0"
+ url = "https://downloads.sourceforge.net/project/smalt/smalt-0.7.6.tar.gz"
+
+ version('0.7.6', 'c3215d70ba960c8fdc8e80191695c60b')
diff --git a/var/spack/repos/builtin/packages/smc/package.py b/var/spack/repos/builtin/packages/smc/package.py
new file mode 100644
index 0000000000..402c892b0f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/smc/package.py
@@ -0,0 +1,83 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import glob
+
+
+class Smc(MakefilePackage):
+ """A minimalist high-order finite difference algorithm
+ for combustion problems. It includes core discretizations
+ for advection, diffusive transport and chemical kinetics.
+ The models for computing diffusive transport coefficients
+ have been replaced by a simplified approximation
+ but the full structure of the discretization of
+ the diffusive terms have been preserved."""
+
+ homepage = "https://ccse.lbl.gov/ExaCT/index.html"
+ url = "https://ccse.lbl.gov/ExaCT/SMC.tar.gz"
+ tags = ['proxy-app']
+
+ version('master', '94a4ea94abbc5e61397c2a4d1fb56ed6')
+
+ variant(
+ 'mpi', default=True,
+ description='Build with MPI support')
+ variant(
+ 'openmp', default=True,
+ description='Build with OpenMP support')
+ variant(
+ 'debug', default=False,
+ description='Build with debugging')
+# variant(
+# 'mic', default=False,
+# description='Compile for Intel Xeon Phi')
+ variant(
+ 'k_use_automatic', default=True,
+ description='Some arrays in kernels.F90 will be automatic')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('gmake', type='build')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('GNUmakefile')
+ if '~mpi' in spec:
+ makefile.filter('MPI := t', '#')
+ if '~openmp' in spec:
+ makefile.filter('OMP := t', '#')
+ if '+debug' in spec:
+ makefile.filter('NDEBUG :=', '#')
+ if '~k_use_automatic' in spec:
+ makefile.filter('K_U.*:= t', '#')
+ if self.compiler.name == 'intel':
+ makefile.filter('COMP := .*', 'COMP := Intel')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ files = glob.glob(join_path(self.build_directory, '*.exe'))
+ for f in files:
+ install(f, prefix.bin)
+ install('inputs_SMC', prefix.bin)
+ install('README', prefix)
+ install('BoxLib.license.txt', prefix) \ No newline at end of file
diff --git a/var/spack/repos/builtin/packages/snap-berkeley/package.py b/var/spack/repos/builtin/packages/snap-berkeley/package.py
new file mode 100644
index 0000000000..9bd9cd961c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/snap-berkeley/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class SnapBerkeley(MakefilePackage):
+ """SNAP is a fast and accurate aligner for short DNA reads. It is
+ optimized for modern read lengths of 100 bases or higher, and takes
+ advantage of these reads to align data quickly through a hash-based
+ indexing scheme."""
+
+ homepage = "http://snap.cs.berkeley.edu/"
+ url = "https://github.com/amplab/snap/archive/v1.0beta.18.tar.gz"
+
+ version('1.0beta.18', '41e595fffa482e9eda1c3f69fb5dedeb')
+ version('0.15', 'a7d87cc822f052665a347ab0aa84d4de', preferred=True)
+
+ depends_on('zlib')
+
+ conflicts('%gcc@6:')
+ conflicts('%cce')
+ conflicts('%clang')
+ conflicts('%intel')
+ conflicts('%nag')
+ conflicts('%pgi')
+ conflicts('%xl')
+ conflicts('%xl_r')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ if self.spec.satisfies('@1.0beta.18:'):
+ install('snap-aligner', prefix.bin)
+ install('SNAPCommand', prefix.bin)
+ else:
+ install('snap', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/snap/package.py b/var/spack/repos/builtin/packages/snap/package.py
new file mode 100644
index 0000000000..2db4dc7afa
--- /dev/null
+++ b/var/spack/repos/builtin/packages/snap/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Snap(MakefilePackage):
+ """SNAP serves as a proxy application to model
+ the performance of a modern discrete ordinates
+ neutral particle transport application.
+ SNAP may be considered an update to Sweep3D,
+ intended for hybrid computing architectures.
+ It is modeled off the Los Alamos National Laboratory code PARTISN."""
+
+ homepage = "https://github.com/lanl/SNAP"
+ url = ""
+ tags = ['proxy-app']
+
+ version('master', git='https://github.com/lanl/SNAP.git')
+
+ variant('openmp', default=False, description='Build with OpenMP support')
+ variant('opt', default=True, description='Build with debugging')
+ variant('mpi', default=True, description='Build with MPI support')
+
+ depends_on('mpi', when='+mpi')
+
+ build_directory = 'src'
+
+ def edit(self, spec, prefix):
+ with working_dir(self.build_directory):
+ makefile = FileFilter('Makefile')
+ if '~opt' in spec:
+ makefile.filter('OPT = yes', 'OPT = no')
+ if '~mpi' in spec:
+ makefile.filter('MPI = yes', 'MPI = no')
+ if '~openmp' in spec:
+ makefile.filter('OPENMP = yes', 'OPENMP = no')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('src/gsnap', prefix.bin)
+ install_tree('qasnap', prefix.qasnap)
+ install('README.md', prefix)
diff --git a/var/spack/repos/builtin/packages/snbone/package.py b/var/spack/repos/builtin/packages/snbone/package.py
new file mode 100644
index 0000000000..b4d125a77e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/snbone/package.py
@@ -0,0 +1,64 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Snbone(MakefilePackage):
+ """This application targets the primary computational solve burden of a SN,
+ continuous finite element based transport equation solver."""
+
+ homepage = "https://github.com/ANL-CESAR/"
+ url = "https://github.com/ANL-CESAR/SNbone.git"
+
+ version('develop', git='https://github.com/ANL-CESAR/SNbone.git')
+
+ tags = ['proxy-app']
+
+ depends_on('metis')
+
+ def build(self, spec, prefix):
+ working_dirs = ['src_c', 'src_fortran', 'src_makemesh',
+ 'src_processmesh']
+ for wdir in working_dirs:
+ with working_dir(wdir, create=False):
+ if self.compiler.name == 'gcc' and wdir == 'src_processmesh':
+ make('COMPILER=gfortran', 'METISLIB={0}'
+ .format(spec['metis'].prefix + '/lib/libmetis.so'))
+ elif self.compiler.name == 'intel':
+ make('COMPILER=intel', 'LDFLAGS=-lm')
+ else:
+ make('COMPILER=gfortran', 'LDFLAGS=-lm')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin.C)
+ mkdirp(prefix.bin.Fortran)
+ mkdirp(prefix.bin.MakeMesh)
+ mkdirp(prefix.bin.ProcessMesh)
+
+ install('src_c/SNaCFE.x', prefix.bin.C)
+ install('src_fortran/SNaCFE.x', prefix.bin.Fortran)
+ install('src_makemesh/makemesh.x', prefix.bin.MakeMesh)
+ install('src_processmesh/processmesh.x', prefix.bin.ProcessMesh)
diff --git a/var/spack/repos/builtin/packages/sniffles/package.py b/var/spack/repos/builtin/packages/sniffles/package.py
new file mode 100644
index 0000000000..9d890b03df
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sniffles/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Sniffles(CMakePackage):
+ """Structural variation caller using third generation sequencing."""
+
+ homepage = "https://github.com/fritzsedlazeck/Sniffles/wiki"
+ url = "https://github.com/fritzsedlazeck/Sniffles/archive/v1.0.5.tar.gz"
+
+ version('1.0.5', 'c2f2350d00418ba4d82c074e7f0b1832')
+
+ # the build process doesn't actually install anything, do it by hand
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ src = "bin/sniffles-core-{0}".format(spec.version.dotted)
+ binaries = ['sniffles', 'sniffles-debug']
+ for b in binaries:
+ install(join_path(src, b), join_path(prefix.bin, b))
diff --git a/var/spack/repos/builtin/packages/snptest/package.py b/var/spack/repos/builtin/packages/snptest/package.py
new file mode 100644
index 0000000000..a60a15d054
--- /dev/null
+++ b/var/spack/repos/builtin/packages/snptest/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Snptest(Package):
+ """SNPTEST is a program for the analysis of single SNP association in
+ genome-wide studies."""
+
+ homepage = "https://mathgen.stats.ox.ac.uk/genetics_software/snptest/snptest.html"
+ url = "http://www.well.ox.ac.uk/~gav/resources/snptest_v2.5.2_linux_x86_64_dynamic.tgz"
+
+ version('2.5.2', 'e3f2cc0351f260cf29369dc4f79a660a')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('snptest_v{0}'.format(self.version), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/soap2/package.py b/var/spack/repos/builtin/packages/soap2/package.py
new file mode 100644
index 0000000000..5853bdf1e6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/soap2/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Soap2(Package):
+ """Software for short oligonucleotide alignment."""
+
+ homepage = "http://soap.genomics.org.cn/soapaligner.html"
+ url = "http://soap.genomics.org.cn/down/soap2.21release.tar.gz"
+
+ version('2.21', '563b8b7235463b68413f9e841aa40779')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.share.man)
+ install('soap', prefix.bin)
+ install('2bwt-builder', prefix.bin)
+ install('soap.1', prefix.share.man)
+ install('soap.man', prefix.share.man)
diff --git a/var/spack/repos/builtin/packages/soapindel/package.py b/var/spack/repos/builtin/packages/soapindel/package.py
new file mode 100644
index 0000000000..6d22660786
--- /dev/null
+++ b/var/spack/repos/builtin/packages/soapindel/package.py
@@ -0,0 +1,53 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Soapindel(MakefilePackage):
+ """SOAPindel is focusing on calling indels from the next-generation
+ paired-end sequencing data."""
+
+ homepage = "http://soap.genomics.org.cn/soapindel.html"
+
+ version('2.1.7.17', '317ef494173969cdc6a8244dd87d06bd',
+ url='http://soap.genomics.org.cn/down/SOAPindel_20130918_2.1.7.17.zip')
+
+ depends_on('perl', type=('build', 'run'))
+
+ build_directory = 'indel_detection.release'
+
+ def install(self, spec, prefix):
+ with working_dir('indel_detection.release'):
+ install_tree('tools', prefix.tools)
+ mkdirp(prefix.lib)
+ install('affine_align.pm', prefix.lib)
+ install('indel_lib.pm', prefix.lib)
+ mkdirp(prefix.bin)
+ install('assemble_align', prefix.bin)
+ install('cluster_reads', prefix.bin)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PERL5LIB', self.prefix.lib)
+ run_env.prepend_path('PATH', self.prefix.tools)
diff --git a/var/spack/repos/builtin/packages/gbenchmark/package.py b/var/spack/repos/builtin/packages/soapsnp/package.py
index 591a5403f0..3d22a579bf 100644
--- a/var/spack/repos/builtin/packages/gbenchmark/package.py
+++ b/var/spack/repos/builtin/packages/soapsnp/package.py
@@ -25,26 +25,18 @@
from spack import *
-class Gbenchmark(CMakePackage):
- """A microbenchmark support library"""
+class Soapsnp(MakefilePackage):
+ """SOAPsnp uses a method based on Bayes' theorem (the reverse probability
+ model) to call consensus genotype by carefully considering the data
+ quality, alignment, and recurring experimental errors."""
- homepage = "https://github.com/google/benchmark"
- url = "https://github.com/google/benchmark/archive/v1.0.0.tar.gz"
+ homepage = "http://soap.genomics.org.cn/soapsnp.html"
+ url = "http://soap.genomics.org.cn/down/SOAPsnp-v1.03.tar.gz"
- version('1.1.0', '8c539bbe2a212618fa87b6c38fba087100b6e4ae')
- version('1.0.0', '4f778985dce02d2e63262e6f388a24b595254a93')
+ version('1.03', '8d69e196013657357ff840b611762ebc')
- def build_type(self):
- return "Release"
+ depends_on('boost')
- def patch(self):
- filter_file(
- r'add_cxx_compiler_flag..fstrict.aliasing.',
- r'##### add_cxx_compiler_flag(-fstrict-aliasing)',
- 'CMakeLists.txt'
- )
- filter_file(
- r'add_cxx_compiler_flag..Werror',
- r'##### add_cxx_compiler_flag(-Werror',
- 'CMakeLists.txt'
- )
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('soapsnp', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/somatic-sniper/package.py b/var/spack/repos/builtin/packages/somatic-sniper/package.py
new file mode 100644
index 0000000000..4d5a17bcce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/somatic-sniper/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class SomaticSniper(CMakePackage):
+ """A tool to call somatic single nucleotide variants."""
+
+ homepage = "http://gmt.genome.wustl.edu/packages/somatic-sniper"
+ url = "https://github.com/genome/somatic-sniper/archive/v1.0.5.0.tar.gz"
+
+ version('1.0.5.0', '64bc2b001c9a8089f2a05900f8a0abfe')
+
+ depends_on('ncurses')
+
+ parallel = False
diff --git a/var/spack/repos/builtin/packages/sortmerna/package.py b/var/spack/repos/builtin/packages/sortmerna/package.py
new file mode 100644
index 0000000000..fbf0f44ed8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sortmerna/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Sortmerna(CMakePackage):
+ """SortMeRNA is a program tool for filtering, mapping and OTU-picking NGS
+ reads in metatranscriptomic and metagenomic data"""
+
+ homepage = "https://github.com/biocore/sortmerna"
+ url = "https://github.com/biocore/sortmerna"
+
+ version('2017-07-13', git='https://github.com/biocore/sortmerna.git', commit='8bde6fa113a5d99a23ae81b48eeea6760e966094')
+
+ depends_on('zlib')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir(join_path('spack-build', 'src', 'indexdb')):
+ install('indexdb', prefix.bin)
+ with working_dir(join_path('spack-build', 'src', 'sortmerna')):
+ install('sortmerna', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/spades/package.py b/var/spack/repos/builtin/packages/spades/package.py
new file mode 100644
index 0000000000..443436d3ae
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spades/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Spades(CMakePackage):
+ """SPAdes - St. Petersburg genome assembler - is intended for both
+ standard isolates and single-cell MDA bacteria assemblies."""
+
+ homepage = "http://cab.spbu.ru/software/spades/"
+ url = "http://cab.spbu.ru/files/release3.10.1/SPAdes-3.10.1.tar.gz"
+
+ version('3.10.1', 'dcab7d145af81b59cc867562f27536c3')
+
+ depends_on('python', type=('build', 'run'))
+ depends_on('zlib')
+ depends_on('bzip2')
+
+ conflicts('%gcc@7.1.0:')
+
+ root_cmakelists_dir = 'src'
diff --git a/var/spack/repos/builtin/packages/spark/package.py b/var/spack/repos/builtin/packages/spark/package.py
index c625f6b82a..ddd825018e 100644
--- a/var/spack/repos/builtin/packages/spark/package.py
+++ b/var/spack/repos/builtin/packages/spark/package.py
@@ -39,7 +39,7 @@ class Spark(Package):
variant('hadoop', default=False,
description='Build with Hadoop')
- depends_on('jdk', type=('build', 'run'))
+ depends_on('java', type=('build', 'run'))
depends_on('hadoop', when='+hadoop', type=('build', 'run'))
version('2.1.0', '21d4471e78250775b1fa7c0e6c3a1326')
@@ -68,7 +68,7 @@ class Spark(Package):
@when('+hadoop')
def setup_environment(self, spack_env, run_env):
- env['JAVA_HOME'] = self.spec['jdk'].prefix
+ env['JAVA_HOME'] = self.spec['java'].prefix
# spack_env.set('JAVA_HOME', self.spec['jdk'].prefix)
hadoop = self.spec['hadoop'].command
diff --git a/var/spack/repos/builtin/packages/sparta/package.py b/var/spack/repos/builtin/packages/sparta/package.py
new file mode 100644
index 0000000000..361c0253e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sparta/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Sparta(Package):
+ """small RNA-PARE Target Analyzer (sPARTA) is a tool which utilizes
+ high-throughput sequencing to profile genome-wide cleavage
+ products."""
+
+ homepage = "https://github.com/atulkakrana/sPARTA.github"
+ url = "https://github.com/atulkakrana/sPARTA/archive/1.25.tar.gz"
+
+ version('1.25', '50fda66bf860f63ae8aef5e8fb997a75')
+
+ depends_on('bowtie2')
+ depends_on('python@3:', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('py-numpy', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('sPARTA.py', prefix.bin)
+ install('revFernoMap.py', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py
index 56062c1472..66b76e1be1 100644
--- a/var/spack/repos/builtin/packages/sqlite/package.py
+++ b/var/spack/repos/builtin/packages/sqlite/package.py
@@ -33,8 +33,12 @@ class Sqlite(AutotoolsPackage):
"""
homepage = "www.sqlite.org"
+ version('3.20.0', 'e262a28b73cc330e7e83520c8ce14e4d',
+ url='https://www.sqlite.org/2017/sqlite-autoconf-3200000.tar.gz')
version('3.18.0', 'a6687a8ae1f66abc8df739aeadecfd0c',
url='https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz')
+ version('3.8.10.2', 'a18bfc015cd49a1e7a961b7b77bc3b37',
+ url='https://www.sqlite.org/2015/sqlite-autoconf-3081002.tar.gz')
version('3.8.5', '0544ef6d7afd8ca797935ccc2685a9ed',
url='https://www.sqlite.org/2014/sqlite-autoconf-3080500.tar.gz')
diff --git a/var/spack/repos/builtin/packages/sspace-longread/package.py b/var/spack/repos/builtin/packages/sspace-longread/package.py
new file mode 100644
index 0000000000..9f55ecdc6e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sspace-longread/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class SspaceLongread(Package):
+ """SSPACE-LongRead is a stand-alone program for scaffolding pre-assembled
+ contigs using long reads
+
+ Note: A manual download is required for SSPACE-LongRead.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.baseclear.com/genomics/bioinformatics/basetools/SSPACE-longread"
+
+ version('1.1', '0bb5d8603d7ead4ff1596135a520cc26')
+
+ depends_on('perl', type=('build', 'run'))
+
+ def url_for_version(self, version):
+ return "file://{0}/40SSPACE-LongRead_v{1}.tar.gz".format(
+ os.getcwd(), version.dashed)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('blasr', prefix.bin)
+ install('SSPACE-LongRead.pl', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sspace-standard/package.py b/var/spack/repos/builtin/packages/sspace-standard/package.py
new file mode 100644
index 0000000000..7b1de9c1b3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sspace-standard/package.py
@@ -0,0 +1,56 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class SspaceStandard(Package):
+ """SSPACE standard is a stand-alone program for scaffolding pre-assembled
+ contigs using NGS paired-read data
+
+ Note: A manual download is required for SSPACE-Standard.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.baseclear.com/genomics/bioinformatics/basetools/SSPACE"
+ url = "file://{0}/41SSPACE-STANDARD-3.0_linux-x86_64.tar.gz".format(os.getcwd())
+
+ version('3.0', '7e171b4861b9d514e80aafc3d9cdf554')
+
+ depends_on('perl', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
+ install_tree('bowtie', prefix.bowtie)
+ install_tree('bwa', prefix.bwa)
+ install_tree('dotlib', prefix.dotlib)
+ install_tree('tools', prefix.tools)
+ install('SSPACE_Standard_v{0}.pl'.format(self.version), prefix)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('SSPACE_HOME', prefix)
+ run_env.prepend_path('PATH', prefix)
diff --git a/var/spack/repos/builtin/packages/stacks/package.py b/var/spack/repos/builtin/packages/stacks/package.py
new file mode 100644
index 0000000000..df0d486b0b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/stacks/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Stacks(AutotoolsPackage):
+ """Stacks is a software pipeline for building loci from short-read
+ sequences, such as those generated on the Illumina platform."""
+
+ homepage = "http://catchenlab.life.illinois.edu/stacks/"
+ url = "http://catchenlab.life.illinois.edu/stacks/source/stacks-1.46.tar.gz"
+
+ version('1.46', '18b0568a4bba44fb4e5be0eb7ee2c08d')
+
+ variant('sparsehash', default=True, description='Improve Stacks memory usage with SparseHash')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('sparsehash', when='+sparsehash')
+
+ def configure_args(self):
+ args = []
+ if '+sparsehash' in self.spec:
+ args.append('--enable-sparsehash')
+ else:
+ args.append('--disable-sparsehash')
+ return args
diff --git a/var/spack/repos/builtin/packages/stc/package.py b/var/spack/repos/builtin/packages/stc/package.py
index 7365943a14..2403767679 100644
--- a/var/spack/repos/builtin/packages/stc/package.py
+++ b/var/spack/repos/builtin/packages/stc/package.py
@@ -34,7 +34,7 @@ class Stc(AutotoolsPackage):
version('0.7.3', '6bf769f406f6c33d1c134521373718d3')
- depends_on('jdk')
+ depends_on('java')
depends_on('ant')
depends_on('turbine')
diff --git a/var/spack/repos/builtin/packages/stringtie/package.py b/var/spack/repos/builtin/packages/stringtie/package.py
new file mode 100644
index 0000000000..9baf545a4c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/stringtie/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Stringtie(MakefilePackage):
+ """StringTie is a fast and highly efficient assembler of RNA-Seq alignments
+ into potential transcripts."""
+
+ homepage = "https://ccb.jhu.edu/software/stringtie"
+ url = "https://github.com/gpertea/stringtie/archive/v1.3.3b.tar.gz"
+
+ version('1.3.3b', '11a43260b18e4272182380e922445d88')
+
+ depends_on('samtools')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('stringtie', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/structure/package.py b/var/spack/repos/builtin/packages/structure/package.py
new file mode 100644
index 0000000000..abe1ee76e8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/structure/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Structure(MakefilePackage):
+ """Structure is a free software package for using multi-locus genotype
+ data to investigate population structure."""
+
+ homepage = "http://web.stanford.edu/group/pritchardlab/structure.html"
+ url = "http://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v2.3.4/structure_kernel_source.tar.gz"
+
+ version('2.3.4', '4e0591678cdbfe79347d272b5dceeda1')
+
+ depends_on('jdk', type=('build', 'run'))
+
+ def url_for_version(self, version):
+ url = "http://web.stanford.edu/group/pritchardlab/structure_software/release_versions/v{0}/structure_kernel_source.tar.gz"
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('structure', prefix.bin)
+ install('mainparams', prefix.bin)
+ install('extraparams', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sublime-text/package.py b/var/spack/repos/builtin/packages/sublime-text/package.py
index 3d7fb65005..e7605b40be 100644
--- a/var/spack/repos/builtin/packages/sublime-text/package.py
+++ b/var/spack/repos/builtin/packages/sublime-text/package.py
@@ -49,7 +49,7 @@ class SublimeText(Package):
depends_on('libxau', type='run')
def url_for_version(self, version):
- if version.up_to(1) == '2':
+ if version[0] == 2:
return "https://download.sublimetext.com/Sublime%20Text%20{0}%20x64.tar.bz2".format(version)
else:
return "https://download.sublimetext.com/sublime_text_3_build_{0}_x64.tar.bz2".format(version)
diff --git a/var/spack/repos/builtin/packages/subread/package.py b/var/spack/repos/builtin/packages/subread/package.py
new file mode 100644
index 0000000000..b09e398602
--- /dev/null
+++ b/var/spack/repos/builtin/packages/subread/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import sys
+
+
+class Subread(MakefilePackage):
+ """The Subread software package is a tool kit for processing next-gen
+ sequencing data."""
+
+ homepage = "http://subread.sourceforge.net/"
+ url = "https://downloads.sourceforge.net/project/subread/subread-1.5.2/subread-1.5.2-source.tar.gz"
+
+ version('1.5.2', '817d2a46d87fcef885c8832475b8b247')
+
+ depends_on('zlib')
+
+ def build(self, spec, prefix):
+ plat = sys.platform
+ with working_dir('src'):
+ if plat.startswith('linux'):
+ make('-f', 'Makefile.Linux')
+ elif plat.startswith('darwin'):
+ make('-f', 'Makefile.MacOS')
+ else:
+ raise InstallError("The communication mechanism %s is not"
+ "supported" % plat)
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sumaclust/package.py b/var/spack/repos/builtin/packages/sumaclust/package.py
new file mode 100644
index 0000000000..b1d7a94c5a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sumaclust/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Sumaclust(MakefilePackage):
+ """Sumaclust aims to cluster sequences in a way that is fast and exact at
+ the same time."""
+
+ homepage = "https://git.metabarcoding.org/obitools/sumaclust"
+
+ version('1.0.20', '31c7583fbe2e3345d5fe3e9431d9b30c',
+ url="https://git.metabarcoding.org/obitools/sumaclust/uploads/69f757c42f2cd45212c587e87c75a00f/sumaclust_v1.0.20.tar.gz")
+
+ def build(self, spec, prefix):
+ make('CC={0}'.format(spack_cc))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('sumaclust', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index 98e2f8f009..b0ad1c1f42 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
import os
+import sys
class Sundials(Package):
@@ -33,21 +34,28 @@ class Sundials(Package):
homepage = "http://computation.llnl.gov/casc/sundials/"
url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz"
+ version('2.7.0', 'c304631b9bc82877d7b0e9f4d4fd94d3')
version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95')
- variant('mpi', default=True, description='Enable MPI support')
+ variant('mpi', default=True,
+ description='Enable MPI parallelism')
variant('lapack', default=True,
- description='Build with external BLAS/LAPACK libraries')
+ description='Use external BLAS/LAPACK libraries')
variant('klu', default=False,
- description='Build with SuiteSparse KLU libraries')
+ description='Enable KLU sparse, direct solver')
variant('superlu', default=False,
- description='Build with SuperLU_MT libraries')
- variant('openmp', default=False, description='Enable OpenMP support')
+ description='Enable SuperLU_MT sparse, direct solver')
+ variant('openmp', default=False,
+ description='Enable OpenMP parallelism')
variant('pthread', default=True,
- description='Enable POSIX threads support')
+ description='Enable Pthreads parallelism')
+ variant('hypre', default=False,
+ description='Enable Hypre parallel vector for MPI parallelism')
- depends_on('cmake', type='build')
+ depends_on('cmake', type='build')
depends_on('mpi', when='+mpi')
+ depends_on('mpi', when='@2.7:+hypre')
+ depends_on('hypre', when='@2.7:+hypre')
depends_on('blas', when='+lapack')
depends_on('lapack', when='+lapack')
depends_on('suite-sparse', when='+klu')
@@ -55,54 +63,72 @@ class Sundials(Package):
depends_on('superlu-mt+pthread', when='+superlu+pthread')
def install(self, spec, prefix):
+
+ def on_off(varstr):
+ return 'ON' if varstr in self.spec else 'OFF'
+
cmake_args = std_cmake_args[:]
+
+ fortran_flag = self.compiler.pic_flag
+ if spec.satisfies('%clang platform=darwin'):
+ mpif77 = Executable(self.spec['mpi'].mpif77)
+ libgfortran = LibraryList(mpif77('--print-file-name',
+ 'libgfortran.a', output=str))
+ fortran_flag += ' ' + libgfortran.ld_flags
+
cmake_args.extend([
'-DBUILD_SHARED_LIBS=ON',
- '-DCMAKE_C_FLAGS=-fPIC',
- '-DCMAKE_Fortran_FLAGS=-fPIC',
+ '-DCMAKE_C_FLAGS={0}'.format(self.compiler.pic_flag),
+ '-DCMAKE_Fortran_FLAGS={0}'.format(fortran_flag),
'-DEXAMPLES_ENABLE=ON',
'-DEXAMPLES_INSTALL=ON',
- '-DFCMIX_ENABLE=ON'
+ '-DFCMIX_ENABLE=ON',
+ '-DMPI_ENABLE=%s' % on_off('+mpi'),
+ '-DLAPACK_ENABLE=%s' % on_off('+lapack'),
+ '-DKLU_ENABLE=%s' % on_off('+klu'),
+ '-DHYPRE_ENABLE=%s' % on_off('+hypre'),
+ '-DSUPERLUMT_ENABLE=%s' % on_off('+superlu'),
+ '-DOPENMP_ENABLE=%s' % on_off('+openmp'),
+ '-DPTHREAD_ENABLE=%s' % on_off('+pthread')
])
# MPI support
if '+mpi' in spec:
cmake_args.extend([
- '-DMPI_ENABLE=ON',
'-DMPI_MPICC={0}'.format(spec['mpi'].mpicc),
'-DMPI_MPIF77={0}'.format(spec['mpi'].mpif77)
])
- else:
- cmake_args.append('-DMPI_ENABLE=OFF')
+
+ # Building with Hypre
+ if '+hypre' in spec and spec.satisfies('@2.7:'):
+ cmake_args.extend([
+ '-DHYPRE_INCLUDE_DIR={0}'.format(
+ spec['hypre'].prefix.include),
+ '-DHYPRE_LIBRARY_DIR={0}'.format(
+ spec['hypre'].prefix.lib)
+ ])
# Building with LAPACK and BLAS
if '+lapack' in spec:
cmake_args.extend([
- '-DLAPACK_ENABLE=ON',
'-DLAPACK_LIBRARIES={0}'.format(
(spec['lapack'].libs +
spec['blas'].libs).joined(';')
)
])
- else:
- cmake_args.append('-DLAPACK_ENABLE=OFF')
# Building with KLU
if '+klu' in spec:
cmake_args.extend([
- '-DKLU_ENABLE=ON',
'-DKLU_INCLUDE_DIR={0}'.format(
spec['suite-sparse'].prefix.include),
'-DKLU_LIBRARY_DIR={0}'.format(
spec['suite-sparse'].prefix.lib)
])
- else:
- cmake_args.append('-DKLU_ENABLE=OFF')
# Building with SuperLU_MT
if '+superlu' in spec:
cmake_args.extend([
- '-DSUPERLUMT_ENABLE=ON',
'-DSUPERLUMT_INCLUDE_DIR={0}'.format(
spec['superlu-mt'].prefix.include),
'-DSUPERLUMT_LIBRARY_DIR={0}'.format(
@@ -116,20 +142,6 @@ class Sundials(Package):
msg = 'You must choose either +openmp or +pthread when '
msg += 'building with SuperLU_MT'
raise RuntimeError(msg)
- else:
- cmake_args.append('-DSUPERLUMT_ENABLE=OFF')
-
- # OpenMP support
- if '+openmp' in spec:
- cmake_args.append('-DOPENMP_ENABLE=ON')
- else:
- cmake_args.append('-DOPENMP_ENABLE=OFF')
-
- # POSIX threads support
- if '+pthread' in spec:
- cmake_args.append('-DPTHREAD_ENABLE=ON')
- else:
- cmake_args.append('-DPTHREAD_ENABLE=OFF')
with working_dir('build', create=True):
cmake('..', *cmake_args)
@@ -137,6 +149,9 @@ class Sundials(Package):
make()
make('install')
+ if (sys.platform == 'darwin'):
+ fix_darwin_install_name(prefix.lib)
+
install('LICENSE', prefix)
self.filter_compilers()
diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py
index 7cdf4315fc..c7ef1e3bae 100644
--- a/var/spack/repos/builtin/packages/superlu/package.py
+++ b/var/spack/repos/builtin/packages/superlu/package.py
@@ -38,7 +38,7 @@ class Superlu(Package):
version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447')
version('4.3', 'b72c6309f25e9660133007b82621ba7c')
- variant('fpic', default=True,
+ variant('pic', default=True,
description='Build with position independent code')
depends_on('cmake', when='@5.2.1:', type='build')
@@ -51,7 +51,7 @@ class Superlu(Package):
'-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].libs.joined())
]
- if '+fpic' in spec:
+ if '+pic' in spec:
cmake_args.extend([
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON'
])
@@ -89,7 +89,7 @@ class Superlu(Package):
'CDEFS = -DAdd_'
])
- if '+fpic' in spec:
+ if '+pic' in spec:
config.extend([
# Use these lines instead when pic_flag capability arrives
'CFLAGS = -O3 {0}'.format(self.compiler.pic_flag),
diff --git a/var/spack/repos/builtin/packages/swarm/package.py b/var/spack/repos/builtin/packages/swarm/package.py
new file mode 100644
index 0000000000..b752f52381
--- /dev/null
+++ b/var/spack/repos/builtin/packages/swarm/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Swarm(MakefilePackage):
+ """A robust and fast clustering method for amplicon-based studies."""
+
+ homepage = "https://github.com/torognes/swarm"
+ url = "https://github.com/torognes/swarm/archive/v2.1.13.tar.gz"
+
+ version('2.1.13', 'ab6aff0ba5d20a53b9f13f8f3d85839f')
+
+ build_directory = 'src'
+
+ def install(self, spec, prefix):
+ install_tree('bin', prefix.bin)
+ install_tree('scripts', prefix.scripts)
+ install_tree('man', prefix.share.man)
diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py
index 50dd335ac7..a36cfc70b2 100644
--- a/var/spack/repos/builtin/packages/symengine/package.py
+++ b/var/spack/repos/builtin/packages/symengine/package.py
@@ -55,6 +55,9 @@ class Symengine(CMakePackage):
description='Enable thread safety option')
variant('shared', default=True,
description='Enables the build of shared libraries')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
# NOTE: mpir is a drop-in replacement for gmp
# NOTE: [mpc,mpfr,flint,piranha] could also be built against mpir
@@ -66,10 +69,6 @@ class Symengine(CMakePackage):
depends_on('flint', when='+flint~boostmp')
depends_on('piranha', when='+piranha~flint~boostmp')
- def build_type(self):
- # CMAKE_BUILD_TYPE should be Debug | Release
- return 'Release'
-
def cmake_args(self):
spec = self.spec
options = []
@@ -77,7 +76,6 @@ class Symengine(CMakePackage):
# See https://github.com/symengine/symengine/blob/master/README.md
# for build options
options.extend([
- '-DCMAKE_BUILD_TYPE=Release',
'-DWITH_SYMENGINE_RCP:BOOL=ON',
'-DWITH_SYMENGINE_THREAD_SAFE:BOOL=%s' % (
'ON' if ('+thread_safe' or '+openmp') in spec else 'OFF'),
diff --git a/var/spack/repos/builtin/packages/sympol/package.py b/var/spack/repos/builtin/packages/sympol/package.py
index 6385bd09da..3e129e68eb 100644
--- a/var/spack/repos/builtin/packages/sympol/package.py
+++ b/var/spack/repos/builtin/packages/sympol/package.py
@@ -26,14 +26,14 @@
from spack import *
-class Sympol(Package):
+class Sympol(CMakePackage):
"""SymPol is a C++ tool to work with symmetric polyhedra"""
homepage = "http://www.math.uni-rostock.de/~rehn/software/sympol.html"
url = "http://www.math.uni-rostock.de/~rehn/software/sympol-0.1.8.tar.gz"
version('0.1.8', '7cba1997f8532c754cb7259bf70caacb')
- depends_on("cmake", type='build')
+ depends_on("cmake@2.6:", type="build")
depends_on("bliss")
depends_on("boost")
@@ -41,8 +41,3 @@ class Sympol(Package):
depends_on("lrslib")
patch("lrs_mp_close.patch")
-
- def install(self, spec, prefix):
- cmake(".", *std_cmake_args)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py
index 36bcdf1cfc..d914b0226d 100644
--- a/var/spack/repos/builtin/packages/sz/package.py
+++ b/var/spack/repos/builtin/packages/sz/package.py
@@ -30,11 +30,11 @@ class Sz(AutotoolsPackage):
"""Error-bounded Lossy Compressor for HPC Data."""
homepage = "https://collab.cels.anl.gov/display/ESR/SZ"
- url = "http://www.mcs.anl.gov/~shdi/download/sz-1.4.9-beta.tar.gz"
+ url = "https://github.com/disheng222/SZ/archive/v1.4.9.2.tar.gz"
version('develop', git='https://github.com/disheng222/SZ.git',
branch='master')
- version('1.4.9-beta', '8a00cddc39780c18d766215f69713f82')
+ version('1.4.9.2', '028ce90165b7a4c4051d4c0189f193c0')
variant('fortran', default=False,
description='Enable fortran compilation')
diff --git a/var/spack/repos/builtin/packages/tabix/package.py b/var/spack/repos/builtin/packages/tabix/package.py
new file mode 100644
index 0000000000..1e54dd4716
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tabix/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tabix(MakefilePackage):
+ """Generic indexer for TAB-delimited genome position files"""
+
+ homepage = "https://github.com/samtools/tabix"
+ url = "https://github.com/samtools/tabix"
+
+ version('2013-12-16', git='https://github.com/samtools/tabix.git', commit='1ae158ac79b459f5feeed7490c67519b14ce9f35')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('python', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.share.man.man1)
+ install('tabix', prefix.bin)
+ install('bgzip', prefix.bin)
+ install('tabix.py', prefix.bin)
+ install('tabix.1', prefix.share.man.man1)
+ install('tabix.tex', prefix.share)
+ install('TabixReader.java', prefix.bin)
+ install('libtabix.a', prefix.lib)
+ install_tree('perl', prefix.perl)
+ install_tree('python', prefix.python)
diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py
index ac34bedd93..11cc280a9a 100644
--- a/var/spack/repos/builtin/packages/task/package.py
+++ b/var/spack/repos/builtin/packages/task/package.py
@@ -25,22 +25,15 @@
from spack import *
-class Task(Package):
+class Task(CMakePackage):
"""Feature-rich console based todo list manager"""
homepage = "http://www.taskwarrior.org"
url = "http://taskwarrior.org/download/task-2.4.4.tar.gz"
version('2.4.4', '517450c4a23a5842df3e9905b38801b3')
- depends_on('cmake', type='build')
- depends_on("gnutls")
- depends_on("libuuid")
- # depends_on("gcc@4.8:")
+ depends_on('cmake@2.8:', type='build')
+ depends_on('gnutls')
+ depends_on('libuuid')
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('-DCMAKE_BUILD_TYPE=release',
- '..',
- *std_cmake_args)
- make()
- make("install")
+ conflicts('%gcc@:4.7')
diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py
index b14a507424..9a9e250011 100644
--- a/var/spack/repos/builtin/packages/taskd/package.py
+++ b/var/spack/repos/builtin/packages/taskd/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Taskd(Package):
+class Taskd(CMakePackage):
"""TaskWarrior task synchronization daemon"""
homepage = "http://www.taskwarrior.org"
@@ -33,14 +33,8 @@ class Taskd(Package):
version('1.1.0', 'ac855828c16f199bdbc45fbc227388d0')
- depends_on('cmake', type='build')
- depends_on("libuuid")
- depends_on("gnutls")
+ depends_on('libuuid')
+ depends_on('gnutls')
+ depends_on('cmake@2.8:', type='build')
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('-DCMAKE_BUILD_TYPE=release',
- '..',
- *std_cmake_args)
- make()
- make("install")
+ conflicts('%gcc@:4.7')
diff --git a/var/spack/repos/builtin/packages/tcoffee/package.py b/var/spack/repos/builtin/packages/tcoffee/package.py
new file mode 100644
index 0000000000..0f954b42c7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tcoffee/package.py
@@ -0,0 +1,57 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tcoffee(MakefilePackage):
+ """T-Coffee is a multiple sequence alignment program."""
+
+ homepage = "http://www.tcoffee.org/"
+ url = "https://github.com/cbcrg/tcoffee"
+
+ version('2017-08-17', git='https://github.com/cbcrg/tcoffee.git', commit='f389b558e91d0f82e7db934d9a79ce285f853a71')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('blast-plus')
+ depends_on('dialign-tx')
+ depends_on('viennarna')
+ depends_on('clustalw')
+ depends_on('tmalign')
+ depends_on('muscle')
+ depends_on('mafft')
+ depends_on('pcma')
+ depends_on('poamsa')
+ depends_on('probconsrna')
+
+ build_directory = 'compile'
+
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make('t_coffee')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir(self.build_directory):
+ install('t_coffee', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/tealeaf/package.py b/var/spack/repos/builtin/packages/tealeaf/package.py
new file mode 100644
index 0000000000..e8d60b4448
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tealeaf/package.py
@@ -0,0 +1,77 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+import glob
+
+from spack import *
+
+
+class Tealeaf(MakefilePackage):
+ """Proxy Application. TeaLeaf is a mini-app that solves
+ the linear heat conduction equation on a spatially decomposed
+ regularly grid using a 5 point stencil with implicit solvers.
+ """
+
+ homepage = "http://uk-mac.github.io/TeaLeaf/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/TeaLeaf/TeaLeaf-1.0.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('1.0', '02a907281ad2d09e70ca0a17551c6d79')
+
+ depends_on('mpi')
+
+ @property
+ def build_targets(self):
+ targets = [
+ '--directory=TeaLeaf_ref',
+ 'MPI_COMPILER={0}'.format(self.spec['mpi'].mpifc),
+ 'C_MPI_COMPILER={0}'.format(self.spec['mpi'].mpicc),
+ ]
+
+ if '%gcc' in self.spec:
+ targets.append('COMPILER=GNU')
+ elif '%cce' in self.spec:
+ targets.append('COMPILER=CRAY')
+ elif '%intel' in self.spec:
+ targets.append('COMPILER=INTEL')
+ elif '%pgi' in self.spec:
+ targets.append('COMPILER=PGI')
+ elif '%xl' in self.spec:
+ targets.append('COMPILER=XL')
+
+ return targets
+
+ def install(self, spec, prefix):
+ # Manual Installation
+ mkdirp(prefix.bin)
+ mkdirp(prefix.doc.tests)
+
+ install('README.md', prefix.doc)
+ install('TeaLeaf_ref/tea_leaf', prefix.bin)
+ install('TeaLeaf_ref/tea.in', prefix.bin)
+
+ for f in glob.glob('TeaLeaf_ref/*.in'):
+ install(f, prefix.doc.tests)
diff --git a/var/spack/repos/builtin/packages/tethex/package.py b/var/spack/repos/builtin/packages/tethex/package.py
index d5d4ba891b..9429678661 100644
--- a/var/spack/repos/builtin/packages/tethex/package.py
+++ b/var/spack/repos/builtin/packages/tethex/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Tethex(Package):
+class Tethex(CMakePackage):
"""Tethex is designed to convert triangular (in 2D) or tetrahedral (in 3D)
Gmsh's mesh to quadrilateral or hexahedral one respectively. These meshes
can be used in software packages working with hexahedrals only - for
@@ -38,12 +38,13 @@ class Tethex(Package):
version('0.0.7', '6c9e4a18a6637deb4400c6d77ec03184')
version('develop', git='https://github.com/martemyev/tethex.git')
- depends_on('cmake', type='build')
+ variant('build_type', default='Release',
+ description='The build type to build',
+ values=('Debug', 'Release'))
- def install(self, spec, prefix):
- cmake('.')
- make()
+ depends_on('cmake@2.8:', type='build')
+ def install(self, spec, prefix):
# install by hand
mkdirp(prefix.bin)
install('tethex', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py
index 306f8d9de5..c91d0096f3 100644
--- a/var/spack/repos/builtin/packages/thrift/package.py
+++ b/var/spack/repos/builtin/packages/thrift/package.py
@@ -38,6 +38,8 @@ class Thrift(Package):
homepage = "http://thrift.apache.org"
url = "http://apache.mirrors.ionfish.org/thrift/0.9.2/thrift-0.9.2.tar.gz"
+ version('0.10.0', '795c5dd192e310ffff38cfd9430d6b29')
+ version('0.9.3', '88d667a8ae870d5adeca8cb7d6795442')
version('0.9.2', '89f63cc4d0100912f4a1f8a9dee63678')
# Currently only support for c-family and python
@@ -46,7 +48,7 @@ class Thrift(Package):
variant('python', default=True,
description="Build support for python")
- depends_on('jdk')
+ depends_on('java')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
@@ -63,7 +65,7 @@ class Thrift(Package):
def install(self, spec, prefix):
env['PY_PREFIX'] = prefix
- env['JAVA_HOME'] = spec['jdk'].prefix
+ env['JAVA_HOME'] = spec['java'].prefix
# configure options
options = ['--prefix=%s' % prefix]
diff --git a/var/spack/repos/builtin/packages/tig/package.py b/var/spack/repos/builtin/packages/tig/package.py
new file mode 100644
index 0000000000..da8482a21a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tig/package.py
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tig(AutotoolsPackage):
+ """Text-mode interface for git"""
+
+ homepage = "https://jonas.github.io/tig/"
+ url = "https://github.com/jonas/tig/releases/download/tig-2.2.2/tig-2.2.2.tar.gz"
+
+ version('2.2.2', '3b4a9f0fd8d18c1039863e6c4ace6e46')
+
+ depends_on('ncurses')
diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py
index 69ea8a6a00..ab25ba1d5b 100644
--- a/var/spack/repos/builtin/packages/tk/package.py
+++ b/var/spack/repos/builtin/packages/tk/package.py
@@ -53,3 +53,8 @@ class Tk(AutotoolsPackage):
def configure_args(self):
spec = self.spec
return ['--with-tcl={0}'.format(spec['tcl'].prefix.lib)]
+
+ @run_after('install')
+ def symlink_wish(self):
+ with working_dir(self.prefix.bin):
+ symlink('wish{0}'.format(self.version.up_to(2)), 'wish')
diff --git a/var/spack/repos/builtin/packages/tmalign/package.py b/var/spack/repos/builtin/packages/tmalign/package.py
new file mode 100644
index 0000000000..5f08bb27fc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tmalign/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tmalign(Package):
+ """TM-align is an algorithm for sequence-order independent protein
+ structure comparisons."""
+
+ homepage = "http://zhanglab.ccmb.med.umich.edu/TM-align"
+ url = "http://zhanglab.ccmb.med.umich.edu/TM-align/TM-align-C/TMalignc.tar.gz"
+
+ version('2016-05-25', 'c1027e4b65c07d1c5df9717de7417118')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('TMalign', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py
index 63d6c943b8..a3a8e5ad89 100644
--- a/var/spack/repos/builtin/packages/tmux/package.py
+++ b/var/spack/repos/builtin/packages/tmux/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Tmux(Package):
+class Tmux(AutotoolsPackage):
"""Tmux is a terminal multiplexer.
What is a terminal multiplexer? It lets you switch easily between several
@@ -45,15 +45,5 @@ class Tmux(Package):
depends_on('libevent')
depends_on('ncurses')
- def install(self, spec, prefix):
- pkg_config_path = ':'.join([
- spec['libevent'].prefix,
- spec['ncurses'].prefix
- ])
-
- configure(
- "--prefix=%s" % prefix,
- "PKG_CONFIG_PATH=%s" % pkg_config_path)
-
- make()
- make("install")
+ def configure_args(self):
+ return ['LIBTINFO_LIBS=-lncurses']
diff --git a/var/spack/repos/builtin/packages/tophat/package.py b/var/spack/repos/builtin/packages/tophat/package.py
new file mode 100644
index 0000000000..116db56b32
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tophat/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tophat(AutotoolsPackage):
+ """Spliced read mapper for RNA-Seq."""
+
+ homepage = "http://ccb.jhu.edu/software/tophat/index.shtml"
+ url = "https://github.com/infphilo/tophat/archive/v2.1.1.tar.gz"
+
+ version('2.1.1', 'ffd18de2f893a95eb7e9d0c5283d241f')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+
+ depends_on('boost@1.47:')
+ depends_on('bowtie2', type='run')
+
+ parallel = False
+
+ def configure_args(self):
+ return ["--with-boost={0}".format(self.spec['boost'].prefix)]
diff --git a/var/spack/repos/builtin/packages/tppred/package.py b/var/spack/repos/builtin/packages/tppred/package.py
new file mode 100644
index 0000000000..919e15c3b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tppred/package.py
@@ -0,0 +1,54 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Tppred(Package):
+ """TPPRED is a software package for the prediction of mitochondrial
+ targeting peptides from protein primary sequence."""
+
+ homepage = "https://tppred2.biocomp.unibo.it/tppred2/default/software"
+ url = "http://biocomp.unibo.it/savojard/tppred2.tar.gz"
+
+ version('2.0', 'cd848569f6a8aa51d18fbe55fe45d624')
+
+ depends_on('python@2.7:2.999', type='run')
+ depends_on('py-scikit-learn@0.13.1', type='run')
+ depends_on('emboss')
+
+ def url_for_version(self, version):
+ url = 'http://biocomp.unibo.it/savojard/tppred{0}.tar.gz'
+ return url.format(version.up_to(1))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ with working_dir('bin'):
+ install('tppred2.py', prefix.bin)
+ install_tree('data', prefix.data)
+ install_tree('example', prefix.example)
+ install_tree('tppred2modules', prefix.modules)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('TPPRED_ROOT', prefix)
diff --git a/var/spack/repos/builtin/packages/transabyss/package.py b/var/spack/repos/builtin/packages/transabyss/package.py
new file mode 100644
index 0000000000..10ee508899
--- /dev/null
+++ b/var/spack/repos/builtin/packages/transabyss/package.py
@@ -0,0 +1,45 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Transabyss(Package):
+ """De novo assembly of RNAseq data using ABySS"""
+
+ homepage = "http://www.bcgsc.ca/platform/bioinfo/software/trans-abyss"
+ url = "http://www.bcgsc.ca/platform/bioinfo/software/trans-abyss/releases/1.5.5/transabyss-1.5.5.zip"
+
+ version('1.5.5', '9ebe0394243006f167135cac4df9bee6')
+
+ depends_on('abyss@1.5.2')
+ depends_on('python@2.7.6:', type=('build', 'run'))
+ depends_on('py-igraph@0.7.0:', type=('build', 'run'))
+ depends_on('blat')
+
+ def install(self, spec, prefix):
+ install('transabyss', prefix)
+ install('transabyss-merge', prefix)
+ install_tree('bin', prefix.bin)
+ install_tree('utilities', prefix.utilities)
diff --git a/var/spack/repos/builtin/packages/transdecoder/package.py b/var/spack/repos/builtin/packages/transdecoder/package.py
new file mode 100644
index 0000000000..4c23afbf2a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/transdecoder/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Transdecoder(MakefilePackage):
+ """TransDecoder identifies candidate coding regions within transcript
+ sequences, such as those generated by de novo RNA-Seq transcript
+ assembly using Trinity, or constructed based on RNA-Seq alignments to
+ the genome using Tophat and Cufflinks."""
+
+ homepage = "http://transdecoder.github.io/"
+ url = "https://github.com/TransDecoder/TransDecoder/archive/v3.0.1.tar.gz"
+
+ version('3.0.1', 'f62b86a15fcb78b1dada9f80cc25f300')
+
+ depends_on('perl', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('TransDecoder.LongOrfs', prefix)
+ install('TransDecoder.Predict', prefix)
+ install_tree('PerlLib', prefix.PerlLib)
+ install_tree('util', prefix.util)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.prepend_path('PATH', prefix.util.bin)
+ run_env.prepend_path('PATH', prefix)
diff --git a/var/spack/repos/builtin/packages/transposome/package.py b/var/spack/repos/builtin/packages/transposome/package.py
new file mode 100644
index 0000000000..01499290cf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/transposome/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Transposome(PerlPackage):
+ """A toolkit for annotation of transposable element families from
+ unassembled sequence reads."""
+
+ homepage = "https://sestaton.github.io/Transposome/"
+ url = "https://github.com/sestaton/Transposome/archive/v0.11.2.tar.gz"
+
+ version('0.11.2', '157c1fc090b0aa30050d03df885dcde0')
+
+ depends_on('blast-plus')
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 161b2ed52a..a0d0ccfa3c 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -93,8 +93,6 @@ class Trilinos(CMakePackage):
description='Build python wrappers')
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
variant('boost', default=True,
description='Compile with Boost')
variant('tpetra', default=True,
@@ -123,6 +121,8 @@ class Trilinos(CMakePackage):
description='Compile with Amesos')
variant('amesos2', default=True,
description='Compile with Amesos2')
+ variant('anasazi', default=True,
+ description='Compile with Anasazi')
variant('ifpack', default=True,
description='Compile with Ifpack')
variant('ifpack2', default=True,
@@ -147,16 +147,37 @@ class Trilinos(CMakePackage):
description='Compile with explicit instantiation for complex')
variant('dtk', default=False,
description='Enable DataTransferKit')
+ variant('fortrilinos', default=False,
+ description='Enable ForTrilinos')
+ variant('openmp', default=False,
+ description='Enable OpenMP')
+
resource(name='dtk',
git='https://github.com/ornl-cees/DataTransferKit',
tag='master',
placement='DataTransferKit',
when='+dtk')
+ resource(name='fortrilinos',
+ git='https://github.com/trilinos/ForTrilinos',
+ tag='develop',
+ placement='packages/ForTrilinos',
+ when='+fortrilinos')
+
conflicts('+dtk', when='~tpetra')
+ conflicts('+fortrilinos', when='~fortran')
+ conflicts('+fortrilinos', when='@:99')
+ conflicts('+fortrilinos', when='@master')
+ # Can only use one type of SuperLU
+ conflicts('+superlu-dist', when='+superlu')
+ # For Trilinos v11 we need to force SuperLUDist=OFF, since only the
+ # deprecated SuperLUDist v3.3 together with an Amesos patch is working.
+ conflicts('+superlu-dist', when='@11.4.1:11.14.3')
+ # PnetCDF was only added after v12.10.1
+ conflicts('+pnetcdf', when='@0:12.10.1')
# ###################### Dependencies ##########################
- # Everything should be compiled with -fpic
+ # Everything should be compiled position independent (-fpic)
depends_on('blas')
depends_on('lapack')
depends_on('boost', when='+boost')
@@ -169,9 +190,9 @@ class Trilinos(CMakePackage):
# MPI related dependencies
depends_on('mpi')
- depends_on('netcdf+mpi')
- depends_on('parallel-netcdf', when="+pnetcdf@master")
- depends_on('parallel-netcdf', when="+pnetcdf@12.10.2:")
+ depends_on('netcdf+mpi', when="~pnetcdf")
+ depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@master")
+ depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@12.10.2:")
depends_on('parmetis', when='+metis')
# Trilinos' Tribits config system is limited which makes it very tricky to
# link Amesos with static MUMPS, see
@@ -182,11 +203,11 @@ class Trilinos(CMakePackage):
# work at the end. But let's avoid all this by simply using shared libs
depends_on('mumps@5.0:+mpi+shared', when='+mumps')
depends_on('scalapack', when='+mumps')
+ depends_on('superlu-dist', when='+superlu-dist')
depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist')
- depends_on('superlu-dist', when='@12.6.2:+superlu-dist')
depends_on('superlu-dist@develop', when='@develop+superlu-dist')
depends_on('superlu-dist@xsdk-0.2.0', when='@xsdk-0.2.0+superlu-dist')
- depends_on('superlu+fpic@4.3', when='+superlu')
+ depends_on('superlu+pic@4.3', when='+superlu')
# Trilinos can not be built against 64bit int hypre
depends_on('hypre~internal-superlu~int64', when='+hypre')
depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre')
@@ -204,23 +225,8 @@ class Trilinos(CMakePackage):
url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-{0}.tar.gz"
return url.format(version.dashed)
- # check that the combination of variants makes sense
- def variants_check(self):
- if ('+superlu-dist' in self.spec and
- self.spec.satisfies('@11.14.1:11.14.3')):
- # For Trilinos v11 we need to force SuperLUDist=OFF, since only the
- # deprecated SuperLUDist v3.3 together with an Amesos patch is
- # working.
- raise RuntimeError('The superlu-dist variant can only be used' +
- ' with Trilinos @12.0.1:')
- if '+superlu-dist' in self.spec and '+superlu' in self.spec:
- # Only choose one type of superlu
- raise RuntimeError('The superlu-dist and superlu variant' +
- ' cannot be used together')
-
def cmake_args(self):
spec = self.spec
- self.variants_check()
cxx_flags = []
options = []
@@ -233,8 +239,6 @@ class Trilinos(CMakePackage):
'-DTrilinos_ENABLE_TESTS:BOOL=OFF',
'-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF',
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
- '-DCMAKE_BUILD_TYPE:STRING=%s' % (
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'),
@@ -293,6 +297,8 @@ class Trilinos(CMakePackage):
'ON' if '+gtest' in spec else 'OFF'),
'-DTrilinos_ENABLE_Teuchos:BOOL=%s' % (
'ON' if '+teuchos' in spec else 'OFF'),
+ '-DTrilinos_ENABLE_Anasazi:BOOL=%s' % (
+ 'ON' if '+anasazi' in spec else 'OFF'),
])
if '+xsdkflags' in spec:
@@ -330,7 +336,8 @@ class Trilinos(CMakePackage):
'-DTrilinos_ENABLE_SEACASEpu:BOOL=ON',
'-DTrilinos_ENABLE_SEACASExodiff:BOOL=ON',
'-DTrilinos_ENABLE_SEACASNemspread:BOOL=ON',
- '-DTrilinos_ENABLE_SEACASNemslice:BOOL=ON'
+ '-DTrilinos_ENABLE_SEACASNemslice:BOOL=ON',
+ '-DTrilinos_ENABLE_SEACASIoss:BOOL=ON'
])
else:
options.extend([
@@ -511,6 +518,17 @@ class Trilinos(CMakePackage):
# ################# Miscellaneous Stuff ######################
+ # OpenMP
+ if '+openmp' in spec:
+ options.extend([
+ '-DTrilinos_ENABLE_OpenMP:BOOL=ON',
+ '-DKokkos_ENABLE_OpenMP:BOOL=ON'
+ ])
+ if '+tpetra' in spec:
+ options.extend([
+ '-DTpetra_INST_OPENMP:BOOL=ON'
+ ])
+
# Fortran lib
if '+fortran' in spec:
if spec.satisfies('%gcc') or spec.satisfies('%clang'):
diff --git a/var/spack/repos/builtin/packages/trimgalore/package.py b/var/spack/repos/builtin/packages/trimgalore/package.py
new file mode 100644
index 0000000000..9dd8be11e9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/trimgalore/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Trimgalore(Package):
+ """Trim Galore! is a wrapper around Cutadapt and FastQC to consistently
+ apply adapter and quality trimming to FastQ files, with extra
+ functionality for RRBS data."""
+
+ homepage = "https://github.com/FelixKrueger/TrimGalore"
+ url = "https://github.com/FelixKrueger/TrimGalore/archive/0.4.4.tar.gz"
+
+ version('0.4.4', 'aae1b807b48e38bae7074470203997bb')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('py-cutadapt', type=('build', 'run'))
+ depends_on('fastqc')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('trim_galore', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/trimmomatic/package.py b/var/spack/repos/builtin/packages/trimmomatic/package.py
index 54c80d2ba0..42f0e68973 100644
--- a/var/spack/repos/builtin/packages/trimmomatic/package.py
+++ b/var/spack/repos/builtin/packages/trimmomatic/package.py
@@ -39,7 +39,7 @@ class Trimmomatic(Package):
version('0.36', '8549130d86b6f0382b1a71a2eb45de39')
version('0.33', '924fc8eb38fdff71740a0e05d32d6a2b')
- depends_on('jdk@8:', type='run')
+ depends_on('java@8:', type='run')
def install(self, spec, prefix):
mkdirp(prefix.bin)
@@ -58,7 +58,7 @@ class Trimmomatic(Package):
# Munge the helper script to explicitly point to java and the
# jar file.
- java = join_path(self.spec['jdk'].prefix, 'bin', 'java')
+ java = join_path(self.spec['java'].prefix, 'bin', 'java')
kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
filter_file('^java', java, script, **kwargs)
filter_file('trimmomatic.jar', join_path(prefix.bin, jar_file),
diff --git a/var/spack/repos/builtin/packages/udunits2/package.py b/var/spack/repos/builtin/packages/udunits2/package.py
index ad16fb04fb..2658674992 100644
--- a/var/spack/repos/builtin/packages/udunits2/package.py
+++ b/var/spack/repos/builtin/packages/udunits2/package.py
@@ -29,7 +29,7 @@ class Udunits2(AutotoolsPackage):
"""Automated units conversion"""
homepage = "http://www.unidata.ucar.edu/software/udunits"
- url = "ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.24.tar.gz"
+ url = "https://www.gfd-dennou.org/arch/ucar/unidata/pub/udunits/udunits-2.2.24.tar.gz"
version('2.2.24', '898b90dc1890f172c493406d0f26f531')
version('2.2.23', '9f66006accecd621a4c3eda4ba9fa7c9')
diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py
index df7c80b2bd..a1ca765a56 100644
--- a/var/spack/repos/builtin/packages/unixodbc/package.py
+++ b/var/spack/repos/builtin/packages/unixodbc/package.py
@@ -34,3 +34,6 @@ class Unixodbc(AutotoolsPackage):
url = "http://www.unixodbc.org/unixODBC-2.3.4.tar.gz"
version('2.3.4', 'bd25d261ca1808c947cb687e2034be81')
+
+ depends_on('libiconv')
+ depends_on('libtool')
diff --git a/var/spack/repos/builtin/packages/usearch/package.py b/var/spack/repos/builtin/packages/usearch/package.py
new file mode 100644
index 0000000000..87ea6798ca
--- /dev/null
+++ b/var/spack/repos/builtin/packages/usearch/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class Usearch(Package):
+ """USEARCH is a unique sequence analysis tool with thousands of users
+ world-wide.
+
+ Note: A manual download is required for USEARCH.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "http://www.drive5.com/usearch/"
+
+ version('10.0.240', '05192b6d5e291530c190a19a3cc82b53', expand=False)
+
+ def url_for_version(self, version):
+ return "file://{0}/usearch{1}_i86linux32".format(os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('usearch{0}_i86linux32'.format(self.version),
+ prefix.bin.usearch)
diff --git a/var/spack/repos/builtin/packages/varscan/package.py b/var/spack/repos/builtin/packages/varscan/package.py
new file mode 100644
index 0000000000..f4c2ae029d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/varscan/package.py
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os.path
+
+
+class Varscan(Package):
+ """Variant calling and somatic mutation/CNV detection for next-generation
+ sequencing data"""
+
+ homepage = "http://dkoboldt.github.io/varscan/"
+ url = "https://github.com/dkoboldt/varscan/releases/download/2.4.2/VarScan.v2.4.2.jar"
+
+ version('2.4.2', '4b810741505a8145a7f8f9f6791bbacf', expand=False)
+
+ depends_on('java', type=('build', 'run'))
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.jar)
+ jar_file = 'VarScan.v{v}.jar'.format(v=self.version.dotted)
+ install(jar_file, prefix.jar)
+
+ script_sh = join_path(os.path.dirname(__file__), "varscan.sh")
+ script = prefix.bin.varscan
+ install(script_sh, script)
+ set_executable(script)
+
+ java = join_path(self.spec['java'].prefix, 'bin', 'java')
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ filter_file('^java', java, script, **kwargs)
+ filter_file('varscan.jar', join_path(prefix.jar, jar_file),
+ script, **kwargs)
+
+ def setup_environment(self, spack_env, run_env):
+ run_env.set('VARSCAN_HOME', self.prefix)
+ run_env.set('CLASSPATH', self.prefix.jar)
diff --git a/var/spack/repos/builtin/packages/varscan/varscan.sh b/var/spack/repos/builtin/packages/varscan/varscan.sh
new file mode 100644
index 0000000000..71824a46c6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/varscan/varscan.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+# convenience wrapper for the astral jar file
+java $JAVA_ARGS $JAVA_OPTS -jar varscan.jar "$@"
diff --git a/var/spack/repos/builtin/packages/vc/package.py b/var/spack/repos/builtin/packages/vc/package.py
index e41a385947..67ced036b2 100644
--- a/var/spack/repos/builtin/packages/vc/package.py
+++ b/var/spack/repos/builtin/packages/vc/package.py
@@ -35,11 +35,7 @@ class Vc(CMakePackage):
version('1.2.0', 'a5236df286b845d2fee5ef1e4d27549f')
version('1.1.0', 'e354c1e3ea1d674b6f2af9c6fd230d81')
- variant('debug', default=False)
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
+ variant('build_type', default='RelWithDebInfo',
+ description='The build type to build',
+ values=('Debug', 'Release', 'RelWithDebug',
+ 'RelWithDebInfo', 'MinSizeRel'))
diff --git a/var/spack/repos/builtin/packages/vcftools/package.py b/var/spack/repos/builtin/packages/vcftools/package.py
index f84ea1ed7c..bb2721e353 100644
--- a/var/spack/repos/builtin/packages/vcftools/package.py
+++ b/var/spack/repos/builtin/packages/vcftools/package.py
@@ -45,7 +45,7 @@ class Vcftools(AutotoolsPackage):
# this needs to be in sync with what setup_environment adds to
# PERL5LIB below
def configure_args(self):
- return ['--with-pmdir=lib']
+ return ['--with-pmdir={0}'.format(self.prefix.lib)]
@run_before('install')
def filter_sbang(self):
@@ -72,4 +72,4 @@ class Vcftools(AutotoolsPackage):
filter_file(match, substitute, *files, **kwargs)
def setup_environment(self, spack_env, run_env):
- run_env.prepend_path('PERL5LIB', join_path(self.prefix, 'lib'))
+ run_env.prepend_path('PERL5LIB', self.prefix.lib)
diff --git a/var/spack/repos/builtin/packages/vecgeom/package.py b/var/spack/repos/builtin/packages/vecgeom/package.py
index d514f13c17..9843840e5b 100644
--- a/var/spack/repos/builtin/packages/vecgeom/package.py
+++ b/var/spack/repos/builtin/packages/vecgeom/package.py
@@ -36,17 +36,8 @@ class Vecgeom(CMakePackage):
version('0.3.rc', git='https://gitlab.cern.ch/VecGeom/VecGeom.git',
tag='v0.3.rc')
- variant('debug', default=False, description='Build debug version')
-
depends_on('cmake@3.5:', type='build')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = [
'-DBACKEND=Scalar',
diff --git a/var/spack/repos/builtin/packages/vegas2/package.py b/var/spack/repos/builtin/packages/vegas2/package.py
new file mode 100644
index 0000000000..1c091a568c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vegas2/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Vegas2(Package):
+ """"VEGAS2 is an extension that uses 1,000 Genomes data to model SNP
+ correlations across the autosomes and chromosome X"""
+
+ homepage = "https://vegas2.qimrberghofer.edu.au/"
+ url = "https://vegas2.qimrberghofer.edu.au/vegas2v2"
+
+ version('2', '815d80b86e9e294f99332bb5181e897a', expand=False)
+
+ depends_on('perl', type='run')
+ depends_on('r', type='run')
+ depends_on('plink')
+ depends_on('r-mvtnorm', type='run')
+ depends_on('r-corpcor', type='run')
+
+ def url_for_version(self, version):
+ url = 'https://vegas2.qimrberghofer.edu.au/vegas2v{0}'
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('vegas2v{0}'.format(self.version), prefix.bin)
diff --git a/var/spack/repos/builtin/packages/velvet/package.py b/var/spack/repos/builtin/packages/velvet/package.py
new file mode 100644
index 0000000000..48e0e04d1a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/velvet/package.py
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Velvet(MakefilePackage):
+ """Velvet is a de novo genomic assembler specially designed for short read
+ sequencing technologies."""
+
+ homepage = "http://www.ebi.ac.uk/~zerbino/velvet/"
+ url = "http://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.10.tgz"
+
+ version('1.2.10', '6e28c4b9bedc5f7ab2b947e7266a02f6')
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('velvetg', prefix.bin)
+ install('velveth', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/viennarna/package.py b/var/spack/repos/builtin/packages/viennarna/package.py
new file mode 100644
index 0000000000..548aacb56f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/viennarna/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Viennarna(AutotoolsPackage):
+ """The ViennaRNA Package consists of a C code library and several
+ stand-alone programs for the prediction and comparison of RNA secondary
+ structures."""
+
+ homepage = "https://www.tbi.univie.ac.at/RNA/"
+ url = "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_3_x/ViennaRNA-2.3.5.tar.gz"
+
+ version('2.3.5', '4542120adae9b7abb605e2304c2a1326')
+
+ variant('sse', default=True, description='Enable SSE in order to substantially speed up execution')
+ variant('perl', default=True, description='Build ViennaRNA with Perl interface')
+ variant('python', default=True, description='Build ViennaRNA with Python interface')
+
+ depends_on('perl', type=('build', 'run'))
+ depends_on('python', type=('build', 'run'))
+ depends_on('libsvm')
+ depends_on('gsl')
+
+ def url_for_version(self, version):
+ url = 'https://www.tbi.univie.ac.at/RNA/download/sourcecode/{0}_x/ViennaRNA-{1}.tar.gz'
+ return url.format(version.up_to(2).underscored, version)
+
+ def configure_args(self):
+ args = []
+ if '+sse' in self.spec:
+ args.append('--enable-sse')
+ else:
+ args.append('--disable-sse')
+ if '~python' in self.spec:
+ args.append('--without-python')
+ else:
+ args.append('--with-python')
+ if '~perl' in self.spec:
+ args.append('--without-perl')
+ else:
+ args.append('--with-perl')
+ if 'python@3:' in self.spec:
+ args.append('--with-python3')
+ return args
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index 17efe0eb80..2c08c73a3c 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Visit(Package):
+class Visit(CMakePackage):
"""VisIt is an Open Source, interactive, scalable, visualization,
animation and analysis tool."""
homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/"
@@ -36,29 +36,26 @@ class Visit(Package):
version('2.10.2', '253de0837a9d69fb689befc98ea4d068')
version('2.10.1', '3cbca162fdb0249f17c4456605c4211e')
- depends_on('cmake', type='build')
+ depends_on('cmake@3.0:', type='build')
depends_on('vtk@6.1.0~opengl2')
depends_on('qt@4.8.6')
depends_on('python')
depends_on('silo+shared')
depends_on('hdf5~mpi')
- def install(self, spec, prefix):
- qt_bin = spec['qt'].prefix.bin
+ root_cmakelists_dir = 'src'
- with working_dir('spack-build', create=True):
- cmake_args = std_cmake_args[:]
- cmake_args.extend([
- '-DVTK_MAJOR_VERSION=6',
- '-DVTK_MINOR_VERSION=1',
- '-DVISIT_USE_GLEW=OFF',
- '-DVISIT_LOC_QMAKE_EXE:FILEPATH={0}/qmake-qt4'.format(qt_bin),
- '-DPYTHON_DIR:PATH={0}'.format(spec['python'].home),
- '-DVISIT_SILO_DIR:PATH={0}'.format(spec['silo'].prefix),
- '-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix),
- '-DVISIT_VTK_DIR:PATH={0}'.format(spec['vtk'].prefix),
- ])
+ def cmake_args(self):
+ spec = self.spec
+ qt_bin = spec['qt'].prefix.bin
- cmake(join_path('..', 'src'), *cmake_args)
- make()
- make('install')
+ return [
+ '-DVTK_MAJOR_VERSION={0}'.format(spec['vtk'].version[0]),
+ '-DVTK_MINOR_VERSION={0}'.format(spec['vtk'].version[1]),
+ '-DVISIT_USE_GLEW=OFF',
+ '-DVISIT_LOC_QMAKE_EXE:FILEPATH={0}/qmake-qt4'.format(qt_bin),
+ '-DPYTHON_DIR:PATH={0}'.format(spec['python'].home),
+ '-DVISIT_SILO_DIR:PATH={0}'.format(spec['silo'].prefix),
+ '-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix),
+ '-DVISIT_VTK_DIR:PATH={0}'.format(spec['vtk'].prefix),
+ ]
diff --git a/var/spack/repos/builtin/packages/vmatch/package.py b/var/spack/repos/builtin/packages/vmatch/package.py
new file mode 100644
index 0000000000..bc09c0b70d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vmatch/package.py
@@ -0,0 +1,42 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Vmatch(Package):
+ """Vmatch is a versatile software tool for efficiently solving large scale
+ sequence matching tasks"""
+
+ homepage = "http://www.vmatch.de/"
+ url = "http://www.vmatch.de/distributions/vmatch-2.3.0-Linux_x86_64-64bit.tar.gz"
+
+ version('2.3.0', '592a4f941239494d892f3c6ff21a1423')
+
+ def url_for_version(self, version):
+ url = 'http://www.vmatch.de/distributions/vmatch-{0}-Linux_x86_64-64bit.tar.gz'
+ return url.format(version)
+
+ def install(self, spec, prefix):
+ install_tree(self.stage.source_path, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py
index 6756d0427b..bd5879e68a 100644
--- a/var/spack/repos/builtin/packages/votca-csg/package.py
+++ b/var/spack/repos/builtin/packages/votca-csg/package.py
@@ -39,16 +39,7 @@ class VotcaCsg(CMakePackage):
version('develop', git='https://github.com/votca/csg', branch='master')
version('1.4', 'd009e761e5e3afd51eed89c420610a67')
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@2.8:", type='build')
depends_on("votca-tools@1.4:1.4.999", when='@1.4:1.4.999')
depends_on("votca-tools@develop", when='@develop')
depends_on("gromacs~mpi@5.1:")
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/votca-ctp/package.py b/var/spack/repos/builtin/packages/votca-ctp/package.py
index 81586b18e6..8ace180487 100644
--- a/var/spack/repos/builtin/packages/votca-ctp/package.py
+++ b/var/spack/repos/builtin/packages/votca-ctp/package.py
@@ -39,16 +39,7 @@ class VotcaCtp(CMakePackage):
version('develop', git='https://github.com/votca/ctp', branch='master')
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@2.8:", type='build')
depends_on("votca-tools@develop", when='@develop')
depends_on("votca-csg@develop", when='@develop')
depends_on("votca-moo@develop", when='@develop')
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/votca-moo/package.py b/var/spack/repos/builtin/packages/votca-moo/package.py
index a596ba1c9c..dfbef140eb 100644
--- a/var/spack/repos/builtin/packages/votca-moo/package.py
+++ b/var/spack/repos/builtin/packages/votca-moo/package.py
@@ -39,14 +39,5 @@ class VotcaMoo(CMakePackage):
version('develop', git='https://github.com/votca/moo', branch='master')
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@2.8:", type='build')
depends_on("votca-tools@develop", when='@develop')
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py
index 39055c45a3..d2acac8736 100644
--- a/var/spack/repos/builtin/packages/votca-tools/package.py
+++ b/var/spack/repos/builtin/packages/votca-tools/package.py
@@ -39,18 +39,9 @@ class VotcaTools(CMakePackage):
version('develop', git='https://github.com/votca/tools', branch='master')
version('1.4', 'cd47868e9f28e2c7b9d01f95aa0185ca')
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@2.8:", type='build')
depends_on("expat")
depends_on("fftw")
depends_on("gsl")
depends_on("boost")
depends_on("sqlite")
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py
index 951df7b8c6..80cd4802e3 100644
--- a/var/spack/repos/builtin/packages/votca-xtp/package.py
+++ b/var/spack/repos/builtin/packages/votca-xtp/package.py
@@ -39,17 +39,8 @@ class VotcaXtp(CMakePackage):
version('develop', git='https://github.com/votca/xtp', branch='master')
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@2.8:", type='build')
depends_on("votca-tools@develop", when='@develop')
depends_on("votca-csg@develop", when='@develop')
depends_on("votca-ctp@develop", when='@develop')
depends_on("votca-moo@develop", when='@develop')
-
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
diff --git a/var/spack/repos/builtin/packages/vpfft/package.py b/var/spack/repos/builtin/packages/vpfft/package.py
new file mode 100644
index 0000000000..8d4ef7defe
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vpfft/package.py
@@ -0,0 +1,67 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Vpfft(MakefilePackage):
+ """Proxy Application. VPFFT is an implementation of a mesoscale
+ micromechanical materials model. By solving the viscoplasticity
+ model, VPFFT simulates the evolution of a material under deformation.
+ The solution time to the viscoplasticity model, described by a set
+ of partial differential equations, is significantly reduced by the
+ application of Fast Fourier Transform in the VPFFT algorithm.
+ """
+
+ homepage = "http://www.exmatex.org/vpfft.html"
+ url = "https://github.com/exmatex/VPFFT/archive/master.tar.gz"
+ tag = ['proxy-app']
+
+ version('develop', git='https://github.com/exmatex/VPFFT.git')
+
+ depends_on('eigen')
+ depends_on('fftw')
+ depends_on('mpi')
+
+ @property
+ def build_targets(self):
+ targets = [
+ "--file=Makefile.make",
+ "EIGEN_PATH={0}".format(
+ join_path(
+ self.spec['eigen'].prefix.include,
+ 'eigen{0}'.format(
+ self.spec['eigen'].version.up_to(1)))),
+ "FFTW_PATH={0}".format(self.spec['fftw'].prefix),
+ "CC={0}".format(self.spec['mpi'].mpicxx)
+ ]
+ return targets
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('VPFFT++', prefix.bin)
+ install('README.md', prefix)
+ install('README.make', prefix)
+ install('README-license.txt', prefix)
+ install_tree('docs', prefix.docs)
diff --git a/var/spack/repos/builtin/packages/vpic/package.py b/var/spack/repos/builtin/packages/vpic/package.py
index e24aa9e530..43083d813e 100644
--- a/var/spack/repos/builtin/packages/vpic/package.py
+++ b/var/spack/repos/builtin/packages/vpic/package.py
@@ -40,18 +40,9 @@ class Vpic(CMakePackage):
version('develop', git='https://github.com/lanl/vpic', branch='master', submodules=True)
- variant('debug', default=False, description='Build debug version')
-
depends_on("cmake@3.1:", type='build')
depends_on('mpi')
- def build_type(self):
- spec = self.spec
- if '+debug' in spec:
- return 'Debug'
- else:
- return 'Release'
-
def cmake_args(self):
options = ['-DENABLE_INTEGRATED_TESTS=ON', '-DENABLE_UNIT_TESTS=ON']
diff --git a/var/spack/repos/builtin/packages/vsearch/package.py b/var/spack/repos/builtin/packages/vsearch/package.py
new file mode 100644
index 0000000000..07ed838654
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vsearch/package.py
@@ -0,0 +1,39 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Vsearch(AutotoolsPackage):
+ """VSEARCH is a versatile open-source tool for metagenomics."""
+
+ homepage = "https://github.com/torognes/vsearch"
+ url = "https://github.com/torognes/vsearch/archive/v2.4.3.tar.gz"
+
+ version('2.4.3', '8f57210fe447a781078fde06e6402650')
+
+ depends_on('m4', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
diff --git a/var/spack/repos/builtin/packages/xplor-nih/package.py b/var/spack/repos/builtin/packages/xplor-nih/package.py
new file mode 100644
index 0000000000..4ae0ea519f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xplor-nih/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+import os
+
+
+class XplorNih(Package):
+ """XPLOR-NIH is a structure determination program.
+
+ Note: A manual download is required for XPLOR-NIH.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://nmr.cit.nih.gov/xplor-nih/"
+
+ version('2.45', 'ab3e046604beb0effc89a1adb7bab438')
+
+ depends_on('python', type=('build', 'run'))
+
+ def url_for_version(self, version):
+ return "file://{0}/xplor-nih-{1}-Linux_x86_64.tar.gz".format(os.getcwd(), version)
+
+ def install(self, spec, prefix):
+ install_tree(self.stage.source_path, prefix.bin)
diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py
index de91cf0c95..2bb1df326c 100644
--- a/var/spack/repos/builtin/packages/xproto/package.py
+++ b/var/spack/repos/builtin/packages/xproto/package.py
@@ -43,3 +43,8 @@ class Xproto(AutotoolsPackage):
depends_on('pkg-config@0.9.0:', type='build')
depends_on('util-macros', type='build')
+
+ def install(self, spec, prefix):
+ # Installation fails in parallel
+ # See https://github.com/LLNL/spack/issues/4805
+ make('install', parallel=False)
diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py
index d377c68968..6388c006a7 100644
--- a/var/spack/repos/builtin/packages/xrootd/package.py
+++ b/var/spack/repos/builtin/packages/xrootd/package.py
@@ -26,7 +26,7 @@
from spack import *
-class Xrootd(Package):
+class Xrootd(CMakePackage):
"""The XROOTD project aims at giving high performance, scalable fault
tolerant access to data repositories of many kinds."""
homepage = "http://xrootd.org"
@@ -38,19 +38,4 @@ class Xrootd(Package):
version('4.4.0', '58f55e56801d3661d753ff5fd33dbcc9')
version('4.3.0', '39c2fab9f632f35e12ff607ccaf9e16c')
- depends_on('cmake', type='build')
-
- def install(self, spec, prefix):
- options = []
- options.extend(std_cmake_args)
-
- build_directory = join_path(self.stage.path, 'spack-build')
- source_directory = self.stage.source_path
-
- if '+debug' in spec:
- options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
-
- with working_dir(build_directory, create=True):
- cmake(source_directory, *options)
- make()
- make("install")
+ depends_on('cmake@2.6:', type='build')
diff --git a/var/spack/repos/builtin/packages/xsbench/package.py b/var/spack/repos/builtin/packages/xsbench/package.py
new file mode 100644
index 0000000000..db84ec5b3d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/xsbench/package.py
@@ -0,0 +1,65 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Xsbench(MakefilePackage):
+ """XSBench is a mini-app representing a key computational
+ kernel of the Monte Carlo neutronics application OpenMC.
+ A full explanation of the theory and purpose of XSBench
+ is provided in docs/XSBench_Theory.pdf."""
+
+ homepage = "https://github.com/ANL-CESAR/XSBench/"
+ url = "https://github.com/ANL-CESAR/XSBench/archive/v13.tar.gz"
+
+ tags = ['proxy-app']
+
+ version('13', '72a92232d2f5777fb52f5ea4082aff37')
+
+ variant('mpi', default=False, description='Build with MPI support')
+
+ depends_on('mpi', when='+mpi')
+
+ build_directory = 'src'
+
+ @property
+ def build_targets(self):
+
+ targets = []
+
+ cflags = '-std=gnu99'
+ if '+mpi' in self.spec:
+ targets.append('CC={0}'.format(self.spec['mpi'].mpicc))
+
+ cflags += ' ' + self.compiler.openmp_flag
+ targets.append('CFLAGS={0}'.format(cflags))
+ targets.append('LDFLAGS=-lm')
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ install('src/XSBench', prefix.bin)
diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py
index 583de80f3a..4d27b5a79f 100644
--- a/var/spack/repos/builtin/packages/xsdk/package.py
+++ b/var/spack/repos/builtin/packages/xsdk/package.py
@@ -53,9 +53,9 @@ class Xsdk(Package):
depends_on('trilinos@develop+xsdkflags+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse~tpetra~ifpack2~zoltan2~amesos2~exodus',
when='@develop')
- depends_on('petsc@xsdk-0.2.0+trilinos+mpi+hypre+superlu-dist+metis+hdf5~mumps~boost',
+ depends_on('petsc@xsdk-0.2.0+trilinos+mpi+hypre+superlu-dist+metis+hdf5~mumps~boost+double~int64',
when='@xsdk-0.2.0')
- depends_on('petsc@develop+trilinos+mpi+hypre+superlu-dist+metis+hdf5~mumps~boost',
+ depends_on('petsc@develop+trilinos+mpi+hypre+superlu-dist+metis+hdf5~mumps~boost+double~int64',
when='@develop')
depends_on('pflotran@xsdk-0.2.0', when='@xsdk-0.2.0')
diff --git a/var/spack/repos/builtin/packages/xsdktrilinos/package.py b/var/spack/repos/builtin/packages/xsdktrilinos/package.py
index 0d70baabcd..cf3d425313 100644
--- a/var/spack/repos/builtin/packages/xsdktrilinos/package.py
+++ b/var/spack/repos/builtin/packages/xsdktrilinos/package.py
@@ -45,20 +45,18 @@ class Xsdktrilinos(CMakePackage):
description='Compile with PETSc solvers')
variant('shared', default=True,
description='Enables the build of shared libraries')
- variant('debug', default=False,
- description='Builds a debug version of the libraries')
# MPI related dependencies
depends_on('mpi')
depends_on('hypre~internal-superlu', when='+hypre')
depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre')
- depends_on('hypre@develop~internal-superlu', when='@develop+hypre')
+ depends_on('hypre@develop~internal-superlu', when='@develop+hypre')
depends_on('petsc@xsdk-0.2.0+mpi~complex', when='@xsdk-0.2.0+petsc')
- depends_on('petsc@develop+mpi~complex', when='@develop+petsc')
+ depends_on('petsc@develop+mpi~complex', when='@develop+petsc')
depends_on('trilinos@12.6.4', when='@12.6.4')
depends_on('trilinos@12.8.1', when='@12.8.1')
depends_on('trilinos@xsdk-0.2.0', when='@xsdk-0.2.0')
- depends_on('trilinos@develop', when='@develop')
+ depends_on('trilinos@develop', when='@develop')
def url_for_version(self, version):
url = "https://github.com/trilinos/xSDKTrilinos/archive/trilinos-release-{0}.tar.gz"
@@ -75,8 +73,6 @@ class Xsdktrilinos(CMakePackage):
'-DxSDKTrilinos_ENABLE_TESTS:BOOL=ON',
'-DxSDKTrilinos_ENABLE_EXAMPLES:BOOL=ON',
'-DTrilinos_INSTALL_DIR=%s' % spec['trilinos'].prefix,
- '-DCMAKE_BUILD_TYPE:STRING=%s' % (
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'),
'-DTPL_ENABLE_MPI:BOOL=ON',
diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py
index e537af6b41..59228ec4cb 100644
--- a/var/spack/repos/builtin/packages/yaml-cpp/package.py
+++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py
@@ -36,7 +36,7 @@ class YamlCpp(CMakePackage):
variant('shared', default=True,
description='Enable build of shared libraries')
- variant('fpic', default=True,
+ variant('pic', default=True,
description='Build with position independent code')
depends_on('boost', when='@:0.5.3')
@@ -49,7 +49,7 @@ class YamlCpp(CMakePackage):
'-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'),
'-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % (
- 'ON' if '+fpic' in spec else 'OFF'),
+ 'ON' if '+pic' in spec else 'OFF'),
])
return options
diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py
index 680d67c7b0..945459b948 100644
--- a/var/spack/repos/builtin/packages/zeromq/package.py
+++ b/var/spack/repos/builtin/packages/zeromq/package.py
@@ -30,6 +30,10 @@ class Zeromq(AutotoolsPackage):
homepage = "http://zguide.zeromq.org/"
url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz"
+ version('develop', branch='master',
+ git='https://github.com/zeromq/libzmq.git')
+ version('4.2.2', '52499909b29604c1e47a86f1cb6a9115',
+ url='https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz')
version('4.1.4', 'a611ecc93fffeb6d058c0e6edf4ad4fb')
version('4.1.2', '159c0c56a895472f02668e692d122685')
version('4.1.1', '0a4b44aa085644f25c177f79dc13f253')
@@ -40,6 +44,16 @@ class Zeromq(AutotoolsPackage):
depends_on("libsodium")
depends_on("libsodium@:1.0.3", when='@:4.1.2')
+ depends_on('autoconf', type='build', when='@develop')
+ depends_on('automake', type='build', when='@develop')
+ depends_on('libtool', type='build', when='@develop')
+ depends_on('pkg-config', type='build', when='@develop')
+
+ @when('@develop')
+ def autoreconf(self, spec, prefix):
+ bash = which('bash')
+ bash('./autogen.sh')
+
def configure_args(self):
config_args = ['--with-libsodium']
if 'clang' in self.compiler.cc:
diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py
index b51426347f..b5e3c7c2bc 100644
--- a/var/spack/repos/builtin/packages/zfp/package.py
+++ b/var/spack/repos/builtin/packages/zfp/package.py
@@ -35,8 +35,8 @@ class Zfp(MakefilePackage):
of zfp 0.5.1 or newer also support compression of integer data.
"""
- homepage = "http://computation.llnl.gov/projects/floating-point-compression"
- url = "http://computation.llnl.gov/projects/floating-point-compression/download/zfp-0.5.1.tar.gz"
+ homepage = 'http://computation.llnl.gov/projects/floating-point-compression'
+ url = 'http://computation.llnl.gov/projects/floating-point-compression/download/zfp-0.5.1.tar.gz'
version('0.5.1', '0ed7059a9b480635e0dd33745e213d17')
version('0.5.0', '2ab29a852e65ad85aae38925c5003654')
@@ -45,8 +45,11 @@ class Zfp(MakefilePackage):
default='64',
values=('8', '16', '32', '64'),
multi=False,
- description='Bit stream word size: use smaller for finer \
- rate granularity. Use 8 for H5Z-ZFP filter.')
+ description='Bit stream word size: use smaller for finer ' \
+ 'rate granularity. Use 8 for H5Z-ZFP filter.')
+
+ variant('shared', default=True,
+ description='Build shared versions of the library')
def edit(self, spec, prefix):
config_file = FileFilter('Config')
@@ -56,15 +59,23 @@ class Zfp(MakefilePackage):
spec.variants['bsws'].value)
def build(self, spec, prefix):
- make("shared")
+ with working_dir('src'):
+ if '~shared' in spec:
+ make('static')
+ else:
+ make('shared')
def install(self, spec, prefix):
incdir = 'include' if spec.satisfies('@0.5.1:') else 'inc'
- # No install provided
+ # Note: ZFP package does not provide an install target
mkdirp(prefix.lib)
mkdirp(prefix.include)
- install('lib/libzfp.so', prefix.lib)
+ # Note: ZFP package builds .so files even on OSX
+ if '~shared' in spec:
+ install('lib/libzfp.a', prefix.lib)
+ else:
+ install('lib/libzfp.so', prefix.lib)
install('%s/zfp.h' % incdir, prefix.include)
install('%s/bitstream.h' % incdir, prefix.include)
if spec.satisfies('@0.5.1:'):
diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py
index 0d9822f287..30fcef95e1 100644
--- a/var/spack/repos/builtin/packages/zlib/package.py
+++ b/var/spack/repos/builtin/packages/zlib/package.py
@@ -57,7 +57,7 @@ class Zlib(Package):
def setup_environment(self, spack_env, run_env):
if '+pic' in self.spec:
- spack_env.set('CFLAGS', self.compiler.pic_flag)
+ spack_env.append_flags('CFLAGS', self.compiler.pic_flag)
def install(self, spec, prefix):
config_args = []
diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index 008bea9c27..6404cadbe1 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -76,7 +76,7 @@ class Zoltan(Package):
if '+shared' in spec:
config_args.append('RANLIB=echo')
config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o')
- config_cflags.append('-fPIC')
+ config_cflags.append(self.compiler.pic_flag)
if spec.satisfies('%gcc'):
config_args.append('--with-libs={0}'.format('-lgfortran'))
diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py
index 24bb9ec896..7225418363 100644
--- a/var/spack/repos/builtin/packages/zsh/package.py
+++ b/var/spack/repos/builtin/packages/zsh/package.py
@@ -34,7 +34,24 @@ class Zsh(AutotoolsPackage):
homepage = "http://www.zsh.org"
url = "http://downloads.sourceforge.net/project/zsh/zsh/5.1.1/zsh-5.1.1.tar.gz"
+ version('5.3.1', checksum='d583fbca0c2410bf9542ce8a651c26ca')
version('5.1.1', checksum='8ba28a9ef82e40c3a271602f18343b2f')
+ # Testing for terminal related things causes failures in e.g. Jenkins.
+ # See e.g. https://www.zsh.org/mla/users/2003/msg00845.html,
+ # although the name of the option has evolved since then.
+ variant('skip-tcsetpgrp-test', default=True,
+ description="Skip configure's tcsetpgrp test")
+
depends_on("pcre")
depends_on("ncurses")
+
+ def configure_args(self):
+ if '+skip-tcsetpgrp-test' in self.spec:
+ # assert that we have a functional tcsetpgrp
+ args = ['--with-tcsetpgrp']
+ else:
+ # let configure run it's test and see what's what
+ args = []
+
+ return args
diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py
index 7cd5d6785d..0551ff8163 100644
--- a/var/spack/repos/builtin/packages/zstd/package.py
+++ b/var/spack/repos/builtin/packages/zstd/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Zstd(Package):
+class Zstd(MakefilePackage):
"""Zstandard, or zstd as short version, is a fast lossless compression
algorithm, targeting real-time compression scenarios at zlib-level and
better compression ratios."""
@@ -33,10 +33,8 @@ class Zstd(Package):
homepage = "http://facebook.github.io/zstd/"
url = "https://github.com/facebook/zstd/archive/v1.1.2.tar.gz"
+ version('1.3.0', '888660a850e33c2dcc7c4f9d0b04d347')
version('1.1.2', '4c57a080d194bdaac83f2d3251fc7ffc')
def install(self, spec, prefix):
- make()
- if self.run_tests:
- make('test')
make('install', 'PREFIX={0}'.format(prefix))