Damask improvements (#28178)

This commit is contained in:
Martin Diehl 2022-01-08 12:50:38 +01:00 committed by GitHub
parent 897616f073
commit 2bb844ee0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 18 deletions

View File

@ -7,8 +7,8 @@
class DamaskGrid(CMakePackage): class DamaskGrid(CMakePackage):
"""Grid solver for DAMASK""" """Grid solver for DAMASK"""
homepage = "https://damask3.mpie.de" homepage = "https://damask.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz" url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDiehl'] maintainers = ['MarDiehl']
@ -17,9 +17,10 @@ class DamaskGrid(CMakePackage):
depends_on('pkgconfig', type='build') depends_on('pkgconfig', type='build')
depends_on('cmake@3.10:', type='build') depends_on('cmake@3.10:', type='build')
depends_on('petsc+mpi+hdf5')
depends_on('petsc@3.14.0:3.14,3.15.1:3.15', when='@3.0.0-alpha4') depends_on('petsc@3.14.0:3.14,3.15.1:3.15', when='@3.0.0-alpha4')
depends_on('petsc@3.14.0:3.14,3.15.1:3.16', when='@3.0.0-alpha5') depends_on('petsc@3.14.0:3.14,3.15.1:3.16', when='@3.0.0-alpha5')
depends_on('hdf5+fortran') depends_on('hdf5@1.10:+mpi+fortran')
depends_on('fftw+mpi') depends_on('fftw+mpi')
patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4') patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4')
@ -29,12 +30,11 @@ class DamaskGrid(CMakePackage):
values=('Debug', 'Release', 'DebugRelease')) values=('Debug', 'Release', 'DebugRelease'))
def patch(self): def patch(self):
filter_file(' -lhdf5 ', ' -lhdf5_fortran -lhdf5 ', 'CMakeLists.txt') filter_file(' -lz ', ' -lz ${FFTW_LIBS} ', 'CMakeLists.txt')
filter_file(' -lz ', ' -lz -lfftw3 -lfftw3_mpi ', 'CMakeLists.txt')
def cmake_args(self): def cmake_args(self):
args = ['-DDAMASK_SOLVER:STRING=grid'] return [self.define('DAMASK_SOLVER', 'grid'),
return args self.define('FFTW_LIBS', self.spec['fftw:mpi'].libs.link_flags)]
@run_after('install') @run_after('install')
@on_package_attributes(run_tests=True) @on_package_attributes(run_tests=True)

View File

@ -7,8 +7,8 @@
class DamaskMesh(CMakePackage): class DamaskMesh(CMakePackage):
"""Mesh solver for DAMASK""" """Mesh solver for DAMASK"""
homepage = "https://damask3.mpie.de" homepage = "https://damask.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz" url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDiehl'] maintainers = ['MarDiehl']
@ -17,9 +17,10 @@ class DamaskMesh(CMakePackage):
depends_on('pkgconfig', type='build') depends_on('pkgconfig', type='build')
depends_on('cmake@3.10:', type='build') depends_on('cmake@3.10:', type='build')
depends_on('petsc+mpi+hdf5')
depends_on('petsc@3.14.0:3.14,3.15.1:3.15', when='@3.0.0-alpha4') depends_on('petsc@3.14.0:3.14,3.15.1:3.15', when='@3.0.0-alpha4')
depends_on('petsc@3.14.0:3.14,3.15.1:3.16', when='@3.0.0-alpha5') depends_on('petsc@3.14.0:3.14,3.15.1:3.16', when='@3.0.0-alpha5')
depends_on('hdf5+fortran') depends_on('hdf5@1.10:+mpi+fortran')
patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4') patch('CMakeDebugRelease.patch', when='@3.0.0-alpha4')
@ -27,12 +28,8 @@ class DamaskMesh(CMakePackage):
description='The build type to build', description='The build type to build',
values=('Debug', 'Release', 'DebugRelease')) values=('Debug', 'Release', 'DebugRelease'))
def patch(self):
filter_file(' -lhdf5 ', ' -lhdf5_fortran -lhdf5 ', 'CMakeLists.txt')
def cmake_args(self): def cmake_args(self):
args = ['-DDAMASK_SOLVER:STRING=mesh'] return [self.define('DAMASK_SOLVER', 'mesh')]
return args
@run_after('install') @run_after('install')
@on_package_attributes(run_tests=True) @on_package_attributes(run_tests=True)

View File

@ -21,7 +21,7 @@ class Damask(BundlePackage):
""" """
homepage = "https://damask3.mpie.de" homepage = "https://damask.mpie.de"
maintainers = ['MarDiehl'] maintainers = ['MarDiehl']

View File

@ -7,8 +7,8 @@
class PyDamask(PythonPackage): class PyDamask(PythonPackage):
"""Pre- and post-processing tools for DAMASK""" """Pre- and post-processing tools for DAMASK"""
homepage = "https://damask3.mpie.de" homepage = "https://damask.mpie.de"
url = "https://damask3.mpie.de/download/damask-3.0.0.tar.xz" url = "https://damask.mpie.de/download/damask-3.0.0.tar.xz"
maintainers = ['MarDiehl'] maintainers = ['MarDiehl']