Esempio n. 1
0
    def testCall(self):
        time.sleep(0.5)

        import mapreduce
        M = mapreduce.zeros()
        res = op.context.pull(np.ndarray, M)
        self.assertTrue(np.linalg.norm(res) < 1e-5)

        M = mapreduce.create_dist_array()
        res = op.context.pull(np.ndarray, M)
Esempio n. 2
0
    def testCall(self):
        time.sleep(0.5)

        import mapreduce
        M = mapreduce.zeros()
        res = op.context.pull(np.ndarray, M)
        self.assertTrue(np.linalg.norm(res) < 1e-5)

        M = mapreduce.create_dist_array()
        res = op.context.pull(np.ndarray, M)
Esempio n. 3
0
    def testMatMul(self):
        time.sleep(1.0)

        print "starting computation"

        import matmul
        import mapreduce

        M = mapreduce.create_dist_array()
        res = matmul.matrix_multiply(M, M)

        A = op.context.assemble(M)
        B = op.context.assemble(res)

        self.assertTrue(np.linalg.norm(A.dot(A) - B) <= 1e-4)
Esempio n. 4
0
    def testMatMul(self):
        time.sleep(1.0)

        print "starting computation"

        import matmul
        import mapreduce

        M = mapreduce.create_dist_array()
        res = matmul.matrix_multiply(M, M)

        A = op.context.assemble(M)
        B = op.context.assemble(res)

        self.assertTrue(np.linalg.norm(A.dot(A) - B) <= 1e-4)