prism_abort.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 subroutine prism_abort ( comp_id, file, mesg )
00014
00015
00016
00017 use PRISM, only : PRISM_UNDEFINED, dummy_interface => prism_abort
00018
00019 use PSMILe
00020
00021 implicit none
00022
00023
00024
00025 Character(len=*), Intent(In) :: mesg
00026
00027
00028
00029 Character(len=*), Intent(In) :: file
00030
00031
00032
00033
00034
00035
00036 Integer, Intent(InOut) :: comp_id
00037
00038
00039
00040
00041
00042
00043 integer :: ila_args(PSMILe_trans_Header_length)
00044 integer :: ierror
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 Character(len=len_cvs_string), save :: mycvs =
00064 '$Id: prism_abort.F90 2939 2011-02-03 12:13:10Z redler $'
00065
00066
00067
00068
00069
00070 ila_args(1) = PSMILe_trans_Abort
00071 ila_args(2) = global_rank
00072 ila_args(3) = 1
00073 ila_args(4) = Appl%sequence_number
00074 ila_args(5) = Appl%rank
00075
00076 call psmile_trs_inform(ila_args, PRISMdrv_root, ierror)
00077
00078
00079
00080 call psmile_flushstd
00081
00082
00083
00084 if ( comp_id /= PRISM_UNDEFINED ) then
00085
00086 if (comp_id < 1 .or. &
00087 comp_id > Number_of_Comps_allocated) then
00088 print *, trim(ch_id), 'prism_abort : comp_id (out of range)'
00089 comp_id = PRISM_UNDEFINED
00090 endif
00091
00092 if (Comps(comp_id)%status == PSMILe_status_free) then
00093 print *, trim(ch_id), 'prism_abort : comp_id (not active)'
00094 comp_id = PRISM_UNDEFINED
00095 endif
00096
00097 endif
00098
00099 print *
00100 print *, '********************************************************'
00101 print *, ' Trying to abort the coupled application '
00102 print *, '********************************************************'
00103 print *
00104 print *, ' prism_abort called from routine ', trim(file)
00105
00106 if ( comp_id == PRISM_UNDEFINED ) then
00107 print *, ' from unkown component (odd comp_id for prism_abort)'
00108 else
00109 print *, ' in component ', trim(Comps(comp_id)%comp_name)
00110 endif
00111
00112 print *
00113 print *, trim(mesg)
00114 print *
00115 print *, ' Name of aborting application is ', trim(Appl%name)
00116 print *, ' Rank within global set is ', global_rank
00117 print *, ' Rank within application is ', Appl%rank
00118 print *, ' Rank within component is ', Comps(comp_id)%rank
00119 print *, '********************************************************'
00120
00121
00122
00123 call psmile_flushstd
00124
00125
00126
00127
00128
00129
00130 end subroutine prism_abort