From owner-chemistry@ccl.net Tue May 8 07:33:00 2007 From: "Toomas Tamm tt-ccl2(_)kky.ttu.ee" To: CCL Subject: CCL:G: Question about coding in Gaussian Message-Id: <-34210-070507043843-2311-LcGpFIc45uGYSkfShCiqtw#,#server.ccl.net> X-Original-From: Toomas Tamm Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 Date: Mon, 7 May 2007 10:38:38 +0300 Mime-Version: 1.0 Sent to CCL by: Toomas Tamm [tt-ccl2^_^kky.ttu.ee] Given the diversity of replies to this question, I wish to express support to the view of Ödön Farkas, which in my opinion best agrees with the symptoms descibed in the original question. L101 and L301 are different executables. All data values are lost once L101 terminates, and initialized to zero when L301 starts. If data needs to be transfered from L101 to L301, it must be written to a disk file in L101 and read back in L301. I do not know how easy or difficult it is to add one's own COMMON block to the list of blocks which need to be written to the read-write file and retrieved in the other link, but this seems to be the way to go. Alternatively, the programmer might write data to a file he creates just for this purpose and then read it back. The latter may be easier to implement for ad-hoc experiments but may create problems (eg with portability) if the code is expected to be used by others, in other environments, etc. -- Toomas Tamm e-mail: tt-ccl2 (at) kky . ttu . ee Chair of Inorganic Chemistry voice: INT+372-620-2810 Tallinn University of Technology fax: INT+372-620-2828 Ehitajate tee 5, EE-19086 Tallinn, Estonia http://www.kk.ttu.ee/toomas/ On Sat, May 05, 2007 at 05:32:06PM +0200, Ödön Farkas farkas%%chem.elte.hu wrote: > > Sent to CCL by: =?ISO-8859-1?Q?=D6d=F6n?= Farkas [farkas++chem.elte.hu] > Hi, > > It seems to be a simple problem. If you want using a COMMON block to > transfer data between different executables, you have to make sure it is > written out to the read-write file and then in the other program it is > read and the COMMON block is initialized. > > Best wishes, > > Ödön > > On Fri, 2007-05-04 at 11:41 -0400, george li lgh19721031*hotmail.com > wrote: > > Sent to CCL by: "george li" [lgh19721031-$-hotmail.com] > > Hi CCLers, > > > > I am new programmer for Gaussian(03). I am trying to use COMMON block to transfer some data between different subroutines, but when I do this, in the sender subroutine (say L101.F) it is OK, which shows all correct values for the variables, but in receiver subroutines (say L301.F) it cannot show correct values, which all of them are zero. > > > > Compilation is no problem. > > > > Could you give me some hints for how to use COMMON block in Gaussian codes? > > > > Thank you very much!!! > > > > Have a great weekend!!!> > > > > > -- > Ödön Farkas > Associate professor > Deparment of Organic Chemistry and > Laboratory of Chemical Informatics, > Institute of Chemistry, > Eötvös Loránd University, Budapest > Address: 1/A Pázmány Péter sétány, > H-1117 Budapest, Hungary > Phone: +36-1-372-2570 > Cell phone: +36-30-255-3111 > Fax: +36-1-372-2620 > URL: http://organ.elte.hu/farkas> >