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
	[[alternative HTML version deleted]]

