Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit arguments are skipped, resulting in compilation error #44

Closed
MrYann opened this issue Apr 20, 2016 · 6 comments
Closed

implicit arguments are skipped, resulting in compilation error #44

MrYann opened this issue Apr 20, 2016 · 6 comments

Comments

@MrYann
Copy link
Contributor

MrYann commented Apr 20, 2016

Hi James. As it is, I am still struggling to use some fortran code in Python ...

It seems that implicit arguments are skipped in the f90wrap files, instead of following the fortran implicit declaration rules (which f2py seems to know). Is there something I am missing, or do I have to explicitly declare all subroutine arguments ?

@jameskermode
Copy link
Owner

There's currently no support for implicit arguments in f90wrap, as I never came across a Fortran code which used these, but as usual I'm open to issues/pull requests :-)

@MrYann
Copy link
Contributor Author

MrYann commented Apr 20, 2016

Your code is huge, so it is hard to tell but I guess that 2 small modifications might do it :
1 - in file "f90wrapgen.py", function "visit_Procedure", line 332 : comment "self.write("implicit none")"
2 - in file "parse.py", function "check_subt", probably in the block starting at line 726, after the comment "Select only first declaration that matches entries in argument list" : find a way to keep the undeclared arguments.
3 - Repeat 2 for the function "check_funct"
Optional : give the type "implicit" to undeclared arguments for the doc_string.

It is of course the step 2 that is the most involved and I have not enough understanding of your code today to propose an precise way to do this.

@MrYann
Copy link
Contributor Author

MrYann commented May 3, 2016

Hi James :)
I have tinkered a bit with your code to add basic inference of implicit types for arguments and function returns. Would you like me to provide the modified code, in the event of a future integration ? (I also "upgraded" some "removing this or that" lines from logging to warning, as I feel that missing functionalities should really be noted)

@jameskermode
Copy link
Owner

Please do, that would be great! If you create a pull request here on GitHub I will review your changes and incorporate as soon as possible.

On 3 May 2016, at 18:27, MrYann notifications@github.com wrote:

Hi James :)
I have tinkered a bit with your code to add basic inference of implicit types for arguments and function returns. Would you like me to provide the modified code, in the event of a future integration ? (I also "upgraded" some "removing this or that" lines from logging to warning, as I feel that missing functionalities should really be noted)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@MrYann
Copy link
Contributor Author

MrYann commented May 3, 2016

Ok, I tried, but must have done something wrong : it says +2487 -0 lines, and I have only added < 20 lines.


Yann

Le 3 mai 2016 à 19:32, James Kermode notifications@github.com a écrit :

Please do, that would be great! If you create a pull request here on GitHub I will review your changes and incorporate as soon as possible.

On 3 May 2016, at 18:27, MrYann notifications@github.com wrote:

Hi James :)
I have tinkered a bit with your code to add basic inference of implicit types for arguments and function returns. Would you like me to provide the modified code, in the event of a future integration ? (I also "upgraded" some "removing this or that" lines from logging to warning, as I feel that missing functionalities should really be noted)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #44 (comment)

@MrYann
Copy link
Contributor Author

MrYann commented May 3, 2016

Got it … uploaded in wring folder. Sorry for the inconvenience.


Yann

Le 3 mai 2016 à 19:47, Yann Grisel yannibu@gmail.com a écrit :

Ok, I tried, but must have done something wrong : it says +2487 -0 lines, and I have only added < 20 lines.


Yann

Le 3 mai 2016 à 19:32, James Kermode <notifications@github.com mailto:notifications@github.com> a écrit :

Please do, that would be great! If you create a pull request here on GitHub I will review your changes and incorporate as soon as possible.

On 3 May 2016, at 18:27, MrYann <notifications@github.com mailto:notifications@github.com> wrote:

Hi James :)
I have tinkered a bit with your code to add basic inference of implicit types for arguments and function returns. Would you like me to provide the modified code, in the event of a future integration ? (I also "upgraded" some "removing this or that" lines from logging to warning, as I feel that missing functionalities should really be noted)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #44 (comment)

@MrYann MrYann closed this as completed May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants