Ensure implicit none via compiler option#77
Conversation
989068f to
7c2fc3f
Compare
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
==========================================
+ Coverage 69.96% 70.18% +0.22%
==========================================
Files 39 40 +1
Lines 5716 5722 +6
==========================================
+ Hits 3999 4016 +17
+ Misses 1717 1706 -11
|
55ec8ff to
54521a7
Compare
79a6af8 to
de892b1
Compare
| @@ -0,0 +1,207 @@ | |||
| ! Module for permanent file handling | |||
There was a problem hiding this comment.
No changes here, just moved from module.F90
| FUNCTION R1MACH() | ||
| IMPLICIT real(DP) (A-H,O-Z) | ||
| PARAMETER (ONE=1.D0,TWO=2.D0,HALF=0.5D0) | ||
| real(DP), parameter :: ONE=1.D0, TWO=2.D0, HALF=0.5D0 |
There was a problem hiding this comment.
Last implicit real :-)
| @@ -0,0 +1,38 @@ | |||
| ! Exact values for ANG,AUTOKCAL and AUTODEBYE,me,AUTOM,AUTOFS,AMU: | |||
There was a problem hiding this comment.
No changes, just moved from modules.F90
| ! https://kiwi.atmos.colostate.edu/fortran/docs/fortran2012.key-8.pdf | ||
| ! TODO: We should probably move this outside of the modules.f90 | ||
|
|
||
| ! Extra electronic properties (not mandatory) |
There was a problem hiding this comment.
These were just stubs, not used anywhere, so I removed them for now.
| end do | ||
|
|
||
| call init_usermass() | ||
| ! Check for duplicate user defined atom names |
There was a problem hiding this comment.
I inlined init_usermass for simplicity
de892b1 to
cca9530
Compare
I think this mode was broken before this commit, and perhaps it is still broken, but I am not even sure what it was supposed to do or if it ever worked. Probably not... I think it was just testing a normal mode transform with PIMD, using a slightly different version of the hamiltonian. Closes #63
cca9530 to
c86ccd5
Compare
Also moved mod_const to a separate file to break circular dependency due to the 'DP' constant. This let me reorder compilation of some files and make 'fatal_error' accessible to all modules. In general, to goal is to have one module per file, so I also split the mod_files from module.F90 to files.F90 Other small changes were done to squash compiler warnings. As I was in the modules.F90 anyway, I also added unit tests for mass initialization and did a little refactor.
c86ccd5 to
846194e
Compare
| " | ||
| } | ||
|
|
||
| warning_flags="-Wall -Wno-integer-division -Wno-maybe-uninitialized" |
There was a problem hiding this comment.
To remove some spurious compiler warnings. We should now be warnings-free with this setting I think.
|
@suchanj thanks for looking at the other PR. 🙇♂️ This one is now ready as well, but absolutely no pressure, do on your own time. Thanks! This is a mixture of several small things, see first comment. |
Adding
-fimplicit-noneto FFLAGS ensures that we always haveimplicit nonein our modules and functions.I fixed one missing
implicit none(caught an unitialized variable!) and converted one last implicit typing inrandom.F90.l also moved
mod_constfrommodules.F90to a separate fileconstants.F90to break circular dependency due to the 'DP' constant. This allowed me reorder compilation of a some files and make 'fatal_error()' accessible to all modules. In general, our goal should be to have one module per file, so while I was in there, I also did the same formod_files.Other small changes were done to squash compiler warnings. I also did a bit of cleanup in
mass_initand wrote some unit tests to verify this functionality (especially user defined masses code was messy and not fully tested).Closes #76, Closes #63