Ignore:
Timestamp:
Jan 13, 2025, 4:52:20 PM (2 weeks 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/dyn3d/gcm.F90

    r3316 r3574  
    3030  USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref, &
    3131                itau_dyn,itau_phy,day_ini,jD_ref,jH_ref,day_end
     32  use version_info_mod, only: print_version_info
    3233
    3334
     
    133134  character (len=20) :: modname
    134135  character (len=80) :: abort_message
     136  character(100)     :: arg ! To read command-line arguments
    135137  ! locales pour gestion du temps
    136138  INTEGER :: an, mois, jour
     
    142144!   Initialisations:
    143145!   ----------------
     146
     147  if (command_argument_count() > 0) then ! Get the number of command-line arguments
     148      call get_command_argument(1,arg) ! Read the argument given to the program
     149      select case (trim(adjustl(arg)))
     150          case('version')
     151              call print_version_info()
     152              stop
     153          case default
     154              error stop "The argument given to the program is unknown!"
     155      end select
     156  endif
    144157
    145158  abort_message = 'last timestep reached'
Note: See TracChangeset for help on using the changeset viewer.