summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Improve performance of Fortran index calculationseschnett2011-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | In Fortran, Cactus currently declares grid functions e.g. as (this is the expansion of DECLARE_CCTK_ARGUMENTS) REAL*8 gxx (X0metric,X1metric,X2metric) where X0metric etc. are integers passed into the routine. Each grid function group has its own, independent size. This has two disadvantages: - The compiler does not know that all grid functions have the same size (namely cctk_lsh), and thus has to perform array index calculations separately for each group - The argument list is longer than neded The enclosed patch declares grid functions via cctk_lsh. Grid arrays are still declared independently. This reduces the code size of e.g. GRHydro/GRHydro_Tmunu.F90 from 6836 to 6241 bytes on my system. I have not attempted to measure a performance difference. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4763 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add final newlineeschnett2011-09-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4731 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct definitions of CCTK_LSSH and CCTK_LSSH_IDX in Fortraneschnett2011-08-28
| | | | | | | | Correct definitions of CCTK_LSSH and CCTK_LSSH_IDX in Fortran. Add comments. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4722 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add (empty) configuration.ccleschnett2011-08-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4721 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check indices in CCTK_GFINDEX3D and friends when CCTK_DEBUG is definedeschnett2011-08-19
| | | | | | | | Check grid point indices in CCTK_GFINDEX3D and friends when CCTK_DEBUG is defined. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4719 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check HAVE_CCTK_C_INLINE to see if inlining is supportedeschnett2011-08-14
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4716 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Flush stdout and stderr before and after outputting a parametereschnett2011-08-13
| | | | | | | | warning. This helps prevent mixing of stdout and stderr when both are redirected to the same file. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4714 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Accept comments in multi-line strings in parameter fileseschnett2011-07-02
| | | | | | | | | | Modify the parameter file parser to accept comments in multi-line strings. These comments extend from a "#" character to the end of the line. This makes it much easier to comment out variables in output strings. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4710 17b73243-c579-4c4c-a9d2-2d5706c11dac
* This patch makes the CST stage create prototypes for all scheduledeschnett2011-03-30
| | | | | | | | | | | functions into a new file cctk_ScheduleFunctions.h, which is included into cctk.h. This is done only for C (and C++) since Fortran prototypes cannot be declared at file scope. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4696 17b73243-c579-4c4c-a9d2-2d5706c11dac
* include cctk_Termination.h from cctk.hknarf2011-02-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4683 17b73243-c579-4c4c-a9d2-2d5706c11dac
* from Ian Hinder:knarf2011-01-06
| | | | | | | | | | | | | | | Correctly load parameter files with DOS line-endings Before this commit, when a parameter file with DOS line-endings was used, certain features of Cactus did not work correctly. For example, setting an output directory of $parfile would create an output directory named "$parfile" instead of expanding the parameter filename. This commit converts any CR-LF sequences to LF immediately after the parameter file is loaded. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4663 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Improve optional requirement of capabilitieseschnett2010-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Thorns can specify that they can make use of a particular capability (for example HDF5), but that it is not absolutely required. It is currently not possible to detect a capability in the source code or make system of a thorn because there is no preprocessor macro and no make variable defined to indicate that the capability is available. Additionally, the preprocessor definitions which are explicitly provided by a capability are written to an include file which is malformed and hence these definitions cannot be read. This commit: * Introduces makefile and preprocessor variables HAVE_CAPABILITY_<cap> for each provided capability * Removes the incorrect definition line causing the include file to be malformed * Renames cctki_Capabilities.h to cctk_Capabilities.h and causes cctk_Capabilities.h to be included from cctk.h by all thorns * Excludes cctk_Capabilities.h from dependency checking (dependencies of the files included from this one will be sufficient) [Patch from Ian Hinder] git-svn-id: http://svn.cactuscode.org/flesh/trunk@4659 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add CCTK_VECTGFINDEX3D and friendseschnett2010-11-24
| | | | | | | | | | Add functions CCTK_VectGF1D, CCTK_VectGF2D etc. and the corresponding macros CCTK_VECTGFINDEX1D etc. that allow indexing into vector grid variables. Vector grid variables require an additional index, namely the vector index; these functions simplify using them. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4654 17b73243-c579-4c4c-a9d2-2d5706c11dac
* support __unused__ where known. This let's e.g. gcc know that especially the ↵knarf2010-11-23
| | | | | | Cactus variables might be unused and should not be reported as such. This closes ET ticket #1 git-svn-id: http://svn.cactuscode.org/flesh/trunk@4651 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Provide Fortran wrapper for CCTK_SyncGroupsI().rideout2010-11-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4646 17b73243-c579-4c4c-a9d2-2d5706c11dac
* detect error in dimension size settings of grid arrays, and produce a ↵knarf2010-10-27
| | | | | | meaningful error message git-svn-id: http://svn.cactuscode.org/flesh/trunk@4644 17b73243-c579-4c4c-a9d2-2d5706c11dac
* fix last commit (ooops). ValidateModifiers() is apparently called for all ↵knarf2010-09-29
| | | | | | modifiers, and some of them apparently allow non-full variable names. My mistake, not corrected. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4639 17b73243-c579-4c4c-a9d2-2d5706c11dac
* check return value of CCTK_VarIndex for check of if/while variable in ↵knarf2010-09-28
| | | | | | schedule tree, and give corresponding warning message git-svn-id: http://svn.cactuscode.org/flesh/trunk@4637 17b73243-c579-4c4c-a9d2-2d5706c11dac
* reorganizes the printout of the scheduling treeknarf2010-06-03
| | | | | | Cactus does at startup a bit, fixing also some indentation problems. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4620 17b73243-c579-4c4c-a9d2-2d5706c11dac
* test flesh commit messageknarf2010-04-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4609 17b73243-c579-4c4c-a9d2-2d5706c11dac
* test flesh commit messageknarf2010-04-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4608 17b73243-c579-4c4c-a9d2-2d5706c11dac
* test flesh commitknarf2010-04-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4607 17b73243-c579-4c4c-a9d2-2d5706c11dac
* test flesh commitknarf2010-04-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4606 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The function can get confused with detecting the end of the bufferschnetter2010-01-18
| | | | | | | | | | | | | | when the last line is in a comment or in a string, and may overrun the end of the buffer. The symptoms are error messages past the last line of the parameter file, because the memory after the buffer end is interpreted as (probably mal-formed) parameter file content. Since the paring routine is quite complex, this patch works around this problem by increasing the size of the buffer by a few characters and setting these to NUL. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4594 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Improve screen message when option -S (--print-schedule) is usedschnetter2010-01-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4593 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Output parameter warnings to both stdout and stderr, same as regularschnetter2009-12-05
| | | | | | | | | | | | warnings. Remove the function print_bold_stderr. Use bold_stdout and bold_stderr instead. Clean up the way variable argument lists are handled. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4591 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Modify the behaviour of mixed C/Fortran string comparisons, so that itschnetter2009-12-05
| | | | | | | | | | | | | is consistent with the routines converting Fortran strings to C strings. Fortran strings have a fixed length, and trailing white space is usually ignored. The Cactus routine converting Fortran to C strings did already ignore trailing white space, but the routine comparing Fortran and C strings did not. This is now consistent. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4590 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add new schedule modes meta_early, meta_late, global_early, andschnetter2009-12-05
| | | | | | | | | global_late. These modes can then be used in Carpet, where they will simplify traversing the schedule tree when local, level, and global mode routines are mixed. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4589 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Rename routine CCTK_IOMethod to CCTK_IOMethodName, since it returnsschnetter2009-12-05
| | | | | | | | | | the name of the I/O method, not an IOMethod structure. Add a new routine CCTK_IOMethod which returns a pointer to the IOMethod structure describing the I/O method. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4588 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Provide LoopControl macros.schnetter2009-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These generalise the LoopControl thorn of Carpet, and introduce a generic looping mechanism to Cactus. They provides a simple, straightforward implementation (without the optimisations found in Carpet's LoopControl thorn), and other thorns can provide various optimisations, e.g. loop tiling or OpenMP parallelisation. The macros are defined in a new file cctk_Loop.h, automatically included from cctk.h. There are macros for 1D, 2D, 3D, and 4D loops, corresponding to Cactus' CCTK_GFINDEX* macros. Each macro comes in four variants: CCTK_LOOP3: a generic 3D loop CCTK_LOOP3_ALL: loop over all grid points of a grid function CCTK_LOOP3_INTERIOR: loop over the interior points, excluding ghost, symmetry, and boundary points CCTK_LOOP3_BOUNDARY: loop over all (outer) boundary points The header file contains a straightforward implementation via macros that expand to corresponding "for" statements. There are also macros for Fortran, but these are much less elegant since Fortran does not support block-scope local variables. In addition, Fortran requires declaring certain variables as private when OpenMP is used, which adds another complication. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4581 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use size_t instead of char as index variable into the parse bufferschnetter2009-11-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4576 17b73243-c579-4c4c-a9d2-2d5706c11dac
* This patch improves the parser used by Cactus to prepocess parameterknarf2009-09-25
| | | | | | | | | | | | | | | | | | | files. The main changes are: - when reading a parameter file do not parse the file while reading, but read it first into a buffer, preprocess that and parse the buffer after that - replace the code which changes $parfile into the parameter file name to use this buffer preprocessing - replace $ENV{'*'} "defines" by environment variable values (*), e.g. $ENV{'HOME'} with $HOME. Frank git-svn-id: http://svn.cactuscode.org/flesh/trunk@4573 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Associate a separate timer for each routine called in a given schedule bintradke2009-04-30
| | | | | | | | | | | so its execution times in different bins can be distinguished. For multiple calls within the same bin, the accumulated time is reported only once. This applies patch http://www.cactuscode.org/old/pipermail/patches/2009-April/000258.html. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4557 17b73243-c579-4c4c-a9d2-2d5706c11dac
* also output the process ID in the Cactus banner printed at startuptradke2009-02-13
| | | | | | | (patch http://www.cactuscode.org/old/pipermail/patches/2009-February/000256.html) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4552 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Clarify error messageschnetter2009-01-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4517 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Name flesh timers so that they contain the routine name as wellschnetter2008-11-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4511 17b73243-c579-4c4c-a9d2-2d5706c11dac
* added missing include file "util_String.h"tradke2008-10-23
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4509 17b73243-c579-4c4c-a9d2-2d5706c11dac
* bugfix in {integer,real} parameter range checking routines for the casetradke2008-09-15
| | | | | | | | where there's only '*' given as allowed value (see also thread http://www.cactuscode.org/old/pipermail/developers/2008-September/005626.html) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4504 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make a copy of the I/O method name string when registering a new I/Oschnetter2008-09-06
| | | | | | | method. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4503 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Remove superfluous argument "first" from if_check prototype; "first"schnetter2008-08-29
| | | | | | | only makes sense for while_check. Update all callers and callees. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4502 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Cactus has currently an error in its parameter checking. Itschnetter2008-06-17
| | | | | | | | | | | | | | | | | | | | | | | | interprets ranges consisting of single numbers as allowing this number and all larger numbers. For example, the specification INT spatial_order "Order of spatial differencing" { 2 :: "second order" 4 :: "fourth order" } 2 allows all numbers not less than 2. This patch corrects this problem. Since this involves regular expressions which are often difficult to read, I have broken up the regular expressions into macros containing sub-expressions. I have also replaced calls to atoi and atof with calls to strtol and strtod, since these allow error checking which also was not present before. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4496 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct inconsistency in prototype for argument check_if in functionschnetter2008-05-26
| | | | | | | CCTKi_DoScheduleTraverse. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4490 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Output new schedule bin "postpostinitial" in the scheduleschnetter2008-05-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4489 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Call new schedule bin "postpostinitial" during initialisationschnetter2008-05-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4488 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add IF clauses to schedule itemsschnetter2008-04-09
| | | | | | | | | | | | | | | Schedule items in Cactus can already have WHILE clauses, which means that they are executed while a certain condition are true. This patch adds IF clauses, which means that they are executed only if a certain condition is true. The syntax is equivalent to WHILE clauses. These if clauses is different from the existing C-syntax if statements, which are only evaluated at startup and determine how the schedule is constructed. These if clauses are evaluated every time the schedule is traversed, and can skip certain schedule items. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4478 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct the order in which the schedule is output: The schedule binschnetter2008-04-07
| | | | | | | | postinitial is executed before the recursive initialisation of finer grids, not afterwards. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4477 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a new function CCTK_MaxGFDim to the flesh which returns theschnetter2008-04-07
| | | | | | | | | | | | | | | | | (maximum) dimension of all grid functions. Cactus can currently not handle the case where one uses grid arrays of dimension D while grid functions have a dimension less than D. During initialisation, Cactus sets cctk_dim to the largest dimension of all grid variables in all active thorns. This is arguably wrong; cctk_dim should be set to the (maximum) dimension of the grid functions. This patch adds a new function CCTK_MaxGFDim to the flesh which returns the (maximum) dimension of all grid functions. This function is used to set cctk_dim. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4476 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correct the output all preregrid and postregrid bins in the scheduleschnetter2008-03-02
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4469 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Output all preregrid and postregrid bins in the schedule, and indicateschnetter2008-03-02
| | | | | | | when the grid hierarchy is changed git-svn-id: http://svn.cactuscode.org/flesh/trunk@4468 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Move the output of the schedule timers and the call to MPI_Finalizeschnetter2008-03-01
| | | | | | | | | from CactusDefaultShutdown to CCTKi_ShutdownCactus, which is executed as the last function. This also means that drivers don't have to do this any more, as it is now always done by the flesh. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4467 17b73243-c579-4c4c-a9d2-2d5706c11dac