psmile_enddef_action_loc.F90
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 subroutine psmile_enddef_action_loc (msg_locations, ierror)
00013
00014
00015
00016 use PRISM_constants
00017
00018 use PSMILe, dummy_interface => PSMILe_Enddef_action_loc
00019
00020 implicit none
00021
00022
00023
00024 Type (enddef_msg_locations), Intent (In) :: msg_locations
00025
00026
00027
00028
00029
00030
00031 Integer, Intent (Out) :: ierror
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 Integer, parameter :: nerrp = 1
00042 Integer :: ierrp (nerrp)
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 Character(len=len_cvs_string), save :: mycvs =
00065 '$Id: psmile_enddef_action_loc.F90 2804 2010-12-07 10:07:10Z hanke $'
00066
00067
00068
00069
00070
00071 #ifdef VERBOSE
00072 print 9990, trim(ch_id), msg_locations%src_rank
00073
00074 call psmile_flushstd
00075 #endif /* VERBOSE */
00076
00077 call psmile_get_locations_3d (msg_locations, ierror)
00078 if (ierror > 0) return
00079
00080
00081
00082 if (msg_locations%further_msg_flag == 1) then
00083
00084
00085
00086
00087
00088 if (paction%n_answer >= paction%n_answer2recv) then
00089
00090
00091
00092 #ifdef PRISM_ASSERTION
00093 if (paction%lrequest(1) /= MPI_REQUEST_NULL) then
00094 call psmile_assert ( __FILE__, __LINE__, &
00095 'paction%lrequest(1) is not finished !')
00096 endif
00097 #endif
00098
00099 call MPI_Irecv (paction%msgreq, nd_msgint, MPI_INTEGER, &
00100 MPI_ANY_SOURCE, reqtag, comm_psmile, &
00101 paction%lrequest(1), ierror)
00102 if ( ierror /= MPI_SUCCESS ) then
00103 ierrp (1) = ierror
00104 ierror = PRISM_Error_MPI
00105
00106 call psmile_error ( ierror, 'MPI_Irecv', &
00107 ierrp, 1, __FILE__, __LINE__ )
00108 return
00109 endif
00110
00111 endif
00112
00113 paction%n_answer = paction%n_answer - 1
00114
00115 else
00116
00117
00118
00119
00120 paction%nloc_recv = paction%nloc_recv + 1
00121
00122 endif
00123
00124
00125
00126 #ifdef VERBOSE
00127 print 9980, trim(ch_id), ierror
00128
00129 call psmile_flushstd
00130 #endif /* VERBOSE */
00131
00132
00133
00134
00135 #ifdef VERBOSE
00136
00137 9990 format (1x, a, ': psmile_enddef_action_loc: sender ', i6)
00138 9980 format (1x, a, ': psmile_enddef_action_loc: eof ierror =', i3)
00139
00140 #endif /* VERBOSE */
00141
00142 end subroutine PSMILe_Enddef_action_loc