-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue272 + Issue265 mpi and main in separate process #275
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One function added: call_with_output()
Need to do FLIT_REGISTER_MAIN() first, but it is all implemented, and tested!
- Debugging with TravisCI - Fixed tst_subprocess. sh does not output the same error string for all versions
This strips out most of the infrastructure from before of how MPI worked. Now we will onlly support MPI with a main()-like function in which you are expected to call MPI_Init() and MPI_Finalize().
This demonstrates how it can be done to run an MPI test with float, double, and long double without having to write three different main functions. Not easy...
To do this, functions which() and realpath() were implemented in fsutil. This should allow for the user to still call call_main() and call_mpi_main() after changing to a different directory. Also, documentation was added for call_main() and call_mpi_main().
allow it to be called more than once with the same args
fix FLIT_REGISTER_MAIN()
Bug: if the test file itself is found to be variable, then the symbol bisect will fail because of duplicate flit test registrations. This is because both object files will contribute their static objects to the executable and registerTest() will be called twice.
This reduces test runtime from 51 seconds to 38 seconds
IanBriggs
reviewed
Jul 9, 2019
IanBriggs
reviewed
Jul 11, 2019
IanBriggs
approved these changes
Jul 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c++
Involves touching c++ code
documentation
Involves touching documentation
make
Involves touching GNU Makefiles
python
Involves touching python code
tests
Involves touching tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #265 and fixes #272
Description:
Allow calling a
main()
-like function from a FLiT test. Also, be able to call amain()
-like function that uses MPI from a FLiT test.The
main()
-like functionality is the following:REGISTER_FLIT_MAIN()
that takes the function pointer, andcall_main()
that takes the function pointer and command-line argumentsmain()
-like function is called from a child process (that is the same executable, but with special flags)The MPI functionality is the following:
call_mpi_main()
from the test where they specify everything thecall_main()
function requires plus anmpirun
command with flags.mpirun
command and everything just works.main()
-like function. There is no other way. I think this is a reasonable downside, and worth the exxtra stability our current approach affordssrc/subprocess.cpp
Documentation:
main()
function and how to write MPI tests with examples.Tests:
src/subprocess.cpp
call_main()
TestFactory
classregisterTest()
function used by theREGISTER_TEST()
macro