Comments (4)
@citibeth The conflict in the CPP token is unfortunate. With a serial build you should indeed not be setting it when compiling driver.F90. Because the compilation of driver.F90 is in user space, you ought to be able to control what flags are sent to it. I could add a new token along the lines you suggest, but to delete the other one would break every one else's build that does use MPI
Perhaps you could just create and maintain a copy of driver.F90 in your own source tree? It really won't be changing until 4.0 is out in which case this issue will hopefully evaporate.
I'm open to any suggestion for the current version that does not break the builds of others.
from pfunit.
from pfunit.
Apparently not. :-(
There really is not much to it though.
First, within the build of the library itself the flag is used to export the MPI specific extensions of pFUnit in pFUnit_mod and whether or not pFUnit's init/finalize trigger MPI's init/finalize. Of course in this context the CPP token is controlled by the build process, not by the user.
Then in driver.F90 it is used to (a) include 'mpif.h' (which may not even be necessary any more) and (b) to have the runner use an MpiContext for controlling resources available to the test runner. The default is a serial context.
Basically if you build the library with -DMPI=YES then you should compile the driver with -DUSE_MPI, and otherwise you should not. Previously there were two separate drivers, which avoided this issue, but resulted in significant code duplication. In 4.0 the duplicated code will have been refactored into the framework, leaving the driver as a very simple entity. The MPI logic is compiled into a separate library , and MPI is enabled by the user by linking with"-lpfunit -lfunit", while a serial test suite is compiled by linking with just "-lfunit". (At least I think this will work - I've only done a small bit of testing thus far.)
from pfunit.
It may also be worth pointing out that, so long as you have MPI in your environment anyway, then it is perfectly sensible to use a parallel build of pFUnit for serial tests. Depending on the flavor of MPI you may need to launch the test with mpirun -np 1 ... , but many flavors allow a 1 PE launch without mpirun.
from pfunit.
Related Issues (20)
- xml output to file HOT 1
- Rebuild issue with Intel fortran and -warn all HOT 3
- Using MAX_PES as a variable for NPES HOT 2
- Allow overriding add_test arguments via add_pfunit_ctest HOT 4
- Error when configuring using pFUnit HOT 14
- Feature Request: Misnamed Test Module Diagnostic HOT 3
- CMake Feature Request: Recompile *_driver.F90 when new TEST_SOURCES added HOT 3
- Feature Request: @assertEquals for string arrays HOT 3
- Error installing pFUnit on WSL(Ubuntu-20.04.5) HOT 11
- compiling on NAS HOT 9
- Fortran compilation error
- Error in opening compiled module files HOT 4
- Incorrect CMake logic for MPIEXEC
- Memory leak when using the @disable macro HOT 5
- CMake error when "-- Performing Test _LOGICAL_DEFAULT_KIND" during setup; missing ./cmake/Trial_sources directory under ./extern/fArgParse/extern/gFTL-shared/extern/gFTL HOT 3
- pFUnit silently fails on Actions HOT 8
- Relative TEST_SOURCES paths in `add_pfunit_ctest` HOT 2
- MAX_LEN_REAL_AS_STRING is a little too small HOT 3
- bug in ctest macro HOT 1
- Intel LLVM 2023.2.x msan issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pfunit.