Dear All, 
     Martin correctly chastises me for mailing list incompetence. Very sorry. I
think this is the way to start another thread...
But here's my question:

What is the status of TLS and openMP on the gcc and gfortran
suites for OSX from fink at present? Things seem to fall over on my current fink
gfortran, for example. ( I get stuff like....

 % gfortran -fopenmp OMPdriver.f90 -fopenmp -o OMPdriver

Undefined symbols:
  "___emutls_get_address", referenced from:
      _MAIN__.omp_fn.0 in ccrn2pM7.o
      _MAIN__.omp_fn.0 in ccrn2pM7.o
      _MAIN__.omp_fn.0 in ccrn2pM7.o
      _MAIN__.omp_fn.0 in ccrn2pM7.o
      _MAIN__.omp_fn.1 in ccrn2pM7.o
      _MAIN__.omp_fn.1 in ccrn2pM7.o
  "___emutls_register_common", referenced from:
      global constructors keyed to 65535_0_OMPdriver.f90 in ccrn2pM7.o
      global constructors keyed to 65535_0_OMPdriver.f90 in ccrn2pM7.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Do I need to do a custom build of gcc/gfortran to expects TLS and openmp
directives to work (e.g. the legal
fortran chunk below)

program OMPdriver

      integer:: a, b, i, tid, omp_get_thread_num
      real*4::  x
      common /c1/ a
      common /dummy/ x

!$omp threadprivate(/c1/, /dummy/) 

!     explicitly turn off dynamic threads
      call omp_set_dynamic(.false.)

      print *, '1st parallel region:'
!$omp parallel private(b, tid) 
      tid = omp_get_thread_num()
      a = tid
      b = tid
      x = 1.1 * tid + 1.0
      print *, 'thread',tid,':   a,b,x=',a,b,x
!$omp end parallel 

      print *, '************************************'
      print *, 'master thread doing serial work here'
      print *, '************************************'

      print *, '2nd parallel region: '
!$omp parallel private(tid) 
      tid = omp_get_thread_num()
      print *, 'thread',tid,':   a,b,x=',a,b,x
!$omp end parallel 

      end

Best wishes all,
         James.



------------------------------------------------------------------------------

_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to