prism_message.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 subroutine prism_message ( comp_id, string )
00014
00015
00016
00017 use PRISM, dummy_interface => prism_message
00018
00019 use PSMILe
00020
00021 implicit none
00022
00023
00024
00025 Integer, Intent(In) :: comp_id
00026 Character (len=*), Intent(In) :: string
00027
00028
00029
00030
00031
00032
00033 character(len=16) :: ch_rank
00034 integer :: ipos
00035 integer :: id
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 Character(len=len_cvs_string), save :: mycvs =
00054 '$Id: prism_message.F90 2325 2010-04-21 15:00:07Z valcke $'
00055
00056
00057
00058
00059
00060 call psmile_flushstd
00061
00062
00063
00064 if ( comp_id /= PRISM_UNDEFINED ) then
00065
00066 if (comp_id < 1 .or. &
00067 comp_id > Number_of_Comps_allocated) then
00068 print *, trim(ch_id), 'prism_message: comp_id (out of range)'
00069 id = PRISM_UNDEFINED
00070 endif
00071
00072 if (Comps(comp_id)%status == PSMILe_status_free) then
00073 print *, trim(ch_id), 'prism_message: comp_id (not active)'
00074 id = PRISM_UNDEFINED
00075 endif
00076
00077 endif
00078
00079
00080
00081
00082 call psmile_flushstd
00083
00084 ipos = 0
00085 call psmile_int2char ( Appl%rank, ch_rank, ipos)
00086
00087 if ( id == PRISM_UNDEFINED ) then
00088 write (*, 9990) ch_rank(1:ipos), 'UNKNOWN ', trim (string)
00089 else
00090 write (*, 9990) ch_rank(1:ipos), trim(Comps(comp_id)%comp_name), trim (string)
00091 endif
00092
00093 call psmile_flushstd
00094
00095 9990 format (1x, '[', a, '] PRISM message from component: ', a, &
00096 /1x, a)
00097
00098 end subroutine prism_message