예제 #1
0
           pf.failed("found empty library name  when trying to find good dynamic lib with findResourceByShortType")
       elif not libname.endswith("|libmpi.so"):
           pf.failed("found wrong library trying to find good dynamic lib with findResourceByShortType")
       else:
           pf.passed("found libmpi.so with findResourceByShortType")

    try:
       # try finding a resource with findResourceByType 
        ri = ResourceIndex()
        build = Resource("mybuild","build")
        env = Resource("myenv", "environment")
        lib = Resource(env.name+"|libmpi.so","environment|module")
        ri.addResource(lib)
        execution = Execution("myexec")
        ri.addResources([build,env])
        resList = ri.findResourcesByType("environment|module")
        libname = ""
        for r in resList:
            if r.name.find("libmpi") >= 0:
                libname = r.name
                break
    except PTexception, a:
       pf.failed("PTexception raised when trying to find good dynamic lib with findResourceByType: " + a.value)
    except:
       pf.failed("non-PTexception raised when trying to find good dynamic lib with findResourceByType")
       raise
    else:
       if libname == "":
           pf.failed("found empty library name  when trying to find good dynamic lib with findResourceByType")
       elif not libname.endswith("|libmpi.so"):
           pf.failed("found wrong library trying to find good dynamic lib with findResourceByType")
예제 #2
0
        concurrency = e['concurrency']
        if (concurrency.find("PTHREADS") >= 0) or \
           (concurrency.find("OPENMP") >= 0):
           threaded = True
        else:
           threaded = False
 
        buildFile = eInfo.dataDir + "/" + execName + ".bld"
        # creates build and execution resources
        Build.getBuildInfo(resIdx, buildFile, execName, ptds)
 
        runFile = eInfo.dataDir + "/" + execName + ".run"
        #  uses build and execution resources in resIdx
        Run.getRunInfo(resIdx, runFile, eInfo, ptds)
       
        [execution] = resIdx.findResourcesByType("execution")  
        app.addExecution(execution)
        
        parsePerf.getPerfInfo(resIdx, execName, \
                       eInfo.dataDir, eInfo.perfTools,  \
                       threaded, ptds)
        writeLst = resIdx.PTdF()
        write_files(eInfo.dataDir, execName, writeLst, opt.split)
        print "PTDF execution data generation complete."
  except PTexception, a:
      if testMode:
         print a.value
         raise PTexception(a)
      else:
         print a.value
         return -1
예제 #3
0
            pf.failed(
                "found wrong library trying to find good dynamic lib with findResourceByShortType"
            )
        else:
            pf.passed("found libmpi.so with findResourceByShortType")

    try:
        # try finding a resource with findResourceByType
        ri = ResourceIndex()
        build = Resource("mybuild", "build")
        env = Resource("myenv", "environment")
        lib = Resource(env.name + "|libmpi.so", "environment|module")
        ri.addResource(lib)
        execution = Execution("myexec")
        ri.addResources([build, env])
        resList = ri.findResourcesByType("environment|module")
        libname = ""
        for r in resList:
            if r.name.find("libmpi") >= 0:
                libname = r.name
                break
    except PTexception, a:
        pf.failed(
            "PTexception raised when trying to find good dynamic lib with findResourceByType: "
            + a.value)
    except:
        pf.failed(
            "non-PTexception raised when trying to find good dynamic lib with findResourceByType"
        )
        raise
    else:
예제 #4
0
                concurrency = e['concurrency']
                if (concurrency.find("PTHREADS") >= 0) or \
                   (concurrency.find("OPENMP") >= 0):
                    threaded = True
                else:
                    threaded = False

                buildFile = eInfo.dataDir + "/" + execName + ".bld"
                # creates build and execution resources
                Build.getBuildInfo(resIdx, buildFile, execName, ptds)

                runFile = eInfo.dataDir + "/" + execName + ".run"
                #  uses build and execution resources in resIdx
                Run.getRunInfo(resIdx, runFile, eInfo, ptds)

                [execution] = resIdx.findResourcesByType("execution")
                app.addExecution(execution)

                parsePerf.getPerfInfo(resIdx, execName, \
                               eInfo.dataDir, eInfo.perfTools,  \
                               threaded, ptds)
                writeLst = resIdx.PTdF()
                write_files(eInfo.dataDir, execName, writeLst, opt.split)
                print "PTDF execution data generation complete."
        except PTexception, a:
            if testMode:
                print a.value
                raise PTexception(a)
            else:
                print a.value
                return -1