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

Add support for LAMMPS using CMakeMake #6917

Closed

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Sep 26, 2018

(created using eb --new-pr)

@ocaisa ocaisa added the new label Sep 26, 2018
@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2018

Alternate approach to easybuilders/easybuild-easyblocks#594 using CMakeMake since this build system is now available in LAMMPS

@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2018

We currently have 2 CUDA versions in 2018b, the error in the test is not aware of the fact that this is already the case (i.e, I'm not the one causing it)

@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2018

There is room for an easyblock here so you can seamlessly handle the currently excluded build options and other specifics but at least this is an initial version.

@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2018

I don't have access to the toolchain used here (I successfully built the original easyconfig in the JSC custom env with slightly different deps), if someone else could upload a test report that would be great.

@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2018

I've commented out the CUDA support (although it does work with CUDA 10) because you need to provide specifics about the particular hardware you have

@boegel
Copy link
Member

boegel commented Sep 26, 2018

@ocaisa Test reports coming in (just for proof of concept sake).

This is way too complex for an easyconfig-only approach, but using the CMake build procedure should make a custom easyblock for LAMMPS as bit easier indeed...

@boegel
Copy link
Member

boegel commented Sep 26, 2018

Test report by @boegel
SUCCESS
Build succeeded for 4 out of 4 (3 easyconfigs in this PR)
node2404.golett.os - Linux centos linux 7.5.1804, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/8a56858996bddc14c0fd60be3608c76f for a full test report.

@boegel
Copy link
Member

boegel commented Sep 26, 2018

Test report by @boegel
SUCCESS
Build succeeded for 13 out of 13 (3 easyconfigs in this PR)
node3124.skitty.os - Linux centos linux 7.5.1804, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 2.7.5
See https://gist.github.com/f3eb97124e6f93495de60ae4076fb0d7 for a full test report.

@vanzod
Copy link
Member

vanzod commented Oct 1, 2018

Test report by @vanzod
SUCCESS
Build succeeded for 7 out of 7 (3 easyconfigs in this PR)
cermis - Linux debian 9.5, Intel(R) Xeon(R) CPU E5620 @ 2.40GHz, Python 2.7.13
See https://gist.github.com/4c02180b8f89fc08687cd1db68b377b9 for a full test report.

@ocaisa
Copy link
Member Author

ocaisa commented Oct 3, 2018

Ok, this has basically everything you need to create the easyblock. The included packages need to cross-referenced with https://lammps.sandia.gov/doc/Build_extras.html#kokkos
...I don't have time to do this now but maybe someone else would take up the gauntlet @vanzod ?

# Initialise configopts so we can comment out at will below
configopts = ""

parallelisation_packages = ['BUILD_MPI', 'BUILD_OMP', 'PKG_KOKKOS', 'PKG_OPT', 'PKG_USER-OMP', 'PKG_USER-INTEL', 'PKG_GPU']
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like you can't have PKG_GPU and Kokkos at the same time

# Need to use the Kokkos wrapper if we are using CUDA
configopts += ' -DCMAKE_CXX_COMPILER="%(builddir)s/%(namelower)s-%(version)s/lib/kokkos/bin/nvcc_wrapper" '
# and tell the wrapper which c++ compiler to use
configopts += ' -DCMAKE_CXX_FLAGS="-ccbin $CXX $CXXFLAGS" '
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems to cause problems with some packages (which seem to be using the CXX_FLAGS with the C compiler)

@ocaisa
Copy link
Member Author

ocaisa commented Nov 16, 2018

@vanzod Can you take this for another spin, I've updated the version and introduced logic. I know @boegel won't like this but the hardware related stuff will make an easyblock time consuming, it's on my to-do but this at least exposes all the pieces of the puzzle.

('gzip', '1.9'),
('HDF5', '1.10.2'),
('tbb', '2018_U5'),
#('CUDA', '10.0.130', '', True),
Copy link
Member Author

Choose a reason for hiding this comment

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

It would seem that CUDA+kokkos support only works with GCC, the wrapper causes problems in other modules using (CUDA supported) Intel compilers.

@ocaisa
Copy link
Member Author

ocaisa commented Nov 16, 2018

Personally, I've successfully built this with cuda = True, kokkos = False, cuda = False, kokkos = False and cuda = False, kokkos = True. The only successful build I've had with kokkos+cuda has been by cheating and using the underlying GCCcore as the C++ compiler (by setting a hardcoded CMAKE_CXX_FLAGS)

@easybuilders easybuilders deleted a comment from boegelbot Nov 16, 2018
@easybuilders easybuilders deleted a comment from boegelbot Nov 16, 2018
@JackPerdue
Copy link
Contributor

"@boegel won't like this but"

I'm sure he absolutely abhors it but I absolutely love it. "We don't need no stinkin' easyblocks".

I never knew that easyconfigs had if: else: clauses.... that's cool. I'm going to play with this.

@JackPerdue
Copy link
Contributor

LAMMPS-20180316-intel-2017b-Python-3.6.3-CUDA-9.1.85-mpi.eb.txt

(Our latest build.... local users need VORO++ also)

@JackPerdue
Copy link
Contributor

OK... bad example... it uses the lammps.py easyblock PR. But still, anything that can be pushed into the easyconfig should be. Don't make packagers have to jump through hoops to update easyblocks just to build the latest version.

@fgeorgatos
Copy link
Contributor

@ocaisa , @JackPerdue : I have also found unnatural that you need to choose about what goes into an easyconfig and what goes into an easyblock;

perhaps, I'd rather have a long yaml file configuration format on which python code can be embedded:

  • in any case easyconfigs or easyblocks are not stand-along code anyhow, so it would be ideal to bundle the logic up, so that git commits preserve related information into one transaction!

@boegel boegel added this to the 3.x milestone May 14, 2019
@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
@Darkless012
Copy link
Contributor

Could this be closed/rejected due to LAMMPS-foss/intell-2019b being merged?
#9883
#9884

@boegel
Copy link
Member

boegel commented Feb 29, 2020

closing due to easybuilders/easybuild-easyblocks#1964

@boegel boegel closed this Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants