Ignore:
Timestamp:
Jan 13, 2025, 4:52:20 PM (8 days 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.COMMON/libf/dyn3dpar/gcm.F

    r3316 r3574  
    2727     &                       ecritstart
    2828      use cpdet_mod, only: ini_cpdet
     29      use version_info_mod, only: print_version_info
    2930
    3031
     
    134135      character (len=20) :: modname
    135136      character (len=80) :: abort_message
     137      character(100)     :: arg ! To read command-line arguments
    136138! locales pour gestion du temps
    137139      INTEGER :: an, mois, jour
     
    156158c   Initialisations:
    157159c   ----------------
     160
     161      if (command_argument_count() > 0) then ! Get the number of command-line arguments
     162          call get_command_argument(1,arg) ! Read the argument given to the program
     163          select case (trim(adjustl(arg)))
     164              case('version')
     165                  call print_version_info()
     166                  stop
     167              case default
     168                  error stop 'The argument given to the program '
     169     &//'is unknown!'
     170          end select
     171      endif
    158172
    159173      abort_message = 'last timestep reached'
Note: See TracChangeset for help on using the changeset viewer.