summaryrefslogtreecommitdiff
path: root/src/main
Commit message (Collapse)AuthorAge
...
* 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
* slightly clarify wording in GRDOC comments forjthorn2006-05-14
| | | | | | | | | | | CCTK_GroupTagsTable() CCTK_GroupTagsTableI() (this change is *only* to comment wording -- there's no change to executable code) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4298 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Applying Erik's patch from 6.10.05swhite2006-05-11
| | | | | | | New command line option to stop after printing the schedule git-svn-id: http://svn.cactuscode.org/flesh/trunk@4293 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix a bug in CCTK_ParameterSet() .jthorn2006-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symptoms were that if you (a) set the same parameter twice, *and* (b) the second setting is an invalid value, then current-CVS Cactus core-dumps inside the flesh trying to free() a garbage (uninitialized) pointer. For example, the following par file suffices to trigger the core-dump, using only flesh parameters (*no* thorns activated): # this par file causes a core dump in current-CVS Cactus Cactus::cctk_timer_output = "off" Cactus::cctk_timer_output = "foo" # an illegal value for this parameter Looking at the code, 599 /* check if a parameter is set more than once in a parfile */ 600 if (cctk_parameter_set_mask == PARAMETER_RECOVERY_PRE && 601 param->props->n_set > 0) 602 { 603 if (retval == 0) 604 { 605 new_value = CCTK_ParameterValString (param->props->name, 606 param->props->thorn); 607 retval = strcmp (old_value, new_value) ? -10 : -11; 608 } 609 free (new_value); 610 } Notice that the free() at line 609 may be executed even if new_value was *not* assigned a value at line 605. Alas, new_value is a local variable in this function, and is not explicitly initialized, so it has a garbage value initially... and line 605 is its only assignment in this function. The fix is easy -- just move the free() up to right after line 607, so it's executed if and only if new_value has been assigned. patch was http://www.cactuscode.org/old/pipermail/patches/2006-April/000162.html developers discussion was http://www.cactuscode.org/old/pipermail/developers/2006-April/001758.html http://www.cactuscode.org/old/pipermail/developers/2006-April/001759.html git-svn-id: http://svn.cactuscode.org/flesh/trunk@4285 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Completed the previous fix -- I had missed another occurrance of theswhite2006-03-08
| | | | | | | types in question. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4267 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix for bug introduced by recent patch in systems with non-SYSV conformantswhite2006-03-07
| | | | | | | | | | | | | | | | | | | | | | | sys/time.h, such as Darwin 7.9.0. The SYSV declaration is struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* and microsecond }; I had used time_t and suseconds_t thinking they were the safe types to use, but older BSD systems use longs for both. SYSV only specifies that they be signed integral types, suseconds_t must hold 1,000,000 and -1, so long should be enough for both. See http://www.opengroup.org/onlinepubs/007908799/xsh/systime.h.html http://www.opengroup.org/onlinepubs/007908799/xsh/systypes.h.html git-svn-id: http://svn.cactuscode.org/flesh/trunk@4266 17b73243-c579-4c4c-a9d2-2d5706c11dac
* As discussed in today's Cactus call, applying a couple of the patchesswhite2006-03-02
| | | | | | | | | | from 14 Feb Patches list. As discussed, will further investigate the validity and origin of the Complex sqrt function later. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4262 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Also print the working directory in the banner output at startup.tradke2006-02-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4256 17b73243-c579-4c4c-a9d2-2d5706c11dac
* See Cactus Patches <patches@cactuscode.org>swhite2006-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: CactusDefaultEvolve.c cleanup Date: Fri, 23 Dec 2005 15:43:50 +0100 The code in CactusDefaultEvolve.c, was complicated by 1) a global variable, cactus_terminate, which is checked but never set except in commented-out code, and 2) a lot of other commented-out code. This patch only removes code that is never used, and is intended to make the remaining code easier to follow and potentially safer. I checked all arrangements available to me, including Carpet, for cactus_terminate. It appears only in CactusPUGH/PUGH/src/Evolve.c (where it is commented out) AlphaThorns/Spawner/src/Evolve.c This change removes * live but useless code that references cactus_terminate * commented-out TerminationStepper function * commented-out code for cactus_terminate_global * now-unused TERMINATION_RAISED_BRDCAST * numerous commented out CCTK*Timer code I checked to see that it compiles, and is a patch against the most recent checkout. I then ran the standard testsuites with the modified code and verified that their results were identical to those with the unmodified code. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4253 17b73243-c579-4c4c-a9d2-2d5706c11dac
* When recovering parameters from checkpoint, only warn about attempts to settradke2006-02-03
| | | | | | | | | | a non-steerable parameter if its value in the recovery parfile differs from the one in the checkpoint. This avoids unnecessary warnings when recovering with the same parfile (and IO::recovery = "autoprobe" set). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4249 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Extend CCTK_VWarn() so that, if Cactus::cctk_full_warnings is set to true,tradke2005-12-13
| | | | | | | | | it also prints the hostname of the originating warning message. This information comes in handy when debugging a problem on clusters by directly logging into the nodes. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4214 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Cosmetic changes.goodale2005-12-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4208 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removing unused variables as found by David Rideout and Erik Schnetter.goodale2005-12-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4207 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correcting some formatting.goodale2005-12-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4206 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make parameter array assignments without specifying the actual indextradke2005-11-03
| | | | | | | a major error also at the default parameter checking level. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4190 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Apply patch ↵tradke2005-10-24
| | | | | | | | | | | | | | | | | | | | | http://www.cactuscode.org/old/pipermail/patches/2005-October/000112.html: Check if there is more than one assignment to a parameter in the parfile and will print a warning with line number information in such a case. It checks both for multiple parameter assignments of the same or a different value. Depending on the parameter checking level (as set via the command line option '-parameter-level {strict|normal|relaxed}') the flesh will also abort the run after printing the warning in the following two cases: * the parameter level is "normal" (which is the default) or "strict" and there are multiple assignments of different values * the parameter level is "strict" and there are multiple assignments of the same value git-svn-id: http://svn.cactuscode.org/flesh/trunk@4188 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Untabifying.goodale2005-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4163 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding missing header.goodale2005-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4161 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing C++ comment markers to C comment markers.goodale2005-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4160 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Do sanity checking on parameter file name and give a reason why itgoodale2005-10-03
| | | | | | | | can't be opened if at all possible. Fixes PR 1864. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4159 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Patch from Jian Tao to add some callback functionality to thegoodale2005-10-03
| | | | | | | | | | warning system. This allows thorns to register functions which will be called when CCTK_Warn or CCTK_Info are called, with the contents of the warning/info message, thus allowing thorns to do things like logging warnings to file or displaying on webpages. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4157 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo changes that prevent more unwanted warnings about unused variables.schnetter2005-09-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Print run time warnings while setting parameters with CCTK_WARNschnetter2005-09-26
| | | | | | | | | | | | | | instead of with fprintf (stderr, ...). Correct critical error in looking at the values of cctk_full_warnings, highlight_warning_messages, and cctk_strong_param_check. Handle the empty regular expression specially in CCTK_RegexMatch, since regcomp may treat it as illegal expression. In Cactus, an empty regular expression matches everything. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4150 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare orschnetter2005-09-26
| | | | | | | | | | | | | | declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add Cactus variable type CCTK_POINTER_TO_CONSTschnetter2005-08-25
| | | | | | | | | | Complete the implementation of the Cactus variable type CCTK_POINTER_TO_CONST. Define a constant CCTK_VARIABLE_POINTER_TO_CONST. Handle this variable when asking for its name and its size. Allow values of this type in tables. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4113 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Free the parsed parameter expression with Util_ExpressionFree insteadschnetter2005-07-16
| | | | | | | | of free, because the structure contains pointers that also need to be freed. This fixes a memory leak. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4094 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Convert double value to string by using sprintf with the %.20g insteadschnetter2005-07-16
| | | | | | | | | of the %f modifier: %f can easily produce more than 100 characters (the length of the allocated buffer) for large values, and %f outputs by default only 6 digits of precision. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4093 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed bug from my last commit: CCTK_NumGroups() doesn't take an argument.tradke2005-06-07
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4076 17b73243-c579-4c4c-a9d2-2d5706c11dac