anchor.diff:    implicit none
     private
     public :: command_line_read
  -  character(len=1), parameter                  :: nl=achar(10)
  -  character(len=long_string_size)              :: syntax = nl//& 
  -       '                                        elss-learn (v0.3.1)                                    '//nl//&
  -       '                                     =========================                                 '//nl//&
  -       nl//&
  -       nl//&
  -       'Option                         Description                                     (Default Value)  '//nl//&
  -       '------------------------------------------------------------------------------------------------'//nl//&
  -       ' --fasta <path_to_file>        MSA file (FASTA format)                         (None)           '//nl//&
  -       nl//&
  -       nl//&
  -       ' (-h|--help)                   print this help message                         (None)           '//nl//&
  -       nl//&
  -       ' --prefix <string>             prefix for output files                         (None)           '//nl//&
  -       nl//&
  -       ' (-p|--prm) <path_to_file>     parameters file                                 (None)           '//nl//&   
  -       '        OR'//nl//&   
  -       ' (-c|--chk) <path_to_file>     checkpoint file                                 (None)           '//nl//&   
  -       nl//&
  -       ' (-n|--nsweeps) <int>          num. of MC sweeps per gradient estimate         (1000)           '//nl//&
  -       nl//&
  -       ' (-u|--nupdate) <int>          stride (as num. of sweeps) for averages updates (10)             '//nl//&
  -       nl//&
  -       ' --fasta <path_to_file>        MSA file (FASTA format)                         (None)           '//nl//&
  -       nl//&
  -       ' (-w|--weights) <path_to_file> weights file                                    (None)           '//nl//&
  -       '        OR'//nl//&   
  -       ' --wid <float>                 %id threshold for weights calculation           (-1)             '//nl//&
  -       nl//&
  -       ' --learn-gd <int>              num. of gradient descent steps                  (0)              '//nl//&
  -       nl//&
  -       ' (--learn|--learn-agd) <int>   num. of accelerated gradient descent steps      (2000)           '//nl//&
  -       nl//&
  -       ' (-l|--lambda) <float>         (scaled) regularization parameter               (0.01)           '//nl//&
  -       nl//&
  -       ' --random_seed <int>           init. the random seed (if 0, use system_clock)  (0)              '//nl//&
  -       '------------------------------------------------------------------------------------------------'//nl//&
  -       nl//&
  -       nl//&
  -       '------------------------------------------------------------------------------------------------'//nl//&
  -       ' For more information and examples, please check the project github repository:                 '//nl//&
  -       ' https://github.com/simomarsili/elss                                                            '//nl//&
  -       '------------------------------------------------------------------------------------------------'//nl//&
  -       '                                                                                                    '
   
   contains
   
  -  subroutine command_line_read(udata,data_type,uwgt,wid,uprm,uchk,&
  -                               rseed,beta,mc_nsweeps,nupdate,niter_agd,niter_gd,&
  -                               lambda,prefix,error_code)
  -    use units, only: units_open,units_open_unf
  -    use arguments, only: read_opt,read_opt_arg
  -    integer,                    intent(inout) :: udata
  -    character(len=*),           intent(inout) :: data_type
  -    integer,                    intent(inout) :: uwgt
  -    real(kflt),                 intent(inout) :: wid
  -    integer,                    intent(inout) :: uprm
  -    integer,                    intent(inout) :: uchk
  -    integer,                    intent(inout) :: rseed
  -    real(kflt),                 intent(inout) :: beta
  -    integer,                    intent(inout) :: mc_nsweeps
  -    integer,                    intent(inout) :: nupdate
  -    integer,                    intent(inout) :: niter_agd
  -    integer,                    intent(inout) :: niter_gd
  -    real(kflt),                 intent(inout) :: lambda
  -    character(len=*),           intent(out) :: prefix
  -    integer,                    intent(out) :: error_code
  +  subroutine command_line_read(udata, data_type, uwgt, wid, uprm, uchk, rseed, &
  +       beta, mc_nsweeps, nupdate, niter_agd, niter_gd, lambda,prefix, &
  +       error_code)
  +    use units, only: units_open, units_open_unf
  +    use arguments, only: read_opt, read_opt_arg
  +    integer,          intent(inout) :: udata
  +    character(len=*), intent(inout) :: data_type
  +    integer,          intent(inout) :: uwgt
  +    real(kflt),       intent(inout) :: wid
  +    integer,          intent(inout) :: uprm
  +    integer,          intent(inout) :: uchk
  +    integer,          intent(inout) :: rseed
  +    real(kflt),       intent(inout) :: beta
  +    integer,          intent(inout) :: mc_nsweeps
  +    integer,          intent(inout) :: nupdate
  +    integer,          intent(inout) :: niter_agd
  +    integer,          intent(inout) :: niter_gd
  +    real(kflt),       intent(inout) :: lambda
  +    character(len=*), intent(out) :: prefix
  +    integer,          intent(out) :: error_code
       integer                         :: err
       character(len=long_string_size) :: data_file
       character(len=long_string_size) :: ww_file
  
positive.code:        select case(trim(arg))
         case('-h','--help')
            ! print help and exit
            write(0,*) trim(syntax)
            error_code = 1
            return
         case('-i','--int','--fasta')
  
negative.code:     nargs = command_argument_count()
  
      if (nargs == 0) then
         write(0,100)! no args: print syntax and stop
         error_code = 1
         return
      end if
  