parallel processing - Only one image in Fortran Coarrays in gfortran -
i'm using gfortran compiler , trying work on parallel programming without mpi. though, spent time on reading fortran, gfortran, parallel programming, couldn't use different processors @ same time.
my purpose create matrix multiplication working on different processor reduce time. have many ideas first of all, have use different processors. use written codes, computer have 1 image. example:
program hello_image integer::a write(*,*) "hello image ", this_image(), & "out of ", num_images()," total images" read(*,*), end program hello_image
this simple program took pdf parallel programming in fortran. should give output:
hello image 1 out of 8 hello image 2 out of 8 hello image 3 out of 8 hello image 4 out of 8 hello image 5 out of 8 hello image 6 out of 8 hello image 7 out of 8 hello image 8 out of 8
but compiler giving output:
hello image 1 out of 1.
i use gfortran compiler command
gfortran "codename" -fcoarray=single
i spent time solve "probably simple problem" couldn't solve it.
this output got when try -fcoarray=lib. that's why using -fcoarray=single because 1 can executed. should solve this? thank help;
/tmp/ccvnpvrc.o: in function `main__': hew.f08:(.text+0x62): undefined reference `_gfortran_caf_this_image' hew.f08:(.text+0xa8): undefined reference `_gfortran_caf_num_images' /tmp/ccvnpvrc.o: in function `main': hew.f08:(.text+0x175): undefined reference `_gfortran_caf_init' hew.f08:(.text+0x19f): undefined reference `_gfortran_caf_finalize' collect2: error: ld returned 1 exit status
even though, installed linuxbrew website of opencoarrays, still having same issue. brew doctor says there no problem @ when use line
gfortran hew.f08 -fcoarray=lib -lcaf_mpi
same error appears. should use package line? package should download? how download it? how use gfortran have executable file? (i'm using ubuntu)
i used
ruby -e "$(curl -fssl https://raw.githubusercontent.com/linuxbrew/install/master/install)"
line install. then, used both of lines setting path;
path=/home/[username]/.linuxbrew/bin:$path path=/home/linuxbrew/.linuxbrew/bin:$path
now, when use line
gfortran hew.f08 -fcoarray=lib -lcaf_mpi
the output is:
/usr/bin/ld: cannot find -lcaf_mpi collect2: error: ld returned 1 exit status
Comments
Post a Comment