X-Recipient: archive-cygwin@delorie.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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=nE5GNDcVTPMR2FBP
	VQKPgHie7JFiXGRIxIyYYloEzx2oQsLwGfcF/mBoEafvay0MELRFd1PbQ1Jhzdxu
	afHOQmscD1s5Usb6AgVpCrCyGpdbo1wnmlXfj1L4YVwtndgN4dMEg/f9wzY3P1tY
	A3xuFshn6ZMWpEnyAcRQo4Fo7E4=
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:message-id:date:from:reply-to:mime-version:to
	:subject:references:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=c3WbOQPqvF4+eEE50zJ+1r
	9dm98=; b=Yz9o6YKefxF6mTi11HPfkKScwiPYjeM/S05ySo64zcyIFB26/eRCU1
	Okv+YlCAnQ8UmZnQS9sNQTXig51mX1/yWWVAfkV9FULvbz1b13cCOMpWhb6IcKkK
	9AAqKTYysfl/KNWSJ1PT8TYiB9/yoBka/Rf5GeewufqQdJ18215Yg=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KAM_MXURI,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: omr-d09.mx.aol.com
Message-ID: <5323099A.2090006@aol.com>
Date: Fri, 14 Mar 2014 09:52:26 -0400
From: Tim Prince <n8tm@aol.com>
Reply-To: tprince@computer.org
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Some Problems about gcc 4.8.2 on cygwin
References: <CAFrJEvN+Rckr6_XDYr5WUWLtYA6T6694bwPZAzUmR8OZdJ-_Zw@mail.gmail.com>
In-Reply-To: <CAFrJEvN+Rckr6_XDYr5WUWLtYA6T6694bwPZAzUmR8OZdJ-_Zw@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
x-aol-global-disposition: G
x-aol-sid: 3039ac1afead5323099c157c
X-AOL-IP: 69.133.204.177


On 3/14/2014 8:42 AM, rexdf Rexdf wrote: 2.It's about OpenMP
<elided stuff which doesn't quote legibly>
Is there a cygwin related question here?  Questions on OpenMP and 
clock() might be tolerated on gcc-help.
Advice on how to make meaningful benchmarks is definitely off topic.

With cygwin g++ 4.9 at -O or -O3 on win8.1 I get
time: 0
as evidently the compiler can shortcut your test loop (is that what you 
wished?).

For the -O0 -fopenmp build,
time: 2484    (1 thread)
time: 2547    (2 threads)
time: 2828    (3 t)
time: 3187    (4 t)
Much as would be expected, as you are asking for the total time spent 
among all threads (usual interpretation of clock()).
The bash time command shows real time decreasing with number of threads 
(close to total clock time divided by number of threads). OpenMP 
provides the function omp_get_wtime() for performance measurement 
(possibly a wrapper for gettimeofday()).
The cygwin library evidently doesn't treat clock() as equivalent to 
omp_get_wtime().  Speculation on how you could find a non-cygwin library 
which treats them as equivalent is probably off topic here.
Anyway, I think your problem is not with the cygwin gcc, unless you are 
looking for the more aggressive optimization of version 4.9.

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

