Search in sources :

Example 6 with MethodImplementation

use of es.bsc.compss.types.implementations.MethodImplementation in project compss by bsc-wdc.

the class Test method cloudManagerTest.

/*
     * *********************************** CLOUD MANAGER TEST IMPLEMENTATION ***********************************
     */
private static void cloudManagerTest() {
    // Print Out CloudManager static structures
    System.out.println("[LOG] CloudManager Static Structures definition");
    // Check for each implementation the correctness of its resources
    coreCount = CoreManager.getCoreCount();
    CloudProvider cp = ResourceManager.getCloudProvider("BSC");
    for (int coreId = 0; coreId < coreCount; coreId++) {
        System.out.println("[LOG] Checking Core" + coreId);
        for (Implementation impl : CoreManager.getCoreImplementations(coreId)) {
            if (impl.getTaskType().equals(TaskType.METHOD)) {
                System.out.println("[LOG]\t Checking Implementation: " + impl.getImplementationId());
                System.out.println("\t\t Checking obtained compatible cloud images");
                MethodImplementation mImpl = (MethodImplementation) impl;
                for (CloudImageDescription cid_gci : cp.getCompatibleImages(mImpl.getRequirements())) {
                    System.out.println("\t\t\t Checking compatible Image: " + cid_gci.getImageName());
                    String res = checkImplementationAssignedToCloudImage(mImpl.getRequirements(), cid_gci);
                    if (res != null) {
                        String error = "[ERROR] Implementation: Core = " + coreId + " Impl = " + impl.getImplementationId() + ". ";
                        error = error.concat("Implementation and cloud image not matching on: " + res);
                        System.out.println(error);
                        System.exit(-1);
                    }
                }
                System.out.println("\t\t Checking obtained compatible cloud types");
                for (CloudInstanceTypeDescription type : cp.getCompatibleTypes(new CloudMethodResourceDescription(mImpl.getRequirements()))) {
                    if (type.getResourceDescription().canHostSimultaneously(mImpl.getRequirements()) < 1) {
                        continue;
                    }
                    System.out.println("\t\t\t Checking compatible Type: " + type.getName());
                    String res = checkImplementationAssignedToType(mImpl.getRequirements(), type.getResourceDescription());
                    if (res != null) {
                        String error = "[ERROR] Implementation: Core = " + coreId + " Impl = " + impl.getImplementationId() + ". ";
                        error = error.concat("Implementation and type not matching on: " + res);
                        System.out.println(error);
                        System.exit(-1);
                    }
                }
            }
        }
    }
    // Return success value
    System.out.println("[LOG] * CloudManager test passed");
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) CloudProvider(es.bsc.compss.types.CloudProvider) CloudImageDescription(es.bsc.compss.types.resources.description.CloudImageDescription) CloudInstanceTypeDescription(es.bsc.compss.types.resources.description.CloudInstanceTypeDescription) CloudMethodResourceDescription(es.bsc.compss.types.resources.description.CloudMethodResourceDescription) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Implementation(es.bsc.compss.types.implementations.Implementation)

Example 7 with MethodImplementation

use of es.bsc.compss.types.implementations.MethodImplementation in project compss by bsc-wdc.

the class Test method checkCoreElementConstraints.

private static void checkCoreElementConstraints(int coreId) {
    System.out.println("[LOG] Checking " + coreToName[coreId]);
    System.out.println("[LOG] \t Has " + declaringClassesItf[coreId].length + " declaring classes in the CEI");
    System.out.println("[LOG] \t Has " + idToSignatures[coreId].size() + " signatures registered");
    // Signatures store one dummy extra signature
    if (declaringClassesItf[coreId].length + 1 != idToSignatures[coreId].size()) {
        System.out.println(coreToName[coreId] + " has " + idToSignatures[coreId].size() + " registered signatures and there are " + declaringClassesItf[coreId].length + " declaringClasses in the CEI");
        System.exit(-1);
    }
    List<Implementation> implementations = CoreManager.getCoreImplementations(coreId);
    System.out.println("[LOG] \t Has " + implementations.size() + " implementations registered");
    if (declaringClassesItf[coreId].length != implementations.size()) {
        System.out.println(coreToName[coreId] + " has " + implementations.size() + " registered implementations and there are " + declaringClassesItf[coreId].length + " declaringClasses in the CEI");
        System.exit(-1);
    }
    // Check all constraints
    for (int implId = 0; implId < declaringClassesItf[coreId].length; implId++) {
        MethodImplementation m = ((MethodImplementation) implementations.get(implId));
        System.out.println("[LOG] \t" + declaringClassesItf[coreId][implId]);
        if (declaringClassesItf[coreId][implId].compareTo(m.getDeclaringClass()) != 0) {
            System.out.println(coreToName[coreId] + "'s declaringClass " + declaringClassesItf[coreId][implId] + " is not included registered in the system");
            System.exit(-1);
        }
        String constraint = checkConstraints(generalConstraintsItf[coreId], constraintsItf[coreId][implId], m.getRequirements());
        if (constraint != null) {
            System.out.println("Constraints for " + coreToName[coreId] + "'s declaringClass " + declaringClassesItf[coreId][implId] + " does not meet the annotations (" + constraint + ")");
            System.exit(-1);
        }
    }
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Implementation(es.bsc.compss.types.implementations.Implementation)

Example 8 with MethodImplementation

use of es.bsc.compss.types.implementations.MethodImplementation in project compss by bsc-wdc.

the class ITFParser method checkDefinedImplementations.

/**
 * Check all the defined implementations of the same method
 *
 * @param m
 * @param methodId
 * @param calleeMethodSignature
 * @param hasStreams
 * @param implementations
 * @param signatures
 */
private static void checkDefinedImplementations(java.lang.reflect.Method m, Integer methodId, StringBuilder calleeMethodSignature, boolean hasStreams, boolean hasPrefixes, List<Implementation> implementations, List<String> signatures) {
    /*
         * Global constraints of the method
         */
    MethodResourceDescription defaultConstraints = MethodResourceDescription.EMPTY_FOR_CONSTRAINTS.copy();
    if (m.isAnnotationPresent(Constraints.class)) {
        defaultConstraints = new MethodResourceDescription(m.getAnnotation(Constraints.class));
    }
    /*
         * Check all annotations present at the method for versioning
         */
    String methodName = m.getName();
    int implId = 0;
    /*
         * METHOD
         */
    for (Method methodAnnot : m.getAnnotationsByType(Method.class)) {
        LOGGER.debug("   * Processing @Method annotation");
        // Warning for ignoring streams
        if (hasStreams) {
            ErrorManager.warn("Java method " + methodName + " does not support stream annotations. SKIPPING stream annotation");
        }
        // Warning for ignoring prefixes
        if (hasPrefixes) {
            ErrorManager.warn("Java method " + methodName + " does not support prefix annotations. SKIPPING prefix annotation");
        }
        String declaringClass = methodAnnot.declaringClass();
        String methodSignature = calleeMethodSignature.toString() + declaringClass;
        signatures.add(methodSignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (methodAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(methodAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new MethodImplementation(declaringClass, methodName, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
    /*
         * SERVICE
         */
    for (Service serviceAnnot : m.getAnnotationsByType(Service.class)) {
        // Services don't have constraints
        LOGGER.debug("   * Processing @Service annotation");
        // Warning for ignoring streams
        if (hasStreams) {
            ErrorManager.warn("Java service " + methodName + " does not support stream annotations. SKIPPING stream annotation");
        }
        calleeMethodSignature.append(serviceAnnot.namespace()).append(',');
        calleeMethodSignature.append(serviceAnnot.name()).append(',');
        calleeMethodSignature.append(serviceAnnot.port());
        String serviceSignature = calleeMethodSignature.toString();
        signatures.add(serviceSignature);
        // Register service implementation
        Implementation impl = new ServiceImplementation(methodId, serviceAnnot.namespace(), serviceAnnot.name(), serviceAnnot.port(), serviceAnnot.operation());
        ++implId;
        implementations.add(impl);
    }
    /*
         * MPI
         */
    for (MPI mpiAnnot : m.getAnnotationsByType(MPI.class)) {
        LOGGER.debug("   * Processing @MPI annotation");
        String binary = EnvironmentLoader.loadFromEnvironment(mpiAnnot.binary());
        String workingDir = EnvironmentLoader.loadFromEnvironment(mpiAnnot.workingDir());
        String mpiRunner = EnvironmentLoader.loadFromEnvironment(mpiAnnot.mpiRunner());
        if (mpiRunner == null || mpiRunner.isEmpty()) {
            ErrorManager.error("Empty mpiRunner annotation for method " + m.getName());
        }
        if (binary == null || binary.isEmpty()) {
            ErrorManager.error("Empty binary annotation for method " + m.getName());
        }
        LOGGER.debug("Binary: " + binary);
        LOGGER.debug("mpiRunner: " + mpiRunner);
        String mpiSignature = calleeMethodSignature.toString() + LoaderUtils.MPI_SIGNATURE;
        signatures.add(mpiSignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (mpiAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(mpiAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new MPIImplementation(binary, workingDir, mpiRunner, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
    /*
         * Decaf
         */
    for (Decaf decafAnnot : m.getAnnotationsByType(Decaf.class)) {
        LOGGER.debug("   * Processing @DECAF annotation");
        String dfScript = EnvironmentLoader.loadFromEnvironment(decafAnnot.dfScript());
        String dfExecutor = EnvironmentLoader.loadFromEnvironment(decafAnnot.dfExecutor());
        String dfLib = EnvironmentLoader.loadFromEnvironment(decafAnnot.dfLib());
        String workingDir = EnvironmentLoader.loadFromEnvironment(decafAnnot.workingDir());
        String mpiRunner = EnvironmentLoader.loadFromEnvironment(decafAnnot.mpiRunner());
        if (mpiRunner == null || mpiRunner.isEmpty()) {
            ErrorManager.error("Empty mpiRunner annotation for method " + m.getName());
        }
        if (dfScript == null || dfScript.isEmpty()) {
            ErrorManager.error("Empty binary annotation for method " + m.getName());
        }
        LOGGER.debug("DF Script: " + dfScript);
        LOGGER.debug("DF Executor: " + dfExecutor);
        LOGGER.debug("DF Lib: " + dfLib);
        LOGGER.debug("mpiRunner: " + mpiRunner);
        String mpiSignature = calleeMethodSignature.toString() + LoaderUtils.DECAF_SIGNATURE;
        signatures.add(mpiSignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (decafAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(decafAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new DecafImplementation(dfScript, dfExecutor, dfLib, workingDir, mpiRunner, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
    /*
         * OMPSS
         */
    for (OmpSs ompssAnnot : m.getAnnotationsByType(OmpSs.class)) {
        LOGGER.debug("   * Processing @OmpSs annotation");
        String binary = EnvironmentLoader.loadFromEnvironment(ompssAnnot.binary());
        String workingDir = EnvironmentLoader.loadFromEnvironment(ompssAnnot.workingDir());
        if (binary == null || binary.isEmpty()) {
            ErrorManager.error("Empty binary annotation for method " + m.getName());
        }
        String ompssSignature = calleeMethodSignature.toString() + LoaderUtils.OMPSS_SIGNATURE;
        signatures.add(ompssSignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (ompssAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(ompssAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new OmpSsImplementation(binary, workingDir, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
    /*
         * OPENCL
         */
    for (OpenCL openclAnnot : m.getAnnotationsByType(OpenCL.class)) {
        LOGGER.debug("   * Processing @OpenCL annotation");
        String kernel = EnvironmentLoader.loadFromEnvironment(openclAnnot.kernel());
        String workingDir = EnvironmentLoader.loadFromEnvironment(openclAnnot.workingDir());
        if (kernel == null || kernel.isEmpty()) {
            ErrorManager.error("Empty kernel annotation for method " + m.getName());
        }
        String openclSignature = calleeMethodSignature.toString() + LoaderUtils.OPENCL_SIGNATURE;
        signatures.add(openclSignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (openclAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(openclAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new OpenCLImplementation(kernel, workingDir, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
    /*
         * BINARY
         */
    for (Binary binaryAnnot : m.getAnnotationsByType(Binary.class)) {
        LOGGER.debug("   * Processing @Binary annotation");
        String binary = EnvironmentLoader.loadFromEnvironment(binaryAnnot.binary());
        String workingDir = EnvironmentLoader.loadFromEnvironment(binaryAnnot.workingDir());
        if (binary == null || binary.isEmpty()) {
            ErrorManager.error("Empty binary annotation for method " + m.getName());
        }
        String binarySignature = calleeMethodSignature.toString() + LoaderUtils.BINARY_SIGNATURE;
        signatures.add(binarySignature);
        // Load specific method constraints if present
        MethodResourceDescription implConstraints = defaultConstraints;
        if (binaryAnnot.constraints() != null) {
            implConstraints = new MethodResourceDescription(binaryAnnot.constraints());
            implConstraints.mergeMultiConstraints(defaultConstraints);
        }
        // Register method implementation
        Implementation impl = new BinaryImplementation(binary, workingDir, methodId, implId, implConstraints);
        ++implId;
        implementations.add(impl);
    }
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) MPIImplementation(es.bsc.compss.types.implementations.MPIImplementation) MPI(es.bsc.compss.types.annotations.task.MPI) Service(es.bsc.compss.types.annotations.task.Service) Decaf(es.bsc.compss.types.annotations.task.Decaf) Method(es.bsc.compss.types.annotations.task.Method) OpenCLImplementation(es.bsc.compss.types.implementations.OpenCLImplementation) Implementation(es.bsc.compss.types.implementations.Implementation) ServiceImplementation(es.bsc.compss.types.implementations.ServiceImplementation) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) BinaryImplementation(es.bsc.compss.types.implementations.BinaryImplementation) MPIImplementation(es.bsc.compss.types.implementations.MPIImplementation) OmpSsImplementation(es.bsc.compss.types.implementations.OmpSsImplementation) DecafImplementation(es.bsc.compss.types.implementations.DecafImplementation) OpenCLImplementation(es.bsc.compss.types.implementations.OpenCLImplementation) ServiceImplementation(es.bsc.compss.types.implementations.ServiceImplementation) DecafImplementation(es.bsc.compss.types.implementations.DecafImplementation) MethodResourceDescription(es.bsc.compss.types.resources.MethodResourceDescription) OpenCL(es.bsc.compss.types.annotations.task.OpenCL) Binary(es.bsc.compss.types.annotations.task.Binary) BinaryImplementation(es.bsc.compss.types.implementations.BinaryImplementation) OmpSs(es.bsc.compss.types.annotations.task.OmpSs) MultiOmpSs(es.bsc.compss.types.annotations.task.repeatables.MultiOmpSs) OmpSsImplementation(es.bsc.compss.types.implementations.OmpSsImplementation)

Example 9 with MethodImplementation

use of es.bsc.compss.types.implementations.MethodImplementation in project compss by bsc-wdc.

the class IDLParserTest method classIDLTest.

@Test
public void classIDLTest() {
    CoreManager.clear();
    String constraintsFile = this.getClass().getResource("class_test.idl").getPath();
    IDLParser.parseIDLMethods(constraintsFile);
    assertEquals(CoreManager.getCoreCount(), 3);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 0");
    List<Implementation> implList = CoreManager.getCoreImplementations(0);
    assertNotNull(implList);
    assertEquals(implList.size(), 1);
    MethodImplementation impl = (MethodImplementation) implList.get(0);
    LOGGER.debug(impl.getDeclaringClass());
    assertEquals(impl.getDeclaringClass(), "Block");
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 1");
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Implementation(es.bsc.compss.types.implementations.Implementation) Test(org.junit.Test)

Example 10 with MethodImplementation

use of es.bsc.compss.types.implementations.MethodImplementation in project compss by bsc-wdc.

the class IDLParserTest method loadIDLTest.

@Test
public void loadIDLTest() {
    CoreManager.clear();
    String constraintsFile = this.getClass().getResource("test.idl").getPath();
    IDLParser.parseIDLMethods(constraintsFile);
    assertEquals(CoreManager.getCoreCount(), CORECOUNT_RESULT);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 0");
    List<Implementation> implList = CoreManager.getCoreImplementations(0);
    assertNotNull(implList);
    MethodImplementation impl = (MethodImplementation) implList.get(0);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (1)");
    assertEquals(implList.size(), CORE0_2_3_4_5_IMPLS_RESULT);
    Processor p = impl.getRequirements().getProcessors().get(0);
    assertEquals(p.getComputingUnits(), COMPUTING_UNITS_RESULT);
    assertEquals(p.getArchitecture(), "x86_64");
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 1");
    implList = CoreManager.getCoreImplementations(1);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (3)");
    assertEquals(implList.size(), CORE1_6_IMPLS_RESULT);
    impl = (MethodImplementation) implList.get(0);
    assertEquals(impl.getRequirements().getMemorySize(), 2.0f, 0);
    assertEquals(impl.getRequirements().getStorageSize(), 10.0f, 0);
    impl = (MethodImplementation) implList.get(1);
    p = impl.getRequirements().getProcessors().get(0);
    assertEquals(p.getComputingUnits(), COMPUTING_UNITS_RESULT);
    assertEquals(impl.getRequirements().getMemorySize(), 4.0f, 0);
    impl = (MethodImplementation) implList.get(2);
    p = impl.getRequirements().getProcessors().get(0);
    assertEquals(p.getComputingUnits(), 1);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 2");
    implList = CoreManager.getCoreImplementations(2);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (1)");
    assertEquals(implList.size(), CORE0_2_3_4_5_IMPLS_RESULT);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 3");
    implList = CoreManager.getCoreImplementations(3);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (1)");
    assertEquals(implList.size(), CORE0_2_3_4_5_IMPLS_RESULT);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 4");
    implList = CoreManager.getCoreImplementations(4);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (1)");
    assertEquals(implList.size(), CORE0_2_3_4_5_IMPLS_RESULT);
    impl = (MethodImplementation) implList.get(0);
    LOGGER.debug("[IDL-Loader]: Checking Number of processors (2)");
    assertEquals(impl.getRequirements().getProcessors().size(), PROCESSOR_COUNT);
    Processor p1 = impl.getRequirements().getProcessors().get(0);
    Processor p2 = impl.getRequirements().getProcessors().get(1);
    LOGGER.debug("[IDL-Loader]: Checking Processor 1 parameters (4)");
    assertEquals(p1.getType(), "CPU");
    assertEquals(p1.getComputingUnits(), 2);
    assertEquals(p1.getArchitecture(), "x86_64");
    assertEquals(p1.getInternalMemory(), 0.6f, 0);
    LOGGER.debug("[IDL-Loader]: Checking Processor 2 parameters (4)");
    assertEquals(p2.getType(), "GPU");
    assertEquals(p2.getComputingUnits(), 256);
    assertEquals(p2.getArchitecture(), "k40");
    assertEquals(p2.getInternalMemory(), 0.024f, 0);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 5");
    implList = CoreManager.getCoreImplementations(5);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (1)");
    assertEquals(implList.size(), CORE0_2_3_4_5_IMPLS_RESULT);
    impl = (MethodImplementation) implList.get(0);
    LOGGER.debug("[IDL-Loader]: Checking Number of processors (1)");
    assertEquals(impl.getRequirements().getProcessors().size(), 1);
    p = impl.getRequirements().getProcessors().get(0);
    LOGGER.debug("[IDL-Loader]: Checking Processor parameters (2)");
    assertEquals(p.getType(), "CPU");
    assertEquals(p.getComputingUnits(), 2);
    LOGGER.debug("[IDL-Loader]: *** Checking Core Element 6");
    implList = CoreManager.getCoreImplementations(6);
    assertNotNull(implList);
    LOGGER.debug("[IDL-Loader]: Checking Number of implementations (3)");
    assertEquals(implList.size(), CORE1_6_IMPLS_RESULT);
    impl = (MethodImplementation) implList.get(0);
    LOGGER.debug("[IDL-Loader]: Checking Number of first implementation processors (1)");
    assertEquals(impl.getRequirements().getProcessors().size(), 1);
    p = impl.getRequirements().getProcessors().get(0);
    assertEquals(p.getType(), "CPU");
    assertEquals(p.getComputingUnits(), 4);
    impl = (MethodImplementation) implList.get(1);
    LOGGER.debug("[IDL-Loader]: Checking Number of second implementation processors (2)");
    assertEquals(impl.getRequirements().getProcessors().size(), PROCESSOR_COUNT);
    p1 = impl.getRequirements().getProcessors().get(0);
    p2 = impl.getRequirements().getProcessors().get(1);
    LOGGER.debug("[IDL-Loader]: Checking Processor 1 parameters (4)");
    assertEquals(p1.getType(), "CPU");
    assertEquals(p1.getComputingUnits(), 2);
    LOGGER.debug("[IDL-Loader]: Checking Processor 2 parameters (4)");
    assertEquals(p2.getType(), "CPU");
    assertEquals(p2.getComputingUnits(), 2);
    impl = (MethodImplementation) implList.get(2);
    LOGGER.debug("[IDL-Loader]: Checking Number of third implementation processors (2)");
    assertEquals(impl.getRequirements().getProcessors().size(), PROCESSOR_COUNT);
    p1 = impl.getRequirements().getProcessors().get(0);
    p2 = impl.getRequirements().getProcessors().get(1);
    LOGGER.debug("[IDL-Loader]: Checking Processor 1 parameters (4)");
    assertEquals(p1.getType(), "CPU");
    assertEquals(p1.getComputingUnits(), 1);
    LOGGER.debug("[IDL-Loader]: Checking Processor 2 parameters (4)");
    assertEquals(p2.getType(), "GPU");
    assertEquals(p2.getComputingUnits(), 1);
}
Also used : MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Processor(es.bsc.compss.types.resources.components.Processor) MethodImplementation(es.bsc.compss.types.implementations.MethodImplementation) Implementation(es.bsc.compss.types.implementations.Implementation) Test(org.junit.Test)

Aggregations

MethodImplementation (es.bsc.compss.types.implementations.MethodImplementation)16 Implementation (es.bsc.compss.types.implementations.Implementation)11 MethodResourceDescription (es.bsc.compss.types.resources.MethodResourceDescription)8 Processor (es.bsc.compss.types.resources.components.Processor)4 LinkedList (java.util.LinkedList)4 AbstractMethodImplementation (es.bsc.compss.types.implementations.AbstractMethodImplementation)3 BinaryImplementation (es.bsc.compss.types.implementations.BinaryImplementation)3 DecafImplementation (es.bsc.compss.types.implementations.DecafImplementation)3 MPIImplementation (es.bsc.compss.types.implementations.MPIImplementation)3 OmpSsImplementation (es.bsc.compss.types.implementations.OmpSsImplementation)3 OpenCLImplementation (es.bsc.compss.types.implementations.OpenCLImplementation)3 CloudMethodResourceDescription (es.bsc.compss.types.resources.description.CloudMethodResourceDescription)3 NIOParam (es.bsc.compss.nio.NIOParam)2 DataType (es.bsc.compss.types.annotations.parameter.DataType)2 ServiceImplementation (es.bsc.compss.types.implementations.ServiceImplementation)2 PriorityQueue (java.util.PriorityQueue)2 BeforeClass (org.junit.BeforeClass)2 Test (org.junit.Test)2 NIOTask (es.bsc.compss.nio.NIOTask)1 JobExecutionException (es.bsc.compss.nio.exceptions.JobExecutionException)1