[Developers] (compiler) bug while using AEIDevelopment/TmunuBase

Steve White steve.white at aei.mpg.de
Thu Oct 5 01:24:25 CDT 2006


Luca,

Could be a compiler bug.

Could also be previous stack corruption.

Try compiling with
	-Mbounds -Mchkstk
which turns on array bounds checking and some kind of stack check.

See chapter 3 of the PGI Users guide
	http://www.pgroup.com/resources/docs.htm


On  4.10.06, Luca Baiotti wrote:
> Hi,
> 
> after compiling a configuration including AEIDevelopment/TmunuBase with
> 
> pgf77 6.1-5 64-bit target on x86-64 Linux
> 
> or with
> 
> pgf77 5.2-2
> 
> on two different machines and by running with the attached simple 
> parfile (which does not activate the thorn Tmunu), I get a segmentation 
> fault in CactusEinstein/ADMConstraints/src/ADMConstraints.F at the line 
> which says:
> 
> #include "CalcTmunu.inc"
> 
> When expanded by the preprocessor, this part of the source file reads:
> 
> c                 Include macro for stress energy tensor.
>        if (CCTK_IsThornActive("TmunuBase").eq.1) then
>        if (stress_energy_2_state .ne. 0) then
>          Ttt = Ttt + T2munu_tt(i,j,k)
>          Ttx = Ttx + T2munu_tx(i,j,k)
>          Tty = Tty + T2munu_ty(i,j,k)
>          Ttz = Ttz + T2munu_tz(i,j,k)
>          Txx = Txx + T2munu_xx(i,j,k)
>          Txy = Txy + T2munu_xy(i,j,k)
>          Txz = Txz + T2munu_xz(i,j,k)
>          Tyy = Tyy + T2munu_yy(i,j,k)
>          Tyz = Tyz + T2munu_yz(i,j,k)
>          Tzz = Tzz + T2munu_zz(i,j,k)
>        end if
>        end if
> 
> and so should be harmless. Instead the segmantation fault is caused by 
> something in the inner if-statement: if I remove its content, the 
> segmantation fault disppears.
> 
> I I turn off optimization. the segmentation fault also disappears.
> 
> This problem is easily reproduced by running the attached parfile.
> 
> Is this a compiler bug or what?
> 
> 
> Ciao,
> 
> Luca.
> 

> Cactus::cctk_full_warnings = yes
> 
> Cactus::terminate   = "iteration"
> Cactus::cctk_itlast = 1
> 
> 
> ActiveThorns = "IOUtil"
> 
> IO::out_dir       = $parfile
> 
> 
> ActiveThorns = "Carpet CarpetLib CarpetReduce"
> 
> Carpet::domain_from_coordbase = yes
> 
> driver::ghost_size              = 2
> 
> 
> ActiveThorns = "Boundary CartGrid3D CoordBase SymBase"
> 
> CoordBase::domainsize = "minmax"
> 
> CoordBase::xmin = -3.0
> CoordBase::ymin = -3.0
> CoordBase::zmin = -3.0
> CoordBase::xmax =  3.0
> CoordBase::ymax =  3.0
> CoordBase::zmax =  3.0
> CoordBase::dx   =  0.1
> CoordBase::dy   =  0.1
> CoordBase::dz   =  0.1
> 
> CartGrid3D::type = "coordbase"
> 
> 
> ActiveThorns = "ADMBase ADMCoupling ADMMacros CoordGauge SpaceMask StaticConformal ADMConstraints"
> 
> ADMConstraints::constraints_persist	= yes
> 
> 
> ActiveThorns = "Time"
> 
> Time::dtfac = 0.25
> 
> 
> ActiveThorns = "MoL"
> 
> MoL::ODE_Method = "RK3"
> 
> 
> ActiveThorns = "BSSN_MoL"
> 
> ADMBase::evolution_method = ADM_BSSN
> 
> 
> ActiveThorns = "CarpetIOBasic"
> 
> IOBasic::outInfo_every      = 1
> IOBasic::outInfo_vars       = "ADMBase::gxx"
> 
> 
> ActiveThorns = "CarpetIOScalar"
> 
> IOScalar::outScalar_every = 1
> IOScalar::outScalar_vars  = "ADMConstraints::hamiltonian"
> 
> 
> ActiveThorns = "CarpetIOASCII"
> 
> IOASCII::out1D_every = 1
> IOASCII::out1D_vars  = "ADMConstraints::hamiltonian"

> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers


-- 
Steve White : Programmer
Max-Planck-Institut für Gravitationsphysik      Albert-Einstein-Institut
Am Mühlenberg 1, D-14476 Golm, Germany                  +49-331-567-7625



More information about the Developers mailing list