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
add custom easyblock for FFTW (REVIEW) #1083
Conversation
@JackPerdue done! We should also do this for AARCH64, but I'm tempted to postpone that to a future PR... Thoughts @geimer? |
Last commit (cd2781d) also takes into account Thoughts on this @pescobar?
|
@boegel I believe enabling NEON on AArch64 is now fairly trivial. The question is more whether the resulting library works. I'm up for giving this new easyblock a try on my ARM box, though I have no clue how to test FFTW... |
@geimer it seems like FFTW has a test suite included, you should be able to run it by including Are you up for looking into updating this easyblock to also cover AARCH64, or shall I? I think it's just checking for the |
@boegel |
…e auto-detection of CPU features
prec_configopts.append('--enable-%s' % flag) | ||
|
||
# NEON (ARM) only for single precision and double precision (on AARCH64) | ||
if (prec == 'single' and self.neon) or (prec == 'double' and self.asimd): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this if
condition is correct. I believe one can pass --enable-neon
for both single- and double-precision if asimd
is flagged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't asimd imply neon?
I can update this to use prec == 'single' and (self.asimd or self.neon)
, but it wouldn't make a difference in practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is: the neon
flag is only available on AArch32 if NEON support is available. And it is single-precision only. On AArch64, there is no neon
flag, but only the asimd
flag indicating single- and double-precision NEON support. So yes, I believe it would make a difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for the clarification, fixed in c7899c2
@JackPerdue You may actually also be interested in VSX support, which seems to be available in POWER7 and above. However, as far as I can see there is no flag in |
processor : 0 Given: https://en.wikipedia.org/wiki/IBM_POWER_microprocessors I'd say grepping /proc/cpuinfo for POWER7 would do. Thanks for the suggestion. I'll have to look at that here at some point (we are about to reprovision our Power7 cluster) |
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>. | ||
## | ||
""" | ||
EasyBuild support for building and installing FFTW, implemented as an easyblock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:author
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks
@JackPerdue VSC support detection implemented in easybuilders/easybuild-framework#2078, I'll update this easyblock accordingly once that is merged |
My tests with this easyblock on latest |
|
||
# auto-detect CPU features that can be used and are not enabled/disabled explicitly, | ||
# but only if --optarch=GENERIC is not being used | ||
if self.cfg['auto_detect_cpu_features'] and build_option('optarch') != OPTARCH_GENERIC: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All x86_64 CPUs support at least SSE2, so this could be enabled even with OPTARCH_GENERIC
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ok, that complicates things a little bit, but I'll look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented in cb14353, please rereview?
Thanks for the review/feedback @wpoely86, @geimer and @JackPerdue! |
prec_configopts.append('--enable-%s' % flag) | ||
|
||
# Altivec (POWER) and SSE only for single precision | ||
for flag in ['altivec', 'sse']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
altivec
does not work for GCC 5 for single precision with Power, see FFTW/fftw3#59 (I also tested GCC6 and the tests fail there as well)
This easyblock takes care of building FFTW with use of AVX* instructions enabled when suitable, i.e. when the host on which it is being built supports these instructions.
(note: requires easybuilders/easybuild-framework#2074)
Using this easyblock for building FFTW results in the same multi-cycle build as is currently done in the FFTW easyconfigs (by specifying
configopts
as a list):The use of advanced SIMD instructions (SSE2, AVX*), building of the libraries for different precisions and for MPI/OpenMP/threads can be controlled via custom easyconfig parameters supported by this easyblock, see below.
Example easyconfig to use along with this easyblock (
eb FFTW.eb --include-easyblocks fftw.py
):TODO:
--optarch
(in particular--optarch=GENERIC
)neon
,asimd
) and POWER (altivec
) (thoughts on this @geimer, @JackPerdue?)cc: @akesandgren, @jhein32, @wpoely86, @rjeschmi, @verdurin