Lbann update (#6987)
* Added new link line flag * Refactored some of the common components out of the different version's build commands. Also corrected the when commands to properly capture non-numeric names such as local. * Added support to the Elemental package for the Hydrogen branch.
This commit is contained in:

committed by
becker33

parent
8bdf7e6baa
commit
a62e1a0451
@@ -62,16 +62,27 @@ class Lbann(CMakePackage):
|
||||
depends_on('cnpy')
|
||||
depends_on('nccl', when='+gpu +nccl')
|
||||
|
||||
@when('@0.94:')
|
||||
def cmake_args(self):
|
||||
@property
|
||||
def common_config_args(self):
|
||||
spec = self.spec
|
||||
# Environment variables
|
||||
CPPFLAGS = []
|
||||
CPPFLAGS.append('-DLBANN_SET_EL_RNG')
|
||||
CPPFLAGS.append('-DLBANN_SET_EL_RNG -ldl')
|
||||
|
||||
args = [
|
||||
return [
|
||||
'-DCMAKE_INSTALL_MESSAGE=LAZY',
|
||||
'-DCMAKE_CXX_FLAGS=%s' % ' '.join(CPPFLAGS),
|
||||
'-DLBANN_VERSION=spack',
|
||||
'-DCNPY_DIR={0}'.format(spec['cnpy'].prefix),
|
||||
]
|
||||
|
||||
# Get any recent versions or non-numeric version
|
||||
# Note that develop > numeric and non-develop < numeric
|
||||
@when('@:0.91' or '@0.94:')
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
args = self.common_config_args
|
||||
args.extend([
|
||||
'-DLBANN_WITH_TOPO_AWARE:BOOL=%s' % ('+gpu +nccl' in spec),
|
||||
'-DLBANN_SEQUENTIAL_INITIALIZATION:BOOL=%s' %
|
||||
('+seq_init' in spec),
|
||||
@@ -79,10 +90,8 @@ def cmake_args(self):
|
||||
'-DLBANN_WITH_VTUNE=OFF',
|
||||
'-DElemental_DIR={0}/CMake/elemental'.format(
|
||||
spec['elemental'].prefix),
|
||||
'-DCNPY_DIR={0}'.format(spec['cnpy'].prefix),
|
||||
'-DLBANN_DATATYPE={0}'.format(spec.variants['dtype'].value),
|
||||
'-DLBANN_VERBOSE=0',
|
||||
'-DLBANN_VERSION=spack']
|
||||
'-DLBANN_VERBOSE=0'])
|
||||
|
||||
if '+opencv' in spec:
|
||||
args.extend(['-DOpenCV_DIR:STRING={0}'.format(
|
||||
@@ -108,16 +117,11 @@ def cmake_args(self):
|
||||
|
||||
return args
|
||||
|
||||
@when('@:0.93')
|
||||
@when('@0.91:0.93')
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
# Environment variables
|
||||
CPPFLAGS = []
|
||||
CPPFLAGS.append('-DLBANN_SET_EL_RNG')
|
||||
|
||||
args = [
|
||||
'-DCMAKE_INSTALL_MESSAGE=LAZY',
|
||||
'-DCMAKE_CXX_FLAGS=%s' % ' '.join(CPPFLAGS),
|
||||
args = self.common_config_args
|
||||
args.extend([
|
||||
'-DWITH_CUDA:BOOL=%s' % ('+gpu' in spec),
|
||||
'-DWITH_CUDNN:BOOL=%s' % ('+gpu' in spec),
|
||||
'-DELEMENTAL_USE_CUBLAS:BOOL=%s' % (
|
||||
@@ -125,13 +129,11 @@ def cmake_args(self):
|
||||
'-DWITH_TBINF=OFF',
|
||||
'-DWITH_VTUNE=OFF',
|
||||
'-DElemental_DIR={0}'.format(spec['elemental'].prefix),
|
||||
'-DCNPY_DIR={0}'.format(spec['cnpy'].prefix),
|
||||
'-DELEMENTAL_MATH_LIBS={0}'.format(
|
||||
spec['elemental'].libs),
|
||||
'-DSEQ_INIT:BOOL=%s' % ('+seq_init' in spec),
|
||||
'-DVERBOSE=0',
|
||||
'-DLBANN_HOME=.',
|
||||
'-DLBANN_VER=spack']
|
||||
'-DLBANN_HOME=.'])
|
||||
|
||||
if spec.variants['dtype'].value == 'float':
|
||||
args.extend(['-DDATATYPE=4'])
|
||||
|
Reference in New Issue
Block a user