please test CMake support in 2 August 2018 version (or later)

Some things are not exactly the same in CMake, see my inline answers below.

Date: Sun, 5 Aug 2018 23:12:46 -0600
From: Quang Ha <[email protected]...>
To: Axel Kohlmeyer <[email protected]>
Cc: LAMMPS Users Mailing List <[email protected]>
Subject: Re: [lammps-users] please test CMake support in 2 August 2018
        version (or later)
Message-ID:
        <[email protected]...>
Content-Type: text/plain; charset="utf-8"

Hi Axel (and LAMMPS team),

Thank you very much for this effort! I have started testing this out. Some
points I found out with roughly an hour or two playing with lammps/cmake:

1. OpenMP seems to be turned on by default: see
https://pastebin.com/rUKskDxm. And that's without turning BUILD_OMP on
(even though it should be OFF as default per
https://github.com/lammps/lammps/tree/master/cmake).

In CMake, we first check if the compiler supports OpenMP and if so we
enable it by default.
You can disable that by explicitly setting BUILD_OMP to OFF.
Background is that, we want to give the user the max. performance out
of the box by default and there is basically no harm to enable OpenMP
by default.

2. Similar issue with MPI - it seems like somehow CMake will default both
of these on without using BUILD_MPI or BUILD_OMP. Even after I removed
everything inside build directory: see https://pastebin.com/1qdRQxtt

Same as for 1.), if MPI is detected it gets used, you can disable it
explicitly with BUILD_MPI = OFF.

3. Turnig BUILD_MPI on, however, does not trigger LAMMPS to compile with
mpicc/mpicxx: see https://pastebin.com/ybDSEDxx

CMake doesn't use compiler wrappers by default, it will instead inject
the MPI include directories and linker flags, e.g. in your log
/home/qth20/.local/openmpi-3.1.1_gcc-7.3.0/include got injected.

Christoph