LAMMPS installation

Hi all,

I’ve cloned the latest version of LAMMPS via Git and want to compile it with the Kokkos package using a gcc compiler **instead of g++, since I’m working on an HPC system where g++ isn’t available.

Is it possible to build Kokkos (and LAMMPS) using only gcc, or is a C++ compiler strictly required?

Thanks in advance for any insights.

Best,
Jo

What kind of HPC system does not have a C++ compiler? Are you sure you are using that system correctly? Have you studied its documentation? Perhaps you need to load some environment module with a custom compiler. If this cannot be remedied, you or your boss (or boss of bosses) should have a proper conversation with the admins.

Emphatically, yes. LAMMPS is written in C++ (and a lot of scientific software is these days). Not only is C++ required, but for KOKKOS, you need a C++17 compiler.
But you don’t need GCC, you can also use Clang, or Intel or Nvidia/PGI compilers.

If you have enough time, energy, and local support, it is entirely feasible to build your own GCC from source (which includes g++ and gcc so I find it exceedingly curious that you’d be able to access one but not the other).