Skip to content

Support -V/--version command line options.#75

Merged
danielhollas merged 2 commits intomasterfrom
version
Nov 24, 2021
Merged

Support -V/--version command line options.#75
danielhollas merged 2 commits intomasterfrom
version

Conversation

@danielhollas
Copy link
Copy Markdown
Contributor

@danielhollas danielhollas commented Nov 14, 2021

Plus some minor stuff:

  • take date/time from preprocessor

  • print compiler version and options for all compilers.
    This works with Intel >=2018 and Gfortran >= 4.6 Since Intel 2017 currently cannot compile ABIN with MPI, I think it is fine to say we partly suppport Intel 2018 and up.

  • change sqrt to dsqrt.
    Apparently, in new compilers this probably/hopefully does not matter, as sqrt seems to adapt to its input precision.
    Tested with the following program, compiled with gfortran 7.3.0, 4.8, 5.6 and ifort 18.0.2.

program test_sqrt
   real(8) :: r = 4.0D0

   print *, r, sqrt(r), dsqrt(r)
   print *, sqrt(4.0), sqrt(4.0D0), dsqrt(4.0D0)
end program

Output:

   4.0000000000000000        2.0000000000000000    2.0000000000000000
   2.00000000       2.0000000000000000        2.0000000000000000

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 14, 2021

Codecov Report

Merging #75 (8338165) into master (eb1d5a0) will increase coverage by 0.03%.
The diff coverage is 73.07%.

❗ Current head 8338165 differs from pull request most recent head 2dff82c. Consider uploading reports for the commit 2dff82c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   69.91%   69.95%   +0.03%     
==========================================
  Files          39       39              
  Lines        5708     5715       +7     
==========================================
+ Hits         3991     3998       +7     
  Misses       1717     1717              
Impacted Files Coverage Δ
src/estimators.F90 100.00% <ø> (ø)
src/force_mm.F90 0.00% <0.00%> (ø)
src/forces.F90 83.83% <0.00%> (ø)
src/init.F90 66.22% <ø> (-0.05%) ⬇️
src/remd.F90 81.97% <ø> (ø)
src/transform.F90 90.45% <0.00%> (ø)
src/potentials.F90 18.34% <16.66%> (ø)
src/surfacehop.F90 73.87% <33.33%> (ø)
src/gle.F90 15.38% <60.00%> (ø)
src/cmdline.F90 100.00% <100.00%> (ø)
... and 8 more

Comment thread src/utils.F90
real(DP) :: r

if (at1 == at2) then
r = 0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get rid of compiler warning. (same as below for get_angle

Comment thread src/compile_info.F90
print*,'Compiled at ', COMPILE_DATE
print*,'Git commit '//GIT_COMMIT
!$ print*,'Compiled with parallel OpenMP support for PIMD.'
print '(a)', 'ABIN version '//ABIN_VERSION
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was originally in print_logo() in init.F90

Comment thread src/Makefile
remd.o force_bound.o water.o force_cp2k.o sh_integ.o surfacehop.o landau_zener.o\
force_mm.o tera_mpi_api.o force_tera.o force_terash.o force_abin.o en_restraint.o analyze_ext_template.o geom_analysis.o analysis.o \
minimizer.o mdstep.o forces.o read_cmdline.o init.o
minimizer.o mdstep.o forces.o cmdline.o init.o
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed file so its name matched the module name.

@danielhollas
Copy link
Copy Markdown
Contributor Author

@suchanj Can you take a look (not sure if you got notified when I tagged you for review).

danielhollas and others added 2 commits November 23, 2021 00:41
Apparently, in new compilers this probably/hopefully
does not matter, as sqrt will adapt to its input precision.
Tested with the following program, compiled with
gfortran 7.3.0, 4.8, 5.6 and ifort 18.0.2.

program test_sqrt
   real(8) :: r = 4.0D0

   print *, r, sqrt(r), dsqrt(r)
   print *, sqrt(4.0), sqrt(4.0D0), dsqrt(4.0D0)
end program

Output:
   4.0000000000000000        2.0000000000000000    2.0000000000000000
   2.00000000       2.0000000000000000        2.0000000000000000
Plus some minor stuff:
 - take date/time from preprocessor
 - print compiler version and options for all compilers.
   This works with Intel >=2018 and Gfortran >= 4.6.
   Since Intel 2017 currently cannot compile ABIN with MPI,
   I think it is fine to say we partly suppport Intel 2018 and up.
@suchanj
Copy link
Copy Markdown
Contributor

suchanj commented Nov 24, 2021

@suchanj Can you take a look (not sure if you got notified when I tagged you for review).

When review is requested i get notifications 👍

@danielhollas danielhollas merged commit 1618b48 into master Nov 24, 2021
@danielhollas danielhollas deleted the version branch November 24, 2021 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants