Explicitly specify optimization level for Release; Add Dockerfiles#185
Explicitly specify optimization level for Release; Add Dockerfiles#185crazyzlj wants to merge 6 commits into
Conversation
…files are not exist
…or compiling Release versions, add dockerfiles
…tplus_official into bug_fixed_for_swatplus_team
…0; and the ly should not be used before assignment
|
I agree with the .f90 commits, it seems like several changes were cherry picked into the next pr. |
Yes, sorry for that, I just noticed that the #186 was with this PR. |
fgeter
left a comment
There was a problem hiding this comment.
Olaf will be back next week and he understands cmakelist.txt better than I do since he originally wrote it. In general, I like the direction this is going. Would it be possible to separate this pull request into two pull requests? One for the docker files and the other on the cmakeList.txt changes?
Hello fgeter, thank you for your comments. The revisions of |
|
I agree, this indeed should be split into two PRs Also, for CMake, the new INSTALL_PREFIX block (around line 155) uses uppercase IF/SET/ELSE/ENDIF/PATH while the rest of the file uses lowercase. Worth normalising. |
This PR includes:
water_tratement_read.f90andwater_use_read.f90-odefaultly means-o2forifort/ifxand-o0forgfortran, I think it's better to use exact-o0,-o1, or-o2in theCMakeLists.txt, to keep consistent among different compilers. Then, I tried to reorganize theCMakeLists.txtto accept the argumentOPT_LEVELto specify the optimization level for non-Debug configs, like O0, O1, O2, O3. Actually, I did account for an inconsistent behavior between/O2and/O1when working withMSVC 2015+ifort 17.0. The/O2got wrong, and theO1and Debug mode got the correct and same results.Dockerfile.alpineandDockerfile.debianfor details.