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.
________________________________________
From: Martin Costabel [[email protected]]
Sent: Friday, May 14, 2010 7:34 PM
To: Gunning, James (CESRE, Clayton)
Cc: fink-users
Subject: Re: [Fink-users] Openmp & thread-local-storag (TLS) in gcc/gfortran 
status ?

James Gunning wrote:

> Dear all,
>           I'm not quite sure where to ask this question, but someone
> here might know.

Most importantly, you should start a new thread for a new thread and not
use an existing one. Your message appears about 9 levels deep in the
thread " [Fink-users] mmap and Python on Fink". Anyone not interested in
that discussion will probably not even see your message.

> What is the status of TLS and openMP on the gcc and gfortran
> suites for OSX at present? Things seem to fall over on my current fink
> gfortran, for example.
> Do I need custom installs?

I don't understand what your question is. But maybe Jack Howarth will
know, once you formulate a question.

--
Martin

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

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

Reply via email to