Examples of HpcApplicationDeploymentType


Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

        /*
           Application descriptor creation and saving
        */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("TG-STA110014S");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.SERIAL);
        app.setNodeCount(1);
        app.setProcessorsPerNode(1);
        app.setMaxWallTime(10);
        /*
        * Use bat file if it is compiled on Windows
        */
        app.setExecutableLocation("/bin/echo");

        /*
        * Default tmp location
        */
        String tempDir = "/home1/01437/ogce";


        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/usr/bin/");

        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

        /*
           Application descriptor creation and saving
        */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("TG-STA110014S");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.SERIAL);
        app.setNodeCount(1);
        app.setProcessorsPerNode(1);
        app.setMaxWallTime(10);
        /*
        * Use bat file if it is compiled on Windows
        */
        app.setExecutableLocation("/bin/echo");

        /*
        * Default tmp location
        */
        String tempDir = "/home1/01437/ogce";


        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");

        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

    // Stampede
    /*
     * Application descriptor creation and saving
     */
    ApplicationDescription appDesc1 = new ApplicationDescription(HpcApplicationDeploymentType.type);
    HpcApplicationDeploymentType app1 = (HpcApplicationDeploymentType) appDesc1.getType();
    ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
    name.setStringValue(serviceName);
    app1.setApplicationName(name);
    ProjectAccountType projectAccountType = app1.addNewProjectAccount();
    projectAccountType.setProjectAccountNumber("TG-STA110014S");

    QueueType queueType = app1.addNewQueue();
    queueType.setQueueName("normal");

    app1.setCpuCount(1);
    app1.setJobType(JobTypeType.SERIAL);
    app1.setNodeCount(1);
    app1.setProcessorsPerNode(1);
    app1.setMaxWallTime(10);
    /*
     * Use bat file if it is compiled on Windows
     */
    app1.setExecutableLocation("/bin/echo");

    /*
     * Default tmp location
     */
    String tempDir = "/home1/01437/ogce";

    app1.setScratchWorkingDirectory(tempDir);
    app1.setInstalledParentPath("/usr/bin/");

    try {
      airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, stampedeHostAddress, appDesc1);
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace(); // To change body of catch statement use File |
                  // Settings | File Templates.
    }
    // Trestles
    /*
     * Application descriptor creation and saving
     */
    ApplicationDescription appDesc2 = new ApplicationDescription(HpcApplicationDeploymentType.type);
    HpcApplicationDeploymentType app2 = (HpcApplicationDeploymentType) appDesc2.getType();
    ApplicationDeploymentDescriptionType.ApplicationName name2 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
    name2.setStringValue(serviceName);
    app2.setApplicationName(name);
    ProjectAccountType projectAccountType2 = app2.addNewProjectAccount();
    projectAccountType2.setProjectAccountNumber("sds128");

    QueueType queueType2 = app2.addNewQueue();
    queueType2.setQueueName("normal");

    app2.setCpuCount(1);
    app2.setJobType(JobTypeType.SERIAL);
    app2.setNodeCount(1);
    app2.setProcessorsPerNode(1);
    app2.setMaxWallTime(10);
    /*
     * Use bat file if it is compiled on Windows
     */
    app2.setExecutableLocation("/bin/echo");

    /*
     * Default tmp location
     */
    String tempDir2 = "/home/ogce/scratch";

    app2.setScratchWorkingDirectory(tempDir2);
    app2.setInstalledParentPath("/opt/torque/bin/");

    try {
      airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc2);
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace(); // To change body of catch statement use File |
                  // Settings | File Templates.
    }
    // Lonestar
    /*
     * Application descriptor creation and saving
     */
    ApplicationDescription appDesc3 = new ApplicationDescription(HpcApplicationDeploymentType.type);
    HpcApplicationDeploymentType app3 = (HpcApplicationDeploymentType) appDesc3.getType();
    ApplicationDeploymentDescriptionType.ApplicationName name3 = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
    name3.setStringValue(serviceName);
    app3.setApplicationName(name);
    ProjectAccountType projectAccountType3 = app3.addNewProjectAccount();
    projectAccountType3.setProjectAccountNumber("TG-STA110014S");

    QueueType queueType3 = app3.addNewQueue();
    queueType3.setQueueName("normal");

    app3.setCpuCount(1);
    app3.setJobType(JobTypeType.SERIAL);
    app3.setNodeCount(1);
    app3.setProcessorsPerNode(1);
    app3.setMaxWallTime(10);
    /*
     * Use bat file if it is compiled on Windows
     */
    app3.setExecutableLocation("/bin/echo");

    /*
     * Default tmp location
     */
    String tempDir3 = "/home1/01437/ogce";

    app3.setScratchWorkingDirectory(tempDir3);
    app3.setInstalledParentPath("/opt/sge6.2/bin/lx24-amd64/");

    try {
      airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, lonestarHostAddress, appDesc3);
    } catch (AiravataAPIInvocationException e) {
      e.printStackTrace(); // To change body of catch statement use File |
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("uot111");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.SERIAL);
        app.setNodeCount(1);
        app.setProcessorsPerNode(1);
        app.setMaxWallTime(10);
        /*
           * Use bat file if it is compiled on Windows
           */
        app.setExecutableLocation("/bin/echo");

        /*
           * Default tmp location
           */
        String tempDir = "/oasis/projects/nsf/uot111/us3/airavata-workdirs/";

        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/opt/torque/bin/");

        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameTrestles, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("uot111");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.MPI);
        app.setNodeCount(32);
        app.setProcessorsPerNode(2);
        app.setMaxWallTime(10);
        /*
           * Use bat file if it is compiled on Windows
           */
        app.setExecutableLocation("/home/us3/trestles/bin/us_mpi_analysis");

        /*
           * Default tmp location
           */
        String tempDir = "/oasis/projects/nsf/uot111/us3/airavata-workdirs/";
        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/opt/torque/bin/");
        app.setJobSubmitterCommand("/opt/mvapich2/pgi/ib/bin/mpiexec");
        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameTrestles, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("TG-MCB070039N");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.MPI);
        app.setNodeCount(32);
        app.setProcessorsPerNode(2);
        app.setMaxWallTime(10);
        /*
           * Use bat file if it is compiled on Windows
           */
        app.setExecutableLocation("/home1/01623/us3/bin/us_mpi_analysis");

        /*
           * Default tmp location
           */
        String tempDir = "/home1/01623/us3";
        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/usr/bin/");
        app.setJobSubmitterCommand("/usr/local/bin/ibrun");
        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gsiSshHostNameStampede, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

 
 
  protected ApplicationDescription getApplicationDesc(JobTypeType jobType) {
    ApplicationDescription appDesc = new ApplicationDescription(
        HpcApplicationDeploymentType.type);
    HpcApplicationDeploymentType appDepType = (HpcApplicationDeploymentType) appDesc
        .getType();
    ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory
        .newInstance();
    name.setStringValue("US3-Job");
    appDepType.setApplicationName(name);

//    ProjectAccountType projectAccountType = appDepType.addNewProjectAccount();
//    projectAccountType.setProjectAccountNumber("TG-AST110064");

//    QueueType queueType = appDepType.addNewQueue();
//    queueType.setQueueName("development");

    // TODO: also handle parallel jobs
    if((jobType.enumValue() == JobTypeType.SERIAL) || (jobType.enumValue() == JobTypeType.SINGLE)) {
      appDepType.setJobType(JobTypeType.SERIAL);
    }
    else if (jobType.enumValue() == JobTypeType.MPI) {
      appDepType.setJobType(JobTypeType.MPI);
    }
    else {
      appDepType.setJobType(JobTypeType.OPEN_MP);
    }
   
    appDepType.setNodeCount(4);
    appDepType.setProcessorsPerNode(8);
   
    appDepType.setMaxWallTime(15);
   
    appDepType.setExecutableLocation("us_mpi_analysis");
   
    ExtendedKeyValueType extKV = appDepType.addNewKeyValuePairs();
    // using jsdl spmd standard
    extKV.setName("NumberOfProcesses");
    // this will be transformed into mpiexec -n 4
    extKV.setStringValue("32");
   
    /*
     * Default tmp location
     */
    String date = (new Date()).toString();
    date = date.replaceAll(" ", "_");
    date = date.replaceAll(":", "_");

    String remoteTempDir = scratchDir + File.separator + "US3" + "_" + date + "_"
        + UUID.randomUUID();

    System.out.println(remoteTempDir);
   
    // no need of these parameters, as unicore manages by itself
    appDepType.setScratchWorkingDirectory(remoteTempDir);
    appDepType.setStaticWorkingDirectory(remoteTempDir);
    appDepType.setInputDataDirectory(remoteTempDir + File.separator + "inputData");
    appDepType.setOutputDataDirectory(remoteTempDir + File.separator + "outputData");
   
    appDepType.setStandardOutput(appDepType.getOutputDataDirectory()+"/stdout");
   
    appDepType.setStandardError(appDepType.getOutputDataDirectory()+"/stderr");

    return appDesc;
  }
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
        log.info("Invoking GSISSH Provider Invoke ...");
        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
        HostDescriptionType host = jobExecutionContext.getApplicationContext().
                getHostDescription().getType();
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) jobExecutionContext.getApplicationContext().
                getApplicationDeploymentDescription().getType();
        try {
            Cluster cluster = null;
            if (jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT) != null) {
                cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getPbsCluster();
            } else {
                cluster = ((SSHSecurityContext) jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
            }
            if (cluster == null) {
                throw new GFacProviderException("Security context is not set properly");
            } else {
                log.info("Successfully retrieved the Security Context");
            }
            // This installed path is a mandetory field, because this could change based on the computing resource
            JobDescriptor jobDescriptor = new JobDescriptor();
            jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
            jobDescriptor.setShellName("/bin/bash");
            Random random = new Random();
            int i = random.nextInt();
            jobDescriptor.setJobName(app.getApplicationName().getStringValue() + String.valueOf(i));
            jobDescriptor.setExecutablePath(app.getExecutableLocation());
            jobDescriptor.setAllEnvExport(true);
            jobDescriptor.setMailOptions("n");
            jobDescriptor.setStandardOutFile(app.getStandardOutput());
            jobDescriptor.setStandardErrorFile(app.getStandardError());
            jobDescriptor.setNodes(app.getNodeCount());
            jobDescriptor.setProcessesPerNode(app.getProcessorsPerNode());
            jobDescriptor.setMaxWallTime(String.valueOf(app.getMaxWallTime()));
            jobDescriptor.setJobSubmitter(app.getJobSubmitterCommand());
            if (app.getProjectAccount().getProjectAccountNumber() != null) {
                jobDescriptor.setAcountString(app.getProjectAccount().getProjectAccountNumber());
            }
            if (app.getQueue().getQueueName() != null) {
                jobDescriptor.setQueueName(app.getQueue().getQueueName());
            }
            jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
            List<String> inputValues = new ArrayList<String>();
            MessageContext input = jobExecutionContext.getInMessageContext();
            Map<String, Object> inputs = input.getParameters();
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

 
 
  protected ApplicationDescription getApplicationDesc(JobTypeType jobType) {
    ApplicationDescription appDesc = new ApplicationDescription(
        HpcApplicationDeploymentType.type);
    HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc
        .getType();
    ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory
        .newInstance();
    name.setStringValue("CatRemote");
    app.setApplicationName(name);
    ProjectAccountType projectAccountType = app.addNewProjectAccount();
    projectAccountType.setProjectAccountNumber("TG-AST110064");

    app.setCpuCount(1);
    // TODO: also handle parallel jobs
    if((jobType.enumValue() == JobTypeType.SERIAL) || (jobType.enumValue() == JobTypeType.SINGLE)) {
      app.setJobType(JobTypeType.SERIAL);
    }
    else if (jobType.enumValue() == JobTypeType.MPI) {
      app.setJobType(JobTypeType.MPI);
    }
    else {
      app.setJobType(JobTypeType.OPEN_MP);
    }
   
    app.setNodeCount(1);
    app.setProcessorsPerNode(1);

    /*
     * Use bat file if it is compiled on Windows
     */
    app.setExecutableLocation("/bin/cat");
   

    /*
     * Default tmp location
     */
    String date = (new Date()).toString();
    date = date.replaceAll(" ", "_");
    date = date.replaceAll(":", "_");

    String remoteTempDir = scratchDir + File.separator + "SimpleCat" + "_" + date + "_"
        + UUID.randomUUID();

    System.out.println(remoteTempDir);
   
    // no need of these parameters, as unicore manages by itself
    app.setScratchWorkingDirectory(remoteTempDir);
    app.setStaticWorkingDirectory(remoteTempDir);
    app.setInputDataDirectory(remoteTempDir + File.separator + "inputData");
    app.setOutputDataDirectory(remoteTempDir + File.separator + "outputData");
   
    app.setStandardOutput(app.getOutputDataDirectory()+"/jsdl_stdout");
   
    app.setStandardError(app.getOutputDataDirectory()+"/jsdl_stderr");

    return appDesc;
  }
View Full Code Here

Examples of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

    JobDefinitionDocument jobDefDoc = JobDefinitionDocument.Factory
        .newInstance();
    JobDefinitionType value = jobDefDoc.addNewJobDefinition();

    HpcApplicationDeploymentType appDepType = (HpcApplicationDeploymentType) context
        .getApplicationContext().getApplicationDeploymentDescription()
        .getType();

    // build Identification
    createJobIdentification(value, appDepType);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.