diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/lammps/package.py | 337 |
1 files changed, 321 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index 327ea1a379..89108a4b1a 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -24,6 +24,7 @@ class Lammps(CMakePackage, CudaPackage): version('20220107', sha256='fbf6c6814968ae0d772d7b6783079ff4f249a8faeceb39992c344969e9f1edbb') version('20211214', sha256='9f7b1ee2394678c1a6baa2c158a62345680a952eee251783e3c246b3f12db4c9') version('20211027', sha256='c06f682fcf9d5921ca90c857a104e90fba0fe65decaac9732745e4da49281938') + version('20210929.3', sha256='d7df30f7ce0bd8b7c21949cf5bdf1877858815379cddb8a264da7a8cbf699639') version('20210929.2', sha256='26586c1e82356b60e40359ee474818003c7788214bfe2bfe9128a3dbe5200b4d') version('20210929.1', sha256='3b792e20864bf88b855332486996f2c540deabb4e3507e48fa4ee96ad79615ec') version('20210929', sha256='5132f332b582be3006510562ef10bac9ef76d760f34fc08a2af556416c57cf4c') @@ -77,26 +78,39 @@ class Lammps(CMakePackage, CudaPackage): return "https://github.com/lammps/lammps/archive/patch_{0}{1}.tar.gz".format( vdate.strftime("%d%b%Y").lstrip('0'), update) + # List of supported optional packages + # Note: package `openmp` in this recipe is called `openmp-package`, to avoid clash + # with the pre-existing `openmp` variant supported_packages = ['asphere', 'body', 'class2', 'colloid', 'compress', - 'coreshell', 'dipole', 'granular', 'kspace', + 'coreshell', 'dielectric', 'dipole', 'granular', 'kspace', 'kokkos', 'latte', 'manybody', 'mc', 'meam', 'misc', - 'mliap', 'molecule', 'mpiio', 'opt', 'peri', 'poems', - 'python', 'qeq', 'replica', 'rigid', 'shock', 'snap', - 'spin', 'srd', 'user-atc', 'user-adios', - 'user-awpmd', 'user-bocs', 'user-cgsdk', + 'mliap', 'ml-iap', 'ml-snap', 'molecule', 'mpiio', + 'opt', 'peri', 'plugin', 'poems', 'python', 'qeq', 'replica', + 'rigid', 'shock', 'snap', 'spin', 'srd', 'voronoi', + 'user-atc', 'user-adios', + 'user-awpmd', 'user-bocs', 'user-brownian', 'user-cgsdk', 'user-colvars', 'user-diffraction', 'user-dpd', 'user-drude', 'user-eff', 'user-fep', 'user-h5md', 'user-lb', 'user-manifold', 'user-meamc', - 'user-mesodpd', 'user-mesont', 'user-mgpt', - 'user-misc', 'user-mofff', 'user-netcdf', 'user-omp', + 'user-mesodpd', 'user-mesont', 'user-mgpt', 'user-misc', + 'user-mofff', 'user-molfile', 'user-netcdf', 'user-omp', 'user-phonon', 'user-plumed', 'user-ptm', 'user-qtb', 'user-reaction', 'user-reaxc', 'user-sdpd', 'user-smd', 'user-smtbq', 'user-sph', 'user-tally', - 'user-uef', 'user-yaff', 'voronoi'] + 'user-uef', 'user-yaff', + 'atc', 'adios', 'awpmd', 'bocs', 'brownian', 'cg-sdk', + 'colvars', 'diffraction', 'dpd-basic', 'dpd-meso', + 'dpd-react', 'dpd-smooth', 'drude', 'eff', 'extra-compute', + 'extra-dump', 'extra-fix', 'extra-molecule', 'extra-pair', + 'fep', 'h5md', 'interlayer', 'latboltz', 'machdyn', + 'manifold', 'mesont', 'mgpt', 'mofff', 'molfile', 'netcdf', + 'openmp-package', 'orient', 'phonon', 'plumed', 'ptm', 'qtb', + 'reaction', 'reaxff', 'smtbq', 'sph', 'tally', 'uef', 'yaff'] for pkg in supported_packages: variant(pkg, default=False, - description='Activate the {0} package'.format(pkg)) + description='Activate the {0} package' + .format(pkg.replace('-package', ''))) variant('lib', default=True, description='Build the liblammps in addition to the executable') variant('mpi', default=True, @@ -129,8 +143,11 @@ class Lammps(CMakePackage, CudaPackage): depends_on('fftw-api@3', when='+kspace') depends_on('voropp+pic', when='+voronoi') depends_on('netcdf-c+mpi', when='+user-netcdf') + depends_on('netcdf-c+mpi', when='+netcdf') depends_on('blas', when='+user-atc') + depends_on('blas', when='+atc') depends_on('lapack', when='+user-atc') + depends_on('lapack', when='+atc') depends_on('opencl', when='+opencl') depends_on('latte@1.0.1', when='@:20180222+latte') depends_on('latte@1.1.1:', when='@20180316:20180628+latte') @@ -140,8 +157,11 @@ class Lammps(CMakePackage, CudaPackage): depends_on('lapack', when='+latte') depends_on('python', when='+python') depends_on('mpi', when='+user-lb') + depends_on('mpi', when='+latboltz') depends_on('mpi', when='+user-h5md') + depends_on('mpi', when='+h5md') depends_on('hdf5', when='+user-h5md') + depends_on('hdf5', when='+h5md') depends_on('jpeg', when='+jpeg') depends_on('kim-api', when='+kim') depends_on('libpng', when='+png') @@ -149,8 +169,15 @@ class Lammps(CMakePackage, CudaPackage): depends_on('kokkos+deprecated_code+shared@3.0.00', when='@20200303+kokkos') depends_on('kokkos+shared@3.1:', when='@20200505:+kokkos') depends_on('adios2', when='+user-adios') + depends_on('adios2', when='+adios') depends_on('plumed', when='+user-plumed') + depends_on('plumed', when='+plumed') depends_on('eigen@3:', when='+user-smd') + depends_on('eigen@3:', when='+machdyn') + depends_on('py-cython', when='+mliap+python') + depends_on('py-cython', when='+ml-iap+python') + depends_on('py-numpy', when='+mliap+python') + depends_on('py-numpy', when='+ml-iap+python') conflicts('+cuda', when='+opencl') conflicts('+body', when='+poems@:20180628') @@ -158,27 +185,303 @@ class Lammps(CMakePackage, CudaPackage): conflicts('+python', when='~lib') conflicts('+qeq', when='~manybody') conflicts('+user-atc', when='~manybody') + conflicts('+atc', when='~manybody') conflicts('+user-misc', when='~manybody') conflicts('+user-phonon', when='~kspace') - conflicts('+user-misc', when='~manybody') + conflicts('+phonon', when='~kspace') conflicts('%gcc@9:', when='@:20200303+openmp') conflicts('+kokkos', when='@:20200227') + conflicts('+dielectric', when='~kspace') + conflicts('+dielectric', when='@:20210702~user-misc') + conflicts('+dielectric', when='@20210728:~extra-pair') conflicts( - '+meam', when='@20181212:', - msg='+meam was removed after @20181212, use +user-meamc instead') + '+meam', when='@20181212:20210527', + msg='+meam is removed between @20181212 and @20210527, use +user-meamc instead') conflicts( '+user-meamc', when='@:20181212', msg='+user-meamc only added @20181212, use +meam instead') conflicts( '+user-reaction', when='@:20200303', msg='+user-reaction only supported for version 20200505 and later') + conflicts( + '+plugin', when='@:20210310', + msg='+plugin only supported for version 20210408 and later') + conflicts( + '+user-brownian', when='@:20210408', + msg='+user-brownian only supported for version 20210514 and later') + conflicts( + '+dielectric', when='@:20210527', + msg='+dielectric only supported for version 20210702 and later') + conflicts( + '+dpd-basic', when='@:20210527', + msg='+dpd-basic only supported for version 20210702 and later') conflicts('+mliap', when='~snap') + conflicts('+ml-iap', when='~ml-snap') conflicts( '+user-adios +mpi', when='^adios2~mpi', msg='With +user-adios, mpi setting for adios2 and lammps must be the same') conflicts( '+user-adios ~mpi', when='^adios2+mpi', msg='With +user-adios, mpi setting for adios2 and lammps must be the same') + conflicts( + '+adios +mpi', when='^adios2~mpi', + msg='With +adios, mpi setting for adios2 and lammps must be the same') + conflicts( + '+adios ~mpi', when='^adios2+mpi', + msg='With +adios, mpi setting for adios2 and lammps must be the same') + + # In the following, package refactoring at 2 July 2021 + conflicts( + '+mliap', when='@20210702:', + msg='+mliap was removed after @20210527, use +ml-iap instead') + conflicts( + '+ml-iap', when='@:20210527', + msg='+ml-iap only added @20210702, use +mliap instead') + conflicts( + '+snap', when='@20210702:', + msg='+snap was removed after @20210527, use +ml-snap instead') + conflicts( + '+ml-snap', when='@:20210527', + msg='+ml-snap only added @20210702, use +snap instead') + # + conflicts( + '+user-atc', when='@20210702:', + msg='+user-atc was removed after @20210527, use +atc instead') + conflicts( + '+atc', when='@:20210527', + msg='+atc only added @20210702, use +user-atc instead') + conflicts( + '+user-adios', when='@20210702:', + msg='+user-adios was removed after @20210527, use +adios instead') + conflicts( + '+adios', when='@:20210527', + msg='+adios only added @20210702, use +user-adios instead') + conflicts( + '+user-awpmd', when='@20210702:', + msg='+user-awpmd was removed after @20210527, use +awpmd instead') + conflicts( + '+awpmd', when='@:20210527', + msg='+awpmd only added @20210702, use +user-awpmd instead') + conflicts( + '+user-bocs', when='@20210702:', + msg='+user-bocs was removed after @20210527, use +bocs instead') + conflicts( + '+bocs', when='@:20210527', + msg='+bocs only added @20210702, use +user-bocs instead') + conflicts( + '+user-brownian', when='@20210702:', + msg='+user-brownian was removed after @20210527, use +brownian instead') + conflicts( + '+brownian', when='@:20210527', + msg='+brownian only added @20210702, use +user-brownian instead') + conflicts( + '+user-cgsdk', when='@20210702:', + msg='+user-cgsdk was removed after @20210527, use +cg-sdk instead') + conflicts( + '+cg-sdk', when='@:20210527', + msg='+cg-sdk only added @20210702, use +user-cgsdk instead') + conflicts( + '+user-colvars', when='@20210702:', + msg='+user-colvars was removed after @20210527, use +colvars instead') + conflicts( + '+colvars', when='@:20210527', + msg='+colvars only added @20210702, use +user-colvars instead') + conflicts( + '+user-diffraction', when='@20210702:', + msg='+user-diffraction was removed after @20210527, use +diffraction instead') + conflicts( + '+diffraction', when='@:20210527', + msg='+diffraction only added @20210702, use +user-diffraction instead') + conflicts( + '+user-dpd', when='@20210702:', + msg='+user-dpd was removed after @20210527, use +dpd-react instead') + conflicts( + '+dpd-react', when='@:20210527', + msg='+dpd-react only added @20210702, use +user-dpd instead') + conflicts( + '+user-drude', when='@20210702:', + msg='+user-drude was removed after @20210527, use +drude instead') + conflicts( + '+drude', when='@:20210527', + msg='+drude only added @20210702, use +user-drude instead') + conflicts( + '+user-eff', when='@20210702:', + msg='+user-eff was removed after @20210527, use +eff instead') + conflicts( + '+eff', when='@:20210527', + msg='+eff only added @20210702, use +user-eff instead') + conflicts( + '+user-fep', when='@20210702:', + msg='+user-fep was removed after @20210527, use +fep instead') + conflicts( + '+fep', when='@:20210527', + msg='+fep only added @20210702, use +user-fep instead') + conflicts( + '+user-h5md', when='@20210702:', + msg='+user-h5md was removed after @20210527, use +h5md instead') + conflicts( + '+h5md', when='@:20210527', + msg='+h5md only added @20210702, use +user-h5md instead') + conflicts( + '+user-lb', when='@20210702:', + msg='+user-lb was removed after @20210527, use +latboltz instead') + conflicts( + '+latboltz', when='@:20210527', + msg='+latboltz only added @20210702, use +user-lb instead') + conflicts( + '+user-manifold', when='@20210702:', + msg='+user-manifold was removed after @20210527, use +manifold instead') + conflicts( + '+manifold', when='@:20210527', + msg='+manifold only added @20210702, use +user-manifold instead') + conflicts( + '+user-meamc', when='@20210702:', + msg='+user-meamc was removed after @20210527, use +meam instead') + conflicts( + '+user-mesodpd', when='@20210702:', + msg='+user-mesodpd was removed after @20210527, use +dpd-meso instead') + conflicts( + '+dpd-meso', when='@:20210527', + msg='+dpd-meso only added @20210702, use +user-mesodpd instead') + conflicts( + '+user-mesont', when='@20210702:', + msg='+user-mesont was removed after @20210527, use +mesont instead') + conflicts( + '+mesont', when='@:20210527', + msg='+mesont only added @20210702, use +user-mesont instead') + conflicts( + '+user-mgpt', when='@20210702:', + msg='+user-mgpt was removed after @20210527, use +mgpt instead') + conflicts( + '+mgpt', when='@:20210527', + msg='+mgpt only added @20210702, use +user-mgpt instead') + conflicts( + '+user-mofff', when='@20210702:', + msg='+user-mofff was removed after @20210527, use +mofff instead') + conflicts( + '+mofff', when='@:20210527', + msg='+mofff only added @20210702, use +user-mofff instead') + conflicts( + '+user-molfile', when='@20210702:', + msg='+user-molfile was removed after @20210527, use +molfile instead') + conflicts( + '+molfile', when='@:20210527', + msg='+molfile only added @20210702, use +user-molfile instead') + conflicts( + '+user-netcdf', when='@20210702:', + msg='+user-netcdf was removed after @20210527, use +netcdf instead') + conflicts( + '+netcdf', when='@:20210527', + msg='+netcdf only added @20210702, use +user-netcdf instead') + conflicts( + '+user-omp', when='@20210702:', + msg='+user-omp was removed after @20210527, use +openmp-package instead') + conflicts( + '+openmp-package', when='@:20210527', + msg='+openmp-package only added @20210702, use +user-omp instead') + conflicts( + '+user-phonon', when='@20210702:', + msg='+user-phonon was removed after @20210527, use +phonon instead') + conflicts( + '+phonon', when='@:20210527', + msg='+phonon only added @20210702, use +user-phonon instead') + conflicts( + '+user-plumed', when='@20210702:', + msg='+user-plumed was removed after @20210527, use +plumed instead') + conflicts( + '+plumed', when='@:20210527', + msg='+plumed only added @20210702, use +user-plumed instead') + conflicts( + '+user-ptm', when='@20210702:', + msg='+user-ptm was removed after @20210527, use +ptm instead') + conflicts( + '+ptm', when='@:20210527', + msg='+ptm only added @20210702, use +user-ptm instead') + conflicts( + '+user-qtb', when='@20210702:', + msg='+user-qtb was removed after @20210527, use +qtb instead') + conflicts( + '+qtb', when='@:20210527', + msg='+qtb only added @20210702, use +user-qtb instead') + conflicts( + '+user-reaction', when='@20210702:', + msg='+user-reaction was removed after @20210527, use +reaction instead') + conflicts( + '+reaction', when='@:20210527', + msg='+reaction only added @20210702, use +user-reaction instead') + conflicts( + '+user-reaxc', when='@20210702:', + msg='+user-reaxc was removed after @20210527, use +reaxff instead') + conflicts( + '+reaxff', when='@:20210527', + msg='+reaxff only added @20210702, use +user-reaxc instead') + conflicts( + '+user-sdpd', when='@20210702:', + msg='+user-sdpd was removed after @20210527, use +dpd-smooth instead') + conflicts( + '+dpd-smooth', when='@:20210527', + msg='+dpd-smooth only added @20210702, use +user-sdpd instead') + conflicts( + '+user-smd', when='@20210702:', + msg='+user-smd was removed after @20210527, use +machdyn instead') + conflicts( + '+machdyn', when='@:20210527', + msg='+machdyn only added @20210702, use +user-smd instead') + conflicts( + '+user-smtbq', when='@20210702:', + msg='+user-smtbq was removed after @20210527, use +smtbq instead') + conflicts( + '+smtbq', when='@:20210527', + msg='+smtbq only added @20210702, use +user-smtbq instead') + conflicts( + '+user-sph', when='@20210702:', + msg='+user-sph was removed after @20210527, use +sph instead') + conflicts( + '+sph', when='@:20210527', + msg='+sph only added @20210702, use +user-sph instead') + conflicts( + '+user-tally', when='@20210702:', + msg='+user-tally was removed after @20210527, use +tally instead') + conflicts( + '+tally', when='@:20210527', + msg='+tally only added @20210702, use +user-tally instead') + conflicts( + '+user-uef', when='@20210702:', + msg='+user-uef was removed after @20210527, use +uef instead') + conflicts( + '+uef', when='@:20210527', + msg='+uef only added @20210702, use +user-uef instead') + conflicts( + '+user-yaff', when='@20210702:', + msg='+user-yaff was removed after @20210527, use +yaff instead') + conflicts( + '+yaff', when='@:20210527', + msg='+yaff only added @20210702, use +user-yaff instead') + # In the following, package refactoring at 28 July 2021 + conflicts( + '+user-misc', when='@20210728:', + msg='+user-misc was removed after @20210702, and split over multiple packages') + conflicts( + '+extra-compute', when='@:20210702', + msg='+extra-compute only added @20210728, use +user-misc instead') + conflicts( + '+extra-dump', when='@:20210702', + msg='+extra-dump only added @20210728, use +user-misc instead') + conflicts( + '+extra-fix', when='@:20210702', + msg='+extra-fix only added @20210728, use +user-misc instead') + conflicts( + '+extra-molecule', when='@:20210702', + msg='+extra-molecule only added @20210728, use +user-misc instead') + conflicts( + '+extra-pair', when='@:20210702', + msg='+extra-pair only added @20210728, use +user-misc instead') + conflicts( + '+interlayer', when='@:20210702', + msg='+interlayer only added @20210728, use +user-misc instead') + conflicts( + '+orient', when='@:20210702', + msg='+orient only added @20210728, use +user-misc instead') patch("lib.patch", when="@20170901") patch("660.patch", when="@20170922") @@ -235,7 +538,7 @@ class Lammps(CMakePackage, CudaPackage): args.append(self.define_from_variant('WITH_FFMPEG', 'ffmpeg')) for pkg in self.supported_packages: - opt = '-D{0}_{1}'.format(pkg_prefix, pkg.upper()) + opt = '-D{0}_{1}'.format(pkg_prefix, pkg.replace('-package', '').upper()) if '+{0}'.format(pkg) in spec: args.append('{0}=ON'.format(opt)) else: @@ -255,18 +558,20 @@ class Lammps(CMakePackage, CudaPackage): # for reduced memory use and parallel communication costs # for transposing 3d FFT data. args.append(self.define('FFT_SINGLE', True)) + if '^cray-fftw' in spec: + args.append('-DFFT=FFTW3') if '+kokkos' in spec: args.append('-DEXTERNAL_KOKKOS=ON') - if '+user-adios' in spec: + if '+user-adios' in spec or '+adios' in spec: args.append('-DADIOS2_DIR={0}'.format(self.spec['adios2'].prefix)) - if '+user-plumed' in spec: + if '+user-plumed' in spec or '+plumed' in spec: args.append('-DDOWNLOAD_PLUMED=no') if '+shared' in self.spec['plumed']: args.append('-DPLUMED_MODE=shared') else: args.append('-DPLUMED_MODE=static') - if '+user-smd' in spec: + if '+user-smd' in spec or '+machdyn' in spec: args.append('-DDOWNLOAD_EIGEN3=no') args.append('-DEIGEN3_INCLUDE_DIR={0}'.format( self.spec['eigen'].prefix.include)) |