run Subroutine

subroutine run(rc)

Arguments

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

Calls

proc~~run~3~~CallsGraph proc~run~3 run at at proc~run~3->at cast cast proc~run~3->cast mapl_fargparsecli mapl_fargparsecli proc~run~3->mapl_fargparsecli mpi_init mpi_init proc~run~3->mpi_init proc~mapl_return MAPL_Return proc~run~3->proc~mapl_return proc~mapl_verify MAPL_Verify proc~run~3->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~~run~3~~CalledByGraph proc~run~3 run program~main~2 main program~main~2->proc~run~3

Source Code

      subroutine run(rc)

         integer, intent(out), optional :: rc

         integer :: status
         character(len=:), allocatable :: input_file

         call MPI_Init(status)
         _VERIFY(status)

         ! Read and parse the command line, and set parameters
         ! If you have extra options you make a procedure as seen below and add arguments
         ! there and pass in here
         cli = MAPL_FargparseCLI(extra=extra_options)

         ! This does the casting of arguments into cap_options for CAP
         cap_options = MAPL_CapOptions(cli, _RC)

         write(*,*) "done with MAPL_FargparseCLI"
         write(*,*) "  cap_options%with_esmf_moab = ", cap_options%with_esmf_moab
         write(*,*) "  cap_options%npes_input_server = ", cap_options%npes_input_server
         write(*,*) "  cap_options%nodes_input_server = ", cap_options%nodes_input_server
         write(*,*) "  cap_options%npes_output_server = ", cap_options%npes_output_server
         write(*,*) "  cap_options%nodes_output_server = ", cap_options%nodes_output_server
         write(*,*) "  cap_options%egress_file = ", cap_options%egress_file

         ! For our extra options we have to explicitly cast them
         call cast(cli%options%at('file'), input_file, _RC)

         write(*,*) ""
         write(*,*) "Extra arguments"
         write(*,*) "  input file = ", input_file

         _RETURN(_SUCCESS)

      end subroutine run