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

parallel make issue in ncdump tests #2395

Closed
edwardhartnett opened this issue Jun 12, 2022 · 6 comments · Fixed by #2983
Closed

parallel make issue in ncdump tests #2395

edwardhartnett opened this issue Jun 12, 2022 · 6 comments · Fixed by #2983

Comments

@edwardhartnett
Copy link
Contributor

As discussed in #2392 there is a parallel make issue (i.e. make -j issue) in the ncdump testing. This causes the following failures:

99% tests passed, 2 tests failed out of 202
Total Test time (real) =  33.53 sec
The following tests FAILED:
	 40 - ncdump_tst_output (Failed)
	 41 - ncdump_tst_nccopy3 (Failed)

The problem is probably test file tst_output_c0.nc and some other files which are created by tst_output.sh and used by tst_nccopy3.sh.

The answer is to make the running of tst_nccopy3.sh dependent on tst_output.sh having completed.

And yet in the Makefile.am I see:

# The tst_nccopy3.sh test uses output from a bunch of other
# tests. This records the dependency so parallel builds work.
tst_nccopy3.log: tst_calendars.log run_utf8_tests.log tst_output.log	\
                 tst_64bit.log run_tests.log tst_lengths.log


So this should be working.

I will take a look at this issue after sorting out some other stuff.

@edwardhartnett
Copy link
Contributor Author

OK, the problem is in tst_nccopy4.sh, which contains this:

if test -f tst_group_data${ext} ; then ${execdir}/tst_group_data ; fi
if test -f tst_enum_data${ext} ; then ${execdir}/tst_enum_data ; fi
if test -f tst_comp${ext} ; then ${execdir}/tst_comp ; fi
if test -f tst_comp2${ext} ; then ${execdir}/tst_comp2 ; fi

This appears to be an attempt to ensure these tests have been run first. However, this is not the way to achieve this. If this runs at the same time as tst_nccopy3.sh is running, one of these files might be in the process of being (re-)created when it is needed.

Instead, the way to ensure that these files all exist is to add a dependency on tst_nccopy4.log in the Makefile,am (as is already done with nccopy3.sh).

I will submit a PR...

@DennisHeimbigner
Copy link
Collaborator

Good. This kind of hidden dependency might occur in other test programs in the same directory.

@edwardhartnett
Copy link
Contributor Author

I have to work on this PR a bit longer so I have turned it into a draft PR. Once I get it fully sorted out I will mark this PR as ready for review...

@edwardhartnett
Copy link
Contributor Author

Btw I am also testing with hdf5 1.13.1 and everything seems to be working...

@edwardhartnett
Copy link
Contributor Author

OK, I'm having this problem again. This time in the CMake build.

@edwardhartnett
Copy link
Contributor Author

OK, I've got a fix. I will put up a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants