summaryrefslogtreecommitdiff
path: root/src/main
Commit message (Collapse)AuthorAge
* Committing change for ticket #176sbrandt2012-07-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4851 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Move MPI support from flesh to a thorneschnett2012-07-21
| | | | | | | | | | | | | | | | Move MPI support from flesh to thorn ExternalLibraries/MPI. This also requires thorns that call MPI directly to declare this in their configuration.ccl. Existing configurations using MPI need to include ExternalLibraries/MPI into their thorn list. * Declare that the flesh optionally uses MPI (because it needs to call MPI_Init) * Update test case mechanism to find out whether MPI is used * Handle configuration bindings for flesh * Don't special-case Crays any more when configuring Linux git-svn-id: http://svn.cactuscode.org/flesh/trunk@4847 17b73243-c579-4c4c-a9d2-2d5706c11dac
* 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/flesh/trunk@4841 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changes for ticket #768sbrandt2012-06-18
| | | | | | | | Change per thorn -DTHORN_IS_xxx to a per thorn -I bindings/include/xxx git-svn-id: http://svn.cactuscode.org/flesh/trunk@4839 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add missing lssh field to struct cGroupDynamicDataeschnett2012-06-11
| | | | | | | | | The size and memory layout of grid functions is described by two variables, cctk_lsh and cctk_lssh. The structure cGroupDynamicData is missing the lssh field. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4833 17b73243-c579-4c4c-a9d2-2d5706c11dac
* have CCTK_RegexMatch return a distinct error code if patterns is invalidrhaas2012-06-05
| | | | | | | | | | | | | | This patch changes the return value in the "does not compile" case to -1 and updates all source files that I could find that use it. Note that this patch changes behaviour of a routine. It used to return 0 for non-compiling patterns so thorns that test for C-like true would interpret invalid patterns as does-not-match, but will interpret the -1 return value as does-match. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4831 17b73243-c579-4c4c-a9d2-2d5706c11dac
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* bugfix for CCTK_TraverseString(): do not overwrite a previously set error codetradke2008-02-29
| | | | | | | while continuing to parse following tokens git-svn-id: http://svn.cactuscode.org/flesh/trunk@4464 17b73243-c579-4c4c-a9d2-2d5706c11dac
* synchronise all processors after PARAM_CHECK to avoid race conditions in casetradke2007-12-06
| | | | | | | of parameter errors (see http://www.cactuscode.org/old/pipermail/developers/2007-December/005480.html) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4440 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Implement a new flesh function CCTK_SchedulePrintTimesToFile.schnetter2007-08-25
| | | | | | | | | The existing internal schedule printing functions now take an additional FILE* argument, and the existing CCTK_SchedulePrintTimes prints explicitly to stdout. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4428 17b73243-c579-4c4c-a9d2-2d5706c11dac
* This patch makes complex arithmetic in C and C++ more efficient, andschnetter2007-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makes it much more convenient for C++, expecially when templates are used. The flesh functions for complex arithmetic are defined (not only declared) by including Complex.c from the header file cctk_Complex.h. They are declared "static inline", so the the compiler can inline them, but does not have to create an out-of-line copy for every source file. Complex.c is also compiled stand-alone without the "static inline" prefix, so that out-of-line copies exist as well. Add some new complex arithmetic functions, e.g. ComplexNeg to change the sign. Make some complex arithmetic functions more efficient by using algorithms from glibc. These algorithms are LGPL. They should be faster and/or more accurate than the existing implementations. For C++, define the usual arithmetic operators (+-*/ etc.) as inline functions calling the corresponding complex arithmetic functions. This makes it possible to use complex numbers in the same way as real numbers, which makes it possible to instantiate templates for both CCTK_REAL and CCTK_COMPLEX. This leads to much code reduction in Carpet. The patch also appends a type postfix to the names of math functions called in the inlined routines: 'f' for HAVE_CCTK_REAL4, nothing for HAVE_CCTK_REAL8, and 'l' for HAVE_CCTK_REAL16. This avoids compiler warnings about conversions from "double" to "float" which may lose significant bits. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4418 17b73243-c579-4c4c-a9d2-2d5706c11dac
* added Fortran wrapper for CCTK_ParameterSet()tradke2007-03-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4412 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added two new flesh API functions CCTK_ParameterSetNotifyRegister() andtradke2006-09-28
| | | | | | | | | | | | | CCTK_ParameterSetNotifyUnregister() to register/unregister user callback functions for parameter set nofications. See discussion thread http://www.cactuscode.org/old/pipermail/developers/2006-September/005090.html for details. This closes patch Cactus-2057 "add new flesh functions to register/unregister notify callbacks for parameter set operations". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4375 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix inconsistent interpretation of CCTK_ParameterQueryTimesSet()'s return value.tradke2006-09-28
| | | | | | | | | | | | | | | | | | | | The discussion on http://www.cactuscode.org/pipermail/developers/2006-August/004990.html brought up the issue of an inconsistent interpretation of CCTK_ParameterQueryTimesSet()'s return value which depends on whether this is a normal run, or one that has been recovered from a checkpoint. The provided patch solves the problem of inconsistent behaviour of CCTK_ParameterQueryTimesSet() by fixing the code in CCTK_ParameterSet() which increments the times_set counter. Now the counter is not incremented for recovered parameters which take the same value as before (effectively assuming this to be a no-op). In addition, non-steerable parameters which are set in the parfile but then recovered to the same value from a checkpoint will have their previous set operation unregistered. In a recovered run, CCTK_ParameterQueryTimesSet() will now return a value larger 0 for the union of - all parameters which have been set in the parfile when the checkpoint was created - all steerable parameters which have been set in the recovery parfile This closes PR Cactus-2056: "fix inconsistent interpretation of CCTK_ParameterQueryTimesSet()'s return value". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4374 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Change default parameter checking level from "normal" to "strict".tradke2006-07-06
| | | | | | | This applies patch http://www.cactuscode.org/old/pipermail/developers/2006-June/004916.html. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4347 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added new command line option '--logdir <dir>' which sets the output directorytradke2006-06-29
| | | | | | | | | | for logfiles created by the \texttt{-r} option. If the directory doesn't exist yet, it will be created by Cactus. This applies patch http://www.cactuscode.org/old/pipermail/developers/2006-June/004901.html. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4337 17b73243-c579-4c4c-a9d2-2d5706c11dac
* When printing the Cactus help, indicate that the '-b,--buffering' optiontradke2006-06-23
| | | | | | | has a mandatory argument. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4332 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use two dashes instead of a single dash when describing command lineschnetter2006-06-23
| | | | | | | | | | | | | option. This is now the preferred format, as per the recent discussion on the developers' mailing list. Comment out a leftover non-commented part of the non-exising "x" option. Reformat the command line descriptions slightly. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4330 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add a new command line option to select the buffering mode of stdout.schnetter2006-06-23
| | | | | | | | | | | | | The option is "-b <mode>", or "-buffering=<mode>", where mode can be "no", "line", or "full". This option uses the ANSI C function call setvbuf() to select the corresponding buffering mode. The buffering mode can be selected only once in a portable programme, and it has to be selected before the first output occurs. This means that it has to be implemented in the flesh. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4329 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Application of patchswhite2006-06-08
| | | | | | | | | | | | | | | | WarnLevel bold off unless output is to tty http://www.cactuscode.org/old/pipermail/patches/2006-April/000161.html I got tired of seeing all the terminal control characters in Cactus output that was piped to files. Tested by watching Cactus output on a terminal, then piping ouput from the same program to a file. E.g. in bash make config-testsuite 2>&1 |tee > ts git-svn-id: http://svn.cactuscode.org/flesh/trunk@4316 17b73243-c579-4c4c-a9d2-2d5706c11dac
* apply patchjthorn2006-06-01
| | | | | | | | | | | | http://www.cactuscode.org/old/pipermail/patches/2006-May/000180.html This documents the 5 (!) separate places in the code which must be changed to add a new command-line option. See also the discussion in http://www.cactuscode.org/mailman/private/cactusmaint/2006-May/021429.html http://www.cactuscode.org/mailman/private/cactusmaint/2006-May/021430.html git-svn-id: http://svn.cactuscode.org/flesh/trunk@4310 17b73243-c579-4c4c-a9d2-2d5706c11dac