Skip to content

Commit

Permalink
set processor_arch to EASYBUILD_GENERIC for generic builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Oct 14, 2024
1 parent 3cd59c8 commit 64bc644
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion easybuild/easyblocks/l/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import os
import re
import tempfile
import textwrap
import copy
from easybuild.tools import LooseVersion

Expand All @@ -46,6 +47,7 @@
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
from easybuild.tools.systemtools import get_shared_lib_ext
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC

from easybuild.easyblocks.generic.cmakemake import CMakeMake

Expand Down Expand Up @@ -579,7 +581,14 @@ def get_kokkos_arch(kokkos_cpu_mapping, cuda_cc, kokkos_arch, cuda=None):

processor_arch = None

if kokkos_arch:
if build_option('optarch') == OPTARCH_GENERIC:
processor_arch = 'EASYBUILD_GENERIC'
warning_msg = "Generic build requested, so setting CPU ARCH to "
warning_msg += "custom value EASYBUILD_GENERIC to prevent CPU optimizations."
if kokkos_arch:
warning_msg += " The specified kokkos_arch (%s) will be ignored." % kokkos_arch
print_warning(warning_msg)
elif kokkos_arch:
if kokkos_arch not in KOKKOS_CPU_ARCH_LIST:
warning_msg = "Specified CPU ARCH (%s) " % kokkos_arch
warning_msg += "was not found in listed options [%s]." % KOKKOS_CPU_ARCH_LIST
Expand Down

0 comments on commit 64bc644

Please sign in to comment.