From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75929 invoked by alias); 4 Jul 2019 04:41:32 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 75921 invoked by uid 89); 4 Jul 2019 04:41:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SEM_URI,SEM_URIRED,SPF_PASS autolearn=ham version=3.3.1 spammy=engineering, UD:F, laptop, dated X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jul 2019 04:41:29 +0000 Received: by mail-wm1-f68.google.com with SMTP id c6so4528778wml.0 for ; Wed, 03 Jul 2019 21:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbcet-ac-in.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=Zdmz5EgYe07t1oQkIOamlZcrLZDtTSrKVLrg3CXZisU=; b=IjzsLHKY5WdHlPfLMr4C1fCQxRKbWIb9YF98c7ToetsP+i3r7xi8J5dKNf+NVNcctK osKJN8BJOnjErU8ls65DmXgo1f8got5T/dQTCCCp5P6CfZfibIAag39dCjmm/Vxa5RSP 6xCDcJA4MaAAYwIzenZwRtJdJ3HccS//bIHcM3krMBEYz/w2TUadTAhFCZne1LnRCeKj u6X6uiGNRj5wsQk+WXliIcoV89E1o5tkIQXFItROc8eEKO86IBmUMEFTe13jXfm59ANE RGbWAcUZXSAiMdHgRCekU6HSzP/cpjxFkuNT/DWHCK11ZpQkhFoOj5u+hEOXg4vTu8uv ZYUQ== MIME-Version: 1.0 From: Krishna Mohan Date: Thu, 04 Jul 2019 04:41:00 -0000 Message-ID: Subject: GCC Fortran + OpenMP : Segmentation Fault Problem To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00021.txt.bz2 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= =3Dsharing 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 files for Makefile from which Makefile gets compile flags etc. Actually I tried to modify file with several options and try to increase by etc. But it doesn= =E2=80=99t produce a good binary which doesn=E2=80=99t show seg.fault. When I analyze this binary using gdb it gives ( ; then ): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D Vna: Cut-off radius for the neutral-atom potential: 3.937239 comcore: Pseudo-core radius Rcore=3D 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=3D) at /home/gpkmo/siesta-4.1-b4/Src/ldau_specs.f:649 #2 0x00000001004f582e in initatom (ns=3D3) 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=3D2, argv=3D0x60004a790) 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=3D0xffffce00, func=3D0x18004= 97f0 , arg=3D0x0, buf=3Dbuf@entry=3D0xffffcdf0) at /usr/src/debug/cygwin-3.0.7-1/winsup/cygwin/cygtls.cc:40 #8 0x0000000180048404 in _cygtls::call (func=3D, arg=3D) 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?) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D 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