Commit 35659c7e authored by Jacob Davison's avatar Jacob Davison
Browse files

changes to track TensorFlow device

parent 6bb3648b
......@@ -18,7 +18,8 @@ import os, sys
#from memory_profiler import profile
import itertools
import random
sess = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(log_device_placement=True))
sess.close()
# user files
# sys.path.append('C:\\Users\\davison\\Research\\exact_diagonalization\\')
from oop_imsrg.hamiltonian import *
......
......@@ -156,7 +156,7 @@ def main3b(n_holes, n_particles, ref=None, d=1.0, g=0.5, pb=0.0):
# --- Solve the IM-SRG flow
y0 = unravel(ha.E, ha.f, ha.G, wg.W)
print('sum(Ws**2)',np.sum(wg.W**2))
solver = ode(derivative,jac=None)
solver.set_integrator('vode', method='bdf', order=5, nsteps=500)
solver.set_f_params(ha, ot, wg, fl)
......@@ -175,7 +175,7 @@ def main3b(n_holes, n_particles, ref=None, d=1.0, g=0.5, pb=0.0):
Es, fs, Gs, Ws = ravel(ys, ha.n_sp_states)
s_vals.append(solver.t)
E_vals.append(Es)
print('sum(Ws**2)',np.sum(Ws**2))
iters += 1
if iters %10 == 0: print("iter: {:>6d} \t scale param: {:0.4f} \t E = {:0.9f}".format(iters, solver.t, Es))
......
Supports Markdown
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