Starting from a background in Fortran, arithmetic with C++ arrays is annoying!
P++ makes it trivial to parallelize A++ codes: Simply recompile & re-link the executable. P++ handles the data distribution and proper ghost boundary managment for you. Read on to learn how to code A++ & P++ applications.
These are already configured on tor.hao.ucar.edu, bluefire.ucar.edu, stic.rice.edu, discovery.dartmouth.edu and many more!
Utilizing A++ and P++ requires a special set of compile and link flags:
CXXFLAGS =-I/path/to/A++/include CXXFLAGS +=-I/path/to/P++/include LDFLAGS =/path/to/A++/lib -lApp -lApp_static LDFLAGS +=/path/to/P++/lib -lPpp -lPpp_static
How does A++ differ from C++?
Note John's occasional convention of typeArray.setBase(1)
See many of the subsections for Array Objects:
Given an (x,y,z) grid, compute cell centers.
Recompile with preprocessor flag PPLUSPLUS
set and link the P++ library.
Example 1b. ``Parallel Hello World''
Example 3. Distribution of Arrays in P++
The solution is in the A+/P+ Tutorial: Example 4. The Heat Equation