void GridApplicInterface::
derived_map(const Variables& vars, const ActiveSet& set, Response& response,
	    int fn_eval_id)
{
  //
  // Launch the grid solver (asynchronously)
  //
  ParamResponsePair prp(vars, interfaceId, response, fn_eval_id);
  derived_map_asynch(prp);
  //
  // Call wait_local_evaluations() until our id is in the set
  //
  PRPQueue prp_queue;
  prp_queue.push_back(prp);
  if (!completionSet.empty()) {
    Cerr << "derived_map - should start with an empty completion set\n";
    abort_handler(-1);
  }
  wait_local_evaluations(prp_queue); // rebuilds completionSet
  response = prp_queue.front().prp_response();
  completionSet.clear();
#if 0
  //
  // Read the params file and handle exceptions
  //
  try {
    if (evalCommRank == 0)
      read_results_files(response, fn_eval_id);
  }
  catch(String& err_msg) {
    // a String exception involves detection of an incomplete file/data
    // set.  In the synchronous case, there is no potential for an incomplete
    // file resulting from a race condition -> echo the error and abort.
    Cerr << err_msg << std::endl;
    abort_handler(-1);
  }
  catch(int fail_code) {
    // The approach here is to have catch(int) rethrow the exception to an 
    // outer catch (either the catch within manage_failure or a catch that 
    // calls manage_failure).
    throw;
  }
#endif
}
 void test_local_evaluations(Dakota::PRPQueue& prp_queue) { 
   wait_local_evaluations(prp_queue); 
 }