Commit 2808f6f1 authored by Dmitry I. Lyakh's avatar Dmitry I. Lyakh
Browse files

Fixed exatn-config, and removed serialization issue.


Signed-off-by: default avatarDmitry I. Lyakh <quant4me@gmail.com>
parent 450b898d
/** ExaTN::Numerics: Numerical server
REVISION: 2022/01/13
REVISION: 2022/01/14
Copyright (C) 2018-2022 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2022 Oak Ridge National Laboratory (UT-Battelle) **/
......@@ -946,14 +946,14 @@ bool NumServer::submit(const ProcessGroup & process_group,
std::dynamic_pointer_cast<numerics::TensorOpCreate>(op0)->
resetTensorElementType(output_tensor->getElementType());
success = submit(op0,tensor_mapper); if(!success) return false; //this CREATE operation will also register the output tensor
//Initialize the output tensor to zero:
std::shared_ptr<TensorOperation> op1 = tensor_op_factory_->createTensorOp(TensorOpCode::TRANSFORM);
op1->setTensorOperand(output_tensor);
std::dynamic_pointer_cast<numerics::TensorOpTransform>(op1)->
resetFunctor(std::shared_ptr<TensorMethod>(new numerics::FunctorInitVal(0.0)));
success = submit(op1,tensor_mapper); if(!success) return false;
success = sync(*op1); assert(success);
}
//Initialize the output tensor to zero:
std::shared_ptr<TensorOperation> op1 = tensor_op_factory_->createTensorOp(TensorOpCode::TRANSFORM);
op1->setTensorOperand(output_tensor);
std::dynamic_pointer_cast<numerics::TensorOpTransform>(op1)->
resetFunctor(std::shared_ptr<TensorMethod>(new numerics::FunctorInitVal(0.0)));
success = submit(op1,tensor_mapper); if(!success) return false;
success = sync(*op1); assert(success);
//Submit tensor network for execution as a whole:
const auto exec_handle = tensor_rt_->submit(network,process_group.getMPICommProxy(),num_procs,local_rank);
......
......@@ -18,6 +18,7 @@
#include "errors.hpp"
//Test activation:
/*
#define EXATN_TEST0
#define EXATN_TEST1
#define EXATN_TEST2
......@@ -48,10 +49,10 @@
//#define EXATN_TEST27 //requires input file from source
//#define EXATN_TEST28 //requires input file from source
#define EXATN_TEST29
#define EXATN_TEST30
#define EXATN_TEST30*/
//#define EXATN_TEST31 //requires input file from source
#define EXATN_TEST32
#define EXATN_TEST33
//#define EXATN_TEST33
#ifdef EXATN_TEST0
......@@ -3673,6 +3674,7 @@ TEST(NumServerTester, ExcitedMCVQE) {
//Numerical processing:
{
exatn::switchComputationalBackend("default");
//Create and initialize tensor network vector tensors:
if(root) std::cout << "Creating and initializing tensor network vector tensors ... ";
success = exatn::createTensorsSync(*vec_net0,TENS_ELEM_TYPE); assert(success);
......
Complete Full CI Energy Spectrum:
[-3.34444821e-01 -2.82326174e-01 -2.72167863e-01 -2.63512172e-01
-2.51368763e-01 -2.46290271e-01 -2.45503332e-01 -2.32746037e-01
-2.29437508e-01 -2.19100671e-01 -2.11428365e-01 -2.01234878e-01
-2.00002417e-01 -1.94122282e-01 -1.91756169e-01 -1.88778674e-01
-1.83929027e-01 -1.80783514e-01 -1.79469921e-01 -1.76292920e-01
-1.74689448e-01 -1.72769676e-01 -1.71355925e-01 -1.66180606e-01
-1.64344014e-01 -1.63364966e-01 -1.62929831e-01 -1.61805300e-01
-1.58504920e-01 -1.57375305e-01 -1.49341036e-01 -1.48204955e-01
-1.46347434e-01 -1.45526689e-01 -1.44424524e-01 -1.41199683e-01
-1.36752730e-01 -1.33837902e-01 -1.30890124e-01 -1.29466067e-01
-1.26840737e-01 -1.23834138e-01 -1.20865931e-01 -1.18202903e-01
-1.14424408e-01 -1.14224638e-01 -1.11708520e-01 -1.08745863e-01
-1.08557058e-01 -1.07837523e-01 -1.05391644e-01 -1.03896763e-01
-1.03533448e-01 -1.01870352e-01 -1.00596910e-01 -1.00412851e-01
-9.66930540e-02 -9.37798612e-02 -9.34287638e-02 -9.25898692e-02
-9.12480320e-02 -9.10217140e-02 -8.81144550e-02 -8.80358201e-02
-8.45510680e-02 -8.39976558e-02 -8.31426486e-02 -8.14303769e-02
-8.00687827e-02 -7.87172211e-02 -7.75103643e-02 -7.74722010e-02
-7.61103025e-02 -7.57180368e-02 -7.53758668e-02 -7.49088944e-02
-7.45711577e-02 -6.86609787e-02 -6.62188188e-02 -6.59094191e-02
-6.44538276e-02 -6.37650895e-02 -6.29328122e-02 -6.15698157e-02
-6.11611990e-02 -6.08785852e-02 -5.80923757e-02 -5.72292070e-02
-5.59173759e-02 -5.29287393e-02 -5.10038284e-02 -5.09582246e-02
-4.84554437e-02 -4.56224275e-02 -4.35733618e-02 -4.35428833e-02
-4.10171854e-02 -3.86108896e-02 -3.82080778e-02 -3.69576412e-02
-3.56208601e-02 -3.31044034e-02 -3.27209367e-02 -3.26388270e-02
-2.62623274e-02 -2.61445739e-02 -2.56008139e-02 -2.35958416e-02
-2.32291649e-02 -2.14492160e-02 -2.05272823e-02 -2.04855499e-02
-1.96359781e-02 -1.74932149e-02 -1.70441211e-02 -1.12815688e-02
-1.08546406e-02 -9.34607843e-03 -9.15969736e-03 -8.47858048e-03
-8.10560051e-03 -6.59801747e-03 -5.51128734e-03 -4.70655710e-03
-4.50659414e-03 -3.35559828e-03 -2.46494724e-03 1.43187469e-04
1.94086466e-03 2.25591636e-03 3.14037349e-03 3.79700178e-03
4.24420485e-03 4.96127389e-03 6.00844017e-03 6.55293054e-03
6.84471994e-03 7.17382906e-03 8.16992292e-03 9.27992263e-03
1.07383487e-02 1.28220446e-02 1.42473752e-02 1.60270456e-02
1.81118717e-02 1.94544385e-02 1.95938068e-02 1.98562228e-02
2.11267610e-02 2.22664832e-02 2.26369260e-02 2.44682876e-02
2.68527409e-02 2.69886125e-02 2.95361466e-02 3.05224940e-02
3.15206220e-02 3.43577726e-02 3.72675310e-02 3.77292137e-02
3.79231192e-02 3.91907146e-02 4.14077338e-02 4.42971272e-02
4.46897674e-02 4.48948012e-02 4.72306275e-02 5.18803184e-02
5.35529272e-02 5.38284317e-02 5.51807457e-02 5.57097216e-02
5.85245381e-02 6.02281194e-02 6.15635562e-02 6.26688764e-02
6.42461465e-02 7.06076122e-02 7.11338786e-02 7.25943949e-02
7.35159372e-02 7.36647258e-02 7.38567489e-02 7.62433619e-02
7.65755761e-02 7.71740794e-02 7.88930050e-02 7.92466354e-02
8.35008364e-02 8.47926904e-02 8.59170210e-02 8.65879103e-02
8.80584587e-02 9.01661836e-02 9.03551266e-02 9.06203670e-02
9.14280520e-02 9.25816853e-02 9.43900959e-02 9.48124779e-02
9.95659987e-02 1.01856500e-01 1.02415148e-01 1.02694845e-01
1.04253308e-01 1.04612593e-01 1.04710883e-01 1.06055267e-01
1.07958527e-01 1.09967395e-01 1.16355071e-01 1.16705980e-01
1.19740224e-01 1.19863944e-01 1.22526386e-01 1.23738275e-01
1.26286194e-01 1.27306389e-01 1.34582518e-01 1.34764136e-01
1.35264266e-01 1.40078511e-01 1.41628498e-01 1.44206485e-01
1.50802967e-01 1.52710606e-01 1.54028631e-01 1.58838811e-01
1.61902998e-01 1.69409540e-01 1.70540573e-01 1.72022903e-01
1.73345971e-01 1.74011921e-01 1.75495360e-01 1.81549348e-01
1.83338774e-01 1.85340787e-01 1.87062752e-01 1.87424901e-01
1.90325163e-01 1.92833199e-01 1.99890474e-01 2.04913244e-01
2.06719461e-01 2.08435065e-01 2.19292927e-01 2.31505312e-01
2.40932783e-01 2.50793039e-01 2.55900247e-01 2.72258856e-01
2.73981786e-01 2.84151014e-01 2.87091549e-01 3.52667460e-01]
......@@ -27,6 +27,8 @@ def main(argv=None):
exatnLibs[i] = '-ldl'
if e == 'm':
exatnLibs[i] = '-lm'
if e == 'cutensor':
exatnLibs[i] = '-lcutensor'
baseLibs += '@MPI_CXX_LIBRARIES@'.split(';') + exatnLibs
output += baseLibs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment