Architecture value for installing lammps with RTX 4090 cmake g++ cuda

I am about to compile lammps with g++ cmake on a linux system with cuda installed and running for an rtx 4090

What should be the architecture value be for this installation ( e.g. = 80, for Ampere ) ?

regards
pb

You would have to use sm_89, according to Wikipedia

thank you for digging that out of Wiki. I did not recognized the 8.9 format.
pb

Also a nice table here: CUDA - Wikipedia.

1 Like

Perfect. Thank you.

Keying in on sm_89 I found:

which others might find useful.

thanks again
pb

When compiling the GPU package with CMake this is not really needed. It will compile “fat” versions of the GPU kernels for all CUDA architectures supported by the CUDA toolkit in use.
You only need to specify the architecture when compiling the KOKKOS package for CUDA.

1 Like

thank you again. I intend to use Reaxff and Airebo and my readings indicate that Kokkos is necessary for those two items. - at least for the Reaxff. Rong ?? I will use CMake , however.

When through with a vetted install I was going to post a script of the commands I used. Just a general info item. Would that be superfluous ?

pb

AIREBO has no GPU acceleration at all.
REAXFF is indeed only accelerated via KOKKOS, however, then the GPU package settings are irrelevant and you have to follow the documentation for selecting GPU architectures.

Last time I checked, the KOKKOS 3.7.1 version does not (yet) have a setting for sm_89, only for sm_90 (and sm_80/sm_86). And that is looking at the code for a new LAMMPS patch release due later this week with an updated KOKKOS library. Before that only sm_80 and sm_86 are supported. I am not sure, if that setting would be sufficient for your GPU.

Thus you may run into trouble with REAXFF and KOKKOS as well.
It is definitely recommended that you wait for the next LAMMPS patch release so you have the most up-to-date Kokkos library included.

Update:
I am trying to customize the Kokkos library in LAMMPS so that it will support sm_89 with KOKKOS. If you don’t mind trying experimental code, you can download a snapshot from https://github.com/akohlmey/lammps/archive/refs/heads/collected-fixes.tar.gz

To select sm_89 with KOKKOS, you should use -D Kokkos_ARCH_ADA89=ON on the command line. Since configuring KOKKOS can be tricky, it is often best to modify the preset in cmake/presets/kokkos-cuda.cmake accordingly and load that from the cmake command line with -C. Once you have a working LAMMPS executable and are more familiar with the details, you can dig through the various KOKKOS configuration options and customize your installation.

At the moment, I have two options 1) an ‘older’ 2x rtx3900 or 2) the ‘new car smell’ rtx 4090. Leaning to the older one first but does that means a re-install of a working lammps. I have no compunction to experimenting, however and the 4090 and Kokkos will have to marry up since reaxff is now mandatory in my case. I appreciate the feedback

pb