Author Topic: Error while running job after successful installation of feap 8.6  (Read 4383 times)

Rahul

  • Jr. Member
  • **
  • Posts: 18
Error while running job after successful installation of feap 8.6
« on: September 04, 2022, 12:16:13 AM »
Hello Everyone,

I have installed feap 8.6 in Ubuntu 16.04 and tried to run the example problem (attached input file). I am getting the following error when I am running the job.

*****
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7FB349C59E08
#1  0x7FB349C58F90
#2  0x7FB3491314BF
#3  0x41DAD0 in pzeroi_ at pzeroi.f:29 (discriminator 2)
#4  0x643580 in setmem_ at setmem.f:119
#5  0x4DA704 in usetmem_ at usetmem.f:55
#6  0x441E54 in ualloc_ at ualloc.f:58
#7  0x41DCC4 in palloc_ at palloc.f:808
#8  0x479DC9 in pnewprob_ at pnewprob.f:667
#9  0x40440F in pcontr_ at pcontr.f:957
#10  0x403101 in feap at feap86.f:175
#11  0x7FB34911C83F
Segmentation fault (core dumped)
****
Could you please help me with the above error?

Thanking you

Regards
Rahul Jangid

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: Error while running job after successful installation of feap 8.6
« Reply #1 on: September 04, 2022, 12:42:47 AM »
Your input file runs fine on my machine.   What compiler are you using?

Perhaps you can put some debugging code into the call chain. 

The error is being thrown when the code is trying to allocate and zero the memory for
the array LD on line 677 in pnewprob.f.  I wonder what your code thinks l3 is at
this location.  Also in pzeroi.f, I wonder what it thinks nn is.

One quick idea is to try to replace the initialization statement
Code: [Select]
ii(:) = 0with a do-loop from 1 to nn.

Rahul

  • Jr. Member
  • **
  • Posts: 18
Re: Error while running job after successful installation of feap 8.6
« Reply #2 on: September 04, 2022, 01:01:14 AM »
The gfortran compiler I am using.
I am using this make file to install feap (attached file).
I got this after installation.

****
--->/home/willkin/Downloads/FEAP_NEW/ver86/contact/util objects now up-to-date<---
make[2]: Leaving directory '/home/willkin/Downloads/FEAP_NEW/ver86/contact/util'
make[1]: Leaving directory '/home/willkin/Downloads/FEAP_NEW/ver86/contact'
--> Feap Archive updated <--
(cd main; make feap)
make[1]: Entering directory '/home/willkin/Downloads/FEAP_NEW/ver86/main'
ranlib /home/willkin/Downloads/FEAP_NEW/ver86/Feap8_6g.a
gfortran -o feap feap86.o  \
/home/willkin/Downloads/FEAP_NEW/ver86/Feap8_6g.a -L/opt/X11/lib -L/usr/local/lib -lX11 -lm -ljpeg -lblas -llapack
--> FEAP executable made <--
make[1]: Leaving directory '/home/willkin/Downloads/FEAP_NEW/ver86/main'
*****

Rahul

  • Jr. Member
  • **
  • Posts: 18
Re: Error while running job after successful installation of feap 8.6
« Reply #3 on: September 04, 2022, 01:17:43 AM »
I changed the file as suggested.
***
!$Id:$
      subroutine pzeroi(ii,nn)

!      * * F E A P * * A Finite Element Analysis Program

!....  Copyright (c) 1984-2022: Regents of the University of California
!                               All rights reserved

!-----[--.----+----.----+----.-----------------------------------------]
!     Modification log                                Date (dd/mm/year)
!       Original version                                    01/11/2006
!       1. Remove loop on 'n'                               30/01/2018
!-----[--.----+----.----+----.-----------------------------------------]
!      Purpose: Zero integer array of data

!      Inputs:
!         nn     - Length of array

!      Outputs:
!         ii(*)  - Array with zero values
!-----[--.----+----.----+----.-----------------------------------------]
      implicit  none

      integer      :: nn
      integer      :: ii(nn)

      save

      do k1 = 1,nn
        ii(k1) = 0
      end do


      end subroutine pzeroi
*****
I am getting the following error when I try to install the program.
--->/home/willkin/Downloads/FEAP_NEW/ver86/program objects now up-to-date<---
makefile:16: recipe for target 'archive' failed
make[1]: *** [archive] Error 1
make[1]: Leaving directory '/home/willkin/Downloads/FEAP_NEW/ver86/program'
makefile:20: recipe for target 'archive' failed
make: *** [archive] Error 2

Rahul

  • Jr. Member
  • **
  • Posts: 18
Re: Error while running job after successful installation of feap 8.6
« Reply #4 on: September 04, 2022, 01:54:23 AM »
The problem has been solved. It was an error because of the "ipr value" in feap86.f. Previously I had ipr=1; now, I changed it to ipr=2. The example problem is working fine.

Thank you

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: Error while running job after successful installation of feap 8.6
« Reply #5 on: September 04, 2022, 02:07:11 AM »
Great.  ipr=1 is used only in special situations.  FYI, ipr stands for "integers per real".  When set to one, you are essentially telling FEAP that your set up is one in which the same number of bytes are used to store an integer as are used to store a double precision real.  This option is pretty rarely used (though it is useful if one needs to solve very large problems that require very long arrays that can not be indexed with standard 4-byte integers).

PS: in your edit of pzeroi.f you forgot to declare k1 as an integer.
« Last Edit: September 04, 2022, 02:25:31 AM by Prof. S. Govindjee »