summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* add function to query name of currently scheduled functionrhaas2012-04-23
| | | | | | | | | | this adds a function CCTK_ScheduleQueryCurrentFunction which returns the cFunctionData of the function currently executing via CCTK_CallScheduledFunction git-svn-id: http://svn.cactuscode.org/flesh/trunk@4805 17b73243-c579-4c4c-a9d2-2d5706c11dac
* expand expression language, add error checking, and more documentationrhaas2012-04-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4804 17b73243-c579-4c4c-a9d2-2d5706c11dac
* fix memory leak in SetVarEvaluatorrhaas2012-04-17
| | | | | | | forgot to call free() after strdup() git-svn-id: http://svn.cactuscode.org/flesh/trunk@4802 17b73243-c579-4c4c-a9d2-2d5706c11dac
* fix access to free()ed memory in ParameterSetReal introduce in r 4797rhaas2012-04-17
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4801 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add missing #includeeschnett2012-04-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4800 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Simplify two routines in ParseFile.ceschnett2012-04-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4799 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow arithmetic expression in ParameterSetrhaas2012-04-11
| | | | | | | | | | | | | | | | | | Expression are of the form: foo::bar = 2*sin(foo:baz) ie. arithmetic and access to already set parameters. The new behaviour is triggered if the parameter string (for real, boolean and int parameters) does not parser properly as a double/int/bool. This last test is mostly an optimization. The largest change is actually in the expression parser which has been extended to handle eg. exponential notation and negations. It now uses a state machine to parse its input. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4797 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Ensure that stderr remains unbufferedeschnett2012-03-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4794 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Set file buffering for stdout after redirecting I/Oeschnett2012-03-03
| | | | | | | | | Set file buffering for stdout (Cactus option -l) after redirecting I/O (Cactus option -r), so that the buffering applies also for redirected I/O. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4793 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Merge branch 'NewSchedule' into trunkhinder2012-01-31
| | | | | | | | | | | This provides support for specifying READS and WRITES clauses for each function scheduled in schedule.ccl. These list the variables which the scheduled function reads from or writes to. This supports future dependency-based scheduling. See https://docs.einsteintoolkit.org/et-docs/Adding_requirements_to_the_Cactus_scheduler for more information. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4788 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Improve comment explaining cGH->dataeschnett2011-12-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4777 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Declare cctkGH as const*eschnett2011-12-01
| | | | | | | | Declare cctkGH as const*, and CCTK_ARGUMENTS as const. This prevents accidental modifications and allows more optimisations. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4772 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make table printing functions publicly accessibleeschnett2011-11-09
| | | | | | | | | | | | The table data types (util_Table.h) have internal routines that print the table contents to screen. This can be helpful for debugging. This patch makes these functions publicly available. Add a routine Util_TablePrintPretty that converts a table to a nice, human-readable string. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4769 17b73243-c579-4c4c-a9d2-2d5706c11dac
* 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