Author Topic: FEAPpv installation under Cygwin  (Read 11798 times)

d.brands

  • Jr. Member
  • **
  • Posts: 19
FEAPpv installation under Cygwin
« on: May 14, 2014, 03:29:40 AM »
Dear all,

has anybody experiences with the installation of PEAPpv in the Cygwin
environment?

My configuration:
- Windows 7 64-bit
- Cygwin Version 2.85 (64-bit)
- FEAPpv 3.1

The compilation/installation runs fine.
But if I start FEAPpv it crashs after the confirmation of the filenames
with the following error message:

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

Backtrace for this error:
#0  0x6C546812
#1  0x6C5C6EEB
#2  0x610304E1
Segmentation fault (Speicherabzug geschrieben)


To be sure, I have set the following tasks:
- enable include files from include/integer8 (in makefile.in)
- set ipr=2 in feappv.f (in main)
- using gcc and gfortran for compilation (in makefile.in)

Does anyone knows further ideas one to get rid of the problem?

Thanks in advance
« Last Edit: May 14, 2014, 03:31:30 AM by d.brands »

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: FEAPpv installation under Cygwin
« Reply #1 on: May 14, 2014, 04:10:53 PM »
Please run the attached program it will verify the settings that you should be using to compile.

d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: FEAPpv installation under Cygwin
« Reply #2 on: May 15, 2014, 04:49:53 AM »
It still does not work. The Memprobe response is:

 **** FEAP Memory Prober: Start ****
Your machine's data-types use the following number of bits
 char 8, int 32, long 64, long long 64, float 32, double 64, pointers 64
 Select the integer8 include files in the top level makefile.in
 Set ipr to 2 in main/feapXX.f
 **** FEAP Memory Prober: End ****

and I check the makefile.in and the feappv.f in main. Everything fine. I test it with a fresh downloaded version of FEAPpv.
But FEAPpv ends again with:

         Are filenames correct? ( y or n; s = stop) : y

         R U N N I N G    F E A P p v    P R O B L E M    N O W

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
Aborted (Speicherabzug geschrieben)


Could the problem be the different data models of Windows and Linux/Cygwin, see http://cygwin.com/cygwin-ug-net/programming.html


d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: FEAPpv installation under Cygwin
« Reply #3 on: May 15, 2014, 06:02:51 AM »
Now, after some debuging hours I have found the problem.
In program/contr.f the fortran-function 'fdate' is called
  call fdate( cdate )
This function call cause the crash.
After comment the line, everything works fine (from my point of view).

But what is the problem???

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: FEAPpv installation under Cygwin
« Reply #4 on: May 15, 2014, 09:45:13 AM »
Does fdate in cywgwin has a different set of arguments from what we use?

d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: FEAPpv installation under Cygwin
« Reply #5 on: May 16, 2014, 01:57:23 AM »
In Cygwin it it the gcc/gfortran Compiler Version 4.8.2
Since Cygwin use the original (from my knowledge) Linux-Code, it should be no diverences.
I have also test the usage of fdate via
    cdate = fdate()
but then cdate is empty.

Now I have modifiy the pcontr.f, by using the intrinsic function 'date_and_time'.
I have attached the modified file.

The same holds for the file plot/fppsop.f, which I have attached, too.
« Last Edit: May 16, 2014, 03:02:14 AM by d.brands »

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: FEAPpv installation under Cygwin
« Reply #6 on: May 16, 2014, 06:50:13 PM »
The problem with fdate is probably the length of the string cdate.  Try making cdate longer. 
In the gfortran docs it says it will be empty if the string is too short; the example they have uses a string of length 30.


Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2648
Re: FEAPpv installation under Cygwin
« Reply #7 on: May 17, 2014, 09:32:41 AM »
The format has been set to print dates as: 'Sat Aug 19 18:13:14 1995’.  The cdate*24 is exactly this length.  However, there are some comments that this may not be long enough if your location prints this in another format.  Thus, setting longer may be needed.  This may be more location specific than compiler dependent.

If you can test this with cdata*30 let us know if it corrects the problem.

Thanks

d.brands

  • Jr. Member
  • **
  • Posts: 19
Re: FEAPpv installation under Cygwin
« Reply #8 on: May 19, 2014, 07:40:52 AM »
To increase the size of the character array 'cdate' does not solve the problem.
I have also increase it to size 50 or 75, but no change in the behavior was observed.
I have also test it with a simple 'four-line' fortran program. The same crash occur.
In a later version of the Gfortran under cygwin the problem does not arise.
May be it is a problem in the acutal version of this compiler. For information here the output of
$ gfortran -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/lto-wrapper.exe
Ziel: x86_64-pc-cygwin
Konfiguriert mit: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --libexecdir=/usr/lib
Thread-Modell: posix
gcc-Version 4.8.2 (GCC)

Consequently, I now will work on with the modified source-files, which I posted above.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: FEAPpv installation under Cygwin
« Reply #9 on: May 19, 2014, 09:38:57 PM »
Thanks for checking this for us.  It seems that there is a problem with your particular version.  I wonder if it is only a 4.8.2 + cygwin problem or if it applies to all 4.8.2 versions.