@@ -123,9 +123,10 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
123123 size_t ninfo = 0 ;
124124 pmix_dmdx_local_t * lcd ;
125125 bool local ;
126+ bool localonly = false;
126127 pmix_buffer_t pbkt ;
127128 char * data ;
128- size_t sz ;
129+ size_t sz , n ;
129130
130131 pmix_output_verbose (2 , pmix_globals .debug_output ,
131132 "recvd GET" );
@@ -162,6 +163,17 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
162163 }
163164 }
164165
166+ /* search for directives we can deal with here */
167+ for (n = 0 ; n < ninfo ; n ++ ) {
168+ if (0 == strcmp (info [n ].key , PMIX_TIMEOUT )) {
169+ if (0 == info [n ].value .data .integer ) {
170+ /* just check our own data - don't wait
171+ * or request it from someone else */
172+ localonly = true;
173+ }
174+ }
175+ }
176+
165177 /* find the nspace object for this client */
166178 nptr = NULL ;
167179 PMIX_LIST_FOREACH (ns , & pmix_globals .nspaces , pmix_nspace_t ) {
@@ -179,6 +191,9 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
179191 cd -> peer -> info -> rank );
180192
181193 if (NULL == nptr || NULL == nptr -> server ) {
194+ if (localonly ) {
195+ return PMIX_ERR_NOT_FOUND ;
196+ }
182197 /* this is for an nspace we don't know about yet, so
183198 * record the request for data from this process and
184199 * give the host server a chance to tell us about it */
@@ -208,6 +223,9 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
208223 * we do know how many clients to expect, so first check to see if
209224 * all clients have been registered with us */
210225 if (!nptr -> server -> all_registered ) {
226+ if (localonly ) {
227+ return PMIX_ERR_NOT_FOUND ;
228+ }
211229 /* we cannot do anything further, so just track this request
212230 * for now */
213231 rc = create_local_tracker (nspace , rank , info , ninfo ,
@@ -223,8 +241,13 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
223241 return rc ;
224242 }
225243
226- /* If we get here, then we don't have the data at this time. Check
227- * to see if we already have a pending request for the data - if
244+ /* If we get here, then we don't have the data at this time. If
245+ * the user doesn't want to look for it, then we are done */
246+ if (localonly ) {
247+ return PMIX_ERR_NOT_FOUND ;
248+ }
249+
250+ /* Check to see if we already have a pending request for the data - if
228251 * we do, then we can just wait for it to arrive */
229252 rc = create_local_tracker (nspace , rank , info , ninfo ,
230253 cbfunc , cbdata , & lcd );
0 commit comments