Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
easybuild-easyblocks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
easybuild-easyblocks
Commits
fa731797
Commit
fa731797
authored
3 years ago
by
Lukáš Krupčík
Browse files
Options
Downloads
Patches
Plain Diff
new file: easyblocks/a/aocl.py
parent
d20a9bf6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
easyblocks/a/aocl.py
+93
-0
93 additions, 0 deletions
easyblocks/a/aocl.py
with
93 additions
and
0 deletions
easyblocks/a/aocl.py
0 → 100644
+
93
−
0
View file @
fa731797
##
# Copyright 2009-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 AMD Core Math Library (AOCL), implemented as an easyblock
@author: Lukas Krupcik (IT4Innovations)
"""
import
os
from
distutils.version
import
LooseVersion
from
easybuild.framework.easyblock
import
EasyBlock
from
easybuild.framework.easyconfig
import
CUSTOM
from
easybuild.tools.run
import
run_cmd_qa
from
easybuild.tools.systemtools
import
get_shared_lib_ext
class
EB_AOCL
(
EasyBlock
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
"""
Constructor, adds extra class variables.
"""
super
(
EB_AOCL
,
self
).
__init__
(
*
args
,
**
kwargs
)
self
.
basedir
=
'
%s
'
%
(
self
.
version
)
def
configure_step
(
self
):
"""
No custom configure step for AOCL.
"""
pass
def
build_step
(
self
):
"""
No custom build step for AOCL.
"""
pass
def
install_step
(
self
):
"""
Install by running install script.
"""
cmd
=
"
./install.sh -t %s
"
%
(
self
.
installdir
)
qa
=
{
'
The directory will be created if it does not already exist. >
'
:
self
.
installdir
}
run_cmd_qa
(
cmd
,
qa
,
log_all
=
True
,
simple
=
True
)
def
make_module_extra
(
self
):
"""
Add extra entries in module file (various paths).
"""
txt
=
super
(
EB_AOCL
,
self
).
make_module_extra
()
basepaths
=
[
"
%s
"
%
(
self
.
basedir
)]
txt
+=
self
.
module_generator
.
set_environment
(
'
AOCL_ROOT
'
,
"
%s/%s
"
%
(
self
.
installdir
,
self
.
basedir
))
for
path
in
basepaths
:
txt
+=
self
.
module_generator
.
prepend_paths
(
'
PATH
'
,
os
.
path
.
join
(
path
,
'
amd-fftw/bin
'
))
for
path
in
basepaths
:
txt
+=
self
.
module_generator
.
prepend_paths
(
'
CPATH
'
,
os
.
path
.
join
(
path
,
'
include
'
))
for
key
in
[
'
LD_LIBRARY_PATH
'
,
'
LIBRARY_PATH
'
]:
for
path
in
basepaths
:
txt
+=
self
.
module_generator
.
prepend_paths
(
key
,
os
.
path
.
join
(
path
,
'
lib
'
))
return
txt
def
sanity_check_step
(
self
):
"""
Custom sanity check for AOCL.
"""
custom_paths
=
{
'
files
'
:
[],
'
dirs
'
:
[
'
%s/include
'
%
(
self
.
version
),
'
%s/lib
'
%
(
self
.
version
),
'
%s/amd-fftw
'
%
(
self
.
version
)]
}
super
(
EB_AOCL
,
self
).
sanity_check_step
(
custom_paths
=
custom_paths
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment