Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_test.sh: "PASS write profile" does not actually write all profiles and should FAIL #87

Closed
vasdommes opened this issue Jul 10, 2023 · 1 comment
Assignees
Milestone

Comments

@vasdommes
Copy link
Collaborator

https://github.com/davidsd/sdpb/blob/b359336/test/run_test.sh#L31
"write profile" test in test/run_test.sh does not actually check that profiles are written to disk.
Profile for rank=0 is not written, El::mpi::Abort() is called, but the test nevertheless "passes".

Repro

(checked on Expanse cluster and on a laptop with WSL+Ubuntu)

  1. Replace the lines https://github.com/davidsd/sdpb/blob/b359336/test/run_test.sh#L26-L39
    with
rm -rf test/io_tests

mkdir -p test/io_tests
touch test/io_tests/profile_error.profiling.0
chmod a-w test/io_tests/profile_error.profiling.0
mpirun -n 2 --quiet ./build/sdpb --precision=1024 --noFinalCheckpoint --procsPerNode=1 -s test/test -c test/io_tests/profile_error --verbosity=2 --maxIterations=1 #2>/dev/null > /dev/null
if [ $? != 0 ]
then
    echo "PASS write profile"
else
    echo "FAIL write profile"
    result=1
fi
exit $result

(i.e. do not remove test/io_tests/ after run and do not redirect output to /dev/null)

  1. run ./test/run_test.sh, see at the end of output:
Process 0 caught error message:
Error when writing to: test/io_tests/profile_error.profiling.0
PASS write profile
  1. Observe that test/io_tests/profile_error.profiling.0 is empty (at the same time test/io_tests/profile_error.profiling.1 is OK).
@vasdommes vasdommes changed the title run_test.sh: "PASS write profile" does not actually write all profiles run_test.sh: "PASS write profile" does not actually write all profiles and should FAIL Jul 10, 2023
@vasdommes
Copy link
Collaborator Author

My bad, didn't notice that the test passes when mpirun fails (i.e. if [ $? != 0 ]), so this behavior is "as designed".

However, it is very unclear when you look at the test name.
I'd suggest having a test for successful "write profile" and another test "write profile should fail".

@vasdommes vasdommes self-assigned this Jul 12, 2023
@vasdommes vasdommes added the io label Jul 13, 2023
@vasdommes vasdommes added this to the 2.6.0 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant