Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianAchilles committed Jul 2, 2024
1 parent bfa2a31 commit 1c12823
Show file tree
Hide file tree
Showing 1,133 changed files with 88,330 additions and 0 deletions.
106 changes: 106 additions & 0 deletions Custom_EasyBlocks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Custom EasyBlocks

Overview of the custom EasyBlocks.

## allinea

- __*added by*__ s.achilles
- __*needed because*__ we need to allow multiple license files
- __*difference compared to upstream*__ the aforementioned parameter
- __*can not be removed*__ at least until that option is merged upstream

## CUDA

- __*added by*__ s.achilles
- __*needed because*__ the new easyblocks removes the stubs
- __*difference compared to upstream*__ the aforementioned parameter
- __*can not be removed*__ until we update to EB 4.8.1 which contains [PR #2793](https://github.com/easybuilders/easybuild-easyblocks/pull/2793)

## MPICH

- __*added by*__ d.alvarez
- __*needed because*__ optional `check_static_libs` parameter in the sanity check (used with `psmpi.py`)
- __*difference compared to upstream*__ the aforementioned parameter
- __*can not be removed*__ at least until that option (needed just for `psmpi.py`) is merged upstream (PR: #2787)

## PSMPI

- __*added by*__ d.alvarez
- __*needed because*__ CUDA support
- __*difference compared to upstream*__ the supporting code to enable CUDA support
- __*can not be removed*__ until the CUDA options are pushed upstream (PR: #2787)

## OPENMPI

- __*added by*__ d.alvarez
- __*needed because*__ the check for `mpirun` should be optional
- __*difference compared to upstream*__ making that check optional
- __*can not be removed*__ until the check is made optional upstream (PR: #2788)

## CODE_SATURNE

- __*added by*__ m.cakircali
- __*needed because*__ there is no support to install `code_saturn` upstream
- __*can not be removed*__ at least until the easyblock is added upstream

## NVIDIA_DRIVER

- __*added by*__ d.alvarez
- __*needed because*__ we custom-install the NVIDIA driver libraries in the EB stack
- __*can not be removed*__ at least until the easyblock is added upstream

## generic/SYSTEM_BUNDLE

- __*added by*__ d.alvarez
- __*needed because*__ it is the basic support for the MPI settings modules
- __*can not be removed*__

## SUITESPARSE

- __*added by*__ d.alvarez
- __*needed because*__ added CUDA-related tweaks not present in upstream
- __*difference compared to upstream*__ the aforementioned
- __*can not be removed*__ Once the PR is merged upstream. Hopefully with the next release

## JULIA

- __*added by*__ j.goebbert
- __*needed because*__ we offer more functionality compared to upstream
- __*difference compared to upstream*__ upstream has not yet an EasyBlock for julia, juliabundle and juliapackage
- __*can not be removed*__ once merged with upstream

## VMD
- __*added by*__ j.goebbert
- __*needed because*__ we replaced the Mesa module by our own OpenGL module compared to upstream
- __*difference compared to upstream*__ upstream checks for Mesa inside the easyblock
- __*can not be removed*__ once upstream uses our OpenGL module

## GROMACS
- __*added_by*__ j.meinke
- __*needed because*__ want to use easyconfig parameters to determine CUDA capability.
- __*difference compared to upstream*__ upstream doesn't have such a feature
- __*can not be removed*__ until merged upstream

## LAMMPS
- __*added_by*__ d.alvarez
- __*needed because*__ upstream does not include the changes that we used in the latest stage
- __*difference compared to upstream*__ various, done by Alan
- __*can not be removed*__ until merged upstream or the changes here are deprecated (need to be assesed by an expert)

## NAMD
- __*added_by*__ d.alvarez
- __*needed because*__ need to disable CUDA support even if CUDA comes as a dependency
- __*difference compared to upstream*__ upstream doesn't have such a feature
- __*can not be removed*__ until merged upstream

## ELPA
- __*added_by*__ d.alvarez
- __*needed because*__ to autodetect CUDA and support CUDA compute capabilities
- __*difference compared to upstream*__ upstream doesn't have such a feature
- __*can not be removed*__ until merged upstream (https://github.com/easybuilders/easybuild-easyblocks/pull/2673)

## CP2K
- __*added_by*__ th.mueller
- __*needed because*__ support for libvori; alternative versions of dbcsr; contains loads of widely obsolete stuff; is essentially a highly non-portable easyblock working only with intel and gnu (which I am not going to change!); running the tests will not work within an eb environment - at least not sensibly.
- __*difference compared to upstream*__ no support for libvori
- __*can not be removed*__
128 changes: 128 additions & 0 deletions Custom_EasyBlocks/allinea.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# This file is part of JSC's public easybuild repository (https://github.com/easybuilders/jsc)
##
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for building and installing Allinea tools, implemented as an easyblock
@author: Kenneth Hoste (Ghent University)
@author: Sebastian Achilles (Forschungszentrum Juelich GmbH)
"""
import os
import shutil
import stat

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions, copy_file
from easybuild.tools.py2vs3 import string_type


class EB_Allinea(Binary):
"""Support for building/installing Allinea."""

@staticmethod
def extra_options(extra_vars=None):
"""Define extra easyconfig parameters specific to Allinea."""
extra = Binary.extra_options(extra_vars)
extra.update({
'templates': [[], "List of templates.", CUSTOM],
'sysconfig': [None, "system.config file to install.", CUSTOM],
})
return extra

def extract_step(self):
"""Extract Allinea installation files."""
EasyBlock.extract_step(self)

def configure_step(self):
"""No configuration for Allinea."""
# ensure a license file is specified
if self.cfg['license_file'] is None:
raise EasyBuildError("No license file specified.")

def build_step(self):
"""No build step for Allinea."""
pass

def install_step(self):
"""Install Allinea using install script."""

if self.cfg['install_cmd'] is None:
self.cfg['install_cmd'] = "./textinstall.sh --accept-licence %s" % self.installdir

super(EB_Allinea, self).install_step()

# copy license file
# allow to copy multiple licenses
lic_path = os.path.join(self.installdir, 'licences')
licenses = self.cfg['license_file']
if isinstance(licenses, string_type):
licenses = [licenses]
try:
for license in licenses:
shutil.copy2(license, lic_path)
except OSError as err:
raise EasyBuildError(
"Failed to copy license file to %s: %s", lic_path, err)

# copy templates
templ_path = os.path.join(self.installdir, 'templates')
for templ in self.cfg['templates']:
path = self.obtain_file(templ, extension='qtf')
if path:
self.log.debug('Template file %s found' % path)
else:
raise EasyBuildError('No template file named %s found', templ)

try:
# use shutil.copy (not copy2) so that permissions of copied file match with rest of installation
shutil.copy(path, templ_path)
except OSError as err:
raise EasyBuildError(
"Failed to copy template %s to %s: %s", templ, templ_path, err)

# copy system.config if requested
sysconf_path = os.path.join(self.installdir, 'system.config')
if self.cfg['sysconfig'] is not None:
path = self.obtain_file(self.cfg['sysconfig'], extension=False)
if path:
self.log.debug('system.config file %s found' % path)
else:
raise EasyBuildError(
'No system.config file named %s found', sysconf_path)

copy_file(path, sysconf_path)
adjust_permissions(sysconf_path, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH,
recursive=False, relative=False)

def sanity_check_step(self):
"""Custom sanity check for Allinea."""
custom_paths = {
'files': ['bin/ddt', 'bin/map'],
'dirs': [],
}
super(EB_Allinea, self).sanity_check_step(custom_paths=custom_paths)
Loading

0 comments on commit 1c12823

Please sign in to comment.