MPI.jl icon indicating copy to clipboard operation
MPI.jl copied to clipboard

Move `Get_processor_name` to new Misc section, and fix test

Open giordano opened this issue 3 years ago • 1 comments

Following up from https://github.com/JuliaParallel/MPI.jl/pull/632#issuecomment-1250138261, @plessl found a system where MPI.Get_processor_name() doesn't indeed match gethostname(). I guess we don't want tests to fail for this trivial issue, so I simplified the test to just check that the function returns a string, as suggested in https://github.com/JuliaParallel/MPI.jl/pull/630#discussion_r973322003. Not super informative, but at least we still make sure the function runs and doesn't crash.

Also, following mpi4py docs, I moved MPI.Get_processor_name to a new "Misc" section (also in source code, and tests). I think that better classifies this function, and it was also my main doubt in https://github.com/JuliaParallel/MPI.jl/pull/630#issue-1376374138. We may add more misc functions in the future.

giordano avatar Sep 18 '22 16:09 giordano

I tried to reproduce the mismatch of the results of MPI.Get_processor_name and gethostname(). But I was unable to reproduce the issue.

But I also suggest to simply skip this test because the standard leaves the format of the result open to the implementation (see Section 9.1.2 in MPI 4.0 standard https://www.mpi-forum.org/docs/mpi-4.0/mpi40-report.pdf) and only defines that the string must be suitable to uniquely identify the processor in the system.

plessl avatar Sep 19 '22 15:09 plessl