Skip to content

Conversation

@bertschinger
Copy link

When informational output is printed about the arguments passed to mdtest, previously every rank printed out the same messages. Duplicating the same informational messages N times for N ranks isn't helpful for the user.

This change makes it so that only rank 0 prints out informational messages about the parameters.

Before:

$ mpirun -n 4 ./src/mdtest -d test_dir
WARNING: Read bytes is 0, thus, a read test will actually just open/close
WARNING: Read bytes is 0, thus, a read test will actually just open/close
WARNING: Read bytes is 0, thus, a read test will actually just open/close
-- started at 12/10/2025 10:15:46 --

mdtest-4.1.0+dev was launched with 4 total task(s) on 1 node(s)
Command line used: ./src/mdtest '-d' 'test_dir'
WARNING: Read bytes is 0, thus, a read test will actually just open/close
...

After:

$ mpirun -n 4 ./src/mdtest -d test_dir
-- started at 12/10/2025 10:13:29 --

mdtest-4.1.0+dev was launched with 4 total task(s) on 1 node(s)
Command line used: ./src/mdtest '-d' 'test_dir'
WARNING: Read bytes is 0, thus, a read test will actually just open/close
...

When informational output is printed about the arguments passed to
mdtest, previously every rank printed out the same messages. Duplicating
the same informational messages N times for N ranks isn't helpful for
the user.

This change makes it so that only rank 0 prints out informational
messages about the parameters.

Before:

    $ mpirun -n 4 ./src/mdtest -d test_dir
    WARNING: Read bytes is 0, thus, a read test will actually just open/close
    WARNING: Read bytes is 0, thus, a read test will actually just open/close
    WARNING: Read bytes is 0, thus, a read test will actually just open/close
    -- started at 12/10/2025 10:15:46 --

    mdtest-4.1.0+dev was launched with 4 total task(s) on 1 node(s)
    Command line used: ./src/mdtest '-d' 'test_dir'
    WARNING: Read bytes is 0, thus, a read test will actually just open/close
    ...

After:

    $ mpirun -n 4 ./src/mdtest -d test_dir
    -- started at 12/10/2025 10:13:29 --

    mdtest-4.1.0+dev was launched with 4 total task(s) on 1 node(s)
    Command line used: ./src/mdtest '-d' 'test_dir'
    WARNING: Read bytes is 0, thus, a read test will actually just open/close
    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants