| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Yes, hopefully this list will grow, but for now
- don't use C++ comments (//) in C code this will cause difficulties
on some platforms
E17 Why is it that when I schedule more than one routine in the same thorn
at ANALYSIS only the first routine is executed and the second one is
ignored?
Are you triggering on different variables with the two routines? If
not, it doesn't matter which thorns they come from, only the first
scheduled routine will be called. This is part of the special design of
the ANALYSIS bin.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3190 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiling, and then postprocessing. What are they doing?
Cactus specific preprocessing is performed for most source files, for
example to expand c-preprocessor macros (e.g. DECLARE_CCTK_PARAMETERS)
in .F, .F90 and .F77 files or to set correct names for calling Fortran
functions in C files. At the end of the preprocessing stage the
resulting source file is placed into the
configs/<config>/build/<thorn>
directory and if ready to be passed to the compiler.
Once a file has been preprocessed, the resulting source file is
compiled, with the working directory set to
configs/<config>/scratch
(which ensures, for example, that all F90 modules can be found by
the compiler).
After the file is compiled, some architectures may require
postprocessing of the object files, for example,some machines
don't allow the use of a "-o" flag for naming the resulting
object file, in which case part of postprocessing would involve
renaming and moving the file.
C32 What is the Cactus c-preprocessor (Cactus cpp) ?
Part of the pre-processing step for Fortran files involves the use of
the C-preprocessor. On some architectures the native CPP does not
correctly handle spaces in source files, and thus corrupts the
resulting file. On other machines there is no native way to generate
dependency information for files. In an attempt to solve these problems
we have written a replacement of CPP in perl, which you may use if you
configure with
CPP='$${PERL} $${CCTK_HOME}/lib/sbin/cpp.pl'
or in an options file without the quotes
CPP=$${PERL} $${CCTK_HOME}/lib/sbin/cpp.pl
The Cactus preprocessor is still being developed and improved, known
problems include
- only currently supports #ifdef, #if defined for a single token and
not operations involving more than one token connected by && and ||,
etc
- problems with macros whose overall expansion contains the original
macro name
The Cactus make system does not use the standalone CPP to preprocess C
source files, as the first step of a C compilation involves the use of
a CPP (normally internal). In any case we do not recommend the use of
this perl CPP to process C files, partly due to the above problems, and
partly as the preprocessor does not pre-define certain symbols which
the native preprocessor would..
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3179 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Yes. Read the section "Fortran Thorn Writers" in the Users Guide, and
follow these general recommendations
- use IMPLICIT NONE in your Cactus subroutines and functions, this
will help in finding errors at compile time.
E15 In my Fortran thorn the value of a Cactus integer parameter is totally
wrong when I print it, but when I print it from C it is fine.
Check that you remembered to add DECLARE_CCTK_PARAMETERS to the
declaration area of the subroutine.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3175 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a file, but nothing I try works.
Cactus KEYWORD and STRING parameters are not stored as Fortran strings
(they are pointers to C strings) so you need to convert them first.
Use the routine CCTK_FortranString to copy them to a locally defined
Fortran string, then you can manipulate them as usual. If you just
want to print the value to the standard output there is also the
routine CCTK_PrintString.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3169 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
can trivially change the value of a parameter in the Fortran source
code of my thorn.
Although changing parameters in Fortran is possible (we haven't thought
of an easy way to enforce read-only parameters) it is not supported and
should not be done!
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3158 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
ThornGuide I only see the first few of them.
It could be that the documentation in one of the thorns is not
following the Cactus ThornGuide coding convention, for example
see the file doc/ThornGuide/template.tex.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3149 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arrays. I tried to use the IOFlexIO thorn and received the error:
Unsupported CCTK variable datatype 10. Is there a way to checkpoint
complex variables?
Yes there is: use IOHDF5 instead of IOFlexIO. The FlexIO library doesn't
support a native complex datatype, and we decided not to add extra logic
complex numbers in IOFlexIO. HDF5 does not have this limitation, it
natively supports all Cactus datatypes.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3143 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Preprocessing DECLARE_CCTK_ARGUMENTS doesn't honour #if blocks.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3132 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
this without compiling all the thorns which come before it?
make <config>-build BUILDLIST="<list of thorns>"
builds thorns in the order they appear in the list. (Note, this does
not link any thorn libraries together).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3126 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
E12 I'm getting wierd syntax errors in Fortran code, with an extra
garbage character (often $ or &) stuck in the middle of a CCTK_INFO()
or CCTK_WARN() or CCTK_EQUALS() call after it has been processed.
You have probably used Fortran (either 77 or 90) line continuation
in a macro call
c example of broken Fortran code fragment
if (CCTK_EQUALS(test,"on")) then
test_state = 1
else if (CCTK_EQUALS(test,
$ "off")) then
test_state = 3
end if
The $ is in column 6 is the Fortran 77 standard way of doing
a line continuation. This doesn't work, because CCTK_EQUALS()
is a macro, and macros use C lexical conventions (regardless of
what language your code is written in). To continue a line in a
macro, use the same technique you would in C, i.e. put a backslash
( \ ) at the end of the line to be continued (note there must *not*
be any whitespace after the \ !!). For example, the above code
should be written
c example of valid Fortran code fragment
if (CCTK_EQUALS(test,"on")) then
test_state = 1
else if (CCTK_EQUALS(test, \
"off")) then
test_state = 0
end if
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3125 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
How can I call these functions deep inside my thorns where this pointer
is not available?
These routines are overloaded by a driver, and the reason for passing
in a cctkGH is to allow the driver to tidy up before exiting. If the
particular driver you are using allows a NULL pointer to be passed you
can pass this instead of the cctkGH pointer. (The worst that will happen
should be a segfault if the driver cannot handle NULL). Alternatively,
you need to include a mechanism to obtain the cctkGH deep inside your
thorns code.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3120 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
| |
param.ccl file. Why can't a parameter itself be used here?
The size of the array has to be fixed at compile time to accomodate
the use of parameters in Fortran thorns.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3110 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
toolkit
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3109 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3020 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
particular thorn is in the compiled ThornList?
Yes, but this is not a good idea for a number of reasons
- it adds hidden dependencies between thorns, and can easily lead to
unexpected and hard to track down behaviour when a thorn is compiled
but not active
- it breaks all kinds of modularity infrastructure in Cactus
- the include file you need to use will cause your source code to be
recompiled when other thorns change
But if you insist, and accept the consequences, this is how you do it,
Include the header file cctk_DefineThorn.h
In your code use
#ifdef ARRANGEMENTNAME_THORNNAME
<your source code>
#endif
If appropriate, to give yourself some protection, use the function
CCTK_IsThornActive to only execute the source code if the thorn was
actually activated (and not just compiled in).
Add a comment to your README/Documentation.tex to remind yourself, and
others of what you have done.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3012 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
> C29 (Linux) Using the Intel Fortran compiler I get the error "/usr/bin/ld
> cannot find -lintrins" on linking.
>
> Set the environment variable IA32ROOT to point to the location of your
> Intel compiler installation (eg /opt/intel/compiler60/ia32). You will
> need to reconfigure, and then try building your executable again.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3009 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3007 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
E6 On compiling Fortran code I get errors like "dummy argument CCTK_DIM has
not been given a type", but I'm not using CCTK_DIM in the routine?
Check if you have passed CCTK_ARGUMENTS in the argument list for the
routine, is do you must have a line
DECLARE_CCTK_ARGUMENTS
in your declarations section.
E7 If I have two grid array groups with identical sizes (and ghost zones,
distributions, etc.), are they guaranteed to be distributed in the same
way? That is, can I count on the fact that their local shapes (lsh)
will be the same? It is true empirically. What if the grid arrays have
different variable types or numbers of time levels?
Yes to all.
D10 Output to screen using the Info IO method of IOBasic doesn't work.
I want to watch min/max values for 'wavetoy::phi' during a cactus run
on stdout. For that, I added
IOBasic::outInfo_every = 10
IOBasic::outInfo_vars = "wavetoy::phi"
to my parameterfile. Thorn IOBasic is active, but I only get the
iteration number and coordinate time printed to screen.
You need to activate a thorn which implements the min/max reductions,
for example CactusPUGH/PUGHReduce.
G1 How can I build the ThornGuide documentation for single thorns or
arrangements?
Give the names of the thorns or arrangements on the make line, e.g.
gmake ThornGuide THORNS="CactusBase/Boundary"
gmake ThornGuide ARRANGEMENTS="CactusBase"
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3006 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3005 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C28 On linking I get an "unresolved text symbol" for a scheduled function
called from libCactusBindings.a
Check the size of the object file which was created for the source
file containing this function in configs/<config>/build/<thorn>.
With some compilers, making object files for complicated source files
can fail because it takes too much memory, and an empty object file
will be created and the make process will fail. If you continue the
make process Cactus will not realise that the object file is empty.
If this is what happened, touch the relevant source file and try
compiling again. It may be that you will need to switch optimisations off
for this file, or split up the troublesome code into smaller components.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2998 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2992 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
| |
D9 How do I run Cactus until a given coordinate time instead of to a
given iteration number?
Instead of setting cactus::cctk_itlast set cactus::cctk_final_time to
the required coordinate time, and also set cactus::terminate = "time".
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2991 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2988 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------------------------------------------------------
38. When trying the new gcc 3.1.1 compiler on Linux, I received a lot of
warnings about the compiler flag "-I/usr/local/include".
This is because HDF5 is installed on this machine in what we
would consider to be a sub-optimal place. HDF5 is preferably
installed in own installation directory with (optionally) sym-links to
the system directories. Cactus configurations should use the HDF5
installation directory itself.
It is a matter of office debate as to whether it would be really be a
good idea or not to check for and remove system directories, we can come
up with pathological examples both if they are left or if they are
removed.
-------------------------------------------------------------------------------
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2974 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
Closes Cactus/934
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2961 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2960 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------------------------------------------------------
37. I writing a thorn, what is the difference between using "const cGH *cctkGH"
and "cGH *cctkGH" for arguement declarations? And what about "const cGH*
const cctkGH"?
'cGH *' is a pointer to a cGH structure which can be modified. This is
necessary eg. in routines which initialize a cGH.
'const cGH *' is a pointer to a cGH structure which is marked as
constant (ie. read-only). The code is not allowed to change the cGH
using such a pointer. The compiler should refuse to compile it otherwise,
or at least print a warning.
Our policy now is to use "const cGH*" for all CCTK_ calls, and it is
recommended that this is also implemented in all thorns. (It is being
implemented in all the released Cactus thorns, but you may still find
some exceptions).
[Note: August 2002: We have still to implement const cGH* in a few
CCTK_ calls, namely
* calls to CCTK_Sync()
* calls to CCTK_Reduce()
* calls to CCTK_Interp() (the old API)
and it is still a matter of debate whether the const qualifier
should be used for CCTK_Sync calls.]
Finally, the additional const qualifier in 'const cGH * const GH' says
that the pointer variable itself cannot be changed (it's just a
one-time-only assignment). For instance, no pointer arithmetic is
allowed on such a pointer. In principle, one could declare all local
variables as const if they aren't changed afterwards. But it's doesn't
have any benefit in writing cleaner code. I think this is just
overkill and using just 'const cGH *' is fine.
-------------------------------------------------------------------------------
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2950 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
This type of point-to-point communication is not possible with Cactus
APIs right now. Any CCTK_Reduce*() is a global communication so far,
and all processors must take part in that communication.
For doing point-to-point communication you should use the appropriate API
of an underlying communication layer like MPI.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2936 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------------------------------------------------------
36. My thorn is calling directly a function from another thorn. Both thorns
are in my ThornList, but on linking I get the error
Startup.c.o(.text+0x4d): undefined reference to `OtherThornsFunction'
Make sure that your thorn inherits from the implementation provided by
the other thorn. If you don't do this, the end link line may not list
the libraries in the right order for linking.
-------------------------------------------------------------------------------
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2917 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
thorn present, now you can, you just can't have any grid functions.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2914 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------------------------------------------------------
36. I get a segmentation fault running Cactus, right after the schedule
tree is printed to screen?
Check to see if you are passing CCTK_ARGUMENTS into any routines
registered at CCTK_STARTUP, if so these need to be removed and void
used instead. The STARTUP timebin is run before the driver sets up
any grid variables, and the segmentation fault occurs in
CCTK_DECLARE_ARGUMENTS when these undefined variables are accessed.
Parameters can however be used in STARTUP routines.
-------------------------------------------------------------------------------
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2913 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2870 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2802 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2801 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-------------------------------------------------------------------------------
32. Compiling files in Cactus seems to involve three steps, preprocessing,
compiling, and then postprocessing. What is the postprocessing step
for?
This is for architecture dependent things which come up. For example,
some machines don't allow using a "-o" flag for naming the resulting
object file, in which case part of postprocessing would involve
renaming and moving the file.
-------------------------------------------------------------------------------
33. How does Cactus manage to so seamlessly call Fortran routines from
C, and vice versa?
Part of the configuration step on a machine involves automatically
deducing the convention which the fortran compiler uses for its symbols
(for example, upper or lower case and the addition of underscores).
This information is then used to construct the macros which are used
at preprocessing to translate Fortran names to C-callable routines.
We also use macros to facilitate passing strings from Fortran into
C. Strings must always be at the end of argument lists for this
(which is why some of our choices of order in argument lists may
seem strange), and the architecture details of string passing are
maintained in the file src/include/cctk_FortranString.h. At the moment
we have macros for one, two or three strings in an argument list.
-------------------------------------------------------------------------------
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2764 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2763 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I get the following error when compiling?
Checking status of libIOJpeg.a
gmake[3]: *** No rule to make target `/u1/allen/scratch/Cactus/arrangements/
CactusIO/IOJpeg/src/IOJpeg.h', needed by `JPEG.c.d'. Stop.
gmake[2]: *** [make.checked] Error 2
gmake[1]: *** [/u1/allen/scratch/Cactus/configs/wave/lib/libIOJpeg.a] Error 2
gmake: *** [wave] Error 2
This is because an include file which was used in your previous compile is
no longer there (in this case the file IOJpeg.h was renamed ioJpeg.h).
To solve this, delete the dependency information by issuing
gmake <config>-cleandeps
before compiling again.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2738 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2711 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2699 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2634 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2615 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2417 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
How to get an earlier release?
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2364 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
main routine of the flesh is bizarrely written in C++.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2360 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2349 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. How to checkout thorns not now part of standard release
2. How to broadcast a local scalar (Thomas just answered this for scott)
3. Why you shouldn't make your own calls to MPI (this answer could be
improved but I wanted to put something there).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2304 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2293 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
|
|
|
| |
an executable.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2147 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2115 17b73243-c579-4c4c-a9d2-2d5706c11dac
|
|
|
|
| |
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2072 17b73243-c579-4c4c-a9d2-2d5706c11dac
|