jobAttr.setNumProcs(app.getCpuCount()); if (app.getProjectAccount().getProjectAccountNumber() != null) { log.info("Setting project to " + app.getProjectAccount().getProjectAccountNumber()); jobAttr.setProject(app.getProjectAccount().getProjectAccountNumber());
/** * Sets the "projectAccount" element */ public void setProjectAccount(org.apache.airavata.schemas.gfac.ProjectAccountType projectAccount) { synchronized (monitor()) { check_orphaned(); org.apache.airavata.schemas.gfac.ProjectAccountType target = null; target = (org.apache.airavata.schemas.gfac.ProjectAccountType)get_store().find_element_user(PROJECTACCOUNT$2, 0); if (target == null) { target = (org.apache.airavata.schemas.gfac.ProjectAccountType)get_store().add_element_user(PROJECTACCOUNT$2); } target.set(projectAccount); } }
public static ApplicationDescription registerApplication(String appName, String exeuctableLocation, String scratchWorkingDirectory, String hostName, String projAccNumber, String queueName, String cpuCount, String nodeCount, String maxMemory) throws Exception { // Create Application Description ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type); HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType(); app.setCpuCount(Integer.parseInt(cpuCount)); app.setNodeCount(Integer.parseInt(nodeCount)); ApplicationDeploymentDescriptionType.ApplicationName name = appDesc.getType().addNewApplicationName(); name.setStringValue(appName); app.setExecutableLocation(exeuctableLocation); app.setScratchWorkingDirectory(scratchWorkingDirectory); ProjectAccountType projectAccountType = ((HpcApplicationDeploymentType) appDesc.getType()).addNewProjectAccount(); projectAccountType.setProjectAccountNumber(projAccNumber); QueueType queueType = app.addNewQueue(); queueType.setQueueName(queueName); app.setMaxMemory(Integer.parseInt(maxMemory)); return appDesc; }
if (gramApplicationDeploymentType.getProjectAccount().getProjectAccountNumber() != null){ applicationDescriptor.setProjectNumber(gramApplicationDeploymentType.getProjectAccount().getProjectAccountNumber()); if (gramApplicationDeploymentType.getProjectAccount().getProjectAccountDescription() != null){ applicationDescriptor.setProjectDescription(gramApplicationDeploymentType.getProjectAccount().getProjectAccountDescription());
projectAccountType.setProjectAccountNumber(applicationDescriptor.getProjectNumber()); projectAccountType.setProjectAccountDescription(applicationDescriptor.getProjectDescription());
if (app.getProjectAccount().getProjectAccountNumber() != null) { log.debug("Setting project to " + app.getProjectAccount().getProjectAccountNumber()); jobAttr.setProject(app.getProjectAccount().getProjectAccountNumber());