segfault within CPU_TIME (was: libgfortran/intrinsics/cpu_time.c: No such file or directory.)

Florian flad@gmx.at
Tue Aug 21 21:18:00 GMT 2007


hi,

> 
>> Program received signal SIGFPE, Arithmetic exception. 0x08269919 in
>> *_gfortrani_cpu_time_4 (time=0x1b3fe1c4) at 
>> /home/fx/gfortran_nightbuild/trunk/libgfortran/intrinsics/cpu_time.c:161
>>  161 
>> /home/fx/gfortran_nightbuild/trunk/libgfortran/intrinsics/cpu_time.c:
>> No such file or directory. in 
>> /home/fx/gfortran_nightbuild/trunk/libgfortran/intrinsics/cpu_time.c
>> 
> 
> This error message you're seeing (about missing 
> /home/fx/gfortran_nightbuild/trunk/libgfortran/intrinsics/cpu_time.c)
>  is just the debugger telling that since you don't have the GCC 
> sources, it can't actually show you the source relevant to this
> error. It's not the reason for the segfault at all.
> 
> As to the source of the error, are you by any chance using 
> -ffpe-trap=precision or another -ffpe-trap option? Otherwise, we'd 
> need at least to know you compilation options exactly.
> 

yes, I am using '-ffpe-trap=precision,zero'

(full options: -mtune=i586 -O0 -m32 -static -Wall -fbacktrace
-ffpe-trap=precision,zero -g -fstack-check -fstack-protector-all
-Wstack-protector )

this is the backtrace by gdb:

#0  0x080a8879 in *_gfortrani_cpu_time_4 (time=0x8b032a4)
    at
/home/fx/gfortran_nightbuild/trunk/libgfortran/intrinsics/cpu_time.c:161
#1  0x0805e018 in __logging_MOD_writelogmessage (logtype=@0x81166b0,
message=0x8116426, errnum=0x0, logical1=0x0, logical2=0x0, logical3=0x0,
logical4=0x0, int1=0x0, int2=0x0, int3=0x0, int4=0x0, double1=0x0,
double2=0x0, double3=0x0, double4=0x0, string1=0x0, string2=0x0,
string3=0x0, string4=0x0, oneline=0x0, timer=0x0, filename=0x0,
loopindex=0x0, _message=0, _string1=0, _string2=0, _string3=0,
_string4=0, _filename=0)
    at logging.f90:361
#2  0x08061b99 in __logging_MOD_promptinpfile (inpfile=@0xbfca92ac,
taskpid=0xbfca92a4, loopindex=0xbfca92a8, _inpfile=512)
    at logging.f90:174
#3  0x08064fae in __manpl_interface_MOD_read_manpl_inp
(manpl=@0xbfca92a4, st=@0xbfca92a0)
    at manplinterface.f90:169
#4  0x0806292a in __manpl_interface_MOD_get_manpl
(request_type=@0xbfcaa6d0, startdate=@0xbfcab278,
    timeinterval=@0xbfcab28b, h=0xbfcaa6f0, dh=0xbfcaaa10,
hlev=@0xbfcaa6e0, timestep=@0xbfcaa6a8,
[...SNIP...]
    _add_leo_file=128, _project_id=50, _task_id=50) at
manplinterface.f90:574
#5  0x08048394 in MAIN__ () at MAnPl.f90:79



So logging.f90:361 just contains:
     call CPU_Time(CpuTimer_Reset)

(real, save :: CpuTimer_Reset)

Is this a problem of the cpu_time intrinsic or does the error actually
already occur before?

thanks, florian







More information about the Fortran mailing list