CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   running gfortran + openmp on OS X El Capitan 10.11.15 (https://www.cfd-online.com/Forums/main/173125-running-gfortran-openmp-os-x-el-capitan-10-11-15-a.html)

AliVali June 14, 2016 02:04

running gfortran + openmp on OS X El Capitan 10.11.15
 
I am running gfortran with openmp on my macbook pro (OS X El Capitan 10.11.15). My code runs without -fopenmp, perfectly. However when I want to run it in parallel threads, it recognizes the number of threads but it doesn't go correctly through a loop. here is an example of the outpu:


Hello I am thread 4
Hello I am thread 1
Hello I am thread 2
Hello I am thread 3
Hello I am thread 5
Hello I am thread 6
Hello I am thread 0
Hello I am thread 7
Number of threads = 8
Number of threads2 = 8
nstep,time 0
Illegal instruction: 4

I tried these compiling command :
gfortran -g -o turb -O -fbacktrace -fopenmp -ffixed-line-length-none -fdefault-real-8

and

gfortran -g -p -o turb -Wall -O2 -fbacktrace -fopenmp -Wl,-stack_size,0x40000000,-stack_addr,0xf0000000 -fbounds-check -ffixed-line-length-none -fdefault-real-8 -fno-align-commons

Both give the same error message. and here is the version I use:
$ gfortran --version
GNU Fortran (GCC) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.

Any help is highly appreciated.


All times are GMT -4. The time now is 04:49.