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: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 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-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 Reply-To: tprince AT computer DOT 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 AT cygwin DOT com Subject: Re: Some Problems about gcc 4.8.2 on cygwin References: In-Reply-To: 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 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