Skip to content

Commit 252f200

Browse files
committed
use architecture dirs (eg a100) for different recipes
1 parent 2ef092c commit 252f200

30 files changed

+2216
-35
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
root: $SCRATCH/uenv-cache
2+
key: $SCRATCH/.keys/.gpg-spack-paraview

recipes/paraview/compilers.yaml renamed to recipes/paraview/a100/compilers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ bootstrap:
33
gcc:
44
specs:
55
- gcc@11
6+
67
#llvm:
78
# requires: gcc@11
89
# specs:

recipes/paraview/config.yaml renamed to recipes/paraview/a100/config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ spack:
66
commit: releases/v0.19
77
repo: https://github.com/spack/spack.git
88

9-
mirror:
10-
enable: true
11-
key: /tmp/gpg-spack-paraview

recipes/paraview/environments.yaml renamed to recipes/paraview/a100/environments.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ gcc-nvgpu:
1010
- cmake
1111
- ninja
1212
- python
13-
- [email protected]+egl+cuda+mpi+opengl2+tbb+ospray+python use_vtkm=on build_edition=rendering
13+
- [email protected] +egl +cuda +mpi +opengl2 +tbb +ospray +python use_vtkm=on build_edition=rendering ^llvm~gold
1414
packages:
15+
- git
1516
- perl
1617
- diffutils
1718
- gettext
@@ -43,6 +44,7 @@ gcc-osmesa:
4344
- vtk +osmesa ^mesa+glx+llvm+opengl+osmesa swr=avx2 default_library=shared
4445
- [email protected]+osmesa~cuda+mpi+opengl2+tbb+ospray+python use_vtkm=default build_edition=rendering ^mesa+glx+llvm+opengl+osmesa swr=avx2 default_library=shared
4546
packages:
47+
- git
4648
- perl
4749
- diffutils
4850
- gettext
File renamed without changes.
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
packages:
2+
all:
3+
providers:
4+
gl: [egl]
5+
egl:
6+
externals:
7+
8+
prefix: /usr
9+
buildable: false
10+
perl:
11+
buildable: false
12+
externals:
13+
14+
prefix: /usr
15+
cpio:
16+
buildable: false
17+
externals:
18+
19+
prefix: /usr
20+
openssh:
21+
buildable: false
22+
externals:
23+
24+
prefix: /usr
25+
openssl:
26+
buildable: false
27+
externals:
28+
29+
prefix: /usr
30+
autoconf:
31+
externals:
32+
33+
prefix: /usr
34+
automake:
35+
externals:
36+
37+
prefix: /usr
38+
bash:
39+
externals:
40+
41+
prefix: /usr
42+
binutils:
43+
externals:
44+
45+
prefix: /usr
46+
bison:
47+
externals:
48+
49+
prefix: /usr
50+
coreutils:
51+
externals:
52+
53+
prefix: /usr
54+
curl:
55+
externals:
56+
- spec: [email protected]+gssapi+ldap+nghttp2
57+
prefix: /usr
58+
file:
59+
externals:
60+
61+
prefix: /usr
62+
findutils:
63+
externals:
64+
65+
prefix: /usr
66+
flex:
67+
externals:
68+
- spec: [email protected]+lex
69+
prefix: /usr
70+
gawk:
71+
externals:
72+
73+
prefix: /usr
74+
gcc:
75+
externals:
76+
- spec: [email protected] languages=c,c++,fortran
77+
prefix: /usr
78+
extra_attributes:
79+
compilers:
80+
c: /usr/bin/gcc-7
81+
cxx: /usr/bin/g++-7
82+
fortran: /usr/bin/gfortran-7
83+
gettext:
84+
externals:
85+
86+
prefix: /usr
87+
ghostscript:
88+
externals:
89+
90+
prefix: /usr
91+
gmake:
92+
externals:
93+
94+
prefix: /usr
95+
groff:
96+
externals:
97+
98+
prefix: /usr
99+
hwloc:
100+
externals:
101+
102+
prefix: /usr
103+
openjdk:
104+
externals:
105+
- spec: [email protected]_9-suse-3.74.2-x8664
106+
prefix: /usr
107+
libfuse:
108+
externals:
109+
110+
prefix: /usr
111+
112+
prefix: /usr
113+
libtool:
114+
externals:
115+
116+
prefix: /usr
117+
lustre:
118+
externals:
119+
- spec: [email protected]_rc2_cray_113_g62287d0
120+
prefix: /usr
121+
m4:
122+
externals:
123+
124+
prefix: /usr
125+
ncurses:
126+
externals:
127+
- spec: [email protected]+termlib abi=6
128+
prefix: /usr
129+
perl:
130+
externals:
131+
- spec: [email protected]~cpanm+shared+threads
132+
prefix: /usr
133+
pkg-config:
134+
externals:
135+
136+
prefix: /usr
137+
python:
138+
externals:
139+
- spec: [email protected]+bz2+crypt+ctypes~dbm~lzma+nis+pyexpat+pythoncmd+readline+sqlite3+ssl~tix~tkinter+uuid+zlib
140+
prefix: /usr
141+
- spec: [email protected]+bz2+crypt+ctypes~dbm+lzma+nis+pyexpat~pythoncmd+readline+sqlite3+ssl~tix~tkinter+uuid+zlib
142+
prefix: /usr
143+
rsync:
144+
externals:
145+
146+
prefix: /usr
147+
sed:
148+
externals:
149+
150+
prefix: /usr
151+
slurm:
152+
externals:
153+
154+
prefix: /usr
155+
tar:
156+
externals:
157+
158+
prefix: /usr
159+
texlive:
160+
externals:
161+
- spec: texlive@20170524
162+
prefix: /usr
163+
which:
164+
externals:
165+
166+
prefix: /usr
167+
xz:
168+
externals:
169+
170+
prefix: /usr
171+
zip:
172+
externals:
173+
174+
prefix: /usr
175+
comgr:
176+
externals:
177+
178+
prefix: /opt/rocm-5.2.4
179+
hip:
180+
externals:
181+
182+
prefix: /opt/rocm-5.2.4
183+
hipblas:
184+
externals:
185+
186+
prefix: /opt/rocm-5.2.4
187+
hipsolver:
188+
externals:
189+
190+
prefix: /opt/rocm-5.2.4
191+
hipsparse:
192+
externals:
193+
194+
prefix: /opt/rocm-5.2.4
195+
hsa-rocr-dev:
196+
externals:
197+
198+
prefix: /opt/rocm-5.2.4
199+
miopen-hip:
200+
externals:
201+
202+
prefix: /opt/rocm-5.2.4
203+
miopen-opencl:
204+
externals:
205+
206+
prefix: /opt/rocm-5.2.4
207+
rccl:
208+
externals:
209+
210+
prefix: /opt/rocm-5.2.4
211+
rdma-core:
212+
externals:
213+
214+
prefix: /usr
215+
rocblas:
216+
externals:
217+
218+
prefix: /opt/rocm-5.2.4
219+
rocfft:
220+
externals:
221+
222+
prefix: /opt/rocm-5.2.4
223+
rocm-smi-lib:
224+
externals:
225+
226+
prefix: /opt/rocm-5.2.4
227+
rocprofiler-dev:
228+
externals:
229+
230+
prefix: /opt/rocm-5.2.4
231+
rocrand:
232+
externals:
233+
234+
prefix: /opt/rocm-5.2.4
235+
rocsolver:
236+
externals:
237+
238+
prefix: /opt/rocm-5.2.4
239+
rocsparse:
240+
externals:
241+
242+
prefix: /opt/rocm-5.2.4
243+
roctracer-dev:
244+
externals:
245+
246+
prefix: /opt/rocm-5.2.4

recipes/paraview/packages.yaml renamed to recipes/paraview/a100/packages.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ packages:
77
88
prefix: /usr
99
buildable: false
10-
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
2+
# Spack Project Developers. See the top-level COPYRIGHT file for details.
3+
#
4+
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
5+
6+
import re
7+
import sys
8+
9+
from spack.package import *
10+
11+
12+
class Egl(BundlePackage):
13+
"""Placeholder for external EGL(OpenGL) libraries from hardware vendors"""
14+
15+
homepage = "https://www.khronos.org/egl"
16+
17+
version("1.5")
18+
maintainers("biddisco")
19+
20+
# This should really be when='platform=linux' but can't because of a
21+
# current bug in when and how ArchSpecs are constructed
22+
if sys.platform.startswith("linux"):
23+
provides("[email protected]")
24+
25+
# conflict with GLX
26+
conflicts("glx")
27+
28+
# not always available, but sometimes
29+
executables = ["^eglinfo$"]
30+
31+
@classmethod
32+
def determine_version(cls, exe):
33+
if exe:
34+
output = Executable(exe)(output=str, error=str)
35+
match = re.search(r"EGL version string: (\S+)", output)
36+
return match.group(1) if match else None
37+
else:
38+
return None
39+
40+
# Override the fetcher method to throw a useful error message;
41+
# fixes GitHub issue (#7061) in which this package threw a
42+
# generic, uninformative error during the `fetch` step,
43+
@property
44+
def fetcher(self):
45+
msg = """This package is intended to be a placeholder for
46+
system-provided EGL(OpenGL) libraries from hardware vendors. Please
47+
download and install EGL drivers/libraries for your graphics
48+
hardware separately, and then set that up as an external package.
49+
An example of a working packages.yaml:
50+
51+
packages:
52+
egl:
53+
buildable: False
54+
externals:
55+
56+
prefix: /usr/
57+
58+
In that case, /usr/ should contain these two folders:
59+
60+
include/EGL/ (egl headers, including "egl.h")
61+
lib (egl libraries, including "libEGL.so")
62+
63+
"""
64+
raise InstallError(msg)
65+
66+
@fetcher.setter # Since fetcher is read-write, must override both
67+
def fetcher(self):
68+
_ = self.fetcher
69+
70+
@property
71+
def headers(self):
72+
return self.egl_headers
73+
74+
@property
75+
def libs(self):
76+
return self.egl_libs
77+
78+
@property
79+
def egl_headers(self):
80+
header_name = "GL/gl"
81+
gl_header = find_headers(header_name, root=self.prefix, recursive=True)
82+
header_name = "EGL/egl"
83+
egl_header = find_headers(header_name, root=self.prefix, recursive=True)
84+
return gl_header + egl_header
85+
86+
@property
87+
def egl_libs(self):
88+
spec = self.spec
89+
lib_name = "libGL"
90+
gl_lib = find_libraries(lib_name, root=self.prefix, recursive=True)
91+
lib_name = "libEGL"
92+
egl_lib = find_libraries(lib_name, root=self.prefix, recursive=True)
93+
return gl_lib + egl_lib

0 commit comments

Comments
 (0)