RE: MinGW gfortran and OpenMP issues...

2012-02-01 Thread Nick Chilton
Hi,

I'm still having problems with OpenMP and the x86_64 MinGW compilers -
code which can run fine on Linux with any number of threads (mapped to
different cores) still will only use  one core on an i5 quad core
windows box. Is this a windows limitation or a compiler one?

Compile with:

x86_64-w64-mingw32-gfortran.exe -o a.exe -mno-cygwin -static -O3
-fopenmp -cpp -Domp $(SOURCES) -L/home/Nick/lib/ -llapack -lblas


Nick

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



Re: MinGW gfortran and OpenMP issues...

2012-02-01 Thread Tim Prince

On 2/1/2012 7:03 PM, Nick Chilton wrote:

Hi,

I'm still having problems with OpenMP and the x86_64 MinGW compilers -
code which can run fine on Linux with any number of threads (mapped to
different cores) still will only use  one core on an i5 quad core
windows box. Is this a windows limitation or a compiler one?

Compile with:

x86_64-w64-mingw32-gfortran.exe -o a.exe -mno-cygwin -static -O3
-fopenmp -cpp -Domp $(SOURCES) -L/home/Nick/lib/ -llapack -lblas




According to my understanding, mingw compiler versions aren't supported 
on this list, notwithstanding that cygwin install is probably the best 
way to get them.  However, that compiler gives me good OpenMP 
performance on 6 of 10 test cases, running on an early core I7 with 
HyperThread disabled, Win7SP1.  GOMP_AFFINITY setting as well as 
avoiding Hyper-Threading are likely more important on Windows than 
linux.  Win7SP1 is particularly important when using Hyper-Threading.



--
Tim Prince

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



Re: MinGW gfortran and OpenMP issues...

2012-01-12 Thread Nick Chilton
Andrey,

I have done this, but no difference. I copied the pthreadGC2.dll from
the appropriate MinGW lib in cygwin to the folder and it runs fine!

There is another problem however. While the program says it is running
with 3 threads, it only runs using 25% cpu, spread over 3 cores (Core
i5, quad core) (when I say spread, it's not constant, it seems to jump
about over the cores 0, 1 and 2) . This occurs when I run from cmd or
cygwin. Interstingly, the same behaviour is observed when I only run
it with one thread. The same code compiled with ifort on linux runs
great with the same input on 3 threads using 3 cores (i.e. 300% cpu)
or 1 core if I choose.

Is there a way to flex all cores on a windows box with OpenMP??

Nick

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



MinGW gfortran and OpenMP issues...

2012-01-11 Thread Nick Chilton
Hi,

I'm trying to compile some code with:

x86_64-w64-mingw32-gfortran.exe -o a.exe -mno-cygwin -static -O3 -cpp
-Domp -fopenmp $(SOURCES) -L/lib/ -llapack -lblas

which compiles fine, but upon execution:

a.exe: error while loading shared libraries: ?: cannot open shared
object file: No such file or directory

cygcheck shows it has no dependencies, but it seems to be looking for
something. Code compiles and runs fine when the OMP sections and
-fopenmp flag are removed (sequential) and compiles fine with OpenMP
on Linux using ifort.

Any ideas what I'm missing?

Cheers!
Nick

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



RE: MinGW gfortran and OpenMP issues...

2012-01-11 Thread Mark Hadfield
Do you have the following directory on your PATH?

/usr/x86_64-w64-mingw32/sys-root/mingw/bin

-Original Message-
From: cygwin-ow...@cygwin.com [mailto:cygwin-ow...@cygwin.com] On Behalf Of 
Nick Chilton
Sent: Thursday, 12 January 2012 17:35
To: cygwin@cygwin.com
Subject: MinGW gfortran and OpenMP issues...

Hi,

I'm trying to compile some code with:

x86_64-w64-mingw32-gfortran.exe -o a.exe -mno-cygwin -static -O3 -cpp -Domp 
-fopenmp $(SOURCES) -L/lib/ -llapack -lblas

which compiles fine, but upon execution:

a.exe: error while loading shared libraries: ?: cannot open shared object file: 
No such file or directory

cygcheck shows it has no dependencies, but it seems to be looking for 
something. Code compiles and runs fine when the OMP sections and -fopenmp flag 
are removed (sequential) and compiles fine with OpenMP on Linux using ifort.

Any ideas what I'm missing?

Cheers!
Nick

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

--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water  Atmospheric 
Research Ltd.

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



RE: MinGW gfortran and OpenMP issues...

2012-01-11 Thread Nick Chilton
While I thought the extra PATH dir solved the problem, it only runs
within cygwin. Running in cmd, it says pthreadGC2.dll is missing.
Just slapping one from google in there, I get an 0xc07b
exception...

Nick

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



Re: MinGW gfortran and OpenMP issues...

2012-01-11 Thread Andrey Repin
Greetings, Nick Chilton!

 While I thought the extra PATH dir solved the problem, it only runs
 within cygwin. Running in cmd, it says pthreadGC2.dll is missing.
 Just slapping one from google in there, I get an 0xc07b
 exception...

Make your user PATH equal to what you see in Cygwin terminal.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 12.01.2012, 11:16

Sorry for my terrible english...


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