aboutsummaryrefslogtreecommitdiff
path: root/src/SetupPGV.c
Commit message (Collapse)AuthorAge
* Introduce cctk_ash, retire cctk_lssheschnett2012-07-04
| | | | | | | | | | | | Introduce cctk_ash, describing the process-local array shape that has been allocated. This may be larger than cctk_lsh, the process-local shape that should be used. Retire cctk_lssh and related infrastructure to handle staggered grid functions. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@515 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Applied patch from Erik Schnetter: rename PUGHi_GenerateTopology totradke2006-06-23
| | | | | | | | PUGH_GenerateTopology an export it to other thorns. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@481 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Changes from Dylan Stark to allow registration of topologygoodale2005-12-14
| | | | | | | | | | | | | | | | | | | | routines and introducing a physical to logical processor mapping. Now it is possible to register custom topology routines if you don't like the two ones we have at the moment (the traditional one and the new one from Frank Loeffler). You can also provide routines to optimise the placement of neighbouring processes on the processors by giving a custom mapping from the numbers PUGH uses for the processors to the actual MPI processor. Please treat this registration as semi-volatile for the moment and coordinate with Dylan if you fancy using it. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@475 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Apply Frank Loeffler's patch to improve the processor distribution ofschnetter2005-09-26
| | | | | | | | | | | | | | | | | | | | | | | | PUGH: Up to now, PUGH does not take the actual grid size into account while setting the number of processors/domains in each direction. This gives problems, e.g. using boxes like 200x7x7 (with 3 ghostzones). It also does not really do a good job in situations with non near-cubic domains (like in bitant mode it devides first in the z-direction, which is usually the smallest). I inserted another decomposition algorithm which is looking for the longest direction and devides this if possible. Because it was done to be easy to understand, it can fail in certain situations, in which it is gracefully falling back to the old decomposition (e.g. a cubic box and 9 processors). To include this algorithm I added a keyword "automatic_old" to PUGH::processor_topology. The new behaviour is the default; this keyword re-enables the old behaviour. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@471 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Improve periodic boundaries on small domains: allow the number ofschnetter2005-09-26
| | | | | | | | | | ghost zones to be larger than the number of interior points if there is only one processor in the corresponding direction. This is necessary to allow two ghost zones when there is only one interior grid point, which is often used to set up lower-dimensional domains. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@469 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Using neighbours to correctly setup bbox and ownership arrays.dstark2005-06-20
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@466 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Set cctk_bbox to zero for periodic boundaries.schnetter2005-04-18
| | | | | | | This closes PR 483. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@465 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Implement the option "PUGH::local_size_includes_ghosts", which allowsschnetter2005-03-20
| | | | | | | | specifying the processor-local unghosted grid size -- this is the grid size that should stay constant for a parallel performance test. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@460 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Calculate load skew correctlyschnetter2005-01-02
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@453 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Store the directional stagger indices in the pGV structure rather than just thetradke2004-06-26
| | | | | | | | staggering code. And use this former later on - this closes PR CactusPUGH 1549: "Staggered grids crash PUGH". git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@446 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Check on each processor that there are enough interior points.tradke2004-06-21
| | | | | | | This is related to PR CactusPUGH/1726 "Periodic boundaries without MPI are broken". git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@445 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Added a sanity check 'nsize >= 3*nghosts' and abort if this is not true.tradke2004-06-08
| | | | | | | | This puts PR CactusPUGH/1726 "Periodic boundaries without MPI are broken" into a suspended state. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@443 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Adding semicolon after fileversion macro so TAGS work properly.goodale2004-02-05
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@430 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Ian's fix for malloc(0) which returns NULL on DEC machines and thus weretradke2003-12-11
| | | | | | | treated as an error. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@427 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fix for my latest commit which broke MPI configurations.tradke2003-12-05
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@426 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Made a few more functions static.tradke2003-12-05
| | | | | | | Fixed gcc compiler warnings about unused parameters. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@425 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Bug was discovered by Fokke Dijkstra: manual partitioning settings wastradke2003-12-01
| | | | | | | | applied to both grid function and grid array variables. Should be done only for grid functions, of course. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@424 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Allow vector groups of scalars.schnetter2003-11-21
| | | | | | | | | | Allow vector groups with more than one declared variable. Much of this patch consists of removing special case code for scalars. Scalars are now almost everywhere treated as rank 0 arrays. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@423 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Changed C++ style comment to C.rideout2002-07-09
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@395 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Really set deallocated data pointers for grid arrays to NULL.tradke2002-07-05
| | | | | | | Before they got allocated to a single array element. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@394 b61c5cb5-eaca-4651-9a7a-d64986f99364
* It's prefectly legitimate to have an array with 0 points as long asgoodale2001-11-02
| | | | | | | | | | storage isn't assigned for it, so check that avgpoints > 0 before dividing by it. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@362 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Filled out the maxskew variable which wasn't being set.allen2001-10-28
| | | | | | | | | | | | Also added a private parameter "info", at the moment it can take the values none or load, if load is chosen it shows the actual load on each processor. I want to add more options for printing out the local domain etc on each processor. Documented the maxskew variable, and how to spot if you are using MPI or not. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@355 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Preliminary support for 'vector' Grid Variables (see commits to ↵goodale2001-10-07
| | | | | | | | | | | | | | interface_parser.ccl for syntax). Works for GFs and GAs, but not implemented yet for GSs. Please treat this as volatile until it is documented, and let me know if you are using it. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@351 b61c5cb5-eaca-4651-9a7a-d64986f99364
* The pGExtras->hyper_volume[] array is counted by number of elements now,tradke2001-06-12
| | | | | | | | not by number of bytes anymore. This fixes PR CactusPUGH-PUGH/689. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@333 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Making rcsid string a constant - PR 669.goodale2001-05-10
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@324 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Call new routine PUGH_MPIDataType() to get the MPI datatype.tradke2001-02-14
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@305 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fixes to the processor topology code. Now does split into 4x4x4 on 64procsgoodale2001-01-30
| | | | | | | | | | | (this was thrown off by floating-point to integer conversion errors before), and also deals correctly with cases where one of the dimensions decomposes into a large prime (this used to lead to, e.g., 62=2*1*31 rather than 1*2*31). Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@302 b61c5cb5-eaca-4651-9a7a-d64986f99364
* PUGH support for CCTK_COMPLEX8 datatype.tradke2000-11-29
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@287 b61c5cb5-eaca-4651-9a7a-d64986f99364
* The connectivity and the extras structure for CCTK_ARRAY variablestradke2000-09-18
| | | | | | | are now freed in DestroyPGH(). This fixes BR 436. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@272 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Allocate/free array of stati for outstanding send requests.tradke2000-09-15
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@267 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Added an index for arrays to the pGA and pGH which is needed to make thatallen2000-09-01
| | | | | | | | | Cache lines are associated uniquely with each timelevel of GA This unique index is used now when storage is assigned for the GA git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@264 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Forgot to free the connectivity and extras when destroying CCTK_ARRAY vars.tradke2000-08-25
| | | | | | | Thanks to Philip who found this memory leak. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@261 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fixing memory problem which can cause core dumps with timelevels. Thisgoodale2000-07-21
| | | | | | | | | is a temporary fix as some of this code needs to be redone properly. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@251 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Removing silly code.goodale2000-07-20
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@250 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Quick and dirty fix to prevent access to freed memory when destroying Array ↵goodale2000-07-19
| | | | | | | | | | | | groups. This is far from perfect, and seems to now not free all the memory, but is far better than a segfault. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@244 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Added new driver overloadable function for querying array data such as lsh.allen2000-06-22
| | | | | | | Put bbox onto the pGV structure to speed up calling this new overloadable function git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@228 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Really free comm buffers when destroying a grid array variable.tradke2000-06-22
| | | | | | | | | | | | This fixes a memory leak in PUGH. Also introduced a termination routine for PUGH which destroys the top-most pGH. Now all memory ever allocated by PUGH should be finally freed at CCTK_TERMINATE. Other thorns' termination routines which still need some information from the pGH should register themselfs as "BEFORE Driver_Terminate". git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@226 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Enabled PUGH to synchronize groups of arrays in one communication calltradke2000-06-14
| | | | | | | | | | | | | | rather than doing it sequentially on individual arrays. Nothing changes for the CCTK routines overloaded by PUGH. For BAM and other thorns which don't care about groups there is now a separate interface to synchronize individual arrays. Also eliminated the restriction to synchronize 1D and 3D arrays only - now it should do arbitrary dims (not yet tested). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@222 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fixing a strange assignment. A few rearrangements. Free some more memorygoodale2000-05-11
| | | | | | | | | on destruction of connectivity structure. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@217 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Small memory leaksallen2000-05-10
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@213 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Changed names of PUGH functions to be uniform. Now all PUGH functionsgoodale2000-04-19
| | | | | | | | | should begin with PUGH. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@211 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fixing rscid warnings, untabified files, combined identical case statementstradke2000-04-18
| | | | | | | for GROUP_GF and GROUP_ARRAY. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@203 b61c5cb5-eaca-4651-9a7a-d64986f99364
* #define MPIallen2000-04-04
| | | | | | | | | | | to #define CCTK_MPI need a reconfigure before next build git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@197 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Removing old files with pGFsallen2000-04-03
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@192 b61c5cb5-eaca-4651-9a7a-d64986f99364
* staggering with PGVlanfer2000-03-27
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@186 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Major changes to PUGH as the dearly loved pGF is removed, and a grid functionallen2000-03-23
| | | | | | | | | | | | | | | | | | | | | | | is lowered to being simply a special case of a grid array, pGA. Grid arrays can all have different sizes, which means that now the size of a GA is moved from the GH to a structure on the GA, along with a lot of other connectivity and additional information which was formerly on the GH. If you need to care about these changes, take a look at the files in src/include/pGH.h and src/include/pGA.h, to see the new structures (I'll leave the old files pGF.h and SetupPGF.c around for a while to compare with). Also, look at a PUGH dependent file which has already been converted, such as CactusPUGHIO/IOASCII/src/Write1D.c. Warning: This commit breaks the development versions of IOHDF5 and IsoSurfacer, these will be fixed real quick. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@182 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Completed DestroyPGH(), added DestroyConnectivity() and DestroyPGextras().tradke2000-03-13
| | | | | | | | | | | This should fix the memory leak in BAM as well as running out of MPI_Type_requests. Thomas git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@177 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Fixing compiler warnings about unused variables, missing prototypes,tradke2000-03-08
| | | | | | | | | | | and return values. Fixing CactusPUGH-PUGH 264. Thomas git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@176 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Load balancing grid decomposition for PUGH.allen2000-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contributed by Matei Ripeneau Here are his notes (hopefully there will soon be PUGH docs to add them to): 1. Purpose Allow manual (user specified) grid partitioning 2. Parameters I've added the following parameters to ./PUGH/param.ccl KEYWORD partition "Is the partition manual/automatic" { "automatic" :: "even implicit partition" "manual" :: "specified by partition_#d_XYZ .." } "automatic" STRING partition_1d_X "Tells how to partition on direction X" ... STRING partition_2d_X "Tells how to partition on direction X" ... STRING partition_2d_Y "Tells how to partition on direction Y" ... STRING partition_3d_X "Tells how to partition on direction X" ... STRING partition_3d_Y "Tells how to partition on direction Y" ... STRING partition_3d_Z "Tells how to partition on direction Z" ... (all these strings have default "") How to specify a manual partition? Simpler to explain using an example: partitioning a grid space with 30 x 30 x 30 points for a configuration with 8 processors can be specified as: PUGH::partition = "manual" PUGH::partition_1d_X = "" // uses default PUGH::partition_2d_X = "16:14" PUGH::partition_2d_Y = "7:9:5:9" PUGH::partition_3d_X = "16:14" PUGH::partition_3d_Y = "12:18" PUGH::partition_3d_Z = "17:13" Even if PUGH::partition = "manual" an empty string like PUGH::partition_1d_X = "" will lead to default (even) partition on that direction git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@174 b61c5cb5-eaca-4651-9a7a-d64986f99364
* Cosmetic changesallen2000-03-04
| | | | git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@167 b61c5cb5-eaca-4651-9a7a-d64986f99364