Conversation
8110aea to
09121c2
Compare
|
@CamStan , I've started to write up some test cases for multi-process open and unlink calls of the same file. This requires an MPI job of at least two procs, though for this, it's sufficient to run all procs on the same node. Would you mind helping me work that test in on this branch? In which directory should I place a multi-process test? The draft of that test is here: Should I add TAP-style |
7f2c25a to
25892e5
Compare
Currently we are only set up with single-process unit tests and the integration tests which are based off the example programs (which only just check if they complete correctly; TAP-style tests aren't used in the examples themselves). We are not set up for multi-process unit tests, but it's something that's been on my mind to attempt at some point, especially now that Travis doesn't limit you as much on this anymore. So I played around with this a bit today to see if I could get something to work and hit a few more bumps than I was expecting. I got a basic version with your Alternatively, could possibly write
I created a new one "t/multi" for now, and named everything associated with it "multi" also. We can change the naming scheme, but just wanted to get it working for now. Then to add it to the test harness I created a new
This is where most of the issues showed up. The biggest being that libtap (what we're currently using to test C code) doesn't like to be run with multiple processes. Essentially if you call To work around this, I had to make sure everything libtap related was only called by rank 0, which is ugly and annoying, but works for now. Could always tweak our testing framework in the future to make sure Changes I made to
Lastly, you'll notice I commented out the the code in I can push that commit to this PR if we want to go this direction. Otherwise, if you grab my commit and want to add/adjust things, to test locally: # get a single node allocation
# after you build
cd build/t
make check TESTS='0001-setup.t 1000-multi-open.t 9010-stop-unifyfsd.t 9999-cleanup.t'
# full log for the test will then be in build/t/1000-multi-open.log
# make adjustments to `open_multi.c`
make clean
make check TESTS='0001-setup.t 1000-multi-open.t 9010-stop-unifyfsd.t 9999-cleanup.t' |
|
Wow, thanks for all of that work, @CamStan ! The direction you're taking things sounds good to me. In a lot of cases, I think we could get by with an collective |
|
Thanks for reviewing, @MichaelBrim |
When more than one process tries to create a given file at the same time with
open(O_CREAT), we were returningEEXISTon procs that lost the race. Those procs should still open the file unlessO_EXCLis also specified.Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: