Пример #1
0
 def start(self, name):
     Timer.start(self, name)
     hpm_start(name)
Пример #2
0
 def __init__(self):
     Timer.__init__(self)
     from _gpaw import hpm_start, hpm_stop
     self.hpm_start = hpm_start
     self.hpm_stop = hpm_stop
     hpm_start(self.top_level)
Пример #3
0
 def __init__(self):
     Timer.__init__(self)
     from _gpaw import hpm_start, hpm_stop
     self.hpm_start = hpm_start
     self.hpm_stop = hpm_stop
     hpm_start(self.top_level)
Пример #4
0
 def start(self, name):
     Timer.start(self, name)
     hpm_start(name)
Пример #5
0
    Q = B // 2 + 1
    C_bnbn = C_nn.reshape((B, M, B, M))
    S_mm = np.empty((Q, M, M))

    # Random wave functions:
    shape = (M, G, G, G)
    np.random.seed(M)
    psit_mG = np.random.uniform(-0.5, 0.5, shape)
    tmp_mG = psit_mG.copy()

    # Overlap
    ttot = 0.0
    ta = time()
    reg = "Overlap" + str(B)
    hpm_start(reg)
    for n in range(Q - 1):
        gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[n], 'c')
        tmp_mG, psit_mG = psit_mG, tmp_mG
    gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[Q - 1], 'c')
    hpm_stop(reg)
    ttot = time() - ta

    # print "Overlap, B:", B, "Time:", ttot

    # Matrix multiply
    ttot = 0.0
    ta = time()
    reg = "Matrix_Mutiply" + str(B)
    hpm_start(reg)
    beta = 0.0
Пример #6
0
    Q = B // 2 + 1
    C_bnbn = C_nn.reshape((B, M, B, M))
    S_mm = np.empty((Q,M,M))

    # Random wave functions:
    shape = (M, G, G, G)
    np.random.seed(M)
    psit_mG = np.random.uniform(-0.5, 0.5, shape)
    tmp_mG = psit_mG.copy()

    # Overlap
    ttot = 0.0
    ta = time()
    reg = "Overlap" + str(B)
    hpm_start(reg)
    for n in range(Q - 1):
        gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[n], 'c')
        tmp_mG, psit_mG = psit_mG, tmp_mG
    gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[Q - 1], 'c')
    hpm_stop(reg)
    ttot = time() - ta

    # print "Overlap, B:", B, "Time:", ttot

    # Matrix multiply
    ttot = 0.0
    ta = time()
    reg = "Matrix_Mutiply" + str(B)
    hpm_start(reg)
    beta = 0.0