[Octopus-users] segfault in zdotc

matthieu verstraete Matthieu.Verstraete at ulg.ac.be
Thu Feb 4 10:47:04 WET 2010


Hi David, great!

Here is my test program - it returns a real, which should be small
(less than 1.e-5 for numerical precision), otherwise it is 138 or so.
I also tried to do a comparison like abs(res1-res2) but this randomly
(really randomly) gives a segfault in execution, instead of just a
erroneous value, and I found this harder to treat in my Makefile than
the raw value. The program could be shortened somewhat if you so
desire.

Ciao

Matthieu


========================================
program testzdotc

implicit none

complex*16, allocatable :: f1(:), f2(:)
complex*16 :: result1, result2
complex*16, external :: zdotc
integer :: nn, ii


nn=100

allocate(f1(nn), f2(nn))

result1 = cmplx(0.0d0,0.0d0)
do ii=1, nn
  f1(ii) = cmplx(exp(real(ii)/real(nn)), 0.0d0)
  f2(ii) = cmplx(cos(real(ii)/real(nn)), 0.0d0)
  result1 = result1 + exp(real(ii)/real(nn))*cos(real(ii)/real(nn))
end do

result2 = cmplx(0.0d0,0.0d0)
result2 = zdotc(nn,f1,1,f2,1)

print *, real(result1-result2)
print *

end program
========================================



On Fri, Jan 29, 2010 at 8:47 PM, David Strubbe <dstrubbe at berkeley.edu> wrote:
> Matthieu,
>
> If you send your test program to discriminate between the proper and
> broken behavior of zdotc, and how it should be compiled, I can try to
> add it to the configure script.
>
> David
>
> On Fri, Jan 29, 2010 at 1:38 AM, Francesco Sottile
> <Francesco.Sottile at polytechnique.edu> wrote:
>> On Fri, 29 Jan 2010, matthieu verstraete wrote:
>>
>>> Again again zdotc,
>>>
>>> apparently this is a frequent but very restricted problem, that only
>>> happens with the zdotc and cdotc routines in blas, in particular on
>>> mac, but also (as in my case) on normal intel with gfortran/g77 (yuck)
>>> mixes
>>>
>>
>> Hi all,
>> it's no so restricted, after all. After having some problems with the diago
>> routine of lapack (infinite loop with 100% cpu occupation), I sistematically
>> compile blas, lapack (even fftw) with the same fortran compiler (and same
>> version) I use to compile the codes. Never had problems since.
>>
>> f.
>>
>>
>>
>>> If someone who knows the autostuff is up to it (anyone?) it would be
>>> good to add a zdotc test in the configure, and/or to replace that
>>> specific call with some inline code in lalg or blas.F90, as Xavier has
>>> done for some other routines (in lapack I believe).
>>>
>>> Cheers
>>>
>>> Matthieu
>>>
>>>
>>> Beautiful:
>>>   testfile                                          # failed testcases
>>>   --------------------------------------------------------------------
>>>   finite_systems_3d/07-spin_orbit_coupling.test     34
>>>   finite_systems_3d/09-spinors.test                 4
>>>
>>> almost perfect! Never seen this before for octopus on my builds!
>>>
>>> On Fri, Jan 29, 2010 at 12:12 AM, matthieu verstraete
>>> <matthieu.jean.verstraete at gmail.com> wrote:
>>>>
>>>> Hello again,
>>>>
>>>> everything's fine (and I believe I had seen this before, sorry). It's
>>>> the blas libs on my cluster which are broken!
>>>>
>>>> A ridiculous little test program with zdotc breaks down for almost all
>>>> the versions of blas installed (including /usr/lib64/libblas.a of
>>>> course, but also libgoto and a bunch of others). I basically have to
>>>> compile the blas myself with ifort to make it work, and then octopus
>>>> goes through smoothly. I'll run the tests now too.
>>>>
>>>> Ciao
>>>>
>>>> Matthieu
>>>>
>>>>
>>>> On Wed, Jan 27, 2010 at 8:30 PM, matthieu verstraete
>>>> <matthieu.jean.verstraete at gmail.com> wrote:
>>>>>
>>>>> Hello all,
>>>>>
>>>>> I have a persistent problem in a low level zdotc call in octopus, on
>>>>> ifort 11/ xeon/ openmpi. I have the latest svn version but this has
>>>>> been happening for months now:
>>>>>
>>>>> Many tests and runs are ok, but I get the following in a td run on a
>>>>> small molecule:
>>>>>
>>>>> gdb octopus
>>>>> .../... runs and stops after
>>>>>
>>>>> Input: [RelativisticCorrection = non_relativistic]
>>>>> Input: [TDGauge = length]
>>>>> Input: [AbsorbingBoundaries = not_absorbing]
>>>>> Info: Generating external potential
>>>>> Input: [MoveIons = vel_verlet]
>>>>> Input: [TDDynamics = ehrenfest]
>>>>> Input: [TDEvolutionMethod = aetrs]
>>>>> Input: [TDExponentialMethod = taylor]
>>>>> Info: Loading restart information.
>>>>> [New Thread 0x2ad6a262a780 (LWP 11650)]
>>>>>
>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>> 0x00002ad6a0e95a41 in zdotc_ () from
>>>>> /cvos/shared/apps/gotoblas/penryn/64/1.26/libgoto.so
>>>>> (gdb) up
>>>>> #1  0x0000000000dedfb4 in lalg_basic_m_mp_dot_4_ ()
>>>>> (gdb)
>>>>> #2  0x0000000000c432d4 in mesh_function_m_mp_zmf_dotp_2_ ()
>>>>> (gdb)
>>>>> #3  0x000000000078225e in energy_m_mp_zcalculate_eigenvalues_ ()
>>>>> (gdb)
>>>>> #4  0x0000000000806f43 in v_ks_m_mp_v_ks_calc_ ()
>>>>> (gdb)
>>>>> #5  0x00000000005eb4a7 in td_mtd_run_mp_init_wfs_ ()
>>>>> (gdb)
>>>>> #6  0x00000000005e6193 in td_m_mp_td_run_ ()
>>>>>
>>>>>
>>>>> And a great many tests fail with the same error (not all are td runs,
>>>>> as far as I can tell). I have tried replacing the blas lib, and the
>>>>> same happens with libgoto libblas etc... so it is certainly something
>>>>> in the way it is called. I have also tried replacing the zdotc call
>>>>> explicitly with boring loops in the code, and the segfault goes away,
>>>>> but this is not a solution. Does anyone have an idea or a suggestion
>>>>> what to change? Could it be the preprocessing of the linalg stuff on
>>>>> my particular platform? Or my compiler options(config.log attached)?
>>>>> Aaargh!
>>>>>
>>>>> cheers
>>>>>
>>>>> Matthieu
>>>>>
>>>>>
>>>>> PS: the only good octopus is an octopus that's chopped up with oil and
>>>>> chilli pepper
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>> Prof. Matthieu Verstraete
>>>>>
>>>>> Universite de Liège
>>>>> Institut de Physique, Bat. B5, 3/7
>>>>> Allée du 6 aout, 17
>>>>> B- 4000 Sart Tilman, Liège
>>>>> Belgium
>>>>>
>>>>> Associate member European Theoretical Spectroscopy Facility (ETSF
>>>>> http://www.etsf.eu)
>>>>>
>>>>> Phone : +32 4 366 90 17
>>>>> Fax   : +32 4 366 36 29
>>>>>
>>>>> Mail : matthieu.verstraete at ulg.ac.be
>>>>>          matthieu.jean.verstraete at gmail.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> Prof. Matthieu Verstraete
>>>>
>>>> Universite de Liège
>>>> Institut de Physique, Bat. B5, 3/7
>>>> Allée du 6 aout, 17
>>>> B- 4000 Sart Tilman, Liège
>>>> Belgium
>>>>
>>>> Associate member European Theoretical Spectroscopy Facility (ETSF
>>>> http://www.etsf.eu)
>>>>
>>>> Phone : +32 4 366 90 17
>>>> Fax   : +32 4 366 36 29
>>>>
>>>> Mail : matthieu.verstraete at ulg.ac.be
>>>>          matthieu.jean.verstraete at gmail.com
>>>>
>>>
>>>
>>>
>>> --
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> Prof. Matthieu Verstraete
>>>
>>> Universite de Liège
>>> Institut de Physique, Bat. B5, 3/7
>>> Allée du 6 aout, 17
>>> B- 4000 Sart Tilman, Liège
>>> Belgium
>>>
>>> Associate member European Theoretical Spectroscopy Facility (ETSF
>>> http://www.etsf.eu)
>>>
>>> Phone : +32 4 366 90 17
>>> Fax   : +32 4 366 36 29
>>>
>>> Mail : matthieu.verstraete at ulg.ac.be
>>>         matthieu.jean.verstraete at gmail.com
>>>
>>> _______________________________________________
>>> Octopus-users mailing list
>>> Octopus-users at tddft.org
>>> http://www.tddft.org/mailman/listinfo/octopus-users
>>>
>>
>>
>> =====================================================
>>  Francesco Sottile
>>  email: francesco.sottile at polytechnique.edu
>>  web: http://etsf.polytechnique.fr/
>>
>>  Laboratoire des Solides Irradies (LSI)
>>  Ecole Polytechnique 91128 Palaiseau cedex, France
>>  Tel. 0033-1-69334549   (Fax. 0033-1-69334543)
>>
>>  European Theoretical Spectroscopy Facility (ETSF)
>>  http://www.etsf.eu
>> =====================================================
>> _______________________________________________
>> Octopus-users mailing list
>> Octopus-users at tddft.org
>> http://www.tddft.org/mailman/listinfo/octopus-users
>>
>>
>



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Prof. Matthieu Verstraete

Universite de Liège
Institut de Physique, Bat. B5, 3/7
Allée du 6 aout, 17
B- 4000 Sart Tilman, Liège
Belgium

Associate member European Theoretical Spectroscopy Facility (ETSF
http://www.etsf.eu)

Phone : +32 4 366 90 17
Fax   : +32 4 366 36 29

Mail : matthieu.verstraete at ulg.ac.be
          matthieu.jean.verstraete at gmail.com



More information about the Octopus-users mailing list