Author Topic: self consistent loop running over 1 week  (Read 7753 times)

0 Members and 1 Guest are viewing this topic.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
self consistent loop running over 1 week
« on: December 17, 2012, 21:10 »
i have an LDOS calculation running on a $12k, 24 core computer with tons of memory .. for over 1 or 2 weeks now ... non converging i think .. currently at step 140 .. it is graphene GNR two probe device with double gate, N=10 wide, only 16nm long ... i really want an LDOS plot .. does this sound out of ordinary?
« Last Edit: December 17, 2012, 22:13 by esp »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ldos running over 1 week
« Reply #1 on: December 17, 2012, 21:40 »
If things don't converge by 506-60 steps, I usually try to find a better strategy, rather than just wait (which isn't to say that some problems do require many steps, but at least you want to try a bit first, before resorting to pure waiting).

It's misleading to call this an LDOS issue, however, if it's the self-consistent calculation that isn't converging. Also the price of the computer and the amount of memory is irrelevant for how the convergence proceeds.

Besides this, there are not enough details to provide any more specific advice. Increase number of history steps, make sure the electrodes are long enough, are "the usual suspects", but if you want me to look at the structure or parameters, it's best to provide the script with full details.
« Last Edit: December 17, 2012, 21:42 by Anders Blom »

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: ldos running over 1 week
« Reply #2 on: December 17, 2012, 22:12 »
yes you are right, it is the self-consistent calc, i apologize .. i suppose i called it ldos, because that is the only think i calculate which uses that calcualtor, LCAO .. so yes, it is not LDOS, it is the SC loop ...

about the computer, i only meant to emphasize it is a very powerful computer with lots of memory ...

yes about the details, i will post the parameters ...

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: self consistent loop running over 1 week
« Reply #3 on: December 17, 2012, 22:22 »
Ok, I'll review the parameters when you send them.

You can make the computer 100x more expensive and add 100 GB of RAM and it has no effect whatsoever on the convergence ;)

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #4 on: December 17, 2012, 22:24 »
cannot post larger than 400k here, sent the nc file by email I am using the following parameters: oList["numerical_accuracy_parameters"] = NumericalAccuracyParameters(k_point_sampling=(1,1,101)) oList["iteration_control_parameters"] = IterationControlParameters(number_of_history_steps=30, tolerance=1e-4, max_steps=140)
Code
def my_LDOSCalculator(oList):
	#----------------------------------------
	# Basis Set
	#----------------------------------------
	basis_set = [
		LDABasis.Carbon_SingleZeta,
		LDABasis.Boron_SingleZeta,
		LDABasis.Hydrogen_SingleZeta,
		LDABasis.Nitrogen_SingleZeta,
		]

	device_algorithm_parameters = DeviceAlgorithmParameters(
		initial_density_type=NeutralAtom(electrode_constraint_length=10.0*Ang),
		)

	#----------------------------------------
	# Electrode Calculators
	#----------------------------------------
	left_electrode_calculator = LCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		)

	right_electrode_calculator = LCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		)

	#----------------------------------------
	# Device Calculator
	#----------------------------------------
	calculator = DeviceLCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		device_algorithm_parameters=device_algorithm_parameters,
		electrode_calculators=
			[left_electrode_calculator, right_electrode_calculator],
		)
	
	return calculator
Code
						LDOS = LocalDeviceDensityOfStates(
							configuration=device_configuration,
							energy=energy,
							kpoints=MonkhorstPackGrid(1,1),
							contributions=All,
							energy_zero_parameter=AverageFermiLevel,
							infinitesimal=1e-06*eV,
							self_energy_calculator=KrylovSelfEnergy(),
							spin=Spin.Sum,
						)


Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #5 on: December 17, 2012, 22:26 »
I don't understand, why would the computing power have no effect?  you said before that more history steps helps convergence speed, and i thought you need lots of RAM for more history steps .. the main cost of the machine i am talking about is memory ... it sounds like you are talking about convergence and i am talking about convergence speed

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #6 on: December 17, 2012, 22:35 »
I did not show there I am also running with bias of course ... like 0.5V Vds, trying to to 0 and 0.5V Vgs
Code

device_configuration.setMetallicRegions([metallic_region0(value = gate_voltage), metallic_region1(value = gate_voltage)] )

			device_configuration.setCalculator(
				calculator(electrode_voltages=(bias,0.0*Volt)),
				initial_state=device_configuration)
			device_configuration.update()

« Last Edit: December 17, 2012, 22:41 by esp »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: self consistent loop running over 1 week
« Reply #7 on: December 17, 2012, 22:39 »
Well, if it runs for 1000 steps without converging, no matter how many history steps you have, because some other parameters is chosen wrong, then the amount of memory doesn't help.

In this case, using SingleZeta is probably a major cause of the problem. So, in that case the memory does indeed become important because you will need a larger basis set, but hopefully you can afford it if there is enough RAM ;) Try SingleZetaPolarized instead.

Also, NeutralAtom is not recommended unless you have a particular reason to choose it - and this system is not one of them. EquivalentBulk will work a lot better I believe.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: self consistent loop running over 1 week
« Reply #8 on: December 17, 2012, 22:40 »
I forgot: you have gates, so the proper Poisson solver must be MultiGrid with Neumann boundary conditions in the direction of the gates.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #9 on: December 17, 2012, 22:42 »
ok thank you for all the notes i will try it again ...

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #10 on: December 29, 2012, 06:59 »
I tried doing what you said for doing an LDDOS calc, but I think I set something up incorrectly .. this is the error: Traceback (most recent call last):   File "./zipdir/NL/Calculators/DeviceCalculatorInterface.py", line 192, in _update   File "./zipdir/NL/Calculators/LCAOCalculator/BaseLCAOCalculator.py", line 153, in _checkOrbitalsMatch NLValueError: The number of orbitals must match for initializing the system. 3108 != 7252 (expected) /home/it1/patakye/QuantumWise/atk-12.2.2/atkpython/bin/atkpython: line 3:  2345 Segmentation fault      PSEUDOPOTENTIALS_PATH=$EXEC_DIR/../share/pseudopotentials PYTHONHOME=$EXEC_DIR/.. PYTHONPATH= LD_LIBRARY_PATH=$EXEC_DIR/../lib $EXEC_DIR/atkpython_exec $* MPI Application rank 0 exited before MPI_Init() with status 139 here is my setup for the calculator:
Code
def my_LDOSCalculator(oList):
	#----------------------------------------
	# Basis Set
	#----------------------------------------
	basis_set = [
		LDABasis.Carbon_SingleZetaPolarized,
		LDABasis.Boron_SingleZetaPolarized,
		LDABasis.Hydrogen_SingleZetaPolarized,
		LDABasis.Nitrogen_SingleZetaPolarized,
	]

	device_algorithm_parameters = DeviceAlgorithmParameters(
		initial_density_type=EquivalentBulk(electrode_constraint_length=10.0 * Ang),
	)

	poisson_solver1 = MultigridSolver(
		boundary_conditions=[NeumannBoundaryCondition,
									DirichletBoundaryCondition,
									PeriodicBoundaryCondition]
	)

	poisson_solver2 = MultigridSolver(
		boundary_conditions=[NeumannBoundaryCondition,
									DirichletBoundaryCondition,
									DirichletBoundaryCondition]
	)


	#----------------------------------------
	# Electrode Calculators
	#----------------------------------------
	left_electrode_calculator = LCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		poisson_solver=poisson_solver1)

	right_electrode_calculator = LCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		poisson_solver=poisson_solver1)

	#----------------------------------------
	# Device Calculator
	#----------------------------------------
	calculator = DeviceLCAOCalculator(
		basis_set=basis_set,
		numerical_accuracy_parameters=oList["numerical_accuracy_parameters"],
		iteration_control_parameters=oList["iteration_control_parameters"],
		device_algorithm_parameters=device_algorithm_parameters,
		electrode_calculators=[left_electrode_calculator, right_electrode_calculator],
		poisson_solver=poisson_solver2)

	return calculator


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: self consistent loop running over 1 week
« Reply #11 on: December 30, 2012, 14:46 »
This error messages appears if you are attempting to use "initial_state" to initialize a calculation, but the systems don't match in size. For instance, you may have a different number of atoms, or a different basis set in the "old" calculator compared to the new one you are trying to start.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: self consistent loop running over 1 week
« Reply #12 on: December 31, 2012, 06:56 »
yes thank you that is probably exactly what i did ... i will re-run thank you