From: glen herrmannsfeldt on
Dr Ivan D. Reid wrote:
(snip)

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

Note that you don't have to have a Makefile to use make. There
are some built-in rules (usually in a system file somewhere).

It seems, though, that on the systems I know about the default
rules for Fortran use the f77 compiler. Yes, not even g77.

It seems that f77 calls f2c to convert to C, then compiles
the C code.

-- glen

From: Sebastian Gallinat on
Jinsong.Zhao(a)gmail.com schrieb:
> 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

Looking at the documentation at
http://openmopac.net/manual/installing%20source.html, one can read:

"MOPAC mopac.f90, to_screen.f90, jdate.f90, a Makefile, and CVF build
files for MOPAC2007..."

Maybe they forgot the makefile in the new distribution. For Linux they
wrote:

"Linux

First, copy all the files in directories src_subroutines, src_modules,
and src_interfaces into the directory MOPAC. The original directory
structure was intended for use on a WINDOWS platform, and the use of
separate directories was convenient there. On Linux platforms, the
Makefile utility does not need separate directories for each group of
source files.

Read over the Makefile, and make any changes necessary. The most
probable change would be to replace the FORTRAN compiler, "g95" with a
different compiler.

When the command, "make MOPAC2007.out" is issued from within the
directory MOPAC, the Makefile will build MOPAC2007.out. "


That gives you the hint, that g95 was originally used.
From: Dr Ivan D. Reid on
On Tue, 30 Sep 2008 12:06:23 -0800, glen herrmannsfeldt <gah(a)ugcs.caltech.edu>
wrote in <18mdndT5LsX35X_VnZ2dnUVZ_uqdnZ2d(a)comcast.com>:
> Dr Ivan D. Reid wrote:
> (snip)

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

> Note that you don't have to have a Makefile to use make. There
> are some built-in rules (usually in a system file somewhere).

> It seems, though, that on the systems I know about the default
> rules for Fortran use the f77 compiler. Yes, not even g77.

> It seems that f77 calls f2c to convert to C, then compiles
> the C code.

Looks like I used a _very_ simple makefile; this one from a Convex:

http://people.brunel.ac.uk/~eesridr/mopacmake.txt

--
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: glen herrmannsfeldt on
Dr Ivan D. Reid wrote:


> Looks like I used a _very_ simple makefile; this one from a Convex:

> http://people.brunel.ac.uk/~eesridr/mopacmake.txt

(snip all the makefile except the following)

fc -o mopac $(OBJECTS) $(EXTRAS) $(LDFLAGS)
mv mopac $$HOME/bin/mopac

It is usual in makefiles to use make variables for program
name, $(FC) instead of fc, $(MV) instead of mv.
You can then override it as, for example:

make FC=gfortran MV=cp

-- glen

From: Jinsong.Zhao on
Now, I could get all objects correctly, using gfortran -c ...

Firstly, I compile src_modules, and copy *.mod to src_interfaces,
and then compile src_interfaces. copy *.mod in both directory
to src_subroutines directory, and compile using -c option to get
objects.

Then move all .o to src_subroutines, and invoke the following
command:

gfortran -o Mopac *.o

I get the following error message:

undefined reference to `__funcon_c__fpc_9'
....

I cannot figure out what's wrong.

Any suggestions, thanks!

Regards,
Jinsong
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10
Prev: Segmentation Fault using cron
Next: fortran 90/95 BNF grammar