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.GENERIC/libf/phystd/dyn1d/rcm1d.F

    r3562 r3574  
    4343     &                  nf90_strerror,NF90_INQ_VARID, NF90_GET_VAR,
    4444     &                  NF90_CLOSE
     45      use version_info_mod, only: print_version_info
     46
    4547      implicit none
    4648
     
    164166      LOGICAL :: moderntracdef=.false. ! JVO, YJ : modern traceur.def
    165167
     168      character(100) :: arg ! To read command-line arguments
     169
    166170c=======================================================================
    167171c INITIALISATION
    168172c=======================================================================
     173      if (command_argument_count() > 0) then ! Get the number of command-line arguments
     174          call get_command_argument(1,arg) ! Read the argument given to the program
     175          select case (trim(adjustl(arg)))
     176              case('version')
     177                  call print_version_info()
     178                  stop
     179              case default
     180                  error stop 'The argument given to the program is '
     181     &//'unknown!'
     182          end select
     183      endif
     184
    169185! check if 'rcm1d.def' file is around
    170186      open(90,file='rcm1d.def',status='old',form='formatted',
Note: See TracChangeset for help on using the changeset viewer.