stfc / claw-compiler

CLAW FORTRAN Compiler
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Prototype claw-python interoperability. #1

Open arporter opened 6 years ago

arporter commented 6 years ago

Currently CLAW applies transformations based on the existence of !$claw directives and rules in an XML configuration file. In this issue we will add support for a user to specify a (Python) script on the command line.

arporter commented 6 years ago

I now have a simple python transformation script that deletes any CLAW directives found in the source. The generated Fortran no longer contains those directives. Next step is to look at how best to handle error messages/exceptions.

arporter commented 6 years ago

Need to think about how we will drive CLAW from PSyclone. Because CLAW uses the OMNI compiler frontend it operates on a Fortran file. Logically, we will therefore need to specify the name of an output Fortran file too. Given the overhead in launching the Jython interpreter, I think we will also need to batch-up files and transformations so that we can transform multiple files in a single call. However, that might not be possible at the moment - can the CLAW command-line interface take more than 1 Fortran file?

arporter commented 6 years ago

I've come to bring this branch up-to-date with the remote master and have found build problems - I can't work out how I ever specified where Jython lived. However, this has now made me think a bit more about the build process and we don't want Jython to become a mandatory dependence for CLAW - it should be an option. I can probably configure cmake so as to pass the Jython location to it as an argument. However, how do I do conditional compilation in Java? i.e. I won't be compiling the files that use the Jython modules.