-
Notifications
You must be signed in to change notification settings - Fork 316
add custom easyblock for BLIS #3385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
wwweert123
wants to merge
9
commits into
easybuilders:develop
from
wwweert123:20240708112836_new_pr_blis
Closed
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d5cb3e6
adding easyblocks: blis.py
e8d88a4
fix format error
f058f83
add comment header
43d5531
fix format error
9d9717c
fix extra_options() to be a static method
1a5976b
add comment about archspec
963bb93
fix format error
7c595b5
Update easybuild/easyblocks/b/blis.py options to alphabetical order
wwweert123 ebfaf43
Remove whitespace
wwweert123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| """ | ||
| Easybuild support for building and installing BLIS, implemented as an easyblock | ||
|
|
||
| @author: Pua Cheng Xuan Frederick (National University of Singapore) | ||
| """ | ||
| from easybuild.easyblocks.generic.configuremake import ConfigureMake | ||
| from easybuild.tools.systemtools import get_shared_lib_ext | ||
| from easybuild.framework.easyconfig import CUSTOM | ||
| from easybuild.tools.systemtools import get_cpu_arch_name | ||
|
|
||
|
|
||
| class EB_BLIS(ConfigureMake): | ||
| """Custom easyblock for BLIS""" | ||
|
|
||
| @staticmethod | ||
| def extra_options(): | ||
| """Custom easyconfig parameters for BLIS easyblock.""" | ||
| extra_vars = { | ||
| 'multi_threading_type': ["openmp", "Type of multithreading to use", CUSTOM], | ||
| 'cblas_enable': [True, "Enable CBLAS", CUSTOM], | ||
| 'shared_enable': [True, "Enable builing shared library", CUSTOM], | ||
| } | ||
|
|
||
| return ConfigureMake.extra_options(extra_vars) | ||
|
|
||
| def configure_step(self): | ||
| """Custom configure step for BLIS.""" | ||
| if self.cfg['cblas_enable']: | ||
| self.cfg.update('configopts', '--enable-cblas') | ||
|
|
||
| if self.cfg['shared_enable']: | ||
| self.cfg.update('configopts', '--enable-shared') | ||
|
|
||
| # arch_name will only be available when archspec is available to easybuild, else arch_name will be unknown | ||
| arch_name = get_cpu_arch_name() | ||
| if arch_name == "a64fx": | ||
| self.cfg.update('configopts', 'CFLAGS="$CFLAGS -DCACHE_SECTOR_SIZE_READONLY"') | ||
|
|
||
| self.cfg.update('configopts', '--enable-threading=%s CC="$CC" auto' % self.cfg['multi_threading_type']) | ||
|
|
||
| super(EB_BLIS, self).configure_step() | ||
|
|
||
| def sanity_check_step(self): | ||
| """Custom sanity check for BLIS""" | ||
| shlib_ext = get_shared_lib_ext() | ||
|
|
||
| custom_paths = { | ||
| 'files': ['include/blis/cblas.h', 'include/blis/blis.h', | ||
| 'lib/libblis.a', 'lib/libblis.%s' % shlib_ext], | ||
| 'dirs': [], | ||
| } | ||
| return super(EB_BLIS, self).sanity_check_step(custom_paths=custom_paths) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.