Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adaptor exception not catched #1

Open
andre-merzky opened this issue Mar 6, 2012 · 0 comments
Open

adaptor exception not catched #1

andre-merzky opened this issue Mar 6, 2012 · 0 comments
Assignees

Comments

@andre-merzky
Copy link
Member

Could you tell me some clues to solve this issue? I tried to submmit a job to GRAM5 with SAGA 1.6 and the globus adaptor(1.0). The job submission stage seemed to be successful and I got the JobID, however, getting status was failed and finally the process was aborted. Please see the following VERVOSE=9 outputs.

--------------------------------------------------------
[ykawai@sg01 job]$ ./test
globus GRAM Adaptor: X.509 context found pointing to user proxy at /tmp/x509up_u40012
Globus Adaptors: Certificate seems to be present.
globus_loader: activate GRAM
globus_loader: activate FTP
globus_loader: activate RLS
globus_loader: activate GSI
globus_loader: activate GASS
call saga::job::job::run()
### GLOBUS GRAM2 ADAPTOR ### RSL: &(executable=/bin/hostname)
### GLOBUS GRAM2 ADAPTOR ### GRAM2 job submission successful: https://qb1.loni.org:50383/16217846432251050936/13773398289657397153/
jobID: https://qb1.loni.org:50383/16217846432251050936/13773398289657397153/ state: -1
check saga::job::job
[JobID]=https://qb1.loni.org:50383/16217846432251050936/13773398289657397153/
----------------------------------------
terminate called after throwing an instance of 'saga::no_success'
  what():  SAGA(NoSuccess):
  SAGA(NoSuccess): std::exception caught: N23globus_gram_job_adaptor9exceptionE
  SAGA(NoSuccess): default_job: posix_job.cpp(89): Could not initialize job for [gram://queenbee.loni-lsu.teragrid.org/jobmanager]. Only these schemas are supported: any://, fork://, none.
  SAGA(NoSuccess): proxy.cpp(247): No (other) adaptor implements job_cpi::get_state

Aborted
--------------------------------------------------------

That is saying the adaptor works for GRAM2?? I use GT5 client and submit to GRAM5 sites at LONI.I tried the globus commands to check the job status/results on the LONI server(qb1) as below. but globus-job-get-output returns "Invalid job id", that's strange.

--------------------------------------------------------
[ykawai@qb1 ~]$ globus-job-status https://qb1.loni.org:50383/16217846432251050936/13773398289657397153/
DONE
[ykawai@qb1 ~]$ globus-job-get-output https://qb1.loni.org:50383/16217846432251050936/13773398289657397153/
Invalid job id.
--------------------------------------------------------


The following is the c++ code I tried.

--------------------------------------------------------
#include <saga/saga.hpp>
#include <iostream>

namespace sja = saga::job::attributes;
namespace sjad = saga::job::attributes::detail;

int main(int argc, char* argv[])
{

  saga::url rm_url ("gram://queenbee.loni-lsu.teragrid.org/jobmanager");
  saga::job::service js(rm_url);

  saga::job::description* jd;
  jd = new saga::job::description();
  jd->set_attribute(sja::description_executable, "/bin/hostname");
  std::string std_out("stdout0306.txt");
  jd->set_attribute(sja::description_output, std_out);
  std::string std_err("stderr0306.txt");
  jd->set_attribute(sja::description_error, std_err);
  std::string path_str("tmp");
  jd->set_attribute(sja::description_working_directory, path_str);
  jd->set_attribute(sja::description_wall_time_limit, "300");
  std::vector <std::string> ostype;
  ostype.push_back (sjad::description_operating_system_linux);
  jd->set_vector_attribute(sja::description_operating_system_type, ostype);

  saga::job::job j = js.create_job(*jd);

  try {
    std::cout << "call saga::job::job::run()" << std::endl;
    j.run();
    std::cout << "check saga::job::job" << std::endl;
    std::cout << "[JobID]=" << j.get_job_id() << std::endl;
  } catch (saga::exception e) {
    std::cout << "!!! exception cought." << std::endl;
    std::cout << " [what]" << std::endl
          << e.what()  << std::endl;
    std::cout << "[error]=" << e.get_error() << std::endl;
    return 1;
  }

  std::cout << "----------------------------------------" << std::endl;
  saga::job::state state = j.get_state();
    while (state != saga::job::Done &&
       state != saga::job::Failed &&
       state != saga::job::Canceled) {
      std::cout << "[state]=" << saga::job::detail::get_state_name(state)
        << std::endl;
      sleep(3);
      state = j.get_state();
    }
  std::cout << "[state]=" << saga::job::detail::get_state_name(state) << std::endl;
  std::cout << "----------------------------------------" << std::endl;

  return 0;
}
--------------------------------------------------------
@ghost ghost assigned oweidner Mar 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants