Skip to content

Commit

Permalink
add openmp variant to lammps (spack#11643)
Browse files Browse the repository at this point in the history
* add openmp variant to lammps

* add conflict for %gcc@9: and +openmp
  • Loading branch information
js947 authored and junghans committed Jun 7, 2019
1 parent 06cc799 commit 9c1c50f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion var/spack/repos/builtin/packages/lammps/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def url_for_version(self, version):
description='Build the liblammps in addition to the executable')
variant('mpi', default=True,
description='Build with mpi')
variant('openmp', default=True, description='Build with OpenMP')
variant('exceptions', default=False,
description='Build with lammps exceptions')

Expand Down Expand Up @@ -87,6 +88,7 @@ def url_for_version(self, version):
conflicts('+user-misc', when='~manybody')
conflicts('+user-phonon', when='~kspace')
conflicts('+user-misc', when='~manybody')
conflicts('%gcc@9:', when='+openmp')

patch("lib.patch", when="@20170901")
patch("660.patch", when="@20170922")
Expand All @@ -109,7 +111,9 @@ def cmake_args(self):
'ON' if '+exceptions' in spec else 'OFF'),
'-D{0}_MPI={1}'.format(
mpi_prefix,
'ON' if '+mpi' in spec else 'OFF')
'ON' if '+mpi' in spec else 'OFF'),
'-DBUILD_OMP={0}'.format(
'ON' if '+openmp' in spec else 'OFF'),
]

if spec.satisfies('@20180629:+lib'):
Expand Down

0 comments on commit 9c1c50f

Please sign in to comment.