summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2023-05-19 12:28:18 -0500
committerGitHub <noreply@github.com>2023-05-19 10:28:18 -0700
commit1a21376515b57ff51b2fd3b4cd17781b4247fc65 (patch)
tree7a06af56f0c115d85a439c420a72232a4720273e
parentbf45a2b6d3bafc2c87d0741abf13151ac63973e7 (diff)
downloadspack-1a21376515b57ff51b2fd3b4cd17781b4247fc65.tar.gz
spack-1a21376515b57ff51b2fd3b4cd17781b4247fc65.tar.bz2
spack-1a21376515b57ff51b2fd3b4cd17781b4247fc65.tar.xz
spack-1a21376515b57ff51b2fd3b4cd17781b4247fc65.zip
intel-xed: add version 2023.04.16 (#37582)
* intel-xed: add version 2023.04.16 1. add version 2023.04.16 2. adjust the mbuild resource to better match the xed version at the time 3. replace three conflicts() with one new requires() for x86_64 target 4. add patch for libxed-ild for some new avx512 instructions * [@spackbot] updating style on behalf of mwkrentel * Fix the build for 2023.04.16. XED requires its source directory to be exactly 'xed', so add a symlink. 5. move the mbuild resource up one level, xed wants it to be in the same directory as the xed source dir 6. deprecate 10.2019.03 * semantic style fix: add OSError to except * [@spackbot] updating style on behalf of mwkrentel --------- Co-authored-by: mwkrentel <mwkrentel@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/intel-xed/libxed-ild.patch32
-rw-r--r--var/spack/repos/builtin/packages/intel-xed/package.py35
2 files changed, 55 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/intel-xed/libxed-ild.patch b/var/spack/repos/builtin/packages/intel-xed/libxed-ild.patch
new file mode 100644
index 0000000000..bbc01fe87c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/intel-xed/libxed-ild.patch
@@ -0,0 +1,32 @@
+Fixes a bug where libxed-ild didn't understand some instructions.
+
+https://github.com/intelxed/xed/issues/298
+
+
+diff --git a/src/dec/xed-ild.c b/src/dec/xed-ild.c
+index 8bf7cbe..0ab90ac 100644
+--- a/src/dec/xed-ild.c
++++ b/src/dec/xed-ild.c
+@@ -1385,6 +1385,7 @@ void xed_ild_lookup_init(void) {
+ void xed_ild_init(void) {
+ init_prefix_table();
+ xed_ild_lookup_init();
++ xed_init_chip_model_info();
+ #if defined(XED_EXTENSION_XOP_DEFINED)
+ xed_ild_chip_init();
+ #endif
+diff --git a/xed_mbuild.py b/xed_mbuild.py
+index db34179..5a7842c 100755
+--- a/xed_mbuild.py
++++ b/xed_mbuild.py
+@@ -1081,7 +1081,8 @@ def build_xed_ild_library(env, lib_env, lib_dag, sources_to_replace):
+ 'xed-ild-disp-l3.c', # generated
+ 'xed-ild-eosz.c', # generated
+ 'xed-ild-easz.c', # generated
+- 'xed-ild-imm-l3.c'] # generated
++ 'xed-ild-imm-l3.c', # generated
++ 'xed-error-enum.c',] # generated
+ common_objs = lib_env.make_obj(common_sources)
+
+ ild_objs += xbc.build_dir_join(lib_env, common_objs)
+
diff --git a/var/spack/repos/builtin/packages/intel-xed/package.py b/var/spack/repos/builtin/packages/intel-xed/package.py
index 2422e91f63..9254d02c9d 100644
--- a/var/spack/repos/builtin/packages/intel-xed/package.py
+++ b/var/spack/repos/builtin/packages/intel-xed/package.py
@@ -21,6 +21,7 @@ class IntelXed(Package):
# Current versions now have actual releases and tags.
version("main", branch="main")
+ version("2023.04.16", tag="v2023.04.16")
version("2022.10.11", tag="v2022.10.11")
version("2022.08.11", tag="v2022.08.11")
version("2022.04.17", tag="v2022.04.17")
@@ -28,30 +29,31 @@ class IntelXed(Package):
version("11.2.0", tag="11.2.0")
# The old 2019.03.01 version (before there were tags).
- version("10.2019.03", commit="b7231de4c808db821d64f4018d15412640c34113")
+ version("10.2019.03", commit="b7231de4c808db821d64f4018d15412640c34113", deprecated=True)
- resource(name="mbuild", placement="mbuild", git=mbuild_git, branch="main", when="@main")
+ # XED wants the mbuild directory adjacent to xed in the same directory.
+ mdir = join_path("..", "mbuild")
+ resource(name="mbuild", placement=mdir, git=mbuild_git, branch="main", when="@main")
+
+ # Match xed more closely with the version of mbuild at the time.
resource(
- name="mbuild",
- placement="mbuild",
- git=mbuild_git,
- commit="09b6654be0c52bf1df44e88c88b411a67b624cbd",
- when="@:9999",
+ name="mbuild", placement=mdir, git=mbuild_git, tag="v2022.07.28", when="@2022.07:9999"
)
+ resource(name="mbuild", placement=mdir, git=mbuild_git, tag="v2022.04.17", when="@:2022.06")
+
variant("debug", default=False, description="Enable debug symbols")
variant("pic", default=False, description="Compile with position independent code.")
# The current mfile uses python3 by name.
- depends_on("python@3.4:", type="build")
+ depends_on("python@3.6:", type="build")
patch("1201-segv.patch", when="@12.0.1")
patch("2019-python3.patch", when="@10.2019.03")
+ patch("libxed-ild.patch", when="@12.0:2022.12")
- conflicts("target=ppc64:", msg="intel-xed only runs on x86")
- conflicts("target=ppc64le:", msg="intel-xed only runs on x86")
- conflicts("target=aarch64:", msg="intel-xed only runs on x86")
+ requires("target=x86_64:", msg="intel-xed only runs on x86/x86_64")
mycflags = [] # type: List[str]
@@ -67,10 +69,19 @@ class IntelXed(Package):
def install(self, spec, prefix):
# XED needs PYTHONPATH to find the mbuild directory.
- mbuild_dir = join_path(self.stage.source_path, "mbuild")
+ mbuild_dir = join_path(self.stage.source_path, "..", "mbuild")
python_path = os.getenv("PYTHONPATH", "")
os.environ["PYTHONPATH"] = mbuild_dir + ":" + python_path
+ # In 2023.04.16, the xed source directory must be exactly 'xed',
+ # so add a symlink, but don't fail if the link already exists.
+ # See: https://github.com/intelxed/xed/issues/300
+ try:
+ lname = join_path(self.stage.source_path, "..", "xed")
+ os.symlink("spack-src", lname)
+ except OSError:
+ pass
+
mfile = Executable(join_path(".", "mfile.py"))
args = ["-j", str(make_jobs), "--cc=%s" % spack_cc, "--no-werror"]