* GCC Fortran + OpenMP : Segmentation Fault Problem
@ 2019-07-04 4:41 Krishna Mohan
0 siblings, 0 replies; only message in thread
From: Krishna Mohan @ 2019-07-04 4:41 UTC (permalink / raw)
To: cygwin
Dear List,
I am using Cygwin (version: CYGWIN_NT-10.0 DESKTOP-3B1RTJD 3.0.7(0.338/5/3)
2019-04-30 18:08 x86_64 in Windows10)
and GCC (7.4.0) in a x64(intel) quad core laptop. It was installed by
setup-x86_64 dated:14-06-2019.
I really think that my GCC is working fine with Fortran and OpenMP for eg.
the file,
https://people.sc.fsu.edu/~jburkardt/f_src/jacobi_openmp/jacobi_openmp.f90
, is compiled/executed correctly. So I think my GCC/OMP installation is OK.
Here I am trying to compile a Fortran-90 code called Siesta with CygWin
(the Linux version of the code is working just fine with/without OpenMP
support), and it works fine *without* OpenMP support (the binary ,
siesta1cpu.exe, which is created by arch.make.1cpu settings in ./Obj and
using the following commands).
-------------------------------------- CMD-1
----------------------------------------
cd Obj
make clean
cp arch.make.1cpu arch.make
make
mv siesta.exe siesta1cpu.exe
./siesta1cpu.exe < h2o.fdf
---------------------------------------
----------------------------------------
Please also see the link for the directory for its source:
https://drive.google.com/file/d/1uRrWJ2FAfVdJF-zIreUDZCknziZbCFV5/view?usp=sharing
But if you make an OMP vesion (here i used GDB flags for core dump ), by
executing these:
------------------------------------- CMD-2
----------------------------------------
cd Obj
make clean
cp arch.make.OMP arch.make
make
./siesta.exe < h2o.fdf
-------------------------------------
----------------------------------------
It executed but stops by showing a Segmentation Fault Error.
I have attached <arch.make.*> files for Makefile from which Makefile gets
compile flags etc.
Actually I tried to modify <arch.make> file with several options and try to
increase <stacksize>
by <ulimit –s unlimited OR ulimit -s 10000000 > etc. But it doesn’t
produce a good binary which doesn’t show seg.fault.
When I analyze this binary using gdb it gives (<gdb siesta.exe> ; then <run
h2o.fdf>):
===================================================================================
Vna: Cut-off radius for the neutral-atom potential: 3.937239
comcore: Pseudo-core radius Rcore= 1.377587
atom:
_________________________________________________________________________
Thread 1 "siesta" received signal SIGSEGV, Segmentation fault.
___chkstk_ms () at
/usr/src/debug/gcc-7.4.0-1/libgcc/config/i386/cygwin.S:146
146 orq $0x0, (%rcx) /* probe there */
(gdb) where
#0 ___chkstk_ms () at
/usr/src/debug/gcc-7.4.0-1/libgcc/config/i386/cygwin.S:146
#1 0x000000010071b29f in ldau_specs::ldau_proj_gen (isp=<error reading
variable: Cannot access memory at address 0xffc78f78>)
at /home/gpkmo/siesta-4.1-b4/Src/ldau_specs.f:649
#2 0x00000001004f582e in initatom (ns=3) at
/home/gpkmo/siesta-4.1-b4/Src/initatom.f:151
#3 0x000000010060c684 in m_siesta_init::siesta_init () at
/home/gpkmo/siesta-4.1-b4/Src/siesta_init.F:379
#4 0x00000001010d359d in siesta () at
/home/gpkmo/siesta-4.1-b4/Src/siesta.F:53
#5 0x00000001010d3669 in main (argc=2, argv=0x60004a790) at
/home/gpkmo/siesta-4.1-b4/Src/siesta.F:10
#6 0x000000018004a816 in _cygwin_exit_return () at
/usr/src/debug/cygwin-3.0.7-1/winsup/cygwin/dcrt0.cc:1022
#7 0x0000000180048353 in _cygtls::call2 (this=0xffffce00, func=0x1800497f0
<dll_crt0_1(void*)>, arg=0x0, buf=buf@entry=0xffffcdf0)
at /usr/src/debug/cygwin-3.0.7-1/winsup/cygwin/cygtls.cc:40
#8 0x0000000180048404 in _cygtls::call (func=<optimized out>,
arg=<optimized out>) at
/usr/src/debug/cygwin-3.0.7-1/winsup/cygwin/cygtls.cc:27
#9 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
===================================================================================
So please help me to figure out why Cygwin's GCC gives:
___chkstk_ms () error ? Do I want to Compile OpenMP my own rather to use
default's OpenMP libs?
Hope that some GCC developers can try to compile Siesta-OMP version by
using CMD-2's instructions and could execute it without any error!
with thanks in advance
Krishnamohan G P
Mar Baselios College of Engineering and Technology
Trivandrum INDIA 695015
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-04 4:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 4:41 GCC Fortran + OpenMP : Segmentation Fault Problem Krishna Mohan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).