Ignore:
Timestamp:
Jan 13, 2025, 4:52:20 PM (32 hours ago)
Author:
jbclement
Message:

COMMON:
The compilation generates a Fortran subroutine to track compilation and version (SVN or Git) details through the executable file. Put the argument 'version' as an option when executing the code to display these information and create a file "version_diff.txt" containing the diff result.
It can work with every program but it has been implemented only for: 'gcm', 'parallel gcm', 'pem', '1D Mars PCM', 'Mars newstart', 'Mars start2archive' and '1D Generic PCM'.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90

    r3335 r3574  
    2222  use dimphy, only : init_dimphy
    2323  use gases_h, only: ngasmx
     24  use version_info_mod, only: print_version_info
    2425
    2526  implicit none
     
    109110  integer :: ios
    110111  integer :: k
     112
     113  character(100) :: arg ! To read command-line arguments
    111114 
    112115  ! --------------
    113116  ! Initialisation
    114117  ! --------------
     118  if (command_argument_count() > 0) then ! Get the number of command-line arguments
     119      call get_command_argument(1,arg) ! Read the argument given to the program
     120      select case (trim(adjustl(arg)))
     121          case('version')
     122              call print_version_info()
     123              stop
     124          case default
     125              error stop 'The argument given to the program is unknown!'
     126      end select
     127  endif
    115128
    116129  pi=2.E+0*asin(1.E+0)
Note: See TracChangeset for help on using the changeset viewer.