From: Jinsong.Zhao on
Thank you all very much for your kindly help.

Now, it seems that the problem result from those subroutines that use
module funcon_C in the form like:

USE funcon_C, only : a0, fpc_9, ev

And the error message like:

analyt.o: In function `analyt_':
analyt.F90:(.text+0x2ba): undefined reference to `__funcon_c__a0'
analyt.F90:(.text+0x1875): undefined reference to `__funcon_c__fpc_9'

I am not familiar with Fortran, and gfortran. Could it be eliminated
by a compiler option?
or need to modify the source code, something like:
USE funcon_C

Any suggestions?

Thanks,
Jinsong
From: user1 on
Jinsong.Zhao(a)gmail.com wrote:
> On Oct 1, 11:29 am, user1 <u...(a)example.net> wrote:
>
>> cd src_modules
>> gfortran -c vastkind.f90
>> gfortran -c *.f90
>> copy *.mod ..\Modules
>> ar -r libmodules.a *.o
>> del *.o
>> del *.mod
>>
>> cd ..\src_interfaces
>> gfortran -I..\Modules -c *.f90
>> copy *.mod ..\Modules
>> ar -r libinterfaces.a *.o
>> del *.o
>> del *.mod
>>
>> cd ..\src_subroutines
>> gfortran -I..\Modules -c *.f90
>>
>> gfortran *.o ..\src_modules\libmodules.a ..\src_interfaces\libinterfaces.a
>> -o mopac7.exe
>
> Thank you very much, except the last step, it works well.
>
> The last step also give error message like
>
> analyt.o: In function `analyt_':
> analyt.F90:(.text+0x2ba): undefined reference to `__funcon_c__a0'
> analyt.F90:(.text+0x2c8): undefined reference to `__funcon_c__a0'
> analyt.F90:(.text+0x2ce): undefined reference to `__funcon_c__a0'
> analyt.F90:(.text+0x1875): undefined reference to `__funcon_c__fpc_9'
> analyt.o: In function `delri_':
> analyt.F90:(.text+0x3988): undefined reference to `__funcon_c(...)
> (void)'
> analyt.F90:(.text+0x3995): undefined reference to `__funcon_c__a0'
> analyt.F90:(.text+0x399d): undefined reference to `__funcon_c__a0'
>
> If I change the following line in analyt.F90:
> USE funcon_C, only : a0, fpc_9, ev
> to
> USE funcon_C
>
> Then the error message disappear, however, I don't know whether
> it would give error result.
>
> Thanks again.
> Jinsong


Phoeey. Under Windows, I did modify "external getarg" and "external iargc " as
mentioned elsewhere. That appeared to be sufficient, although I did not test the
resulting mopac7.exe

When I build under linux, I see the same undefined reference stuff
(funcon_c__a0) ...




From: Jinsong.Zhao on
On Oct 1, 7:29 pm, user1 <u...(a)example.net> wrote:
> Jinsong.Z...(a)gmail.com wrote:
> > On Oct 1, 11:29 am, user1 <u...(a)example.net> wrote:
>
> >> cd src_modules
> >> gfortran -c vastkind.f90
> >> gfortran -c *.f90
> >> copy *.mod ..\Modules
> >> ar -r libmodules.a *.o
> >> del *.o
> >> del *.mod
>
> >> cd ..\src_interfaces
> >> gfortran -I..\Modules -c *.f90
> >> copy *.mod ..\Modules
> >> ar -r libinterfaces.a *.o
> >> del *.o
> >> del *.mod
>
> >> cd ..\src_subroutines
> >> gfortran -I..\Modules -c *.f90
>
> >> gfortran *.o ..\src_modules\libmodules.a ..\src_interfaces\libinterfaces.a
> >> -o mopac7.exe
>
> > Thank you very much, except the last step, it works well.
>
> > The last step also give error message like
>
> > analyt.o: In function `analyt_':
> > analyt.F90:(.text+0x2ba): undefined reference to `__funcon_c__a0'
> > analyt.F90:(.text+0x2c8): undefined reference to `__funcon_c__a0'
> > analyt.F90:(.text+0x2ce): undefined reference to `__funcon_c__a0'
> > analyt.F90:(.text+0x1875): undefined reference to `__funcon_c__fpc_9'
> > analyt.o: In function `delri_':
> > analyt.F90:(.text+0x3988): undefined reference to `__funcon_c(...)
> > (void)'
> > analyt.F90:(.text+0x3995): undefined reference to `__funcon_c__a0'
> > analyt.F90:(.text+0x399d): undefined reference to `__funcon_c__a0'
>
> > If I change the following line in analyt.F90:
> > USE funcon_C, only : a0, fpc_9, ev
> > to
> > USE funcon_C
>
> > Then the error message disappear, however, I don't know whether
> > it would give error result.
>
> > Thanks again.
> > Jinsong
>
> Phoeey. Under Windows, I did modify "external getarg" and "external iargc " as
> mentioned elsewhere. That appeared to be sufficient, although I did not test the
> resulting mopac7.exe
>

would you like to test the resulting mopac7.exe?

> When I build under linux, I see the same undefined reference stuff
> (funcon_c__a0) ...

I have to modify the source code by changing USE funcon_C, only : ...
to USE funcon_C, and compile it successfully. However, after running
it using a example input, I get segmentation fault. I have try to
trace the error, find it come from setup_mopac_arrays.f90 line 47.
However, I don't know how to fix it. Maybe it's a fault of gfortran? I
also try to compile it on solaris using f90, however, there are many
errors about "missing '". But I test setup_mopac_arrays.F90, it dose
not give any error.

Regards,
Jinsong
From: user1 on
[snip]

>>
>
> would you like to test the resulting mopac7.exe?
>

If you have a short input file that could be used for testing, perhaps you could
post it.

I am also trying to build it with g95 under Windows. I am picking up compilation
errors under g95 that did not show up under gfortran. Mostly improper
continuation lines.

You do know that Mopac2007 is available free for academic use - as both linux
and windows binaries ??





From: Jinsong.Zhao on
On Oct 1, 9:59 pm, user1 <u...(a)example.net> wrote:
>
> If you have a short input file that could be used for testing, perhaps you could
> post it.

here is a example input file:

------------->begin here<--------------
AM1 T=600 NOINTER VECTORS LOCAL EF
EXAMPLE OF MOPAC DATA-SET FOR ETHYLENE
The only geometric constraint is that the system must be planar
C 0 0 0 0 0 0 0 0 0
C 1.3 1 0 0 0 0 1 0 0
H 1.1 1 120 1 0 0 2 1 0
H 1.1 1 120 1 0 0 1 2 3
H 1.1 1 120 1 180 0 1 2 3
H 1.1 1 120 1 0 0 2 1 5

----------->end here<-----------
>
> I am also trying to build it with g95 under Windows. I am picking up compilation
> errors under g95 that did not show up under gfortran.  Mostly improper
> continuation lines.

I am trying to build it with f90 under solaris, as you mentioned, it
give improper continuation lines. After correct it, the compile could
give correct results.

>
> You do know that Mopac2007 is available free for academic use - as both linux
> and windows binaries ??

Yes, I know it. However, I also hope to compile it from source.

Thanks and 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