easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
104 stars 283 forks source link

elpa.py deprecated options #3363

Open sassy-crick opened 2 months ago

sassy-crick commented 2 months ago

Whilst addressing a build problem for ELPA-2023.05.001-intel-2023a.eb I came across these warnings:

checking whether obsolete --enable-avx2 has been provided... yes
configure: WARNING: You did still use the deprecated option --enable-avx2! Please switch to the option --enable-avx2-kernels

I believe they are coming from line 132 ff:

        for flag in ELPA_CPU_FEATURE_FLAGS:
            # many ELPA kernels are enabled by default, even when the
            # CPU does not support them, so we disable them all, except
            # when the appropriate CPU flag is found
            # sse kernels require sse4_2
            if flag == 'sse4_2':
                if getattr(self, flag):
                    self.cfg.update('configopts', '--enable-sse')
                    self.cfg.update('configopts', '--enable-sse-assembly')
                else:
                    self.cfg.update('configopts', '--disable-sse')
                    self.cfg.update('configopts', '--disable-sse-assembly')
            elif flag == 'avx512f':
                if getattr(self, 'avx512f'):
                    self.cfg.update('configopts', '--enable-avx512')
                else:
                    self.cfg.update('configopts', '--disable-avx512')
            else:
                if getattr(self, flag):
                    self.cfg.update('configopts', '--enable-%s' % flag)
                else:
                    self.cfg.update('configopts', '--disable-%s' % flag)

It might be something we want to address for EasyBuild 5.x I think.

sassy-crick commented 2 months ago

Just to add to this, as we might need to touch the elpa.py EasyBlock: On our AMD rome CPUs building the above version, i.e. the Intel compiler, fails when using it 'out of the box'. My fix for that is to change the EasyConfig file like this:

toolchainopts = {'openmp': True, 'usempi': True, 'oneapi': False}

auto_detect_cpu_features = False
use_sse4_2 = True
use_avx = True 
use_avx2 = True 
use_avx512f = False

This is not sustainable with the deprecation of the classic Intel compilers. As we are doing a CPU detection, is there a better way of doing it?