[Octopus-users] where should PES_output be called?

Giacomo Mulas gmulas at oa-cagliari.inaf.it
Tue Apr 21 10:24:30 WEST 2009


On Mon, 20 Apr 2009, matthieu verstraete wrote:

> Hi Giacomo,
>
> imho, pes_output should be called at each iteration, probably inside
> pes_doit around line 127. All the arguments are there. Anyone to
> confirm?

I checked into the code of PES_output. It essentially just checks flags and
calls PES_rc_output and/or PES_mask_output. I then went into PES_rc_doit
(which does the actual calculation Suraud-style) and into PES_rc_output. As
far as I can tell, PES_rc_init allocates variables to store the
wavefunction(s) for "OutputEvery" timesteps; PES_rc_output then runs a loop
to dump them to disk, and should therefore be called inside check_point(),
near the same place where td_save_restart and td_write_data are called.
Moreover, PES_rc_output apparently is also supposed to be called once at the
first iteration, for then it will open the files from scratch and write a
header for each file. I attach a simplistic patch which adds these two calls
to PES_output, with which CalcPES_rc appears to work. It is somewhat
unpleasant that the files are opened in the running directory of octopus,
instead of td.general where all other td outputs are placed, but I will take
care of it later.

By the way, apparently I also found a regression in octopus 3.1.0 vs 3.0.1.
The file inp_old runs fine with octopus 3.0.1, while the minimally
modified inp_new file segfaults at iteration 14 with octopus 3.1.0. The
latter happens both with my home compiled version and with the precompiled
binary in the deb package taken from the octopus web site. It looks like
there is some memory corruption somewhere. If you wish, I can run octopus
under a memory checker like valgrind and let you have the output?

Ciao
Giacomo

-- 
_________________________________________________________________

Giacomo Mulas <gmulas at oa-cagliari.inaf.it>
_________________________________________________________________

OSSERVATORIO ASTRONOMICO DI CAGLIARI
Str. 54, Loc. Poggio dei Pini * 09012 Capoterra (CA)

Tel. (OAC): +39 070 71180 248     Fax : +39 070 71180 222
Tel. (UNICA): +39 070 675 4916
_________________________________________________________________

"When the storms are raging around you, stay right where you are"
                          (Freddy Mercury)
_________________________________________________________________
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
# -*- coding: utf-8 mode: shell-script -*-
# $Id:  $

CalculationMode = td

FromScratch = yes

#bondlength = 1.7/0.529177

%Coordinates
"Na" |  0.0 | 0.0 | 0.0 | yes
#"Na" | -bondlength | 0.0 | 0.0 | yes
%

BoxShape = sphere
Radius  = 12.0/0.529177
Spacing = 0.3/0.529177

ExcessCharge = 0
TheoryLevel = independent_particles

T = 80000.0
dt = 0.5
TDMaximumIter = T/dt
TDEvolutionMethod = exp_mid
TDExponentialMethod = lanczos
TDExpOrder = 20
TDTimeStep = dt

#TDDeltaStrength = 0.01
#%TDPolarization
# 1/sqrt(2) | -1/sqrt(2) | 0
# 1/sqrt(2) |  1/sqrt(2) | 0
# 1/sqrt(2) |  0         | 1/sqrt(2)
#%
#TDPolarizationDirection = 1
#TDPolarizationEquivAxis = 3
#%TDPolarizationWprime
# 0 | 0 | 1
#%

omega = .20
electric_amplitude = 0.005
p_c = 137.036
vector_amplitude = -P_c*electric_amplitude/omega
%TDExternalFields
vector_potential | 0 | 0 | 1 | omega | "trapezio"
%
%TDFunctions
"trapezio" | tdf_trapezoidal | vector_amplitude | 1000.0 | 510.0 | 5.0
%

TDGauge = velocity

#CalcPES_rc = yes
#%PES_rc_points
#0.0 | 0.0 | 11.5/0.529177
#0.0 | 11.5/0.529177 | 0.0
#11.5/0.529177 | 0.0 | 0.0
#%

#CalcPES_mask = yes

AbsorbingBoundaries = yes
MoveIons = no

TDOutput = laser + energy + multipoles + td_occup + populations
OutputEvery = 10

SpecStartTime = 1200.
SpecEndTime = 12000.
-------------- next part --------------
# -*- coding: utf-8 mode: shell-script -*-
# $Id:  $

CalculationMode = td

FromScratch = no

#bondlength = 1.7/0.529177

%Coordinates
"Na" |  0.0 | 0.0 | 0.0 | yes
#"Na" | -bondlength | 0.0 | 0.0 | yes
%

BoxShape = sphere
Radius  = 12.0/0.529177
Spacing = 0.3/0.529177

ExcessCharge = 0
TheoryLevel = independent_particles

T = 80000.0
dt = 0.5
TDMaximumIter = T/dt
TDEvolutionMethod = exp_mid
TDExponentialMethod = lanczos
TDExpOrder = 20
TDTimeStep = dt

#TDDeltaStrength = 0.01
#%TDPolarization
# 1/sqrt(2) | -1/sqrt(2) | 0
# 1/sqrt(2) |  1/sqrt(2) | 0
# 1/sqrt(2) |  0         | 1/sqrt(2)
#%
#TDPolarizationDirection = 1
#TDPolarizationEquivAxis = 3
#%TDPolarizationWprime
# 0 | 0 | 1
#%

omega = .20
electric_amplitude = 0.005
p_c = 137.036
vector_amplitude = -P_c*electric_amplitude/omega
%TDExternalFields
vector_potential   | 0 | 0 | 1 | envelope_trapezoidal | vector_amplitude | omega | 1000.0 | 505.0 | 5.0
# vector_potential   | 0 | 0 | 1 | envelope_constant | -vector_amplitude | 0.0
%



AbsorbingBoundaries = yes
MoveIons = no

TDOutput = laser + energy + multipoles + td_occup + populations
OutputEvery = 10

SpecStartTime = 1200.
SpecEndTime = 12000.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pippo.diff
Type: text/x-diff
Size: 439 bytes
Desc: 
Url : http://www.tddft.org/pipermail/octopus-users/attachments/20090421/20d84381/attachment.bin 


More information about the Octopus-users mailing list