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

enhance LAMMPS easyblock dynamically add ARMV81 and A64FX to Kokkos CPU mapping based on LAMMPS version + fix installation of Python bindings for LAMMPS >= 2Aug2023 + fix sanity check by doing MPI_Finalize #3036

Merged
merged 27 commits into from
Feb 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
885f92c
Update KOKKOS_CPU_MAPPING for AArch64 in LAMMPS
Nov 20, 2023
ca5c67c
add recent LAMMPS mappings from https://docs.lammps.org/Build_extras.…
Jan 2, 2024
6eda3d9
add mapping for neoverse_v1, neoverse_n1 and a64fx
Jan 9, 2024
842b662
fix tyle errors
Jan 9, 2024
7123531
Fix CI error
Jan 9, 2024
2c8dfa3
fix update_kokkos_cpu_mapping function
Jan 9, 2024
a7a15f3
fix functions update_kokkos_cpu_mapping() and get_kokkos_arch()
Jan 9, 2024
9f6ac78
fix style errors in CI
Jan 9, 2024
c209141
fix style errors in CI
Jan 9, 2024
7e0824b
Resolve merge conflict
Jan 10, 2024
0fde983
Merge branch 'develop' into LAMMPS_ARM
laraPPr Jan 10, 2024
4db6eae
update function translate_lammps_version to accomodate version naming…
Jan 19, 2024
ac49192
add command to install lammps python package
Feb 7, 2024
5ce473a
fix line too long
Feb 7, 2024
80eb5ad
add docs
Feb 7, 2024
bf46283
add docs
Feb 7, 2024
e47ff4a
add docs
Feb 7, 2024
4070d2f
use kokkos_cpu_mapping rather than mapping for first argument to get_…
boegel Feb 8, 2024
75c491d
add to sanity check commands
Feb 12, 2024
f62c76d
Merge branch 'LAMMPS_ARM' of github.com:laraPPr/easybuild-easyblocks …
Feb 12, 2024
bfac735
make sanity fix for mpi run dependend on versions of LAMMPS older tha…
Feb 12, 2024
c389b2a
Update easybuild/easyblocks/l/lammps.py
laraPPr Feb 12, 2024
ac1e4a2
Update easybuild/easyblocks/l/lammps.py
laraPPr Feb 12, 2024
08b4cf6
Update easybuild/easyblocks/l/lammps.py
laraPPr Feb 12, 2024
0e7ff3c
break up long line
Feb 12, 2024
b9ae418
Merge branch 'LAMMPS_ARM' of github.com:laraPPr/easybuild-easyblocks …
Feb 12, 2024
ed1f1d4
disable auto download if MDI is a dependency
Feb 13, 2024
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
2 changes: 2 additions & 0 deletions easybuild/easyblocks/l/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
'zen2': 'ZEN2',
'zen3': 'ZEN3',
'power9le': 'POWER9',
'neoverse_n1': 'ARMV81',
'neoverse_v1': 'ARMV81',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laraPPr Did you check whether more recent LAMMPS versions supported better targets for neoverse_v1?
If so, we can refine this for more recent LAMMPS versions (or use a better target by default, and fall back to ARMV81 for older LAMMPS versions).

Should we also include A64FX here (which archspec should recognize as such by producing a64fx, see https://github.com/archspec/archspec-json/blob/d844bb36b21dfb9ff5d04727edfc08f592fc06af/cpu/microarchitectures.json#L2716

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the most recent mappings but they do not seem to include better targets for neoverse_v1

Copy link
Member

@ocaisa ocaisa Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in a tricky situation here as you also need to update the KOKKOS_CPU_MAPPING and KOKKOS_GPU_ARCH_TABLE to match up the new architectures introduced but this has to be done in a backwards compatible way. Probably we need to allow that the values of these dictionaries may be dictionaries themselves with version keys and the appropriate return values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I than test this easyblock with older easyconfigs of LAMMPS to see if anything is broken?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or update the "constants" based on the LAMMPS version in the easyblock constructor?

Maybe using constants was just wrong here, and it needs to be done via class variables like self.kokkos_cpu_mapping instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could start doing something like this to update the mapping for particular versions of LAMMPS:

    def update_kokkos_cpu_mapping(self):
                
        if LooseVersion(self.cur_version) >= LooseVersion(translate_lammps_version('2Aug2023')):
            self.kokkos_cpu_mapping['a64fx'] = 'A64FX'
    
    def __init__(self, *args, **kwargs):
        """LAMMPS easyblock constructor: determine whether we should build with CUDA support enabled."""
        super(EB_LAMMPS, self).__init__(*args, **kwargs)

        self.kokkos_cpu_mapping = copy.deepcopy(KOKKOS_CPU_MAPPING)
        self.update_kokkos_cpu_mapping()

and keep KOKKOS_CPU_MAPPING as is, assuming that it's correct for all LAMMPS versions we care about

ARMV81 is supported since stable_29Oct2020 it seems, see lammps/lammps@60864e3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARMv80, ARMv81, ARMv8-ThunderX are actually supported since stable_31Mar2017, see lammps/lammps@a9f0b7d

Copy link
Contributor Author

@laraPPr laraPPr Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARMv8-TX2 is available since stable_29sep2021 (see lammps/lammps@39786b1) and A64FX is available since stable_29Sep2021 (see lammps/lammps@eea14c5)

boegel marked this conversation as resolved.
Show resolved Hide resolved
}


Expand Down
Loading