Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ARRAY VIEWER AND IVF

juliobp
Beginner
648 Views
hello everybody

I downloaded Intel's Array Viewer, and I changed the code of a one sample program for adecuating it to a pendulum vibrating problem. Now I get the following errors:

Error 1 error LNK2019: unresolved external symbol _AVSTARTWATCH referenced in function _MOD_VIBRACIONES. MAIN.obj
Error 2 error LNK2019: unresolved external symbol _AVCREATEGRAPH2D referenced in function _MOD_VIBRACIONES. MAIN.obj
Error 3 error LNK2019: unresolved external symbol _AVNEWVIEWER referenced in function _MOD_VIBRACIONES. MAIN.obj
Error 4 error LNK2019: unresolved external symbol _AVSETVIEWERPATH referenced in function _MOD_VIBRACIONES. MAIN.obj
Error 5 error LNK2019: unresolved external symbol _AVVISIBLE referenced in function _MOD_VIBRACIONES. MAIN.obj
Error 6 error LNK2019: unresolved external symbol _AVENDWATCH referenced in function _MOD_VIBRACIONES. MAIN.obj


the program looks like this:

module MOD_VIBRACIONES

integer, parameter, public :: maxlevel=14
real, parameter, public :: sigma = 1.7
real, public :: H
real(4), allocatable, public :: VIBRACION(:,:)
!DEC$ATTRIBUTES array_visualizer :: VIBRACION
real(4), allocatable, public :: delta(:)
integer, public :: npoints

public :: GRAFICA_MATRIZ

contains

SUBROUTINE GRAFICA_MATRIZ (N,VIBRACION)
REAL, PARAMETER :: PI= 3.141592654, &
e = 2.718281828
INTEGER :: i, N
REAL :: w, k, m, dseta, c, Cc, X, x0, v0, wd, Td, t, AMPLITUD, &
TgALPHA, ALPHA, EHIPOTENUSA, Dc, Dd, VIBRACION(N,2)

WRITE(*,*) 'PROPORCIONE LA MASA DEL SISTEMA'
READ (*,*) m
WRITE(*,*) 'PROPORCIONE EL MDULO DE RIGIDES'
READ (*,*) k
WRITE(*,*) 'PROPORCIONE EL COEFICIENTE DE AMORTIGUAMIENTO'
READ (*,*) c
WRITE(*,*) 'PROPORCIONE EL DESPLAZAMIENTO INICIAL x(0)'
READ (*,*) x0
WRITE(*,*) 'PROPORCIONE LA VELOCIDAD INICIAL'
READ (*,*) v0

w = SQRT(k/m) !FRECUENCIA
Cc = 2*SQRT(m*k) !CONSTANTE DE AMORTIGUAMIENTO CRTICO
Dseta = c/Cc !FACTOR DE AMORTIGUAMIENTO DEL SISTEMA
wd = w*SQRT(1-Dseta**2) !FRECUENCIA CIRCULAR NATURAL
Td = 2*PI/wd !PERODO NATURAL AMORTIGUADO

TgALPHA = (v0 + x0*Dseta*w)/(x0*wd)
ALPHA= ATAN(TgALPHA)
EHIPOTENUSA = SQRT(x0**2 + ((x0 + x0*Dseta*w)/wd)**2)

Dc = x0
Dd = (v0 + Dseta*x0*w)/wd

t= 0.0
DELTATd = Td/100

WRITE(*,*) 'I---TIEMPO--------AMPLITUD-----'
DO i= 1, N
X = EHIPOTENUSA*e**(-Dseta*w*t)*(COS(wd*t - ALPHA) )
WRITE(*,*) I, t, X
VIBRACION(i,1) = t
VIBRACION(i,2) = X
t = t + DELTATd
END DO
END SUBROUTINE

end module MOD_VIBRACIONES


program Brown1d
use AvFRT
use MOD_VIBRACIONES

implicit none

! Variables
real :: D
integer :: status, viewerId, N
character(len=1) :: yn = "y"
character(len=12) :: graphname



WRITE(*,*)'CUANTOS PUNTOS SE VAN A CALCULAR?'
READ (*,*) N
!allocate(delta(maxlevel))
!npoints = 2 ** maxlevel
!allocate(X(0:npoints))
!call random_seed()

H = 0.5
ALLOCATE (VIBRACION(N,2))
print *, "Computing..."
call GRAFICA_MATRIZ (N, VIBRACION)

print *, "Starting Array Viewer"
call avStartWatch(LOC(VIBRACION), 1, shape(VIBRACION), AV_REAL4, "VIBRACION", status)

! Create an XY Plot
call avCreateGraph2D("xyplot", "plot:XYPLOT, ysource:X", status)

! Create the viewer
call avNewViewer(viewerId)

! Point to the xyplot
call avSetViewerPath(viewerId, "graph:/xyplot", status)

! Make it visible
call avVisible(viewerId, AV_TRUE, status)

do
print *, "Recompute values? [y,n]"
read *, yn
if (yn(1:1) /= 'y' .and. yn(1:1) /= 'Y') then
exit
end if

! print *, "Enter fractal dimension [1.0, 2.0]"
! read *, D
! if (D >= 1.0 .and. D <= 2.0) then
! H = 2.0 - D
! end if
! call MidPointBM

! print *, "updating data"
! call avUpdate(LOC(X), status)
end do

print *, "done"

call avEndWatch(LOC(VIBRACION), status)

! deallocate(delta)
deallocate(VIBRACION)


end program Brown1d

what am i doing wrong? and by the way, how can I upload attachments files to the forum?

0 Kudos
6 Replies
Steven_L_Intel1
Employee
648 Views
It looks as if you have not specified the AV libraries to link against.

Attaching instructions are in an Announcement at the top of the forum listing, in the right column of the forum listing and in my signature below. Be sure to follow all seven steps.
0 Kudos
juliobp
Beginner
648 Views
It looks as if you have not specified the AV libraries to link against.

Attaching instructions are in an Announcement at the top of the forum listing, in the right column of the forum listing and in my signature below. Be sure to follow all seven steps.

however, the samples for fortran do not have any special libraries declared. I ran an app that comes with the samples without a problem. here I'm attaching the proyect in question (brown1d.zip)
0 Kudos
Steven_L_Intel1
Employee
648 Views
Yes, the samples do have such libraries declared - under Properties > Linker > Input. The one you attached shows this.
0 Kudos
juliobp
Beginner
648 Views
Yes, the samples do have such libraries declared - under Properties > Linker > Input. The one you attached shows this.

Ok, now I can see it. thanks! By the way, where can I find more information about the array viewer?
0 Kudos
juliobp
Beginner
648 Views

Hi again
I was trying to use the Array viewer within IVF and after studying the samples' code, I succesfully ran my first app. Is there any handbook, tutorial or something other than the sample code to learn from? Or maybe more application sources to download

thanks in advance

0 Kudos
Steven_L_Intel1
Employee
648 Views
No, that's it. You can read the Array Visualizer forum section to see what others have done.
0 Kudos
Reply