Portrait de konstant@mail.ntua.gr

TRANSPOSE gives segmantation fault with large matrices when computing TRANSPOSE(DCONJG(A)). No error if one computer TRANSPOSE(A) and then DCONJG(A) or FORALL(i=1:N,j=1:N) A(i,j) = DCONJG(C(j,i)). In the attached  code the program crashes appx for NMAT > 800 

. No info in core file or in idb, program crashes immediately

. gfortran does not crash


Applies to:

ifort version 13.1.2,  ifort version 12.1.0, ifort version 12.1.2

Linux 3.8.0-19-generic, 2.6.32-22-generic-pae, 2.6.32-33-server

gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3, gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3,gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

RAM is 4GB on all systems

Fichier attachéTaille
Téléchargement bug.f901.16 Ko
2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Casey

You are probably overflowing the stack.  There are two things you can do that should help: 1) increase the limit on your stack size ('ulimit -s unlimited') or 2) add -heap-arrays to your compile options.  The first option will increase stack limits so lare automatic arrays won't overflow it (and cause the segfault) and the second option will cause automatic arrays to be allocated on the heap which avoids any limits on the stack.

The specifics on your problem is in your call TRANSPOSE(DCONJG(A)).  This causes an automatic array to be created behind the scenes to hold the result of DCONJG(A), which is then passed to TRANSPOSE().  This temporary array by default is created on the stack and if it does not fit in the stack your program will crash.  You are notcing this at a threshold NMAT because that threshold corresponds to the free space in your stack.  If you increase your stack size, you'll find that threshold increases.  

Connectez-vous pour laisser un commentaire.