[Saga-devel] Context question

Hartmut Kaiser hkaiser at cct.lsu.edu
Tue Jan 27 10:55:17 CST 2009


> >> Further to your email from last week one further question.  If I
> needed
> >> vector attributes on my context (which I do) how would stage 4 below
> >> work?  I presume that vector attributes are allowed.
> >
> >Ohh well. I didn't even think about that yet. So it's currently not
> >supported. But I think it should be easy enough to add. What's your
> timeline
> >on this?
> >
> >Regards Hartmut
> >
> Hi Hartmut,
> 
> The obvious answer is as soon as possible as this is rather integral to
> our service discovery design!
> We could use many named atrributes, i.e VO_COUNT and VO1, VO2, VO3,
> ..., VOCOUNT but that's not nice.
> 
> On a related topic, I've spent this afternoon trying to get my context
> working but to no avail.
> Now I'm pretty sure that I've followed your instructions to the letter,
> having basically copied what default advert adaptor does.
> 
> My test harness reads
> 
> int main(int argc, char** argv)
> {
>    saga::context ctx("glite_sd_adaptor");
> 
>    ctx.set_attribute("Identity", "bob");
>    ctx.set_attribute("VOs", "PAUL VO");
>    ctx.set_attribute("FQANs", "PAUL FQAN");
>    saga::session s;
>    s.add_context(ctx);
>    saga::sd::discoverer sd(s);
>    return 0;
> }
> 
> but it dies after line 1 with the following
> 
> terminate called after throwing an instance of 'saga::bad_parameter'
>   what():  SAGA(BadParameter):
>   SAGA(BadParameter): default_cpr: Can't handle context types others
> than 'UserPass'
>   SAGA(BadParameter): omii_gridsam_job: Can't handle context types
> others than 'omii_gridsam' (got: glite_sd_adaptor)
>   SAGA(NoAdaptor): No adaptor succeeded in executing constructor for
> context_cpi
> 
> I've obviously missed something but I'm not sure what.  It looks like
> my context CPI is not being considered.  Is there something else I need
> to do?

I probably forgot to mention that you need to register your new CPI just as
you registered all the other CPI's before. 
Did you add a

    context_cpi_impl::register_cpi(list, prefs, adaptor_uuid_);

to your adaptor constructor (see default_advert_adaptor.cpp:37)?

Regards Hartmut





More information about the saga-devel mailing list