[Pw_forum] Patch to enable signal trapping in PWscf

Riccardo Di Meo dimeo at democritos.it
Mon Feb 8 17:10:04 CET 2010


Lorenzo Paulatto wrote:
> On Sat, 06 Feb 2010 17:03:38 +0100, Riccardo Di Meo <dimeo at democritos.it>  
> wrote:
>   
>> I understand that this approach (adding a C file into the QE  
>> distribution) might be disliked, however I'd like to point out a couple  
>> of reasons that might
>>     
>
> Dear Riccardo,
> there are plenty of .c files in the QE distribution, have a look at  
> directory clib/. You could also use the macro F77_FUNC_ for the fortran-c  
>   
I didn't notice that, thank you for the information!

> interface, as the number of underscores added to function names by fortran  
> compilers is compiler-dependent.
>   

yes, but this was for the old F77 interfaces I'm not using.

With the "new" Fortran 2003 standard, the compiler itself takes care of 
the name mangling during the linking process, if a proper interface is 
provided.

A big plus of this approach is also that the compiler can do type 
checking, as well that the usual juggling with pointers/values required 
when building and linking C code with F77 is not necessary anymore.

Cheers,
Riccardo



More information about the users mailing list