GNU bug report logs - #56257
[PATCH] fenics: Do not use mpirun for tests

Previous Next

Package: guix-patches;

Reported by: <Ontje.Luensdorf <at> dlr.de>

Date: Mon, 27 Jun 2022 12:32:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56257 in the body.
You can then email your comments to 56257 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#56257; Package guix-patches. (Mon, 27 Jun 2022 12:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to <Ontje.Luensdorf <at> dlr.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 27 Jun 2022 12:32:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: <Ontje.Luensdorf <at> dlr.de>
To: <guix-patches <at> gnu.org>
Subject: [PATCH] fenics: Do not use mpirun for tests
Date: Mon, 27 Jun 2022 11:24:49 +0000
[Message part 1 (text/plain, inline)]
Hi guix,


the fenics package tests fail and it looks like the tests are run 3
times concurrently. Every test name is printed three times in the build
log, for example here:

https://ci.guix.gnu.org/build/1039880/log/raw

This is the maximum number of parallel jobs of the test run and if I
increase it, I get more print outputs.

AFAIK, pytest doesn't support mpi, so I don't see why the tests are
executed this way.

Anyhow, in the attached patch, the tests are executed directly using
pytest. This prevents the tests from getting stuck and subsequently I
discovered a failure in XDMF tests. With this test also disabled, the
package builds fine for me.

Maybe a fenics or mpi expert can tell if this patch makes sense?

Best regards,
Ontje
[0001-gnu-fenics-Do-not-mpirun-tests.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#56257; Package guix-patches. (Mon, 04 Jul 2022 10:19:02 GMT) Full text and rfc822 format available.

Message #8 received at 56257 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: <Ontje.Luensdorf <at> dlr.de>
Cc: 56257 <at> debbugs.gnu.org, Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: Re: bug#56257: [PATCH] fenics: Do not use mpirun for tests
Date: Mon, 04 Jul 2022 12:18:36 +0200
Hi,

<Ontje.Luensdorf <at> dlr.de> skribis:

> the fenics package tests fail and it looks like the tests are run 3
> times concurrently. Every test name is printed three times in the build
> log, for example here:
>
> https://ci.guix.gnu.org/build/1039880/log/raw
>
> This is the maximum number of parallel jobs of the test run and if I
> increase it, I get more print outputs.
>
> AFAIK, pytest doesn't support mpi, so I don't see why the tests are
> executed this way.

Good question.  Paul, do you remember the reasons for doing so?

> Anyhow, in the attached patch, the tests are executed directly using
> pytest. This prevents the tests from getting stuck and subsequently I
> discovered a failure in XDMF tests. With this test also disabled, the
> package builds fine for me.

Let’s see what Paul thinks, and otherwise I’ll apply the patch shortly
so fenics can be installed again.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#56257; Package guix-patches. (Tue, 05 Jul 2022 12:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 56257 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 56257 <at> debbugs.gnu.org
Subject: [bug#56257] [PATCH] fenics: Do not use mpirun for tests
Date: Tue, 05 Jul 2022 12:43:10 +0000
Hi,

Ludovic Courtès writes:
> Good question.  Paul, do you remember the reasons for doing so?

If I'm the Paul you're referring to, it would be better to CC me in the
future, as I'm not subscribed to the list and only intermittently check
it (which happens more often when I'm submitting patches).

>> Anyhow, in the attached patch, the tests are executed directly using
>> pytest. This prevents the tests from getting stuck and subsequently I
>> discovered a failure in XDMF tests. With this test also disabled, the
>> package builds fine for me.
>
> Let’s see what Paul thinks, and otherwise I’ll apply the patch shortly
> so fenics can be installed again.

Actually, I'm not the original author of the fenics package; I just
added support for #:tests? (and fixed the sanity check), so I don't know
why the tests are run with mpirun.
However, the reason I had added support for the #:tests?
flag is to skip the fenics tests, which were failing for me.
I'm no expert in MPI and pytest, but it does seem that pytest_mpi [1] is
recommended when combining the two, and there are no instances of
@pytest.mark.mpi in the fenics repository.
Further, running pytest tests under MPI is accomplished with [2]:

  mpirun -n 2 python -m pytest --with-mpi

In other words, it seems as if the current tests are repeated in
parallel, as Ontje discovered.

The patch looks good to me.

Best regards,
Paul

[1]: https://pypi.org/project/pytest-mpi/
[2]: https://pytest-mpi.readthedocs.io/en/latest/usage.html





Reply sent to Ludovic Courtès <ludovic.courtes <at> inria.fr>:
You have taken responsibility. (Wed, 03 Aug 2022 10:05:02 GMT) Full text and rfc822 format available.

Notification sent to <Ontje.Luensdorf <at> dlr.de>:
bug acknowledged by developer. (Wed, 03 Aug 2022 10:05:02 GMT) Full text and rfc822 format available.

Message #16 received at 56257-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: "Paul A. Patience" <paul <at> apatience.com>
Cc: 56257-done <at> debbugs.gnu.org, Ontje.Luensdorf <at> dlr.de
Subject: Re: bug#56257: [PATCH] fenics: Do not use mpirun for tests
Date: Wed, 03 Aug 2022 12:04:50 +0200
Hi,

(Sorry for the delay.)

"Paul A. Patience" <paul <at> apatience.com> skribis:

> Ludovic Courtès writes:
>> Good question.  Paul, do you remember the reasons for doing so?
>
> If I'm the Paul you're referring to, it would be better to CC me in the
> future, as I'm not subscribed to the list and only intermittently check
> it (which happens more often when I'm submitting patches).

I actually Cc’d Paul Garlick, but maybe Debbugs ate the Cc: field?

> I'm no expert in MPI and pytest, but it does seem that pytest_mpi [1] is
> recommended when combining the two, and there are no instances of
> @pytest.mark.mpi in the fenics repository.
> Further, running pytest tests under MPI is accomplished with [2]:
>
>   mpirun -n 2 python -m pytest --with-mpi
>
> In other words, it seems as if the current tests are repeated in
> parallel, as Ontje discovered.
>
> The patch looks good to me.

Alright, applied.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 31 Aug 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.