-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gfortran support #5
Comments
Hello Stephano, Please, could you specify the origin of the problem with more detail? |
Sorry, i'm really fast pressing enter .. After this, the good news is that I managed to compile (with gfortran4.9) and test the executable commenting only a few lines |
Good to know. Feel free to do a pull request if you find a work around. It is a very silly bug... it seems that is use "directly" the deferred allocatable strings gfortran blows up, but if you copy it into a temporary variables before using gfortran works... I have done some tests (very quickly indeed), but I have not find a "sane" workaround. |
Sorry, I've probably been too positive... |
Thank you Victor. I see your patches. Why reversing the loop If I understand right, with your patch the examples and the automatic signature are removed, but other features remain, is it right? I will try your patch with more attention to evaluate if this can lead to a sane workaround maintaining all the present features. Thank you very much, your help is very appreciated! P.S. how do you find that the above modifications get gfortran to compile? is it a trial-error analysis or have you used some tool/compiler flags highlighting the crucial statements? |
Hello again,
After commenting line 993, I need to build a correct cli%cla(aa)%val without the first 1+len(args_sep) characters. Inside the loop I concatenate the strings in a different order.
Yes, it is.
It was a trial-error analysis. After commenting the line 993, the compiler did all the work. Line 993: https://github.com/szaghi/FLAP/blob/master/src/Data_Type_Command_Line_Interface.f90#L993 Best regards, |
Thank you again, this is a great starting point... |
just for your information, we take the following link as a starting point to find the problem: |
Interesting, I found similar (I have not the link under my hands) for 4.9.x. |
Dear Victor, this is a non official spoiler... basing on your patch I have written a workaround that is enough sane and... save all features including nice signature and examples... Tomorrow I will upload a new version working with also gfortran 4.9.2! Many many thanks! |
Great news! it makes me happy :) I'm sure that FLAP will be very useful for us. Congratulations for your great work. |
Dear Victor, you are too kind. I have just uploaded the new version (0.0.4) that is Gfortran enabled. This has allowed also to perform a coverage analysis (that I am uploading into the wiki). Please, take a look at the fobos file. In order to correctly build FLAP with gfortran two things are necessary:
Again, thank you very much! |
Dear Stephano, after looking around the backtrace for the error in
I have commented a few lines and then run FLAP with Valgrind. Valgrind output was something similar to:
referencing the sig variable inside function adding FLAP/src/Data_Type_Command_Line_Interface.f90 Line 651 in f999c86
seem to fix the bug. This change it's right? Now i'm compiling with -O3 and it works Best regards, |
You are absolutely right... there are some variables not correctly initialized and among them I have not yet found the time to deeply profile the code! Thank you very much! |
Got it, I refactor the method: I previously changed it from a subroutine to a function and my "old" things are now not refactored. Now works with also optimizations. Thank you again. |
The present gfortran latest version (4.9.x) does not still support deferred length string defined as member of a derived type: FLAP cannot be compiled with gfortran until this gfortran bug will be fixed :-(
The text was updated successfully, but these errors were encountered: