Giter Site home page Giter Site logo

Comments (4)

tclune avatar tclune commented on May 20, 2024

@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.

citibeth avatar citibeth commented on May 20, 2024

from pfunit.

tclune avatar tclune commented on May 20, 2024

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.

tclune avatar tclune commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.