[Patches] [Carpet] Errors with LoopControl
Thomas Radke
tradke at aei.mpg.de
Tue Oct 14 06:17:07 CDT 2008
Erik Schnetter wrote:
> On Oct 13, 2008, at 17:17:59, Thomas Radke wrote:
>
>> Erik Schnetter wrote:
>>> On Mar 27, 2008, at 04:25:26, Hee Il Kim wrote:
>>>> Hi,
>>>>
>>>> I encountered the following errors on a system with intel compilers
>>>> 10.1. I'm using the latest Carpet.
>>>>
>>>> ###
>>>> ...
>>>> ...
>>>>
>>>> Preprocessing
>>>> /home/khi/Cactus/arrangements/Carpet/LoopControl/src/loopcontrol_types.F90
>>>>
>>>>
>>>> Compiling
>>>> /home/khi/Cactus/arrangements/Carpet/LoopControl/src/loopcontrol_types.F90
>>>>
>>>>
>>>> fortcom: Error:
>>>> /home/khi/Cactus/configs/rns_carpet_loopcontrol/build/LoopControl/loopcontrol_types.f90,
>>>>
>>>> line 6: Syntax error, found IDENTIFIER 'NEXT' when expecting one of:
>>>> => = . ( : %
>>>> CCTK_POINTER next
>>>> ------------------^
>>>
>>> I don't know why the type CCTK_POINTER is not known. There may be
>>> something missing in the flesh. I'll have a look.
>>
>> We just had the same problem here on someone's mac using intel
>> compilers. It could be fixed by substituting
>>
>> #include <cctk.h>
>>
>> with
>>
>> #include "cctk.h"
>>
>> in Carpet/LoopControl/src/loopcontrol_types.F90.
>>
>> This type of header file inclusion also happens in other LoopControl
>> sources; other Carpet thorns use both versions in a mixed way. Should
>> this be made consistent ?
>
>
> This problem only exists in Fortran code. C and C++ code can use both
> <> and "" without problems.
>
> The C standard suggests that both <> and "" should work in this case.
> cpp.pl, the Cactus implementation of part of a C preprocessor, simply
> ignores #include lines with <> and only processes those with "". I
> think we could change this in cpp.pl, treating <> and "" in the same way
> (apart from skipping the current directory when <> is used).
If you don't like changing the Cactus header file inclusions into
#include "header.h"
then the Cactus preprocessor needs to be fixed to also handle
#include <header.h>
properly.
The attached patch does that. Ok to apply ?
--
Cheers, Thomas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp.patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/patches/attachments/20081014/23541578/attachment.bin
More information about the Patches
mailing list