8000 Using fypp through the Intel Fortran compilers · Issue #24 · aradi/fypp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Using fypp through the Intel Fortran compilers #24
Open
@ivan-pi

Description

@ivan-pi

The Intel compilers provide a flag -fpp-name=<name> which can be used to specify an alternative preprocessor of the form:

alt_fpp [ [–D<define>]..] [[-I<include directory>]..] inputfile 

which prints output to STDOUT that will get captured by the compiler for further processing.

I've tried to use this with fypp, but I run into errors:

$ ifx -fpp-name=`which fypp` -DNAME=\"Ivan\" fypp_example.F90 
error: Failed to open file '@/tmp/ifxargBf8BjW' for read [FyppFatalError]
error: [Errno 2] No such file or directory: '@/tmp/ifxargBf8BjW' [FileNotFoundError]
$ ifx -fpp-name=fypp -Qlocation,fpp,/home/ivan/.local/bin -DNAME=\"Ivan\" fypp_example.F90 
error: Failed to open file '@/tmp/ifxarg6DL4Me' for read [FyppFatalError]
error: [Errno 2] No such file or directory: '@/tmp/ifxarg6DL4Me' [FileNotFoundError]

It seems like the compiler prepends @ to the path, but otherwise it seems it could work. If you'd like to experiment, here is the toy code:

! fypp_example.F90
#:def hello(name)
print *, "Hello ${name}$"
#:enddef

#:if defined('NAME')
$:hello(NAME)
#:else
print *, "Hello World"
#:endif
end

Do you have any previous experience with such usage, or should I raise an issue at the Intel Fortran forum?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0