Re: Fortran Error Problem



Plz give me advice... at engr_zia76@xxxxxxxxx

ERROR IS :

Compiling Fortran...
C:\MSDEV\Projects\truss\Text1.f90
Linking...
Text1.obj : error LNK2001: unresolved external symbol _X@4
Debug/Text1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Text1.exe - 2 error(s), 0 warning(s)
======================================

On Nov 27, 10:07 pm, engrzi...@xxxxxxxxx wrote:
I am new user of fortran. Trying it first time . Infact to make some
change in code of optimization of 10 bar truss. elimitated 70 errors
but the last one is not eliminated. So i cant run the code i have. Can
anybody help me to run this code. THX.. do email me on
[engr_zi...@xxxxxxxxx[ .

==================

! Program for 10 bar truss optimization yet under process of debugging
by Zia !

REAL, DIMENSION(8) :: P
REAL, DIMENSION(8,8) :: A
REAL, DIMENSION(8,8) :: U
REAL, DIMENSION(10) :: STRS
REAL, DIMENSION(10) :: PENALTY
REAL, DIMENSION(8) :: D

Ps=X(1)+X(2)+X(3)+X(4)+X(5)+X(6)+SQRT(2.)*(X(7)+X(8)+X(9)+X(10))

RL=360.
RHO=0.1

VALUE=RHO*RL*Ps
OBJ=VALUE

! DEFINE CONSTRAINTS

P(1)=0.
P(2)=0.
P(3)=0.
P(4)=0.
P(5)=0.
P(6)=100000.
P(7)=0.
P(8)=100000.

PAR=2.*DSQRT(2.D0)

A(1,1)=X(1)+X(2)+(X(8)+X(9))/PAR
A(1,2)=(-X(8)+X(9))/PAR
A(1,3)=-X(2)
A(1,4)=0.
A(1,5)=-X(9)/PAR
A(1,6)=A(1,5)
A(1,7)=0.
A(1,8)=0.
A(2,2)=X(5)+(X(8)+X(9))/PAR
A(2,3)=0.
A(2,4)=0.
A(2,5)=A(1,5)
A(2,6)=A(1,5)
A(2,7)=0.
A(2,8)=-X(5)
A(3,3)=X(2)+X(10)/PAR
A(3,4)=-X(10)/PAR
A(3,5)=0.
A(3,6)=0.
A(3,7)=-X(10)/PAR
A(3,8)=-A(3,7)
A(4,4)=X(6)+X(10)/PAR
A(4,5)=0.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/2.
STRS(9)=((D(5)+D(6))-(D(1)+D(2)))/2.
STRS(10)=((D(3)-D(4))-(D(7)-D(8)))/2.
DO I=1,10
STRS(I)=STRS(I)*EMOD/RL
ENDDO
PENALTY(1)=ABS(STRS(1))/25000.-1.
PENALTY(2)=ABS(STRS(2))/25000.-1.
PENALTY(3)=ABS(STRS(3))/25000.-1.
PENALTY(4)=ABS(STRS(4))/25000.-1.
PENALTY(5)=ABS(STRS(5))/25000.-1.
PENALTY(6)=ABS(STRS(6))/25000.-1.
PENALTY(7)=ABS(STRS(7))/25000.-1.
PENALTY(8)=ABS(STRS(8))/25000.-1.
PENALTY(9)=ABS(STRS(9))/75000.-1.
PENALTY(10)=ABS(STRS(10))/25000.-1.
STOP
END

.



Relevant Pages

  • Re: Anyone interested in building a vms-like OS?
    ... then you have a good reason for preferring the BSD license over GPL. ... geeks :-) is that it is fast, 5-10 times faster than gcc, while still ... Compiling 10 times faster with almost no optimization does not ... It is compiling much faster but doing less optimizations. ...
    (comp.os.vms)
  • Re: Sun f95 Error 1135: unexpected FORM specifier
    ... don't use any optimization while compiling the code. ... declaration, I could run the a.out only when I compiled and linked ... I am running MODFLOW 96. ...
    (comp.lang.fortran)
  • Re: advice starting programming in C
    ... >gcc is for compiling programs. ... One more gcc option to recommend - the optimization: ... And as response to the queries where a beginner needs optimization: ... warnings that would otherwise be suppressed (at least warnings about ...
    (comp.os.linux.development.apps)
  • Re: 3dnow, mmx, k6-2 optimizing?
    ... >>I've been looking for possible flags, optimizations, really anything ... >>that would help me setup my laptop to use mmx and 3dnow. ... I'm not finding anything in terms of compiling ... optimization levels above -O without compile errors, ...
    (freebsd-questions)
  • Re: Optimization by program restructuring
    ... I use -O2 flag for optimization. ... Some time ago I read article about application optimization by program ... Compiling program with ... flags to generate profiling data 2. ...
    (comp.os.linux.misc)