OPENMP and Subroutines (i.e. CUBA package) in Fortran 90

General OpenMP discussion

OPENMP and Subroutines (i.e. CUBA package) in Fortran 90

Postby vsbgonzalez » Thu Oct 20, 2011 12:10 pm

Hello,

Perhaps this problem was formulated before....

I want to build a program in Fortran 90 to parallel (OpenMP) the calculation of a multidimensional integral. To do these integrals I use the library CUBA. I'm using the OpenMP SECTIONS directive. The program runs for a thread. When I consider more threads the program fails, the output message is an abortion.

1. To try and solve this problem I try to create subroutines that called from this subroutine to the subroutine CUBA that I want, that does not work., example

(SUAVE IS multi-dimensional integration algorithms in CUBA)

SUBROUTINE CALL1(ndim, ncomp, FUN1, userdata,epsrel, epsabs, FLAGS, seed, mineval, maxeval, nnew, flatness, nregions, neval, fail, integral, error, prob)
.
.
.
call suave(ndim, ncomp, FUN1, userdata,epsrel, epsabs, FLAGS_2, seed, mineval, maxeval, nnew, flatness,nregions, neval, fail, integral, error, prob)
.
.
.
END SUBROUTINE CALL1

SUBROUTINE CALL2(ndim, ncomp, FUN2, userdata,epsrel, epsabs, FLAGS, seed, mineval, maxeval, nnew, flatness,nregions, neval, fail, integral, error, prob)
.
.
.
call suave(ndim, ncomp, FUN2, userdata,epsrel, epsabs, FLAGS, seed, mineval, maxeval, nnew, flatness,
nregions, neval, fail, integral, error, prob)
.
.
.
END SUBROUTINE CALL2

2. Another solution I tried was to change all the names in the package CUBA FOR SUAVE before the compilation of this package but just did not get the program running in parallel.

The questions would be:

Given a subroutine (a black box), Can I have different threads run in parallel using this subroutine but with OPENMP who parallelization tool?

If the above answer is yes, Can anyone suggest me any idea how to solve my problem?

thanks

Victor
vsbgonzalez
 
Posts: 5
Joined: Thu Oct 20, 2011 12:03 pm

Return to Using OpenMP

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests