| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
CarpetLib's comm_state class (actually, it's still just a struct) has been
extended to handle collective buffer communications for all possible C datatypes
at the same time. This makes it unnecessary for the higher-level communication
routines to loop over each individual datatype separately.
darcs-hash:20050815150023-776a0-dddc1aca7ccaebae872f9f451b2c3595cd951fed.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
single components
The default communication scheme in Carpet (which does an individual send/recv
operation for each component) comes with two parameters for fine tuning:
CarpetLib::use_lightweight_buffers
CarpetLib::combine_recv_send
the defaults of which are set to use a well-tested but also slower
communication pattern (as turned out during benchmark runs).
This patch cleans up the implementation of this communication scheme so that the
fastest communication pattern (combined posting of send/recv; use of lightweight
buffers) is now always used. The above parameters therefore became obsolete
and shouldn't be used anymore in parfiles.
darcs-hash:20050526114253-776a0-780933a1539a260d74da8b92522fa2f48c714964.gz
|
|
|
|
|
|
| |
this class
darcs-hash:20050526113252-776a0-58480600178d1c7beae50aa34808564a443f3c92.gz
|
|
|
|
| |
darcs-hash:20050411183135-891bb-5d2ced682685fb55a00da1864560e54bd113f765.gz
|
|
|
|
| |
darcs-hash:20050411182954-891bb-6f141054635439136d978f98f528af1204919199.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collective buffers are used to gather all components' data on a processor
before it gets send off to other processors in one go. This minimizes the
number of outstanding MPI communications down to O(N-1) and thus improves
overall efficiency as benchmarks show.
Each processor allocates a pair of single send/recv buffers to communicate
with all other processors. For this the class (actually, the struct) comm_state
was extended by 3 more states:
state_get_buffer_sizes: accumulates the sizes for the send/recv buffers
state_fill_send_buffers: gathers all the data into the send buffers
state_empty_recv_buffers: copies the data from the recv buffer back into
the processor's components
Send/recv buffers are exchanged during state_fill_send_buffers and
state_empty_recv_buffers. The constructor for a comm_state struct now takes
an argument <datatype> which denotes the CCTK datatype to use for the
attached collective buffers. If a negative value is passed here then it falls
back to using the old send/recv/wait communication scheme. The datatype
argument has a default value of -1 to maintain backwards compatibility to
existing code (which therefore will keep using the old scheme).
The new communication scheme is chosen by setting the parameter
CarpetLib::use_collective_communication_buffers to "yes". It defaults to "no"
meaning that the old send/recv/wait scheme is still used.
So far all the comm_state objects in the higher-level routines in thorn Carpet
(restriction/prolongation, regridding, synchronization) have been enabled to
use collective communication buffers.
Other thorns (CarpetInterp, CarpetIO*, CarpetSlab) will follow in separate
commits.
darcs-hash:20050330152811-776a0-51f426887fea099d1a67b42bd79e4f786979ba91.gz
|
|
|
|
|
|
|
| |
Restructure the lightweight communication buffers.
Use lightweight communication buffers for interpolation as well.
darcs-hash:20050103200712-891bb-7e42816d3b8d667916084e3f32527c8f35327d7f.gz
|
|
|
|
|
|
|
|
|
|
|
| |
Lightweight communication buffers use essentially only a vector<T>
instead of a data<T> to transfer data between processors. This should
reduce the computational overhead.
Set the parameter "use_lightweight_buffers" to use this feature. This
feature is completely untested.
darcs-hash:20050102173524-891bb-6a3999cbd63e367c8520c175c8078374d294eaa8.gz
|
|
|
|
| |
darcs-hash:20050101193846-891bb-7bb505d29a25b04c0d23e792eea7ff404d1f4200.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turn most of the templates in CarpetLib, which used to have the form
template<int D> class XXX
into classes, i.e., into something like
class XXX
by setting D to the new global integer constant dim, which in turn is set to 3.
The templates gf and data, which used to be of the form
template<typename T, int D> class XXX
are now of the form
template<typename T> class XXX
The templates vect, bbox, and bboxset remain templates.
This change simplifies the code somewhat.
darcs-hash:20050101182234-891bb-c3063528841f0d078b12cc506309ea27d8ce730d.gz
|
|
|
|
| |
darcs-hash:20050101171429-891bb-130630de8631b8f9bbe494e135662ffb089ecca0.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove functions gdata::lives_on_this_processor() and
gdata::this_processor_is(proc). Introduce dist::rank() and
dist::size() instead.
Re-introduce assert statement in data::proc().
Move declaration and definition of assignment operator near the
constructor and destructor.
darcs-hash:20041230191026-891bb-90eeb1be4c04753c165e13e7c1e65f06847180ca.gz
|
|
|
|
| |
darcs-hash:20050101162121-891bb-ac9d070faecc19f91b4b57389d3507bfc6c6e5ee.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Collect more timing statistics in the data class. Print these
statistics to stdout when the Cactus parameter print_timestats is set.
Create a timer class "timestat". This is a timer that can be started,
stopped, and it prints the total time as well as some statistics.
For memory allocation statistics, count the number of objects as well
as the number of bytes.
darcs-hash:20041230212136-891bb-c14edfa7d539ae9b135eee76afadaad51fd0b098.gz
|
|
|
|
|
|
| |
That is, say e.g. <cmath> instead of <math.h>.
darcs-hash:20041225182902-891bb-2a4502d6a76ed830ab978030fc4e4765b183509f.gz
|
|
|
|
|
|
|
|
|
| |
Introduce parameter a parameter to post MPI_Irecv and MPI_Isend at the
same time.
Use two queues instead of one vector to store the MPI_Requests.
darcs-hash:20041208222541-891bb-c7c8994a0c41b6cfb37f6dc023bc1172238f3619.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The g* classes had exposed public member variables which were never
meant to be altered from outside (I imagine altering most of them
would have resulted in very bad behaviour); I made most of these const.
This resulted in some complaints by the compiler about the canonical
constructor and assignment ops, so I provided private dummies.
This patch contains the following changes:
M ./Carpet/CarpetLib/src/gdata.cc +6
M ./Carpet/CarpetLib/src/gdata.hh -2 +2
M ./Carpet/CarpetLib/src/gf.hh +5
M ./Carpet/CarpetLib/src/ggf.hh -9 +15
darcs-hash:20041209172710-32473-46d2a93e11f21f305467b375fe15910d47b8e4de.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed evil assert from otherwise harmless public accessor gdata::proc().
Very systematically checked that the assert is still done everywhere
this function was previously called.
New functions
bool this_processor_is (int procno);
bool lives_on_this_processor ();
wrapper messy repeated MPI_Comm_rank code.
Had to modify ioascii.cc due to missing assert as explained above, but
found no other instances of calls to proc().
This patch contains the following changes:
M ./Carpet/CarpetIOASCII/src/ioascii.cc +1
M ./Carpet/CarpetLib/src/data.cc -41 +21
M ./Carpet/CarpetLib/src/gdata.cc -6 +19
M ./Carpet/CarpetLib/src/gdata.hh -1 +3
darcs-hash:20041208171657-32473-11da4a7ec810f97b2c82c322119fa69a9ffb4640.gz
|
|
|
|
|
|
|
|
| |
Add a parameter CarpetLib::use_waitall that switches from using a
series of MPI_Wait statements to using a single MPI_Waitall
statement. This might improve performance on many processors.
darcs-hash:20041124235118-891bb-034efea054db236a187022b1858e4574da867fa3.gz
|
|
|
|
| |
darcs-hash:20041020094227-891bb-aac66b506731e35384752ff0fa0df4e91f689a71.gz
|
|
|
|
|
|
| |
Replace all CVS header tags with the standard "$Header:$".
darcs-hash:20040918132147-891bb-dea889bdd94a479ec412d14d08e9efca63e5c24d.gz
|
|
|
|
| |
darcs-hash:20040419055635-07bb3-6014661f8995a59c900cebf24c03f52b6eed2d21.gz
|
|
|
|
| |
darcs-hash:20040323111429-07bb3-08a8c6b8d729eb0efc5b757b61401b14712d790c.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Import the recently announced changes:
1. Carpet has now an infrastructure for multiple maps (aka "grid
patches"). Instead of a single grid hierarchy there can now be
several. This is largely untested, because the remainder of Cactus
cannot handle multiple coordinate systems.
2. The order in which the schedule bins are called has changed. As Ian
Hawke pointed out, the previous order during time evolution was
inconsistent. The initial data ordering did not allow for recovering
and was not usable for progressively solving elliptic equations for
initial data.
3. Carpet now supports convergence levels. The convergence level
specifies by how many factors of two the resolution in the parameter
file should be coarsened (or refined, if negative). This should make
convergence tests and test runs much easier. It is, in principle, also
possible to run several convergence levels at once. This has not been
tested because the remainder of Cactus cannot handle multiple
resolutions. This will be necessary for a multigrid solver, and also
for having a shadow hierarchy to determine where to refine adaptively.
4. Carpet works together with the new CoordBase domain specification
parameters. Without these, using convergence levels will lead to very
strange results.
5. The "modes" have changed. There are now:
meta mode: the whole simulation
global mode: one convergence level
level mode: one refinement level
singlemap mode: one map on one refinement level
local mode: as previously
The whole mode handling has been cleaned up.
6. The regridding thorn has been cleaned up.
7. The kind of prolongation stencil is now determined in Carpet, i.e. at
a fairly hight level, instead of in CarpetLib.
8. The low-order prolongation operators have been made much more
efficient (as have previously the higher-order ones).
9. Assorted smaller changes.
For Carpet users, there should be no major incompatibilities. The major
improvements are 3 and 4 combined. Here is an example:
CoordBase::domainsize = extent
CoordBase::spacing = gridspacing
CoordBase::zero_origin_x = yes
CoordBase::zero_origin_y = yes
CoordBase::zero_origin_z = yes
CoordBase::xextent = 20.0
CoordBase::yextent = 20.0
CoordBase::zextent = 20.0
CoordBase::dx = 1.0
CoordBase::dy = 1.0
CoordBase::dz = 1.0
CoordBase::boundary_shiftout_x_lower = 1
CoordBase::boundary_shiftout_y_lower = 1
CoordBase::boundary_shiftout_z_lower = 1
Carpet::domain_from_coordbase = yes
Carpet::convergence_level = 0
grid::type = coordbase
grid::domain = octant
grid::avoid_origin = no
This gives you a grid that extends from the origin ("zero_origin") up to
20.0 with a grid spacing of 1.0. Symmetry zones and boundary zones are
added automatically. The "shiftout" says that there is no boundary
point on the origin. The staggering parameters (not shown) default to
"no". In order to change the resolution, only the convergence level
has to be adjusted. Note that the old way of specifying the domain
extent still works.
For Carpet developers, one major change is the new mode handling. As
described in 5, the looping macros (that loop over all refinement
levels, or all components) have changed.
darcs-hash:20040125135727-07bb3-51c9647c1b5080e7e180b52a1b81fa155cfd19e9.gz
|
|
|
|
| |
darcs-hash:20031121125546-07bb3-60338023244fbd0fab9d8663adff4cdf78e31141.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many changes that accumulated while Cactus and Carpet diverged.
Add processor splitting mechanism "along-dir" that splits along a
specified direction.
Rename group PostRestrict to bin POSTRESTRICT.
Prolongate initial data only when desired. This saves much time.
Sorry, Ian.
Fix bug in time level cycling of grid arrays. (Note: grid arrays
should not have time levels.)
Fix time_t bug on IRIX.
Make sure that there is no integer overflow when there are many
refinement levels. Always put parentheses around
(maxreflevelfact/reflevelfact).
Fix typo in Carpet verbose output.
Add debug output in processor splitting.
Communicate in three stages: Irecv, (work), Isend, Wait. This might
be more efficient. Much more, potentially.
Fix bug in processor layout of grid arrays. Sorry, Ian.
Make the interpolator interpolate between time levels. Untested.
Fix bug in processor communication in interpolator. Sorry, Ian.
Rewrite prolongation operators to make them twice as fast. There you
are, Ian.
Move prolongation operator kind handling from data to gdata.
Add official hyperslabbing interfaces to CarpetSlab.
Adapt to new cGH * handling.
darcs-hash:20031105151837-07bb3-758a87ff0355dba053269df4b7d7d79bea018669.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the interface.ccl. The prolongation method defaults to "Lagrange" and the other options are "None" and "TVD" (which I'm now sure doesn't work properly).
The prolongation method can now be controlled from the tags table defined in the interface.ccl. The prolongation method defaults to "Lagrange" and the other options are "None" and "TVD" (which I'm now sure doesn't work properly).
As an example, from CartGrid3D:
REAL coordinates type=GF tags='Prolongation="None"'
{
x, y, z, r
}
switches off prolongation for the coordinates.
Also, a one off opportunity to marvel at C++ code that combines the worst features of Fortran with the worst features of C...
darcs-hash:20031015051401-58737-870c23e54e58164a45ffe3438e393587b1cc670b.gz
|
|
|
|
|
|
|
|
| |
Make gf and data objects store a Cactus variable index that this
object is associated with. This can be used to access various kinds
of information, e.g. variable names.
darcs-hash:20031014143916-07bb3-678d114393008db7790b5ed72d6462673414c06a.gz
|
|
|
|
| |
darcs-hash:20030502135918-07bb3-6e9e7dee518a1a591ad66a88ba1e43602e9abdca.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed the "dimgeneric_*" data types from CarpetLib. They were never
really used anyway.
Changed "th" into "th<D>".
Renamed "generic_*" to "g*".
Propagated these changes to all other places.
darcs-hash:20030103144936-07bb3-c4d74d2d94a56a898f9bb735666eefc01e2610e2.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed the variable types for the time from int to real. This allows
more flexibility for time interpolation.
The time interpolators now accept an explicit argument for the current
time, instead of using the current time from the time hierarchy. This
allows arbitrary current times, which are necessary for the
intermediate time steps for time interpolators. The times that are
interpolated _from_ still come from the time hierarchy.
darcs-hash:20020925134915-07bb3-26927a425ca5c0b52a2ca02bc54673c4b9e1781e.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed user choice of C++ template instantiation model. In my
experience, only one model works, namely explicit template
instantiaion. No need to pretend that the other things work with
Cactus.
(Don't complain to me -- I also think it's a shame that something that
calls itself "compiler" isn't able to do this automatically. Many
other compilers for many other languages do this kind of thing without
even mentioning it. So there's either something fundamentally wrong
with the C++ standard, or with the C++ compiler writers, or with the
perceived wishlists of C++ users. And I would bet an arm and a leg
that it's not the second of these.)
darcs-hash:20020505201656-07bb3-a1b8dfc5587d59c718ad25ce89d0c8973c2b3e6f.gz
|
|
|
|
|
|
|
|
|
| |
Moved ASCII output from CarpetLib (where it never belonged) to
CarpetIOASCII.
Added parameter to not output the ghost zones for ASCII output.
darcs-hash:20020109224240-07bb3-457f3768c8aee0b68db6a7a85741ccd9191ee39e.gz
|
|
|
|
|
|
|
| |
Changed the ASCII output format due to popular demand. Now includes
physical time and physical coordinates instead of only indices.
darcs-hash:20020108110354-07bb3-15982730e02655f8249c809e3cf9703d0fb3f5c7.gz
|
|
|
|
|
|
|
| |
Added a bit of convenient functionality.
Fixed a few bugs that were uncovered by dynamic regridding.
darcs-hash:20011214153941-07bb3-c31c15cec651b5c3c992f529b7409c081fda5ba8.gz
|
|
|
|
|
|
|
|
|
| |
Changed handling of interpolation orders; they are now stored in the
grid functions and don't have to be passed around.
Speeded up some prolongation operators. They are still slow.
darcs-hash:20011209154308-07bb3-caa74a89a87c290852f2b59160ed26d9361f3cf1.gz
|
|
|
|
|
|
|
|
| |
Introduced abstraction classes that have no <dim> parameter. This
will make it easier to adapte the driver to support multiple
dimensions at once.
darcs-hash:20010612125655-07bb3-1cba35eb867eca1234b3a40bd7a5641b64776c50.gz
|
|
|
|
| |
darcs-hash:20010329225020-f6438-288c9cfa79334ab72eb8d034f9d2840f5eb99810.gz
|
|
|
|
| |
darcs-hash:20010327202631-f6438-d70466b15bf2224f3ce20968622c77a3cca37a73.gz
|
|
|
|
| |
darcs-hash:20010324213842-f6438-3ccfdd7797b28055f08d28b77e33205c69c60e27.gz
|
|
|
|
|
|
|
| |
Brought in latest differences from the SGI version. This is work
towards a code that compiles on both architectures.
darcs-hash:20010322174200-f6438-23ab5f26cf84d2666312791c6bdb5a0fc1d0390a.gz
|
|
|
|
|
|
|
|
| |
Made two refinement levels work on two processors. Lessons learnt: A
storage contained might well contain zero elements, and Don't return
references to temporary objects.
darcs-hash:20010314100017-f6438-29ce1a19a498067588eaf0f027a00000abe40d8d.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Carpet now passes the Cart3d test suite. This required a rewrite of
CarpetSlabe, which now uses the data<> class instead of doing things
its own way. This in turn required some updates to data<>.
CarpetSlab now ignores (i. e. does not use) boundaries, except outer
boundaries. For that to work, the dh<> class has been given the
notion of an outer boundary.
In order to increase performance, the cctk_bbox[] information in
Carpet is not set correctly. As an approximation, it just reflects
whether the current grid component lies at the outer boundary, as
calculated using cctk_lbnd, cctk_ubnd, and cctk_gsh.
darcs-hash:20010310195459-f6438-8ee874d722de4df717e5eb3002722ceb8d4a9bb7.gz
|
|
|
|
| |
darcs-hash:20010305133103-f6438-b07009b56bf38b955fb2ca8476292ab2e47fdac2.gz
|
|
|
|
| |
darcs-hash:20010301124010-f6438-fca5ed1e25f84efd816aa0d13fc23b58add7195d.gz
|
|
darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz
|