[lammps-users] Building Lammps with ScaFaCoS Package

Hi Axel,

Thanks for your prompt response and Sorry for the delayed one from my side.

With help from your pointers, I was able to successfully install the ScaFaCoS package with lammps.

First to answer your question:
I was using the following commands to configure Lammps using the attached cmake preset files:

cmake -C …/cmake/presets/vt.cmake -C …/cmake/presets/vt_nolib.cmake …/cmake -DKokkos_ARCH_SKX=yes -DKokkos_ARCH_TURING75=yes -DKokkos_ENABLE_CUDA=yes -DKokkos_ENABLE_OPENMP=yes -DDOWNLOAD_SCAFACOS=yes -DCMAKE_CXX_COMPILER=/home/vthakore/src/gitLammps/lib/kokkos/bin/nvcc_wrapper -DBUILD_SHARED_LIBS=on -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran-4.8 -DLAMMPS_SIZES=bigbig

There were a few things that were happening with my earlier attempt:

  1. Earlier, I was not using the flag -DBUILD_SHARED_LIBS=on.
  2. However, as it happens the -fPIC flag was being passed on correctly by Lammps.
  3. With what you shared and the error messages I was getting, I was able to decipher that the problem was not with Lammps but with the Fortran libraries.
  4. To compile the ScaFaCoS package with LAMMPS, I had installed the gfortran-4.8.5 compiler and that had also generated the associated static and dynamic libraries.
  5. However, these were probably not compatible with the installed gcc-version-7.5.0.
  6. To fix this, I then installed the libgfortran-7-dev: https://launchpad.net/ubuntu/focal/+package/libgfortran-7-dev
    Once I followed the above steps, the compilation worked without any problems for me.

Now, I have a question for you:
Is it possible to have the dependencies for the external libraries for the USER-packages listed on the LAMMPS website?

your problem was apparently due to misconfiguration of your machine. also, what you are reporting is very specific to your specific Linux distribution and the version of it. there is not other information we can provide than “do not misconfigure your machine”.

dependencies for LAMMPS itself are documented and CMake checks as much as possible.
However, dependencies for dependent libraries like ScaFaCoS is something that you have to ask the ScaFaCoS developers about.

What we do provide are tested container images:
https://cloud.sylabs.io/library/lammps/default/lammps_development

So if you install singularity you can compile and run LAMMPS in a suitable one of those containers (or use the definition files in the tools/singularity folder to build/customize the image yourself). those images are used in integration testing and thus are known to work and have all suitable libraries and tools installed.

axel.