[Users] Mojave|Simfactory|Fortran(thorn): F90 compiler rejecting "_##" in var names
Scott Hawley
scott.hawley at belmont.edu
Fri Dec 20 00:20:09 CST 2013
Roland,
Thanks for your response.
Yes it is a very new GNU compiler.
I tried altering the relevant line in Cactus/src/include/cctk_Types.h. Adding a space before & after the ## changed the error such that the variable name now gets broken into two bits with a space in between, with the ## still there
Also, making the '##' into a '/**/' as in the other relevant line, also produces a variable name broken by a single space.
Swapping out the usual cpp by setting "FPP = ~/Cactus/lib/sbin/cpp.pl" fixed the issue at hand, but produced a new set of issues regarding multi-line equations. Such as:
- Maple generates a '#' in column 6 as a line-extension character. The cpp.pl seems to think that this is an "invalid preprocessing directive" even though the symbol is at column 6 instead of column 1. It is possible for me to replace " #" with " &" in all my files... ...in fact I've now done that, but there are still errors from other Thorns, such as...
- In ADM/DoubleLeap, multi-line equations are getting mangled. I saw some users-email-list traffic about phasing out thorn ADM, but am not ready to make that change yet. (I want to get my thorn working before reconfiguring so much of it which inherits from ADM.).
Since many thorns in Cactus have multi-line equations, I'm not sure if using the cpp.pl script is an option for me.---Have other people not reported this problem?
Thanks for the answers re verbosity and the include directory!
-Scott
> ,
>
>> integer, parameter :: cctki_use_##cctk_dim = kind(cctk_dim)
> The Fortran compiler should never see these since they should be acted
> on by the C preprocessor which is used by Cactus to preprocess Fortran
> files. It should replace cctki_use_##cctk_dim by cctki_use_cctk_dim .
> I vaguely remember having seen a warning at one point that ## needs to
> be surrounded by whitespace. Are you using a very new gcc compiler
> maybe (gcc seems to become stricter with each release). You can try
> and change Cactus/src/include/cctk_Types.h to put a space around ## in
>
> integer, parameter :: cctki_use_##nam = kind(nam)
>
> ie turn it into
>
> integer, parameter :: cctki_use_ ## nam = kind(nam)
>
> I'd also check for warnings from the C preprocessor. You can also
> check your optionlist to make sure FPP is set to either cpp or cpp.pl
> . The later is Cactus' replacement C preprocessor.
>
>> Two more questions:
>>
>> 1. What is the simfactory analog of "SILENT=no"? I see
>> "--verbose" is already enabled, yet I'd like to see exactly what
>> command (& flags) is being used to invoke the Fortran compiler.
> No idea really. You can try to circumvent simfactory and do (bash):
>
> SILENT=no sim build
>
>> 2. Can the warning re. no "include" directory be safely ignored?
> Yes.
>
> Yours,
> Roland
>
> - --
> My email is as private as my paper mail. I therefore support encrypting
> and signing email messages. Get my PGP key from http://keys.gnupg.net.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.15 (GNU/Linux)
> Comment: Using GnuPG with Icedove - http://www.enigmail.net/
>
> iEYEARECAAYFAlKzz9EACgkQTiFSTN7SboXMFACfcRQQ2Hoxo3c0nK2om7yJhyWA
> XA0AnRHbpi4Kkun8Usp9MjGeErSTv7xE
> =4L+o
> -----END PGP SIGNATURE-----
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
More information about the Users
mailing list