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

Problems with intrinsic modules #37

Closed
zbeekman opened this issue Feb 18, 2015 · 9 comments
Closed

Problems with intrinsic modules #37

zbeekman opened this issue Feb 18, 2015 · 9 comments

Comments

@zbeekman
Copy link
Contributor

Hi Stefano,
I’m running into this error:

Attention: the file ‘src/tests/test1.f90’ depends on 'iso_c_binding' that is unreachable

And the build is failing. However, iso_c_binding is an intrinsic module and does not require any source file to be built, same with iso_fortran_env and ieee_…

Is there a way to tell FoBiS.py not to try to build the intrinsic module, and not to fail if it can’t seem to find it?

@jacobwilliams
Copy link

Here's an idea: if FoBiS determines that there is a module it can't see, just go ahead and compile everything anyway. Then, if it's really a problem, it will fail when compiling (with the normal compiler error message about not being able to locate a module with the given name). That way, you could account for this situation without having to have a list of the intrinsic modules somewhere in the code.

(Maybe in verbose mode it could print out the list of things it can't find).

@zbeekman
Copy link
Contributor Author

@jacobwilliams Sounds like a plan to me!

Also, @jacobwilliams, just curious if you saw my PR from yesterday for json-fortran

@szaghi
Copy link
Owner

szaghi commented Feb 18, 2015

Arghhhhh

I was sure to have trapped the intrinsic modules usage, but evidently I was wrong! The idea of Jacob is very nice... tomorrow I will push the new 1.5.1 version with this feature 👍

@zbeekman
Copy link
Contributor Author

My vote is for this behavior:

  • FoBiS.py automatically detects standard intrinsic modules and handles them correctly
  • If a missing dependency of any type is encountered a warning message is printed and then the build is attempted any way

This will likely be helpful for compiler vendor language extensions, etc.

@szaghi
Copy link
Owner

szaghi commented Feb 19, 2015

Hi all,

I just understand why my intrinsic modules usage is correctly handled and your not. In my OCD workflow I declare explicitly their are intrinsic module by the intrinsic keyword, thus FoBiS has a specific regex to catch these cases, but in your example I think your source is like use iso_c_binding and not use, intrinsic:: iso_c_binding consequently, due to the absence of keyword intrinsic FoBiS assumes that it is a standard module.

I like your feature request to collect the warning on missing dependencies and trying always to make the building, this fixes also the intrinsic modules issue, but I am thinking to change their trap: I do not like false positive warning about them... the standard defines their name thus I think it is better to catch them explicitly. Anyhow the intrinsic keyword trap remains.

I will push an update later this morning.

@szaghi
Copy link
Owner

szaghi commented Feb 19, 2015

Dear all,

in v1.5.1 should be fixed. It is worthy to note that your feature request should be also accomplished: now if a missing dependency of any type is encountered a warning message is printed and then the build is attempted any way.

See you soon.

@szaghi szaghi closed this as completed Feb 19, 2015
@zbeekman
Copy link
Contributor Author

Great! Thanks so much. Does this mean that use iso_c_binding will print a warning now or have the (3?) intrinsic modules been added to the regexp?

@szaghi
Copy link
Owner

szaghi commented Feb 19, 2015

Yes (or not :-) ), no warnings are now printed for the 5 standard intrinsic modules usage (with or without the explicit keyword intrinsic).

I have test with only iso_c_binding and iso_fortran_env, the ieee_xxxx modules are not tested.

See you soon.

@zbeekman
Copy link
Contributor Author

Awesome, thanks! 👍

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

3 participants