[Wien] Segmentation fault in f7splt (lapw2)

Peter Blaha pblaha at theochem.tuwien.ac.at
Tue Oct 8 10:45:51 CEST 2013


You are right.
Anyway, a quick fix should be to add a line

       ipip=max(ilo(3),1)

However, in comparison to p3splt and d5splt.f I can see that there are 
cross-terms with local orbitals missing in most of these equations, so 
I'd very much doubt that these numbers are correct when you have f-los.

In any case, the fsplit is not really used for anything (except when you 
use ISPLIT=15, which should not be done and the qtl program is a much 
better alternative.


Am 08.10.2013 10:10, schrieb Pavel Ondračka:
> Peter Blaha píše v Po 07. 10. 2013 v 22:48 +0200:
>> I can confirm that this is a "real problem", which was undetected for
>> two reasons:
>> a) It is active ONLY when ISPLIT=15 in case.struct. Thus you must have
>> set this manually. However, I doubt that this kind of splitting
>> (according to +/-m) is very informative.  Instead, use the qtl program !
>
> This is strange, I've most certainly didn't set ISPLIT to 15. I've just
> tested with two different cases, one has ISPLIT=2 in case.struct, the
> other ISPLIT=8 and both crash in the same place. BTW I can reproduce
> this even on 64bit fedora with gfortran, I just have to compile lapw2
> with "-O0 -g". I can then be reproduced even with the simple TiC case
> created exactly according to the User's Guide.
>
> BTW the crashing F7SPLT subroutine is called from csplit.f:78
>
> 76 !   IF(L.EQ.3 .and. isplit(jatom).eq.15)     &
> 77     IF(L.EQ.3)                               &
> 78          CALL F7SPLT
> (ALM(1,NUM),BLM(1,NUM),cLM(1,NUM,ipip),MULT(JATOM), &
> 79          PEI(L),num,coord,dmat_f)
>
> So if this should be called only when ISPLIT = 15, then line 76 probably
> shouldn't be commented out.
>
>>
>> b) In ifort uninitial variables are set to zero, so it does not seem to
>> harm (maybe it would if you have f-LOs), but in principle it is a "bug".
>>
>> I'm abroad and the internet connection is not stable enough to make
>> tests, but I'll try to look into it soon.
>>
>>
>> Am 07.10.2013 18:55, schrieb Pavel Ondračka:
>>> Oliver Albertini píše v Po 07. 10. 2013 v 07:56 -0700:
>>>> I had the same problem when I used the wrong -qarch. I had to specify
>>>> pwr7 and the default from siteconfig is pwr5. If you want to find out
>>>> the system architecture issue the prtconf command.
>>>>
>>> Dear Oliver,
>>>
>>> thank for advice, however prtconf reports: "Processor Type:
>>> PowerPC_POWER5" so I should be probably fine with -qarch=pwr5, also it's
>>> kinda strange that you fixed this by setting pwr7. I thought that those
>>> optimization flags were forward compatible...
>>>
>>> For example: IBM docs I've just googled states that -qarch=pwr3
>>> "Produces object code containing instructions that will run on the
>>> POWER5, POWER5+, POWER6, or POWER7 hardware platforms"
>>>
>>> So IMHO compiling with -qarch=pwr5 for pwr7 shouldn't break anything
>>> unless some other weird stuff is going on.
>>>
>>> Best regards
>>> Pavel Ondračka
>>>
>>>> On Oct 7, 2013 3:00 AM, "Pavel Ondračka" <pavel.ondracka at email.cz>
>>>> wrote:
>>>>           Dear WIEN2k mailing list,
>>>>
>>>>           this is a follow up to thread "compilation problems on AIX
>>>>           with xlf90".
>>>>           I've finally managed to compile WIEN2k_13 on AIX 5.3,
>>>>           however I'm now getting a segfault when running lapw2.
>>>>
>>>>           Segmentation fault in f7splt at line 51 in file "" ($t1)
>>>>           could not read "f7splt.f"
>>>>           (dbx) where
>>>>           f7splt(alm = (...), blm = (...), clm = (...), mult = 2, uenorm
>>>>           =
>>>>           0.0028448010014590045, num = 1, coord = '     ', dmat =
>>>>           (...)), line 51
>>>>           in "f7splt.f"
>>>>           csplit(0xfffffffffd8f50c, 0xfffffffffd8f510,
>>>>           0xfffffffffd8a718,
>>>>           0xfffffffffd8976c, 0xfffffffffd8f67c, 0x11023fe30,
>>>>           0x110250590,
>>>>           0x110260cf0), line 78 in "csplit.f"
>>>>           l2main(0xfffffffffffe340, 0xfffffffffffdb84,
>>>>           0xfffffffffffe518,
>>>>           0x1101ac4b0, 0x110000b88, 0xfffffffffffdb80,
>>>>           0xfffffffffffdb90,
>>>>           0xfffffffffffdc48), line 1313 in "l2main_tmp_.F"
>>>>           lapw2(), line 605 in "lapw2_tmp_.F"
>>>>
>>>>           The corresponding lines looks like this:
>>>>           51  dmat(i,j,num)=dmat(i,j,num) + (alm(j)*conjg(alm(i))+ &
>>>>           52  blm(j)*conjg(blm(i))*uenorm+clm(j)*conjg(clm(i))+ &
>>>>           53
>>>>           alm(j)*conjg(clm(i))*pi12lo(ipip,3)+clm(j)*conjg(alm(i))*pi12lo(ipip,3)+
>>>>           &
>>>>           54
>>>>           blm(j)*conjg(clm(i))*pe12lo(ipip,3)+clm(j)*conjg(blm(i))*pe12lo(ipip,3)
>>>>           ) / mult
>>>>
>>>>           Going through all the variables shows suspicious value of ipip
>>>>           =
>>>>           -2147483648, which is used as array index for pi12lo an pe12lo
>>>>           causing
>>>>           the segfault.
>>>>           By grepping through SRC_lapw2 directory I can see, that all
>>>>           other
>>>>           subroutines which use ipip do something like this:
>>>>           $grep "ipip=" *
>>>>           csplit.f: ipip=max(ilo(l),1)
>>>>           d5splt.f: ipip=max(ilo(2),1)
>>>>           p3splt.f: ipip=max(ilo(1),1)
>>>>
>>>>           I'm wondering if there is some similar initialization
>>>>           statement missing
>>>>           in f7splt.f and what should be ipip set to?
>>>>
>>>>           Also I hope this isn't just some result of my inexperienced
>>>>           efforts to
>>>>           make WIEN compile on ancient AIX 5.3 or some other bad
>>>>           configuration.
>>>>
>>>>           Best regards
>>>>           Pavel Ondračka
>>>>
>>>>           _______________________________________________
>>>>           Wien mailing list
>>>>           Wien at zeus.theochem.tuwien.ac.at
>>>>           http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>>>>           SEARCH the MAILING-LIST at:
>>>>            http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>>>> _______________________________________________
>>>> Wien mailing list
>>>> Wien at zeus.theochem.tuwien.ac.at
>>>> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>>>> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>>>
>>>
>>> _______________________________________________
>>> Wien mailing list
>>> Wien at zeus.theochem.tuwien.ac.at
>>> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
>>> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>>>
>>
>
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
>

-- 
Peter Blaha
Inst.Materials Chemistry
TU Vienna
Getreidemarkt 9
A-1060 Vienna
Austria
+43-1-5880115671


More information about the Wien mailing list