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
Let my people ... LTO #15
Comments
So after a little dinkin', I think I've concluded that my case is not the passing a character case and the hidden length issue that Prof Ripley put in the README.txt. Instead, my issue is that I'm mismatching |
Keep in mind, RTFM: suggests putting all .f files into all.f and compiling and then you get more specific error messages: https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-Link_002dtime-Optimization |
It's been 43 minutes since submitting to win builder. Let's "tickle travis"... ok did that and was not able to reproduce LTOs with my current, vanilla, .travis.yml. Will need to investigate that further... hopefully win builder just does it for me. But you know what -- it probably won't. So look at one of the other packages travis and tickle again and see if you can get gcc-9 invoked. All right, going to borrow this fella from
that didn't do it. So try again adding the flags that Prof Ripley put in the README.txt:
... and that didn't work either. I can't reproduce the output then how do I fix it...?!?. Here's crazy idea ... do a local CMD+SHFT+E and see what happens. |
Here's crazy idea ... do a local CMD+SHFT+E and see what happens. -- oops, says I need a higher version of Roxygen ... but this makes me remembrer that 6.1.1 had problems for one of my other packages. Ugh. In the mean time winbuilder came in and it did not reproduce the LTO warning. Double ugh. |
okay. update roxygen locally. |
And then do the cmd+shft+E locally. Remember to set up options so the .Rcheck folder remains and then open |
Looks like I will need to find a way to incoprorate those flags in teh devtools::check call |
HOld up, friend: |
Agha. Only has gcc < 9. Then the lightbulb goes off: go to the essence. Note in Ripley's out put the line:
Well, it looks like that on biowulf, I can "module load" gcc9.1:
and then run:
(caveat: I tried it on the event/src at 11PM and things ran. Tomorrow I'll copy/clone repeated to the biowulf cluster. then I will change to repeated/src. Then I will module load gcc9.1 and then run the gfortran lines as in Ripleys output and see if I can reproduce the LTO errors.) . Good night for now (GNFN). |
Good morning!
AND OH MY GOD IT WORKED:
|
Houston, Texans, we have successfully reproduced the error. On biowulf. with gcc9. |
Okay. So let's try to eliminate the first Looking closely at the corresponding lines/files in gausscop.f and eigen.f, it appears that Argh! That didn't resolve the issue. I even tried repeating step 9 and then step 11 and step 17 and ended up with same result. Next plan:
Okay that just gave the same exact error. Let's make an all.f. Easy from the prompt:
And now do a simple compile on them. https://stackoverflow.com/questions/2297536/how-do-i-capture-all-of-my-compilers-output-to-a-file
then open up in emacs
and ctrl+s for RS( will yield nothing. But ctrl+s for rs( yields:
So as it turns out my intuition was correct about Z needing to be 0.0. But this just made is a single precision real number. To make a double precision I need to type: 0.0D0 (source: http://www.math.hawaii.edu/~hile/fortran/fort3.htm#real A double precision real number in GNU Fortran can be represented by up to 17 digits before truncation occurs. Double precision numbers are written in scientific notation but with D usurping the role of E. Some various ways of writing the number 12.345 as a double precision real number are And then repeat step 11 and step 17 (with -flto). Step 17 shows I've elimined the [-Wlto-type-mismatch warning] for gausscop! Yes! Now, inside all_output.txt do a ctrl+S for dqrdc2( And it is not listed. Yikes. Is it possible they are each subroutines defined (not called!) in hidden.f and chidden.f... no, no. It is weird because it is called twice but not declared anywhere. When I run grep -rnw . -e 'dqrdc2' I only get the two calls. I tried uppercase as well. Hey, didn't you remove a file a long time ago...no, that's an r file: cmcre.R. Is it possible it is defined somewhere else, an artifact from when you originally inherited maintainer position and the Lindsey suite of packages were interconnected (?) No! I did search across all of GITHUB: https://github.com/search?utf8=%E2%9C%93&q=%22SUBROUTINE+DQRDC2%28%22&type=Code And came up with that dqrdc2 is from LINPACK. So let's look at one of them and see https://github.com/DJJ88/R-3.3.1/blob/fb6aad195256b4ca672d15cc9401cb60a1f3a62d/src/appl/dqrdc2.f All the types seem to match up but note that work is listed as c work double precision(p,2). Whereas in hidden.f says double precision work(2*m) maybe change it to work(2*m, 2) |
So I edited hidden.f and chidden.f adding
Step 6 lead to errors. Need to put ,2 thoughout the file...? Answer: Yes. That got rid of errors. But step 17 still showed the same -Wlto-mismatch. Darn. What if... What if I take LINPACK version and put into all.f and then recompiled...? BOOMSHAKALAKAKAKAKAKAKAKAKAKALALALLAKAKALAKAKLAKLA BALKY! YOU DID IT, SON! ICE UP, SON. ICE UP.
Okay so that's the 6th argument where k=rank. It is saying that rank is being seen as a real(8) and being passed as an integer(4). okay, okay. rank is integer in hidden.f but was double precision / real(8) in chidden.f Mystery solved. Change that to integer. Repeat:
AND SUCCESS! No more LTOs! but wait! was the ,2 even necessary???? Okay, undo those and then redo the immediately 3 above steps. ANSWER: The ,2 weren't necessary. So leave them undo (original state) and do a git diff and git status to be displayed in next comment below -- |
SUMMARY:
BAM. Done. After these two edits, do the 17 steps to double check -Wlto-mismatches. And we did it. Push to github from biowulf and then send on to CRAN from mac. Good job, Team. |
Another LTO -- the HIDDEN LTO. So CRAN submission went well but another LTO popped up and they notified me of it:
What's interesting to me is that 1) This What's very interesting is that the call has 9 parameters (the 8th one being To answer this question, after looking at some dqrutl.f files on the internet, it seems I need to look at
Ok. Good to know. I need more info. Let's look at chidden.f call in In summary:
|
So the warning is a type mismatch in parameter 9, which means that the passed So I found a dqrutl.f (as of 2019-07-12) here: https://github.com/microsoft/microsoft-r-open/blob/master/source/src/appl/dqrutl.f and below in case it changes:
|
Prof Ripley emailed me 2019-06-01 saying fix the LTO warnings. He linked to a readme.txt:
So I ctrl+f
[-Wlto-type-mismatch]
and find the following 2 and only 2 instances:The text was updated successfully, but these errors were encountered: