Package org.apache.airavata.schemas.gfac

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


public class UASDataStagingProcessor {
 
  public static void generateDataStagingElements(JobDefinitionType value, JobExecutionContext context, String smsUrl) throws Exception{
   
    HpcApplicationDeploymentType appDepType = (HpcApplicationDeploymentType) context
        .getApplicationContext().getApplicationDeploymentDescription()
        .getType();
   
    smsUrl = "BFT:"+smsUrl;
      
View Full Code Here


 
 
  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("MPIRemote");
    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(1);
    appDepType.setProcessorsPerNode(1);

    /*
     * Use bat file if it is compiled on Windows
     */
    appDepType.setExecutableLocation("/home/bes/mpiexamples/a.out");
   
//    appDepType.setExecutableLocation("/lustre/jhome11/zam/m.memon/mpiexamples");
   
   
   
    ExtendedKeyValueType extKV = appDepType.addNewKeyValuePairs();
    // using jsdl spmd standard
    extKV.setName("NumberOfProcesses");
    // this will be transformed into mpiexec -n 4
    extKV.setStringValue("1");
   
    /*
     * Default tmp location
     */
    String date = (new Date()).toString();
    date = date.replaceAll(" ", "_");
    date = date.replaceAll(":", "_");

    String remoteTempDir = scratchDir + File.separator + "SimpleEcho" + "_" + 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()+"/jsdl_stdout");
   
    appDepType.setStandardError(appDepType.getOutputDataDirectory()+"/jsdl_stderr");

    return appDesc;
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.HpcApplicationDeploymentType

Copyright © 2018 www.massapicom. 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.