From owner-freebsd-fortran@FreeBSD.ORG Mon Sep 2 14:23:35 2013 Return-Path: Delivered-To: fortran@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 35F8322F for ; Mon, 2 Sep 2013 14:23:35 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com [207.126.144.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8540F268B for ; Mon, 2 Sep 2013 14:23:33 +0000 (UTC) Received: from mail-wi0-f170.google.com ([209.85.212.170]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKUiSfXaUfddwwlvURQpAYwLe0la0czylw@postini.com; Mon, 02 Sep 2013 14:23:34 UTC Received: by mail-wi0-f170.google.com with SMTP id cb5so1073818wib.1 for ; Mon, 02 Sep 2013 07:23:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:message-id:to:subject:cc :reply-to:in-reply-to; bh=jVTIAeQBmxvzCFxj987H+RB63XtRokbjZcfFyi204rU=; b=UbxL8KhD8Jf5kcJNuGjz4lgik/AKQFMPST7Ipejn6eY5P/ntyLy2r6Y7MUpmyrHmP2 Gl8+A+MnMLvcLSbp8owriiUrQQZFDmjlhgyWNBDS3aooadEpcoFhB/5Eh2omB25ZKkau EX0aVGsdlYTA9M4QBanNxT4O97swv3vbdlocJx1hpeFXrmqJIYpOFvLjaNVGH4TN32l2 TlhM8oZKgI6FBhjmbwV98y0sZdehG/zADlPHXaXszW2fTyeEa5QTpHukFgdPrPpHqpJ8 76WDborfZZ415QwQpQOxRR1pXgUQz5Knf4bD+aRIHucyIUZ3OP/RMjp3QJRYhlPX0wmi ypvg== X-Gm-Message-State: ALoCoQmV8BicWv/pj+biDsd/sfccUd4yo3R2LPn+kjJ/T/Il/irpiJd6+pqCg+Ealu2ZrTvm+jV0hvS1gqCkqdwu/B+Tu++Yd8DI2qtr/71rt3xKQ/GFtjHPZPIU28RtydJRIqoHp0MXJBd0B0qp4mOGZfy0h82TAA== X-Received: by 10.180.37.164 with SMTP id z4mr14118567wij.30.1378131805821; Mon, 02 Sep 2013 07:23:25 -0700 (PDT) X-Received: by 10.180.37.164 with SMTP id z4mr14118562wij.30.1378131805751; Mon, 02 Sep 2013 07:23:25 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id a8sm18567910wie.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Sep 2013 07:23:24 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6) with ESMTP id r82ENMe1071409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 2 Sep 2013 15:23:22 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.7/8.14.6/Submit) id r82ENMFF071408; Mon, 2 Sep 2013 15:23:22 +0100 (BST) (envelope-from mexas) Date: Mon, 2 Sep 2013 15:23:22 +0100 (BST) From: Anton Shterenlikht Message-Id: <201309021423.r82ENMFF071408@mech-cluster241.men.bris.ac.uk> To: mexas@bris.ac.uk, sgk@troutmask.apl.washington.edu Subject: Re: lazy memory allocation In-Reply-To: <20130824205033.GA55140@troutmask.apl.washington.edu> Cc: fortran@freebsd.org X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bris.ac.uk List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 14:23:35 -0000 >From sgk@troutmask.apl.washington.edu Sat Aug 24 21:53:02 2013 > >That's why you need to do 'allocate(a(10) :: source=0.)'. This >will touch the memory, and should fail on lazy memory allocators >if memory isn't available. I'm looking at MFE, section 15.4.3 Sourced allocation. I think your syntax is wrong. It should be: allocate( a(10), source = 0. ) The double colon (::) is used for typed allocation. Just in case somebody will be reading the archives... Thanks again Anton