summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/cbtf-argonavis/package.py')
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis/package.py90
1 files changed, 65 insertions, 25 deletions
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
index 7b07933911..90789a98f2 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) 2015 Krell Institute. All Rights Reserved.
+# Copyright (c) 2015-2016 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
@@ -24,43 +24,83 @@ class CbtfArgonavis(Package):
homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
# Mirror access template example
- #url = "file:/g/g24/jeg/cbtf-argonavis-1.5.tar.gz"
- #version('1.5', '1f7f6512f55409ed2135cfceabe26b82')
+ #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz"
+ #version('1.6', '0fafa0008478405c2c2319450f174ed4')
- version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-argonavis/cbtf-argonavis')
+ version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
- depends_on("cmake@3.0.2:")
+ depends_on("cmake@3.0.2")
+ depends_on("boost@1.50.0:")
depends_on("papi")
+ depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
depends_on("cbtf")
depends_on("cbtf-krell")
- depends_on("cuda")
+ depends_on("cuda@6.0.37")
+ #depends_on("cuda")
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)
+
+
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)
- # FIXME, hard coded for testing purposes, we will alter when the external package feature is available
- cuda_prefix_path = "/usr/local/cudatoolkit-6.0"
- cupti_prefix_path = "/usr/local/cudatoolkit-6.0/extras/CUPTI"
-
-
with working_dir('CUDA'):
with working_dir('build', create=True):
- cmake('..',
- '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
- '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64,
- '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
- '-DCUDA_INSTALL_PATH=%s' % cuda_prefix_path,
- '-DCUDA_ROOT=%s' % cuda_prefix_path,
- '-DCUPTI_ROOT=%s' % cupti_prefix_path,
- '-DCUDA_DIR=%s' % cuda_prefix_path,
- '-DPAPI_ROOT=%s' % spec['papi'].prefix,
- '-DCBTF_PREFIX=%s' % spec['cbtf'].prefix,
- *std_cmake_args)
- make("clean")
- make()
- make("install")
+ 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")