-
Notifications
You must be signed in to change notification settings - Fork 35
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
Using previously compiled modules #21
Comments
Interesting question. Presently, I have not covered this circumstance: FoBiS.py recognizes static or shared external library, but not precompiled mod files. Indeed, precompiled mod are not well portable: each compiler vendor has its own mod format, the mod being not standard. Consequently, if you try use a mod compiled with intel by the gnu compiler (for example) this should not work. Anyhow, within the same compiler (maybe it is necessary also the same architecture) mod files are portable and FoBiS.py should be able to use them. To try to implement this feature it would be useful to have "prototype scenario". Let us assume thatproject tree is the following: src => foo.f90
mod => bar.mod
obj => bar.o To build |
Yes. In my case I have a bar.mod and a bar.a library. The foo.90 file contains a "use bar" statement. FoBiS should detect that there is no source file that has the bar module in it, but that mod file is available in the include path. It doesnt need to parse the mod file itself. Thanks! |
Ok, I will try to implement it this morning. Il giorno 06:44 ven 09/gen/2015 Jacob Williams notifications@github.com
|
Hey Stefano, If you're not aware of it, I wanted to draw your attention to another Fortran build tool, called Foraytool: https://code.google.com/p/foraytool/ This is what I have been using to build very large projects. It has some similarities to FoBiS. Thought you might find it interesting or get some inspiration from it. Don't deviate from the Poor Fortran Man KISS philosophy though! When the fix for this issue is ready, I'm going to test FoBiS on some large projects and really put it through its paces. |
Thank Jacob, I do not know Presently, I have some issues at work thus I have no time for FoBiS until next Friday. See you soon. |
Hi Jacob, I am working on your requested feature. I am confused. I have just realized that for building a program (compile and link) that Let me more clear. I have program like this program cumbersome
use NesteD_1
implicit none
print '(A)',hello_world
stop
endprogram cumbersome to build this program the Anyhow, the automatic building of program with pre-compiled |
The mod file is only needed at compile time. When linking, you also need to have the .a library file. It is possible that your example links because you are not actually using any subroutines from the module? Try one where the module includes some subroutines that you call in the main program. |
Wow, I have just realized a second thing. We must distinguish two cases:
In the first case no |
Your suggestion is correct. But I am using a variable defined inside the module. I am now trying with a procedure... |
Very interesting...
I think that the Anyhow, I can conclude that in the general case both |
Ok, I have just a working FoBiS.py version with your requested feature. I need only to suppress a false warning message... stay connect. |
That is interesting. I never know about case 1. However, caution...this may be compiler dependent. My understanding is that the Fortran standard says nothing about |
Sure, you are right. The Standard says nothing, thus the I have just pushed the new version. I have added an example for you https://github.com/szaghi/FoBiS/tree/master/examples/cumbersome_dependency_program_precompiled see its fobos file. The config is very simple:
I hope this satisfies your request. See you soon. |
Thanks! Works great! |
Hi all I have just published FoBiS.py on PyPi. You can install it simply by pip (see the wiki): sudo pip install FoBiS.py I think that this is very useful because now you can integrate FoBiS.py into a Continuous Integration Platform like Travis CI. The code has been refactored in order to make easy the maintenance and improvement, but I am quite sure to have introduced new bugs :-) Let me know (if you use the PyPi version) of any new bugs. See you soon. |
Does FoBiS support compiling a project that depends on a pre-compiled mod file (say one that goes with a third-party library)? In this case, the source for this module is not visible to the script and I'm getting the error about unreachable modules.
The text was updated successfully, but these errors were encountered: