This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC Fortran + OpenMP : Segmentation Fault Problem

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,
, 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
mv siesta.exe siesta1cpu.exe
./siesta1cpu.exe < h2o.fdf

Please also see the link for the directory for its source:

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
./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

Vna:  Cut-off radius for the neutral-atom potential:   3.937239
comcore: Pseudo-core radius Rcore=  1.377587


Thread 1 "siesta" received signal SIGSEGV, Segmentation fault.
___chkstk_ms () at
146             orq     $0x0, (%rcx)            /* probe there */
(gdb) where
#0  ___chkstk_ms () at
#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
#3  0x000000010060c684 in m_siesta_init::siesta_init () at
#4  0x00000001010d359d in siesta () at
#5  0x00000001010d3669 in main (argc=2, argv=0x60004a790) at
#6  0x000000018004a816 in _cygwin_exit_return () at
#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/
#8  0x0000000180048404 in _cygtls::call (func=<optimized out>,
arg=<optimized out>) at
#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:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]