make_ComboSpec Function

public function make_ComboSpec(rc) result(spec)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), optional :: rc

Return Value type(ComboSpec)


Calls

proc~~make_combospec~~CallsGraph proc~make_combospec make_ComboSpec add_argument add_argument proc~make_combospec->add_argument argparser argparser proc~make_combospec->argparser at at proc~make_combospec->at cast cast proc~make_combospec->cast interface~mapl_assert MAPL_Assert proc~make_combospec->interface~mapl_assert parse_args parse_args proc~make_combospec->parse_args proc~mapl_return MAPL_Return proc~make_combospec->proc~mapl_return proc~mapl_verify MAPL_Verify proc~make_combospec->proc~mapl_verify proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Called by

proc~~make_combospec~~CalledByGraph proc~make_combospec make_ComboSpec program~main~19 main program~main~19->proc~make_combospec

Source Code

   function make_ComboSpec(rc) result(spec)
      type(ComboSpec) :: spec
      integer, optional, intent(out) :: rc

      integer :: status
      type(ArgParser) :: parser
      type(StringUnlimitedMap) :: options
      class(*), pointer :: option

      parser = ArgParser()
      call add_cli_options(parser)
      options = parser%parse_args()
      
      option => options%at('nx')
      _ASSERT(associated(option), 'nx not found')
      call cast(option, spec%nx, _RC)

      option => options%at('n_levs')
      _ASSERT(associated(option), 'n_levs not found')
      call cast(option, spec%n_levs, _RC)


      option => options%at('n_writers')
      _ASSERT(associated(option), 'n_writers not found')
      call cast(option, spec%n_writers, _RC)


      option => options%at('n_tries')
      _ASSERT(associated(option), 'n_tries not found')
      call cast(option, spec%n_tries, _RC)
      
      _RETURN(_SUCCESS)
   end function make_ComboSpec