Skip to content

Handle CalledProcessError better#3447

Merged
heplesser merged 3 commits intonest:masterfrom
heplesser:mpitest_error_reporting
Mar 27, 2025
Merged

Handle CalledProcessError better#3447
heplesser merged 3 commits intonest:masterfrom
heplesser:mpitest_error_reporting

Conversation

@heplesser
Copy link
Contributor

This PR makes sure that CalledProcessError occurring during MPI testing are caught and reported more clearly. High up in the output one will now get a report like this:

--------------------------------------------------
Running failed for: ['mpirun', '-np', '1', '--oversubscribe', 'python', 'runner.py']
tmpdir            : /var/folders/zz/kr57pbys6f5dtt17dk7jjh4c0000gn/T/tmprff6aso7
--------------------------------------------------
STDOUT
--------------------------------------------------

              -- N E S T --
  Copyright (C) 2004 The NEST Initiative

 Version: 3.8.0-post0.dev0
 Built: Mar 17 2025 22:55:56

 This program is provided AS IS and comes with
 NO WARRANTY. See the file LICENSE for details.

 Problems or suggestions?
   Visit https://www.nest-simulator.org

 Type 'nest.help()' to find out more about NEST.


--------------------------------------------------
STDERR
--------------------------------------------------
Traceback (most recent call last):
  File "/private/var/folders/zz/kr57pbys6f5dtt17dk7jjh4c0000gn/T/tmprff6aso7/runner.py", line 22, in <module>
    test_all_to_all(N=7)
  File "/private/var/folders/zz/kr57pbys6f5dtt17dk7jjh4c0000gn/T/tmprff6aso7/runner.py", line 17, in test_all_to_all
    nest.Connect(nrns, nrns, 'all_to_all2')
  File "/Users/plesser/NEST/code/bld/main/mpi/install/lib/python3.12/site-packages/nest/ll_api.py", line 216, in stack_checker_func
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/plesser/NEST/code/bld/main/mpi/install/lib/python3.12/site-packages/nest/lib/hl_api_connections.py", line 289, in Connect
    sr("Connect")
  File "/Users/plesser/NEST/code/bld/main/mpi/install/lib/python3.12/site-packages/nest/ll_api.py", line 103, in catching_sli_run
    raise exceptionCls(commandname, message)
nest.lib.hl_api_exceptions.NESTErrors.BadProperty: BadProperty in SLI function Connect_g_g_D_D: Unknown connection rule: all_to_all2

--------------------------------------------------

@heplesser heplesser added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Mar 27, 2025
@heplesser heplesser requested a review from JanVogelsang March 27, 2025 08:34
@github-project-automation github-project-automation bot moved this to In progress in PyNEST-NG Mar 27, 2025
Copy link
Contributor

@JanVogelsang JanVogelsang left a comment

Choose a reason for hiding this comment

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

Neat!

@heplesser
Copy link
Contributor Author

@JanVogelsang I have now extended this PR so that it (a) returns empty dataframes/json strings if no connections are present in keeping with the requested data type and (b) data collection for "OTHER" works correctly if a rank does not deliver data (empty file).

@heplesser
Copy link
Contributor Author

Minor test setup improvement, merging based on single review.

@heplesser heplesser merged commit 7c8209d into nest:master Mar 27, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in PyNEST-NG Mar 27, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Build system and CI Mar 27, 2025
@heplesser heplesser deleted the mpitest_error_reporting branch March 28, 2025 09:16
@jessica-mitchell jessica-mitchell added T: Maintenance Work to keep up the quality of the code and documentation. and removed T: Enhancement New functionality, model or documentation labels Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

Comments