X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; q=dns; s=default; b=BEA hKNmoi2zTKFR7OYMJEnNVmKIWd/1a60HwY6CKfkNbR2JeVNFlSUCVLFUrnW3Rm0R VOeRGeEqsJPmu4rUIqDvIsG9FS+hO5D+0jgvKk+V4eOsv5bZetG4i6XeQ2A1OZ1t 9vYqgCEQWpBi5NXQ1nL9ZPMuClGXkY88IplI4cNk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; s=default; bh=QokpvWb9/ tKEDD1Gvz386/n8Qz8=; b=kYdqPvy2dpoHO4/wUt6JZIHqFFixCuwZE/HpFlCX7 gNIQATxYc6G4IT6t9cSqIIkX/QOktUlvlSCOnvbLxCLFLYPfglWy97ObZvvjF0xp DK1b9G//qypvI6YeL4iX+CBLBy1GXzMU+q6R17UaZnsGHXHJc0eBtIwT6sumJoAB bs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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, 4 Jul 2019 10:11:15 +0530 Message-ID: Subject: GCC Fortran + OpenMP : Segmentation Fault Problem To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x644g7rd031371 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 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’t produce a good binary which doesn’t show seg.fault. When I analyze this binary using gdb it gives ( ; then ): =================================================================================== 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=) 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 , arg=0x0, buf=buf AT entry=0xffffcdf0) at /usr/src/debug/cygwin-3.0.7-1/winsup/cygwin/cygtls.cc:40 #8 0x0000000180048404 in _cygtls::call (func=, arg=) 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