-
Notifications
You must be signed in to change notification settings - Fork 87
NAG Fortran Errors on 'module procedure ::' change to 'module procedure' with no double colon #78
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
Conversation
@kmanalo Can you confirm that the library builds AND passes all the tests? I don’t have access to NAG and I don’t think @jacobwilliams does either. Also, are there any warnings issued during the compilation? If you could post a copy of the output from a clean:
that would be very much appreciated. Also confirmation that the parallel build still works with NAG would be great: Lastly, I suspect this is a bug for NAG Fortran. While I haven’t dug through the standard, searching through MCR, “Modern Fortran Explained” has at least one instance (p. 472) of using the |
Terrific! I'm willing to accept it...Lord knows there are enough workarounds for gfortran bugs in there, so I don't mind putting something minor like this for NAG. I think maybe the :: after I would also like to see the full test results, just to verify that everything does work. Thanks! |
This was the primary warning (showed up on a couple of the tests also): line 5716: Unused interface for procedure ARRAY_CALLBACK_FUNC I'll try the other tests and follow up |
|
this is definitely erroneous, as it is used by at least What release or commit are you compiling? Could you recompile with stack tracing enabled? Then, after building the project and tests with CMake/NAG, can you run (at the top level of the build directory (AKA
and also, just for good measure
and post the results here? Lastly could you reconfirm that the current master branch faces the same issues? I’m not sure how much debugging from afar we’ll be able to do, but at least that may yield a stack trace (to help get to the bottom of the segfault…) test 6 is relatively small, and untaxing so I’m surprised this is causing NAG to segfault. |
Note: get_current_line_from_file
I ran through valgrind, and I think I found the root cause to be in the BTW, this error was only happening about 1/3 of the time when I ran the tests (I suppose there is a hit on an unlucky address). I haven't seen this issue present itself with gfortran. |
Compiling with stack tracing enabled may still be helpful, because, at least for gfortran and intel, the compiler will give you a line number where the segfault occurs. My guess is that NAG is botching the reallocation on assignment of @kmanalo your version of NAG at least claims to support reallocation on assignment and deferred length allocatable character variables, right? |
@kmanalo See my previous post, but also, give this patch a shot and see if it solves the problem: https://gist.github.com/zbeekman/bd69647eabdc9e87162b It’s an educated guess at best…. |
…affected jf_test_6 with NAG compiler
@zbeekman I tried your patch, which doesn't affect any outcomes for gfortran, but I don't think it covered the specific NAG issue. Also, I had to add in the compiler flags '-gline -C' for traceback with
For the above trace, this basically confirms what I was seeing with my hand-debugging, that size remained uninitalized in this specific instance of the line read. Thanks for recommending the flags, I should think to do that more often. It's probably veering off the path as far as the last fix (may not be the best choice to index against err_message, this is just my current workaround but maybe there are liabilities): I only desired to add that so as make valgrind happy. I could definitely use some advice, and I'll yield to your recommendations @zbeekman @jacobwilliams . Furthermore, I could gladly contribute to the cmake supplemental flags for NAG; |
Yes, the impact on execution size and binary object size is almost always negligible for the former and small for the latter. I compile everything with it turned on because of how helpful it is in trouble shooting errors.
I’m not sure I understand the fix as you’ve implemented it now, but I think I have a patch that should fix it for you… I did some research on the semantics of non advancing IO and the
Since I don’t have access to NAG, giving me a list of the flags you use to successfully compile, link and run the tests would be most appreciated. Alternatively, you can contribute them directly in the form of a patch or PR. |
Also, my reading of the standard indicates that this is a bug in NAG:
My understanding of this is that after returning from a synchronous and non-advancing |
I’m confused why the coverage/coveralls is listed as pending… maybe because it’s a PR? If you look here: https://coveralls.io/r/jacobwilliams/json-fortran at build 94, clearly there is coverage info… Anyway, @kmanalo, it looks like you patched your fork and pushed it back to github… does it fix the segfault issue with NAG? |
No, I just made the change on the fly- will update you this evening when I get to the compiler. |
ah, I see no access to it atm… just curious do you have the NAG compiler on a personal computer? Do they have affordable academic or personal licenses? |
I get it with access to a site license; I have not looked at Have you looked at Portland also? They have free compiler offers if you On Tue, Mar 10, 2015 at 10:40 AM, Izaak Beekman notifications@github.com
|
yes I use portland sometimes… last I checked their F2008 and F2003 support was poor. |
lol @coveralls ⏰ |
.03%! Every little bit helps! Ha ha! Is this ready to merge? I'm just waiting for one of you guys to give me to go ahead. I also don't have access to NAG. |
Thumbs up here, I didn't see any issues with the last commit and no segfaults. |
Thumbs up here too, so long as @kmanalo tested the latest change with nag and it fixed the segfault issue. |
NAG Fortran Errors on 'module procedure ::' change to 'module procedure' with no double colon
@kmanalo either send us some build flags or submit a PR to patch CMake and/or build.sh if you like and then we can add them |
Tested with NAG Fortran Version 6.0.
cmake ../ -DSKIP_DOC_GEN=TRUE -DCMAKE_Fortran_COMPILER=nagfor
Linux Mint 17 64-bit.