Coarray link errors

8 views
Skip to first unread message

joshua_pedrick

unread,
Nov 2, 2009, 11:06:06 AM11/2/09
to gg95
I've downloaded the latest g95 source and compiled it. I'm able to
compile 'normal' Fortran code, but I'm getting the following errors
when linking my co-array program:

$ g95 coarray.f90
/tmp/ccyibhwb.o: In function `MAIN_':
coarray.f90:(.text+0x2a): undefined reference to `_g95_this_image'
coarray.f90:(.text+0x40): undefined reference to `_g95_sync_all'
coarray.f90:(.text+0x54): undefined reference to `_g95_this_image'
coarray.f90:(.text+0x67): undefined reference to `_g95_num_images'
coarray.f90:(.text+0x116): undefined reference to `_g95_load_image'

coarray.f90:
program coarray
integer :: m[*]

m = THIS_IMAGE()
SYNC ALL

if (THIS_IMAGE() == 1) then
do i=1, NUM_IMAGES()
print *, i, m[i]
enddo
endif
end program

joshua_pedrick

unread,
Nov 2, 2009, 3:23:06 PM11/2/09
to gg95
I solved this problem by linking the coarray.o object file included
with cocon.
Reply all
Reply to author
Forward
0 new messages