Skip to content

Commit c0c6cf7

Browse files
Cameron Mikel CrookCameron Mikel Crook
authored andcommitted
Merge branch 'feature/povolny1/polarDecomposition' into feature/crook5/math
2 parents 557f07c + 6a90517 commit c0c6cf7

File tree

12 files changed

+474
-65
lines changed

12 files changed

+474
-65
lines changed

cmake/SetupTPL.cmake

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
set(thirdPartyLibs "")
22

3-
################################
3+
###############################
44
# CAMP
5-
################################
6-
if(NOT EXISTS ${CAMP_DIR})
7-
message(FATAL_ERROR "CAMP_DIR must be defined and point to a valid directory when using CAMP.")
8-
endif()
5+
###############################
6+
if(CAMP_DIR STREQUAL RAJA_DIR)
7+
message(STATUS "LvArray using CAMP from RAJA.")
8+
else()
9+
if(NOT EXISTS ${CAMP_DIR})
10+
message(FATAL_ERROR "CAMP_DIR must be defined and point to a valid directory when using CAMP.")
11+
endif()
912

10-
message(STATUS "Using CAMP from ${CAMP_DIR}")
13+
message(STATUS "LvArray using CAMP from ${CAMP_DIR}")
1114

12-
find_package(camp REQUIRED PATHS ${CAMP_DIR})
15+
find_package(camp REQUIRED PATHS ${CAMP_DIR})
1316

14-
set(ENABLE_CAMP ON CACHE BOOL "")
17+
set(thirdPartyLibs ${thirdPartyLibs} camp)
18+
endif()
1519

16-
set(thirdPartyLibs ${thirdPartyLibs} camp)
1720

1821
################################
1922
# RAJA
@@ -22,7 +25,7 @@ if(NOT EXISTS ${RAJA_DIR})
2225
message(FATAL_ERROR "RAJA_DIR must be defined and point to a valid directory when using RAJA.")
2326
endif()
2427

25-
message(STATUS "Using RAJA from ${RAJA_DIR}")
28+
message(STATUS "LvArray using RAJA from ${RAJA_DIR}")
2629

2730
find_package(RAJA REQUIRED PATHS ${RAJA_DIR})
2831

@@ -39,14 +42,14 @@ if(ENABLE_UMPIRE)
3942
message(FATAL_ERROR "UMPIRE_DIR must be defined and point to a valid directory when using Umpire.")
4043
endif()
4144

42-
message(STATUS "Using Umpire from ${UMPIRE_DIR}")
45+
message(STATUS "LvArray using Umpire from ${UMPIRE_DIR}")
4346

4447
find_package(umpire REQUIRED
4548
PATHS ${UMPIRE_DIR})
4649

4750
set(thirdPartyLibs ${thirdPartyLibs} umpire)
4851
else()
49-
message(STATUS "Not using Umpire.")
52+
message(STATUS "LvArray not using Umpire.")
5053
endif()
5154

5255
################################
@@ -65,32 +68,32 @@ if(ENABLE_CHAI)
6568
message(FATAL_ERROR "CHAI_DIR must be defined and point to a valid directory when using CHAI.")
6669
endif()
6770

68-
message(STATUS "Using CHAI from ${CHAI_DIR}")
71+
message(STATUS "LvArray using CHAI from ${CHAI_DIR}")
6972

7073
find_package(chai REQUIRED
7174
PATHS ${CHAI_DIR})
72-
73-
# If this isn't done chai will add -lRAJA to the link line, but we don't link to RAJA like that.
74-
get_target_property(CHAI_LINK_LIBRARIES chai INTERFACE_LINK_LIBRARIES)
75-
list(REMOVE_ITEM CHAI_LINK_LIBRARIES RAJA)
76-
set_target_properties(chai
77-
PROPERTIES INTERFACE_LINK_LIBRARIES "${CHAI_LINK_LIBRARIES}")
75+
76+
# # If this isn't done chai will add -lRAJA to the link line, but we don't link to RAJA like that.
77+
# get_target_property(CHAI_LINK_LIBRARIES chai INTERFACE_LINK_LIBRARIES)
78+
# list(REMOVE_ITEM CHAI_LINK_LIBRARIES RAJA)
79+
# set_target_properties(chai
80+
# PROPERTIES INTERFACE_LINK_LIBRARIES "${CHAI_LINK_LIBRARIES}")
7881

7982
set(thirdPartyLibs ${thirdPartyLibs} chai)
8083
else()
81-
message(STATUS "Not using CHAI.")
84+
message(STATUS "LvArray not using CHAI.")
8285
endif()
8386

8487

85-
################################
88+
###############################
8689
# CALIPER
87-
################################
90+
###############################
8891
if(ENABLE_CALIPER)
8992
if(NOT EXISTS ${CALIPER_DIR})
9093
message(FATAL_ERROR "CALIPER_DIR must be defined and point to a valid directory when using caliper.")
9194
endif()
9295

93-
message(STATUS "Using caliper from ${CALIPER_DIR}")
96+
message(STATUS "LvArray using caliper from ${CALIPER_DIR}")
9497

9598
find_package(caliper REQUIRED
9699
PATHS ${CALIPER_DIR})
@@ -102,7 +105,7 @@ if(ENABLE_CALIPER)
102105

103106
set(thirdPartyLibs ${thirdPartyLibs} caliper)
104107
else()
105-
message(STATUS "Not using caliper.")
108+
message(STATUS "LvArray not using caliper.")
106109
endif()
107110

108111
################################

scripts/uberenv/packages/lvarray/package.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,36 @@ class Lvarray(CMakePackage, CudaPackage):
5656
variant('docs', default=False, description='Build docs')
5757
variant('addr2line', default=True,
5858
description='Build support for addr2line.')
59-
59+
6060
depends_on('blt', when='@0.2.0:', type='build')
6161

6262
depends_on('camp')
63-
depends_on('camp+cuda', when='+cuda')
6463

6564
depends_on('raja')
66-
depends_on('raja+cuda', when='+cuda')
6765

68-
# At the moment Umpire doesn't support shared when building with CUDA.
6966
depends_on('umpire', when='+umpire')
70-
depends_on('umpire+cuda~shared', when='+umpire+cuda')
7167

7268
depends_on('chai+raja', when='+chai')
73-
depends_on('chai+raja+cuda', when='+chai+cuda')
7469

7570
depends_on('caliper', when='+caliper')
7671

7772
depends_on('python +shared +pic', when='+pylvarray')
78-
depends_on('[email protected]: +blas +lapack +force-parallel-build', when='+pylvarray')
79-
depends_on('[email protected]: +force-parallel-build', when='+pylvarray')
73+
depends_on('[email protected]: +blas +lapack', when='+pylvarray')
74+
depends_on('[email protected]:', when='+pylvarray')
8075
depends_on('py-pip', when='+pylvarray')
8176

8277
depends_on('[email protected]:', when='+docs', type='build')
8378
depends_on('[email protected]:', when='+docs', type='build')
8479

80+
with when('+cuda'):
81+
for sm_ in CudaPackage.cuda_arch_values:
82+
depends_on('camp +cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_))
83+
depends_on('raja +cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_))
84+
depends_on('umpire +cuda ~shared cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_))
85+
depends_on('chai +cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_))
86+
depends_on('caliper +cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_))
87+
88+
8589
phases = ['hostconfig', 'cmake', 'build', 'install']
8690

8791
@run_after('build')
@@ -285,10 +289,6 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None):
285289
cfg.write("#{0}\n\n".format("-" * 80))
286290

287291
if "+caliper" in spec:
288-
cfg.write("#{0}\n".format("-" * 80))
289-
cfg.write("# Caliper\n")
290-
cfg.write("#{0}\n\n".format("-" * 80))
291-
292292
cfg.write(cmake_cache_option("ENABLE_CALIPER", True))
293293
cfg.write(cmake_cache_entry("CALIPER_DIR", spec['caliper'].prefix))
294294
else:
@@ -297,6 +297,7 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None):
297297
cfg.write('#{0}\n'.format('-' * 80))
298298
cfg.write('# Python\n')
299299
cfg.write('#{0}\n\n'.format('-' * 80))
300+
300301
if '+pylvarray' in spec:
301302
cfg.write(cmake_cache_option('ENABLE_PYLVARRAY', True))
302303
cfg.write(cmake_cache_entry('Python3_EXECUTABLE', os.path.join(spec['python'].prefix.bin, 'python3')))
@@ -306,6 +307,7 @@ def hostconfig(self, spec, prefix, py_site_pkgs_dir=None):
306307
cfg.write("#{0}\n".format("-" * 80))
307308
cfg.write("# Documentation\n")
308309
cfg.write("#{0}\n\n".format("-" * 80))
310+
309311
if "+docs" in spec:
310312
cfg.write(cmake_cache_option("ENABLE_DOCS", True))
311313
sphinx_dir = spec['py-sphinx'].prefix

scripts/uberenv/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"package_version" : "develop",
44
"package_final_phase" : "hostconfig",
55
"package_source_dir" : "../..",
6-
"spack_url": "https://github.com/corbett5/spack",
7-
"spack_branch": "package/corbett/lvarray-update",
6+
"spack_url": "https://github.com/spack/spack",
7+
"spack_branch": "v0.19.0",
88
"spack_activate" : {},
99
"spack_clean_packages": ["lvarray"],
1010
"build_jobs": 100

scripts/uberenv/spack_configs/blueos_3_ppc64le_ib_p9/compilers.yaml

Lines changed: 111 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,90 @@ compilers:
22
- compiler:
33
44
paths:
5-
cc: /usr/tce/packages/clang/clang-ibm-10.0.1/bin/clang
6-
cxx: /usr/tce/packages/clang/clang-ibm-10.0.1/bin/clang++
5+
cc: /usr/tce/packages/clang/clang-10.0.1/bin/clang
6+
cxx: /usr/tce/packages/clang/clang-10.0.1/bin/clang++
77
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
88
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
99
flags:
10-
cflags: -mcpu=native -mtune=native
11-
cxxflags: -mcpu=native -mtune=native
10+
cflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
11+
cxxflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
1212
operating_system: rhel7
13-
target: ppc64le
13+
target: x86_64
1414
modules: []
1515
environment: {}
1616
extra_rpaths: []
1717
- compiler:
1818
1919
paths:
20-
cc: /usr/tce/packages/clang/clang-ibm-11.0.1/bin/clang
21-
cxx: /usr/tce/packages/clang/clang-ibm-11.0.1/bin/clang++
20+
cc: /usr/tce/packages/clang/clang-11.0.1/bin/clang
21+
cxx: /usr/tce/packages/clang/clang-11.0.1/bin/clang++
2222
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
2323
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
2424
flags:
25-
cflags: -mcpu=native -mtune=native
26-
cxxflags: -mcpu=native -mtune=native
25+
cflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
26+
cxxflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
2727
operating_system: rhel7
28-
target: ppc64le
28+
target: x86_64
29+
modules: []
30+
environment: {}
31+
extra_rpaths: []
32+
- compiler:
33+
34+
paths:
35+
cc: /usr/tce/packages/clang/clang-12.0.1/bin/clang
36+
cxx: /usr/tce/packages/clang/clang-12.0.1/bin/clang++
37+
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
38+
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
39+
flags:
40+
cflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
41+
cxxflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
42+
operating_system: rhel7
43+
target: x86_64
44+
modules: []
45+
environment: {}
46+
extra_rpaths: []
47+
- compiler:
48+
49+
paths:
50+
cc: /usr/tce/packages/clang/clang-13.0.1/bin/clang
51+
cxx: /usr/tce/packages/clang/clang-13.0.1/bin/clang++
52+
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
53+
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
54+
flags:
55+
cflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
56+
cxxflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
57+
operating_system: rhel7
58+
target: x86_64
59+
modules: []
60+
environment: {}
61+
extra_rpaths: []
62+
- compiler:
63+
64+
paths:
65+
cc: /usr/tce/packages/clang/clang-14.0.4/bin/clang
66+
cxx: /usr/tce/packages/clang/clang-14.0.4/bin/clang++
67+
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
68+
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
69+
flags:
70+
cflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
71+
cxxflags: -march=native -mtune=native --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0
72+
operating_system: rhel7
73+
target: x86_64
74+
modules: []
75+
environment: {}
76+
extra_rpaths: []
77+
- compiler:
78+
79+
paths:
80+
cc: /usr/tce/packages/gcc/gcc-7.3.0/bin/gcc
81+
cxx: /usr/tce/packages/gcc/gcc-7.3.0/bin/g++
82+
f77: /usr/tce/packages/gcc/gcc-7.3.0/bin/gfortran
83+
fc: /usr/tce/packages/gcc/gcc-7.3.0/bin/gfortran
84+
flags:
85+
cflags: -march=native -mtune=native
86+
cxxflags: -march=native -mtune=native
87+
operating_system: rhel7
88+
target: x86_64
2989
modules: []
3090
environment: {}
3191
extra_rpaths: []
@@ -37,25 +97,55 @@ compilers:
3797
f77: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
3898
fc: /usr/tce/packages/gcc/gcc-8.3.1/bin/gfortran
3999
flags:
40-
cflags: -mcpu=native -mtune=native
41-
cxxflags: -mcpu=native -mtune=native
100+
cflags: -march=native -mtune=native
101+
cxxflags: -march=native -mtune=native
102+
operating_system: rhel7
103+
target: x86_64
104+
modules: []
105+
environment: {}
106+
extra_rpaths: []
107+
- compiler:
108+
109+
paths:
110+
cc: /usr/tce/packages/gcc/gcc-9.3.1/bin/gcc
111+
cxx: /usr/tce/packages/gcc/gcc-9.3.1/bin/g++
112+
f77: /usr/tce/packages/gcc/gcc-9.3.1/bin/gfortran
113+
fc: /usr/tce/packages/gcc/gcc-9.3.1/bin/gfortran
114+
flags:
115+
cflags: -march=native -mtune=native
116+
cxxflags: -march=native -mtune=native
117+
operating_system: rhel7
118+
target: x86_64
119+
modules: []
120+
environment: {}
121+
extra_rpaths: []
122+
- compiler:
123+
124+
paths:
125+
cc: /usr/tce/packages/gcc/gcc-10.2.1/bin/gcc
126+
cxx: /usr/tce/packages/gcc/gcc-10.2.1/bin/g++
127+
f77: /usr/tce/packages/gcc/gcc-10.2.1/bin/gfortran
128+
fc: /usr/tce/packages/gcc/gcc-10.2.1/bin/gfortran
129+
flags:
130+
cflags: -march=native -mtune=native
131+
cxxflags: -march=native -mtune=native
42132
operating_system: rhel7
43-
target: ppc64le
133+
target: x86_64
44134
modules: []
45135
environment: {}
46136
extra_rpaths: []
47137
- compiler:
48-
spec: xl@16.1.1
138+
spec: intel@19.1.2
49139
paths:
50-
cc: /usr/tce/packages/xl/xl-2021.03.11/bin/xlc
51-
cxx: /usr/tce/packages/xl/xl-2021.03.11/bin/xlC
52-
f77: /usr/tce/packages/xl/xl-2021.03.11/bin/xlf
53-
fc: /usr/tce/packages/xl/xl-2021.03.11/bin/xlf
140+
cc: /usr/tce/packages/intel/intel-19.1.2/bin/icc
141+
cxx: /usr/tce/packages/intel/intel-19.1.2/bin/icpc
142+
f77: /usr/tce/packages/intel/intel-19.1.2/bin/ifort
143+
fc: /usr/tce/packages/intel/intel-19.1.2/bin/ifort
54144
flags:
55-
cflags: -qarch=pwr9 -qtune=pwr9 -qxlcompatmacros -qalias=noansi -qsmp=omp -qhot -qnoeh -qsuppress=1500-029 -qsuppress=1500-036
56-
cxxflags: -qarch=pwr9 -qtune=pwr9 -qxlcompatmacros -qlanglvl=extended0x -qalias=noansi -qsmp=omp -qhot -qnoeh -qsuppress=1500-029 -qsuppress=1500-036
145+
cflags: -gcc-name=/usr/tce/packages/gcc/gcc-8.3.1/bin/gcc -march=native -mtune=native
146+
cxxflags: -gxx-name=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ -march=native -mtune=native
57147
operating_system: rhel7
58-
target: ppc64le
148+
target: x86_64
59149
modules: []
60150
environment: {}
61151
extra_rpaths: []

0 commit comments

Comments
 (0)