Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable SVML AVX-512 routines in the pyna update script #1444

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions networks/update_pynucastro_nets.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/usr/bin/env python3
"""Update all the pynucastro networks in the current directory."""

import os
import subprocess
import sys
from pathlib import Path

# Disable slightly-less-precise AVX-512 SVML routines to avoid roundoff diffs
# when different machines regenerate the networks. Accuracy is important here,
# and these calculations aren't a bottleneck. See pynucastro/conftest.py for
# more details.
env = os.environ.copy()
env["NPY_DISABLE_CPU_FEATURES"] = "AVX512F AVX512CD AVX512_SKX"

cwd = Path.cwd()
for net_file in sorted(cwd.glob("**/pynucastro.net")):
network_dir = net_file.parent
Expand All @@ -23,6 +31,7 @@
result = subprocess.run(
[sys.executable, update_script],
cwd=network_dir,
env=env,
capture_output=False,
check=False,
)
Expand Down