This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange error


Dennis Wassel wrote:
>> maglincont.exe: ../../../libgfortran/generated/matmul_r8.c:96:
>> matmul_r8: Assertion `((a)->dtype & 0x07) == 2 || ((b)->dtype & 0x07) ==
>> 2' failed
>>     
>
> this line checks, if at least one of the arguments to MATMUL is a
> matrix i.e. in Fortran terms, if it has rank 2. It seems one of your
> MATMUL calls is incorrect - please check them.
>
> It is possible that gfortran is lacking a compile- or runtime-check,
>   

The rank is always known at compile time - contrary to the shape/size of
an array. Thus in principle it should be impossible to pass the wrong
rank. I think what happens is that the memory got somehow corrupted and
thus the chunk of memory to which a->dtype & 0x07 points does not
contain the rank but something else. Where the memory got corrupted is
of cause not easy to find. If your program is does not take very long
and if your system is supported, you could enable debugging symbols (-g)
and run it through valgrind. Without a test case, memory corruption
problems are extremely difficult to debug remotely.

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]