From: SMTP%"nowicki@tardis.larc.nasa.gov" 27-MAY-1994 14:53:07.63 To: EVERHART CC: Subj: Help with AXP shared images From: nowicki@tardis.larc.nasa.gov (Gregory D. Nowicki) X-Newsgroups: comp.os.vms Subject: Help with AXP shared images Date: 26 May 1994 20:34:10 GMT Organization: NASA Langley Research Center Lines: 80 Message-Id: <2s3142$5r4@reznor.larc.nasa.gov> Reply-To: nowicki@tardis.larc.nasa.gov Nntp-Posting-Host: tardis.larc.nasa.gov To: Info-VAX@CRVAX.SRI.COM X-Gateway-Source-Info: USENET I am posting this for a co-worker. If you have any idea on how to solve this, please contact me, Susan, or post it to USENET. Thanks. SEEKING ENLIGHTENMENT ON ALPHA Shared Images I am attempting to create and install a shared image on an Alpha workstation running OpenVMS V1.5-1H1. The same procedure that works fine on a VAX will not work on the Alpha. The program will compile, link and run with no error messages but the variables in the shared image have an initial value of zero each run. So it is obviously changing just a local copy of the variable instead of the global one intended. I noticed that the fortran listing file on the VAX shows the common block SHARED as having the SHR attribute while the listing file on the Alpha shows it with NOSHR. So I'm suspecting some difference between the two FORTRAN compilers or I'm using an incorrect linker option, but don't know where to go from here. I have included listings of the shared image, how it was created, and the test program. Please let me know if you have encountered and solved this problem or have any suggestions of where to find a solution. Thanks, Susan Kooi s.a.kooi@larc.nasa.gov SHARED IMAGE SOURCE CODE ------------------------ program shareit byte flag common /shared/ flag end SHARED IMAGE CREATION --------------------- $ for/lis shareit $ link/map/full/share shareit $ install add /header/share/write sys$library:shareit.exe TEST PROGRAM SOURCE CODE ------------------------ program test_share1 byte flag common /shared/ flag print*,' inital value flag = ',flag flag = 99 print*,' end value flag = ',flag end program test_share2 byte flag common /shared/ flag print*,' flag = ',flag end TEST PROGRAM RUN ---------------- $ define shareit sys$library:shareit.exe $ for/list test_share1 $ link test_share1,sys$input/opt shareit/share ^Z $ for/list test_share2 $ link test_share2,sys$input/opt shareit/share ^Z $ r test_share1 $ run test_share1 inital value flag = 0 end value flag = 99 $ run test_share2 flag = 0 $ -Greg /* Greg Nowicki | Mail Stop 401A | LIDAR Applications Group */ /* NASA Langley Research Center | Hampton, Virginia 23681-0001 */ /* Voice: (804) 864-2713 | FAX: (804) 864-7790 */ /* nowicki@tardis.larc.nasa.gov | My opinions and mine alone . . . */