Skip to content

Add custom easyblock for ELPA#1621

Merged
boegel merged 29 commits intoeasybuilders:developfrom
micaeljtoliveira:elpa
May 22, 2019
Merged

Add custom easyblock for ELPA#1621
boegel merged 29 commits intoeasybuilders:developfrom
micaeljtoliveira:elpa

Conversation

@micaeljtoliveira
Copy link
Copy Markdown
Contributor

Tested on both x86_64 and ppc, and seems to select the appropriate configuration flags depending on the type of CPU and available features. I also added a few other custom options.

The only thing I'm not really sure about is if we should compile with and without MPI and install both versions of the library, as this is supported by ELPA. This should not be very difficult to implement.

Also, once this is in the corresponding easyconfigs will have to be updated. What is the usual procedure for that?

Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py
Comment thread easybuild/easyblocks/e/elpa.py Outdated
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Jan 22, 2019

@micaeljtoliveira Can you open a merge request for an easyconfig that uses this?

Regarding updating existing easyconfigs, you don't necessarily have to update existing ones, you can just create a PR for the latest version with this

Comment thread easybuild/easyblocks/e/elpa.py Outdated
…for mpi and opemnp (serial, openmp, mpi, openmp+mpi).
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@boegel @ocaisa: As discussed last week, ideally the framework should be changed so that it is possible to iterate over a list of toolchain options just like we do for configopts and buildopts. This way we could set different values for the usempi toolchain option when building in serial or with mpi.

@damianam
Copy link
Copy Markdown
Member

I like very much the idea of having an easyblock for ELPA. I also think it makes sense to keep those options as ELPA options, and not rely on toolchainopts. The libraries have different names, so having them in a single prefix is a logical way to proceed.

@micaeljtoliveira what about GPU support?

@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@damianam GPU support would be great, but I don't have the expertise nor time to implement it. But I would be very happy if some one wants to have a go at it.

@boegel Any chance of having this PR accepted soon? I know it's not ideal, having the serial version of ELPA compiled with MPI toolchain option, but it's still a clear improvement over the current situation.

@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 4, 2019

@micaeljtoliveira A couple of issues were reporting on the mailing list with the proposed ELPA easyblock, see https://lists.ugent.be/wws/arc/easybuild/2019-04/msg00018.html and https://lists.ugent.be/wws/arc/easybuild/2019-04/msg00014.html .

Can you look into those? Do shout if you need help...

From @ocaisa's remark, I understand that there's no longer a need to be able to iterate over a list of toolchainopts, the with_mpi and with_openmp approaches are fine?

@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@boegel I've seen the emails. Fixing the AVX issue should be trivial if indeed it only requires changing avx512 to avx512f.

I understand that there's no longer a need to be able to iterate over a list of toolchainopts, the with_mpi and with_openmp approaches are fine?

Not quite, unfortunately. If I understood correctly, there might be a problem with some toolchains when building a serial application with the mpi compiler wrappers. This will be the case when using the usempi toolchain option for both serial and mpi builds of the library.

@akesandgren
Copy link
Copy Markdown
Contributor

We should preferably get this either merged or rejected before 3.9.1.
What is the currecnt status of it? Does it work as is? Should I run some tests?

@boegel
Copy link
Copy Markdown
Member

boegel commented May 9, 2019

@akesandgren I think this needs support for iterating of a list of toolchain options, so we can have usempi set to False when building the serial part, but have usempi set to True for the parallel part.

On the other hand, I'm not sure that's actually needed at all... usempi is a convenience mechanism available for MPI software that doesn't properly know how to get built, but I'm guessing that's not a problem for ELPA.
If so, then usempi should never be set to True.

@micaeljtoliveira Can you shed some light on this?

@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@akesandgren @boegel The original idea was to build and install all the different flavors of the library (serial, MPI, OpenMP, MPI+OpenMP) with just one easyconfig, in a somehow similar way to what is done for FFTW. Unfortunately the way how ELPA is compiled would require to iterate over toolchain options, as mentioned by @boegel, which is currently not supported.

I think the best is to simplify things so that this can be merged. I will remove the iteration over usempi = True/False Then users who want to build the serial version can simply tweak the corresponding easyconfig. I will also fix one issue reported sometime ago on the mailing list regarding the AVX512 support.

@boegel boegel modified the milestones: 3.9.1, next release (3.9.2) May 17, 2019
@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@boegel :

Since the folders and names of the libraries will depend on the value of usempi,
I thought I was best that this was specified in the easyconfig.

I would prefer having this in the easyblock (which is do once and forget), rather than having to remember to update the easyconfigs according to having usempi set or not, that'll be annoying...

No problem, I will add the check back. I'm still learning about the preferred/best way of doing things in EasyBuild, so you need to have a little patience ;)

Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
Comment thread easybuild/easyblocks/e/elpa.py Outdated
@boegel
Copy link
Copy Markdown
Member

boegel commented May 21, 2019

@micaeljtoliveira One thing that confuses me a bit is that the current ELPA easyconfigs we have include usempi: True, yet sanity_check_paths includes lib/libelpa_openmp.a rather than lib/libelpa_onenode_openmp.a... So were we actualy building ELPA without MPI support all along?

@micaeljtoliveira
Copy link
Copy Markdown
Contributor Author

@micaeljtoliveira One thing that confuses me a bit is that the current ELPA easyconfigs we have include usempi: True, yet sanity_check_paths includes lib/libelpa_openmp.a rather than lib/libelpa_onenode_openmp.a... So were we actualy building ELPA without MPI support all along?

@boegel The naming convention used by ELPA is somewhat confusing: the openmp suffix means that it was compiled with OpenMP and MPI, while the onenode_openmp suffix means it was compiled with OpenMP and without MPI.

Comment thread easybuild/easyblocks/e/elpa.py
Comment thread easybuild/easyblocks/e/elpa.py Outdated
boegel
boegel previously approved these changes May 21, 2019
@boegel boegel changed the title Add easyblock for ELPA. Add custom easyblock for ELPA May 21, 2019
Comment thread easybuild/easyblocks/e/elpa.py Outdated
"""

# make all builds verbose
self.cfg.update('preconfigopts', 'autoreconf &&')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@micaeljtoliveira How is this related to making the build verbose exactly?

Also, should we try and avoid picking up autoreconf from the OS here (i.e. requiring that Autotools is listed as a build dep)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel Ups, copy-paste strikes again. I'll fix it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel This prompted me to look if the call to autoreconf was really necessary. After a couple of tests, it seems not. Maybe it was at some point in some of the older easyconfigs, but AFAICS that's not the case anymore.

vanzod
vanzod previously approved these changes May 21, 2019
@micaeljtoliveira micaeljtoliveira dismissed stale reviews from vanzod and boegel via a5bdb6a May 22, 2019 09:56
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-tested with easybuilders/easybuild-easyconfigs#8360, lgtm, so going in.

Thanks a lot for your work and patience on this @micaeljtoliveira!

@boegel boegel merged commit 4685191 into easybuilders:develop May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants