Author Topic: Segmentation fault in pplotf/PRAX  (Read 3165 times)

aza

  • Jr. Member
  • **
  • Posts: 11
Segmentation fault in pplotf/PRAX
« on: May 02, 2017, 05:29:23 AM »
Dear FEAP experts,

I recently encountered a problem with plotting the principal directions (command PRAX). If the number of nodal points in the attached input file exceeds a certain value, a segmentation fault occurs when accessing hr(k5) in subroutine pplotf.f.
Is there a simple way to fix this? I use FEAP version 8.2 with pplotf.f lastly changed in 04/2008, which is therefore not at all up to date.

Thanks for any suggestions,
aza

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2648
Re: Segmentation fault in pplotf/PRAX
« Reply #1 on: May 02, 2017, 01:25:06 PM »
What operating system, did you change the dimensions on hr(*) and mr(*) as noted at the web site.

How many nodes causes the error?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2648
Re: Segmentation fault in pplotf/PRAX
« Reply #2 on: May 02, 2017, 01:33:16 PM »
It fails in 8.4 too so we will have to look to see what the difficulty is.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2648
Re: Segmentation fault in pplotf/PRAX
« Reply #3 on: May 02, 2017, 01:38:35 PM »
Probably you ran out of memory.  It works on some of my machines and crashes on others.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2648
Re: Segmentation fault in pplotf/PRAX
« Reply #4 on: May 02, 2017, 02:45:40 PM »
I had not recompiled my program after changes and now your problem does run on all my machines.
 
The error in your version relates to the hr(k5).   Here k5 is an integer*4 whereas pointers are supposed to be integer*8.  Later versions correct all this.  Basically, we added an include in the include/integer4 and include/integer8 directories that define values of correct precision and then replace the k5 by these.  But there are lots of changes that need to be done to ensure that correct pointers are recovered.  So at some point you should consider upgrading your program.

aza

  • Jr. Member
  • **
  • Posts: 11
Re: Segmentation fault in pplotf/PRAX
« Reply #5 on: May 03, 2017, 12:47:44 AM »
In other subroutine calls in pplotf.f, k5 has to be defined as integer*4. So would it be okay as a temporary solution to define an integer*8 k6 and to call prax with hr(k6)? I'm not sure about consequences which I don't survey, but it seems to work so far.

If it is still of interest for you, my operating system is Linux.
The dimensions of hr(*) and mr(*) have not been changed in my version. Do you refer to your comment here: http://feap.berkeley.edu/forum/index.php?topic=1344.msg4751#msg4751? Would you suggest me to make this change?

Many thanks for your support.