[Wien] Fwd: bug in qtl
Peter Blaha
pblaha at theochem.tuwien.ac.at
Mon May 31 08:06:28 CEST 2021
I can confirm the problems with x qtl -p.
Actually, there are several problems:
set so was missing in qtlpara_lapw, as already found.
As Laurence Marks suspected, the setting of "-1" in qtl.def for some
files with "unknown" presence causes errors (-1 forces a "read-only"
open statement, but this requires that the file is present.)
The qtl program requires the presence of case.scf2 und case.weight,
which are produced by lapw2. Thus it is mandatory to run x lapw2
-fermi (-p) when you execute lapw1 with a new k-mesh).
I changed the x_lapw script and include this lapw2 step before the qtl
program is executed.
I attach the modified qtlpara_lapw and x_lapw
Please let me know if it works that way in all cases (I have not tested
-so, spin-polarization or -hf, but in principle the fix includes these
options).
Am 29.05.2021 um 18:15 schrieb Hamza Bouafia:
> Dear Prof. Gavin,
> indeed, the addition of "set so" solves the problem of the error
> "undefined variable" but gives a new error:
> ##############
> running QTL in parallel mode
> calculating QTL's from parallel vectors
> QTL - Error
> 0.057u 0.043s 0:00.08 112.5% 0+0k 0+48io 0pf+0w
> ##############
> In attached files you find error and def files
> sincerely
>
> Le sam. 29 mai 2021 à 17:02, Abo, Gavin Sky <gsabo at crimson.ua.edu
> <mailto:gsabo at crimson.ua.edu>> a écrit :
>
> When I implemented Prof. Blaha's fix put into WIEN2k 21.1, I took it
> as given at:
>
>
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg20660.html
> <https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg20660.html>
>
>
> The "so: Undefined variable" suggests I may have been missing
> something which Prof. Blaha may have had his personal file when he
> tested the change to qtlpara_lapw that never made it into WIEN2k 21.1.
>
>
> It might be that "set so" needs added, similar to lapw2para_lapw,
> near the top of the qtlpara_lapw file like:
>
>
> set sc
> set so # semicore-switch
> set cmplx
>
> You could maybe give that a try to see if it fixes the "so:
> Undefined variable" error. Though, it is also possible another
> error will reveal itself after that.
>
>
> On 5/29/2021 9:02 AM, Laurence Marks wrote:
>> This might be a recent addition if "-1" in the def, I will leave
>> it to Peter..
--
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300 FAX: +43-1-58801-165982
Email: blaha at theochem.tuwien.ac.at WIEN2k: http://www.wien2k.at
WWW: http://www.imc.tuwien.ac.at
-------------------------------------------------------------------------
-------------- next part --------------
#!/bin/tcsh -f
#
set tmp = .tmp_qtlpara.$$
set tmp2 = .tmp_qtlpara.$$_2
onintr exit
set name = $0
set bin = $name:h #default directory for WIEN-executables
if !(-d $bin) set bin = .
unalias rm
alias testinput 'if (! -e \!:1 || -z \!:1) goto \!:2'
alias testerror 'if (! -z \!:1.error) goto error'
set t = time
set log = :parallel
set defmach = `hostname`
set updn # spinpolarization switch
set dnup = 'dn' # spinpolarization switch
set sc # semicore-switch
set so
set cmplx
set remote = ssh
set init = init:
set res = residue:
############################################################################
# In this section use 0 to turn of an option, 1 to turn it on,
# respectively choose a value
set useremote = 1 # using remote shell to launch processes
setenv DELAY 0.1 # delay launching of processes by n seconds
setenv SLEEPY 1 # additional sleep before checking
set debug = 0 # set verbosity of debugging output
############################################################################
############################################################################
# and now we look if we should override the defaults
if (-e $bin/parallel_options) then
source $bin/parallel_options
endif
if ( $?USE_REMOTE ) then
set useremote = $USE_REMOTE
endif
############################################################################
if ($#argv < 1) then
echo usage: $0 deffile
exit
endif
while ($#argv)
switch ($1)
case -h:
case -H:
set help
shift; breaksw
case -up:
set updn = '-up'
set dnup = '-dn'
shift; breaksw
case -dn:
set updn = '-dn'
set dnup = '-up'
shift; breaksw
case -so:
set so = 'so'
shift; breaksw
default:
set def = $1:r
shift; breaksw
endsw
end
set exe = $bin/qtl
set exe = qtl
#are we running parallel?
testinput .processes single
echo "running QTL in parallel mode"
echo "RUNNING" >.qtlpara
#before we start, we wipe away all parallel error files
if ( -e qtl.error ) rm *qtl*.error
if ( -e upqtl.error ) rm *qtl*.error
if ( -e dnqtl.error ) rm *qtl*.error
if ( -e qtl_1.error ) rm *qtl_*.error
if ( -e upqtl_1.error ) rm *qtl_*.error
if ( -e dnqtl_1.error ) rm *qtl_*.error
if ( -e .timeq_1) rm .timeq_*
if (-e .machines.help) rm .machines.help
grep -v $init .processes|grep : | grep -v $res >$tmp2
set mist = `wc $tmp2 `
set maxproc = $mist[1]
set machine = `grep $init .processes | cut -f2 -d: | xargs`
if ($#machine > $maxproc) then
set machine = `grep $init .processes |head -$maxproc| cut -f2 -d: | xargs`
endif
set lockfile = `cut -f2 -d: $tmp2 | awk '{print $1 NR}'|xargs`
set residue = `grep $res .processes|cut -f2 -d:`
if ($residue == "") unset residue
if ($debug > 0) echo machines: $machine
echo "** " Error in Parallel QTL >$def.error
#get name of case
setenv PWD `pwd|sed "s/tmp_mnt\///"`
setenv PWD $cwd
set case = $PWD
set case = $case:t
if ($case == "") then
echo "ERROR: cannot detect working directory $cwd -> exit"
exit 1
endif
if ($debug > 0) echo Setting up case $case for parallel execution
if ($debug > 0) echo of QTL
if ($debug > 0) echo " "
#
echo "calculating QTL's from parallel vectors"
vec2old_lapw -p -local $so $updn
$exe $def.def $maxproc
rm $tmp* >&/dev/null
echo "DONE" >.qtlpara
exit 0
error:
echo "** " QTL crashed!
echo "** " QTL crashed at `date`>>$log
echo "** " check ERROR FILES! >>$log
echo "-----------------------------------------------------------------">>$log
echo "** " Error in Parallel QTL >>$def.error
rm $tmp* >&/dev/null
echo "ERROR" >.qtlpara
exit 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x_lapw.gz
Type: application/x-gzip
Size: 22862 bytes
Desc: not available
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20210531/88b5fa48/attachment.gz>
More information about the Wien
mailing list