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.MARS/libf/phymars/dyn1d/testphys1d.F90

    r3400 r3574  
    2121use mod_const_mpi,       only: init_const_mpi
    2222use parallel_lmdz,       only: init_parallel
     23use version_info_mod,    only: print_version_info
    2324
    2425implicit none
     
    7778real, dimension(:,:,:), allocatable :: q             ! tracer mixing ratio (e.g. kg/kg)
    7879real, dimension(1)                  :: wstar = 0.    ! Thermals vertical velocity
     80character(100)                      :: arg           ! To read command-line arguments
    7981
    8082! Physical and dynamical tendencies (e.g. m.s-2, K/s, Pa/s)
     
    100102! INITIALISATION
    101103!=======================================================================
     104if (command_argument_count() > 0) then ! Get the number of command-line arguments
     105    call get_command_argument(1,arg) ! Read the argument given to the program
     106    select case (trim(adjustl(arg)))
     107        case('version')
     108            call print_version_info()
     109            stop
     110        case default
     111            error stop 'The argument given to the program is unknown!'
     112    end select
     113endif
     114
    102115#ifdef CPP_XIOS
    103116    call init_const_mpi
Note: See TracChangeset for help on using the changeset viewer.