From: Jinsong.Zhao on 30 Sep 2008 06:21 Hi there, I am new to fortran, and I hope to know how to compile the Mopac 7.1 obtained from: http://openmopac.net/Downloads/Mopac_7.1source.zip It seems that the code is in F90 free format. I hope to use g77 or gfortran under Linux platform. Any suggestion about how to compile it or about how to write a Makefile are appreciated. Regards, Jinsong
From: Richard Maine on 30 Sep 2008 07:25 Jinsong.Zhao(a)gmail.com <Jinsong.Zhao(a)gmail.com> wrote: > I am new to fortran, and I hope to know how to compile the Mopac 7.1 > obtained from: > http://openmopac.net/Downloads/Mopac_7.1source.zip > It seems that the code is in F90 free format. > > I hope to use g77 or gfortran under Linux platform. > > Any suggestion about how to compile it or about how to write a > Makefile are appreciated. Looks like a bit more that I feel like tackling at the moment - about 55,000 lines of code in about 200 source files, with no obvious documentation, even so much as a README file. There really wasn't any documentation at all with a package of this size? That seems odd. I suppose I could paw around to try to find it, perhaps even elsewhere on the same site, but that's more work than I feel like. Anyway... The one comment I can make right away is that you are correct that it is f90 code, and heavily so. Thus even looking at g77 is a waste of time. G77 isn't an f90 compiler; it's an f77 one. GFortran would be another matter. -- Richard Maine | Good judgement comes from experience; email: last name at domain . net | experience comes from bad judgement. domain: summertriangle | -- Mark Twain
From: Jinsong.Zhao on 30 Sep 2008 08:11 On Sep 30, 7:25 pm, nos...(a)see.signature (Richard Maine) wrote: > > Looks like a bit more that I feel like tackling at the moment - about > 55,000 lines of code in about 200 source files, with no obvious > documentation, even so much as a README file. There really wasn't any > documentation at all with a package of this size? That seems odd. I > suppose I could paw around to try to find it, perhaps even elsewhere on > the same site, but that's more work than I feel like. Anyway... > There is no any document, even the older version, which is in F77 format and could be compiled under Linux platform. > The one comment I can make right away is that you are correct that it is > f90 code, and heavily so. Thus even looking at g77 is a waste of time. > G77 isn't an f90 compiler; it's an f77 one. GFortran would be another > matter. > If I intercept what you said correctly, GFortran should be used here to compiled the code. Then, how to write the Makefile? Just put all source code together, and then execute gfortran? Thanks again, Jinsong
From: Dr Ivan D. Reid on 30 Sep 2008 09:43 On Tue, 30 Sep 2008 05:11:28 -0700 (PDT), Jinsong.Zhao(a)gmail.com <Jinsong.Zhao(a)gmail.com> wrote in <9fdec340-d90b-495b-b61f-40547f141e77(a)c65g2000hsa.googlegroups.com>: > On Sep 30, 7:25�pm, nos...(a)see.signature (Richard Maine) wrote: >> Looks like a bit more that I feel like tackling at the moment - about >> 55,000 lines of code in about 200 source files, with no obvious >> documentation, even so much as a README file. There really wasn't any >> documentation at all with a package of this size? That seems odd. I >> suppose I could paw around to try to find it, perhaps even elsewhere on >> the same site, but that's more work than I feel like. Anyway... >> > There is no any document, even the older version, which is in F77 > format and could be compiled under Linux platform. >> The one comment I can make right away is that you are correct that it is >> f90 code, and heavily so. Thus even looking at g77 is a waste of time. >> G77 isn't an f90 compiler; it's an f77 one. GFortran would be another >> matter. > If I intercept what you said correctly, GFortran should be used here > to > compiled the code. Then, how to write the Makefile? Just put all > source > code together, and then execute gfortran? With an earlier version of MOPAC I did just that, concatenated all the source files. IIRC I had to re-split it back to 4 files as Microsoft Fortran 5 wouldn't handle the one file, on a 33 MHz 80486. I have vague recollections of using a makefile on UNIX systems; I can look up my archives tonight. The F77 code at that time was a bit amateurish in places; I sped up the UHF calculations by a considerable amount with just a small amount of refactoring. -- Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration, Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN KotPT -- "for stupidity above and beyond the call of duty".
From: dpb on 30 Sep 2008 10:19
Jinsong.Zhao(a)gmail.com wrote: .... > ... Then, how to write the Makefile? Just put all source code > together, and then execute gfortran? > .... I'm not at all familiar w/ Linux but for quick 'n dirty w/ Windows I typically use a command line something like for %f in (*.f) do compile %f where compile.bat is a batch file that calls the Fortran compiler For projects stored in flat directory structure and w/o specific ordering for compilation this works as a brute force "compile all" solution. In F90, one needs to be sure those files which are modules and USEd in other files are compile first, of course. Other than the simple-minded approach, writing a make file would be the logical next step. If there isn't one in the distribution package, one would presume (hopefully) that would imply a straight ahead approach would work out ok... -- |