[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1312.0. "Kap reversing order of structure/record" by CSC32::J_HENSON (Don't get even, get ahead!) Thu May 22 1997 11:15

Kap Fortran V2.1, Openvms ?, Dec Fortran V7.0, Alpha

A customer has reported a problem with Kap Fortran.  It is revsersing
the order of his code which results in the compiler not being able
to compile the modified code.  Full details are provided below.

I have NOT reproduced this at the CSC.  I can't find a system with
KAP Fortran on it.

Thanks,

Jerry

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


Below is a stripped-down source file that KAP Fortran has problems with. The
command I am using is this:

$ kfort /kap_switches=(list,listoptions=otcklnps,scan=132,concurrent) -
	/extend -
	test3

The problem only occurs when /kap_switches includes the 'concurrent' option.
The KAP output file has the record and structure statements in reverse order,
which of course won't work and the Dec Fortran compiler flags fatal errors.
The errors are reported as:
-----------------------------------------------------------------------------
"KAPF /LIST/LISTOPTIONS=OTCKLNPS/SCAN=132/CONCURRENT/customer=TEST3 TEST3.FOR"
 KAP/ALPHA_VMS_F 2.1 k201013 940208
 KAP/ALPHA_VMS_F   2.1 k201013 940208     21-May-1997   16:09:38
test3.for:
   MIRBP3A:
0 errors in file test3.for

"FORT /EXTEND TEST3.CMP"

       RECORD /ORIENTATION/PRJORIENT
...............^
%FORT-F-STRNOTDEF, Structure name in RECORD statement not defined
at line number 68 in file CALVIN$USER:[CONWAY.TEST]TEST3.CMP;2

       RECORD /MIBP3A_PARAMS/MPARAMS
...............^
%FORT-F-STRNOTDEF, Structure name in RECORD statement not defined
at line number 69 in file CALVIN$USER:[CONWAY.TEST]TEST3.CMP;2

etc...........
-----------------------------------------------------------------------------
I am using KAP Fortran 2.1, Fortran 7.0, on VMS 6.2-1H3. I hope to run the code
on a 4-processor Sable, hence the interest in using 'concurrent'.

Thanks for your help.

James Conway
LSBR/NIAMS/NIH
301-402-2361

c=============================================================================
      SUBROUTINE MIRBP3A( A
     &			, Vol
     &			, dpx, dpy
     &			, drx, dry, drz
     &			, prjOrient
     &			, mParams
     &			)

	implicit none

	structure /ORIENTATION/
	  real*4 theta
	  real*4 phi
	  real*4 psi
	  real*4 x
	  real*4 y
	end structure

	structure /MIBP3A_PARAMS/
	  integer zStart, zEnd, zStep
	  real    enl, rmask, rayl
	end structure
c=============================================================================

C Passed in
	integer drx, dry, drz, dpx, dpy
	Real    A(dpx,dpy), Vol(drx,dry,drz)
	record /ORIENTATION/prjOrient
	record /MIBP3A_PARAMS/mParams
C Local
	integer irx, iry, iz, i, k, rx2, ry2
	Real    rad, rmask2, r1, r2, r3, r4, r12, r34, yin

	rmask2 = mParams.rmask * mParams.rmask 

	do 3 iz=mParams.zStart, mParams.zEnd, mParams.zStep
	  do 2 i=1,dry
	    iry  = i - prjOrient.y
	    ry2 = iry*iry
	    do 1 k=1, drx
	      irx  = k - prjOrient.x
	      rx2 = irx*irx
	      rad = rx2 + ry2
	      if(rad.gt.rmask2) goto 1
	      R1 = A(irx,   iry)
	      R2 = A(irx,   iry+1)
	      R3 = A(irx+1, iry)
	      R4 = A(irx+1, iry+1)
	      R12 = R1 + (R2-R1)
	      R34 = R3 + (R4-R3)
	      YIN = R12 + (R34-R12)

	      Vol(k,i,iz) = Vol(k,i,iz) + YIN

1           CONTINUE		!along X axis
2         CONTINUE		!along Y axis
3	CONTINUE		!along Z axis

	return
	end

T.RTitleUserPersonal
Name
DateLines
1312.1Not really a FORTRAN problem, is it?WIBBIN::NOYCEPulling weeds, pickin' stonesThu May 22 1997 11:252
Jerry, there's a notes conference for KAP at NICCRT::KAP-USERS.
If you need to make an IPMT case, make sure the product is KAP, not FORTRAN.
1312.2CSC32::J_HENSONDon't get even, get ahead!Tue May 27 1997 11:034
Thanks.  I've posted note 386 in the KAP notes conference.  Sorry for
the inconvenience.

Jerry