| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4412 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#include "cctk_Types.h" since this is
(a) wrong [the actual symbol is _CCTK_TYPES_H_ (with a trailing underscore)],
(b) unnecessary [cctk_Types.h already has an internal include guard,
and modern compilers have special-case optimizations for internal
include guards so they're just as fast at compile-time as external ones],
and
(c) inconsistent with the 3 other files in this same directory
(cctk_Groups.h, cctk_Misc.h, and util_Table.h) which #include
"cctk_Types.h", none of which use an external include guard
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4397 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Timer handles are not numbered consecutively from 0 upwards. It is
therefore not possible to test for legal timer number by checking the
range [0, CCTK_NumTimers()). Instead, for each timer handle one has
to check whether handled data exist.
Remove the feature that a timer number of -1 prints all existing
timers, since it is not possible (?) to iterate over all existing
timers.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4396 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
CCTK_TimerPrintDataI.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4395 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Fixes PR 2058.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4386 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4382 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
values. This makes its behaviour consistent with the flesh API routine
CCTK_ParameterSet().
This closes PR Cactus/2050: preserve newlines in quoted string parameter values.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4371 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
previously specifying a grid spacing of zero caused the interpolator
to return a generic "we encountered a NaN/infinity/non-finite" error code
now there's a new error code specifically for this case
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4368 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4367 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4365 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
| |
CCTK_ERROR_INTERP_COORD_NAN
(needed for a bugfix in some other interpolator code)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4362 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to return a date/time stamp following the ISO 8601 standard format if possible
(see http://www.cactuscode.org/old/pipermail/developers/2006-July/004971.html).
Add the timezone information in the time stamp returned by Util_CurrentTime().
You also need to update lib/make/make.configuration now in order to compile
src/datestamp.c.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4358 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
infinite recursion if a driver didn't overload CCTK_SyncGroupsByDirI().
Thanks to Daniel Herbst and David Fiske for reporting this problem.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4352 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
synchronises multiple groups in a single call. This function deprecates
the old overloadable function CCTK_SyncGroup().
This patch concludes the discussion thread starting on
http://www.cactuscode.org/old/pipermail/developers/2006-June/004933.html.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4348 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
in a recovery run.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4335 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
has a mandatory argument.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4332 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reduces FARGUMENTS line length in cctk.h
http://www.cactuscode.org/old/pipermail/patches/2006-February/000138.html
"Spaces in _CCTK_FARGUMENTS removed to use as less space as possible.
This leaves thorn writers more space for their own variables. Space can
be a problem because of Fortran standard and/or compiler limitations."
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4322 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Define HAVE_CCTK_BYTE etc.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4294 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4292 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4284 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4272 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
types in question.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4267 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Patches mailing list.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4264 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Patches mailing list.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4263 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4256 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
not in <stdlib.h> as used in my previous commit).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4251 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
DECLARE_CCTK_ARGUMENTS macro to do pointer arithmetics) of type 'ptrdiff_t'
rather than 'int'.
This prevents compiler warnings on 64-bit systems where pointer offsets are
assumed as long ints.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4250 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
needed was more checking. This checked out alright on lemieux.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4231 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4230 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Patch from David Rideout.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4215 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
produce an error if it is exceeded.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4210 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
or 32, depending on the definition of the default data types
CCTK_{INT,REAL,COMPLEX}. These new macros make type generic code more
convenient to write.
Patch from Erik Schnetter.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4209 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4208 17b73243-c579-4c4c-a9d2-2d5706c11dac
|