issp-center-dev / TeNeS

Massively parallel tensor network solver
http://www.pasums.issp.u-tokyo.ac.jp/tenes/en
GNU General Public License v3.0
49 stars 11 forks source link

Running multiple jobs and convergence issues in TeNeS #98

Open HamidArianZad opened 2 days ago

HamidArianZad commented 2 days ago

Dear TeNeS Developers,

  1. I would like to run multiple jobs simultaneously in TeNeS, but I am encountering an issue where TeNeS only works when a single job is running. When I attempt to start a second job, TeNeS stops entirely, and even the first job halts. Could you please advise on how to run multiple jobs concurrently?

  2. Additionally, I am working on a frustrated 2D spin-1/2 lattice. When I increase the virtual bond dimension beyond 3 (D > 3), I am unable to achieve convergence, even with a large number of simple update steps (num_step_table = 4000) and CTM parameters (iteration_max = 500, dimension >= 25). The mode is depicted in following figure:

Model1

Since the TeNeS does not support different exchange couplings in this model, I considered J0 = J1 and use modified class square lattice :

class SquareLattice(Lattice):
    def __init__(self, param: Dict[str, Any]):
        super().__init__(param)
        self.type = "square lattice"
        self.zs = [[1, 1, 0], [0, 1, 0], [0, 0, 0]]
        #
        self.L *= 2
        self.W *= 2
        L, W = self.L, self.W
        self.sublattice = [SubLattice([self.vdim] * 4),
                           SubLattice([self.vdim] * 4),
                           SubLattice([self.vdim] * 4),
                           SubLattice([self.vdim] * 4)]

        for source in range(L * W):
            x, y = index2coord(source, L)
            #
            # sublattice A
            #
            if x % 2 == 0 and y % 2 == 0:
                self.sublattice[0].add_site(source)
                self.coords.append(np.array([x, y]))
                # 1st neighbors
                self.bonds[0][0].append(Bond(source, 1, 0))
                self.bonds[0][1].append(Bond(source, 0, 1))
            #
            # sublattice B
            #
            elif x % 2 == 1 and y % 2 == 0:
                  self.sublattice[1].add_site(source)
                  self.coords.append(np.array([x, y]))
                  # 1st neighbors
                  self.bonds[0][1].append(Bond(source, 0, 1))
            #
            # sublattice C
            #
            elif x % 2 == 0 and y % 2 == 1:
                  self.sublattice[2].add_site(source)
                  self.coords.append(np.array([x, y]))
                  # 2nd neighbors
                  self.bonds[1][1].append(Bond(source, 1, -1))
            #
            # sublattice D
            #
            elif x % 2 == 1 and y % 2 == 1:
                  self.sublattice[3].add_site(source)
                  self.coords.append(np.array([x, y]))
                  # 1st neighbors
                  self.bonds[0][0].append(Bond(source, 1, 0))
                  # 2nd neighbors
                  self.bonds[1][1].append(Bond(source, -1, 1))

to identify my lattice. Following inputs in simple.toml file is considered:

[parameter]
[parameter.general]
is_real = true

[parameter.simple_update]
num_step = 200
tau = 0.01

[parameter.full_update]
num_step = 0
tau = 0.01

[parameter.ctm]
iteration_max = 200
dimension = 10

[lattice]
type = "square lattice"
L = 2
W = 2
virtual_dim = 2
initial = "random"

[model]
type = "spin"
J0 = 1.0
J1 = 1.0
"J1'" = 1.0

The code seems work well for D<=3 and L, W<=3.

Any advice on resolving these issues would be greatly appreciated.

Thank you for your support.

yomichi commented 1 day ago
  1. Do you use a cluster machine (e.g., supercomputer)? If so, please ask the system administrator how to run jobs (commands) in parallel. In addition, for TeNeS, please make sure that the names of the output directories (output and tensor_save) of each job differs for avoiding overwriting.

  2. (i) to increase the number of steps. (ii) to specify an initial state moderately. The initial state can be generated by using Hamiltonian including only magnetic field.