Project

General

Profile

Computing Element Name

Added by Scardaci Diego over 13 years ago

Dear All,
can I get the name of the CE where the job is running after the submission via JSAGA API?

Cheers,
Diego


Replies (22)

RE: Computing Element Name - Added by Reynaud Sylvain over 13 years ago

Hi Diego,

Yes, you can get the name of the CE with job.getVectorAttribute(Job.EXECUTIONHOSTS).

This is currently only supported by the following adaptors:
  • arex
  • batchssh
  • local
  • wms

Cheers,
Sylvain

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Dear Sylvain,
I tried to get the CE with job.getVectorAttribute(Job.EXECUTIONHOSTS) using the following code (executed after the job submission):

String jobId = job.getAttribute(Job.JOBID);
System.out.println(jobId);

String executionHosts[];
try {
executionHosts = job.getVectorAttribute(Job.EXECUTIONHOSTS);
} catch (IncorrectStateException e) {
executionHosts = new String[]{"[not initialized yet]"};
} catch (NotImplementedException e) {
executionHosts = new String[]{"[not supported for this backend]"};
}
System.out.println("executionHosts.length="+executionHosts.length);
for (int i=0;i<executionHosts.length;i++)
System.out.println("executionHosts="+executionHosts[i]);

but I obtained the following output:

[wms://egee-wms-01.cnaf.infn.it:7443/glite_wms_wmproxy_server]-[https://albalonga.cnaf.infn.it:9000/dgQ3InIlcxN6PgUplX6b5w]
executionHosts.length=1
executionHosts=null

Then I got the job ID but not the CE (I got a string containing "null").

Cheers,
Diego

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

I forgot to say I'm using the WMS adaptor.

Cheers,
Diego

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

Hi Diego,
In which state is your job when your application retrieves the execution hosts? If it is just after the submission, it is possible that the CE is not yet available.
From what I can read in the adaptor code comments, the job is assigned to a computing element at the state 'READY'. Before that ('SUBMITTED', 'WAITING'), the CE name is not available yet.
I checked that this works fine after the job completion.

Regards
Lionel

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Hi Lionel,
thanks for your answer.

Waiting a while I can successfully obtain the CE name!

I got:
gt2 gridce1.pi.infn.it:2119/jobmanager-lcglsf

Is the prefix "gt2" a constant value? Can I strip this prefix considering it as a constant String? Or can I look for the first blank in the String to identify the CE name starting character?

Regards,
Diego

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

I have no idea. When I tried on the same WMS, I only got the name of the CE. I would advise you to not consider 'gt2' as a constant. You should try to split the answer if it contains a blank.

Lionel

RE: Computing Element Name - Added by Reynaud Sylvain over 13 years ago

Hi Diego,

I also don't know, but 'gt2' makes me think to "Globus Toolkit 2", which is the base middleware component of the LCG-CE that is now deprecated, so this prefix should disapear in the future...

Cheers,
Sylvain

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Hi Lionel and Sylvain,
I executed another test submitting 2 jobs and I got the following strings:

- Job 1
executionHosts=gt2 gridce1.pi.infn.it:2119/jobmanager-lcglsf

- Job 2
executionHosts=wn04.cnaf.infn.it

How you can see the first one is a CE (an old lcg-ce as suggest by you) but the other is a WN! Not a CE! Do you know the reason of this difference?

Cheers,
Diego

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

Diego,
The JSAGA WMS adaptor calls the WMS API method called 'getCENode()' so JSAGA should indeed get the name of the CE and not the name of the WN.
We have no more information about how this method works, though it may be possible that the value depends on the job state. Maybe in your case, Job1 was in READY state (just assigned to a CE) and JoB2 was finished (assigned to a WN). It is just a guess but you can easily test this by submitting a job and getting the CE node when the job is READY and when the job is DONE.

Please let us know about your results.
Regards,
Lionel

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

Hi Diego,
I have some news for, unfortunately some bad news. I have done some more debugging on WMS and I found that:

- the CE name retrived by the WMS API is different from null only after the job has entered the RUNNING state
- for the same state, it can be either the name of the CE node or the name of a worker node. We suspect this to be a configuration issue on CE sides.

So you should try to get the CE name only after the job is running and you will get sometimes the CE sometimes the WN.

Please let me know if you find another conclusion.

Lionel

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Hi Lionel,
thanks for your help.

I found the same conclusion:
- The execution host is available when the job is running;
- sometimes I got a CE and sometimes a WN.

The first one is not a problem for me but the second yes...

For the application we are developing is important to retrieve the CE name because we have to create some maps according where the job is running.

Do you think we could find some workaround to fix this problem?

Cheers,
Diego

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Hi Lionel and Sylvain,
any news about this topic?

Cheers,
Diego

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

Hi Diego,
I am investigating right now if there is another way to get this information in the WMS API. I let you know asap.
Lionel

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Thanks a lot Lionel!

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

Diego, I have good news for you. I found out that the appropriate method in the WMS API is getDestination() and not getCeNode(). The name of the CE is now available as soon as the job is READY.

Moreover, to keep the WMS adaptor consistent with other adaptors (and with the SAGA API), the array that you will get with job.getVectorAttribute(Job.EXECUTIONHOSTS) will also contain the name of the WN, if available. The name of the WN is available as soon as the job is RUNNING and in case of a CREAM CE only.

So to make it short:
- before job is READY: job.getVectorAttribute(Job.EXECUTIONHOSTS) is null
- after job is READY: job.getVectorAttribute(Job.EXECUTIONHOSTS)[0] contains the CE name
- after job is RUNNING on LCGCE: job.getVectorAttribute(Job.EXECUTIONHOSTS)[0] contains the CE name
- after job is RUNNING on CREAM: job.getVectorAttribute(Job.EXECUTIONHOSTS)[0] contains the CE name and job.getVectorAttribute(Job.EXECUTIONHOSTS)[1] contains the WN node

Hope this is clear for you.

This fix will be available in the next snapshot (or in git if you use it)

Regards
Lionel

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Great Lionel!

When do you think the next snapshot will be available?

Thanks again.

Regards,
Diego

RE: Computing Element Name - Added by Schwarz Lionel over 13 years ago

It is not scheduled yet. Not before we get back from holidays, beginning of next year. Do you need this before ?

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Beginning of the next year is ok with me.

Thanks again and Merry Christmas :)

Cheers,
Diego

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Hi Lionel and Sylvain,
have you just planned the release of next snapshot containing the new way to get the CE name?

Thanks in advance and Happy New Year!

Cheers,
Diego

RE: Computing Element Name - Added by Reynaud Sylvain over 13 years ago

Hi Diego and Happy New Year !

The new snapshot is now available :
http://grid.in2p3.fr/software/jsaga-dev/download.html

Cheers,
Sylvain

RE: Computing Element Name - Added by Scardaci Diego over 13 years ago

Thanks a lot Sylvain!

Cheers,
Diego

    (1-22/22)