From fabio.ufla at yahoo.com.br  Sat Jun  8 15:56:19 2013
From: fabio.ufla at yahoo.com.br (=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=)
Date: Sat, 8 Jun 2013 06:56:19 -0700 (PDT)
Subject: [Rd] Problem with gfortran-4.6
Message-ID: <1370699779.66833.YahooMailNeo@web120803.mail.ne1.yahoo.com>

Dears,

I am writing a code in Fortran using OpenMP directives.

When compiling the code in gfortran 4.4 does not occur any problem.

When compiling the code in gfortran 4.6, an error message appears.

In other compilers the error does not occur.


A small example.


## Code in Fortran

? ? ? ?subroutine hello()
? ? ? ?implicit none
? ? ? ?integer :: nthreads, tid
? ? ? ?integer :: omp_get_num_threads, omp_get_thread_num
? ? ? ?integer :: omp_get_max_threads, omp_set_num_threads

? ? ? ?print *, 'M?ximo de threads', omp_get_max_threads()

? ? ? ?!$omp parallel?
? ? ? ?tid = omp_get_thread_num()
? ? ? ?print *, 'Hello World from thread = ', tid
? ? ? ?print *, 'Number of threads =', omp_get_thread_num()
? ? ? ?!$omp end parallel
? ? ? ?end subroutine hello


### Compiling and testing

system("R CMD COMPILE hello.f90 FCFLAGS=-fopenmp")
system("R CMD SHLIB hello.o")

dyn.load("hello.so")

.Fortran("hello")

### Error message

/home/fmcron/Documentos/Fortran/OpenMP/exemplos/hello.so: undefined symbol: _gfortran_transfer_character_write



Thanks



? ? ? ? F?bio Mathias Corr?a


?? Universidade Estadual de Santa Cruz
Departamento de Ci?ncias Exatas e da Terra - DCET


Campus Soane Nazar? de Andrade, km 16 Rodovia Ilh?us-Itabuna
CEP 45662-900. Ilh?us-Bahia


Tel.: 73-3680-5076?



[Rd] Problem with gfortran-4.6
=?iso-8859-1?Q?Fabio_Mathias_Corr=EAa?=