search for: iso_c_bind

Displaying 7 results from an estimated 7 matches for "iso_c_bind".

2019 Feb 01
2
Set the number of threads using openmp with .Fortran?
...stack-protector" F90FLAGS = "-fopenmp" LDFLAGS = "-fopenmp" *This is my Fortran module:* module hello_openmp use omp_lib implicit none contains subroutine hello(ncores) bind(C, name="hello_") use, intrinsic :: iso_c_binding, only : c_double, c_int integer(c_int), intent(in) :: ncores integer :: iam ! Specify number of threads to use: !$call omp_set_num_threads(ncores) !$omp parallel private(iam) iam=omp_get_thread_num() !$omp c...
2019 Feb 02
1
Set the number of threads using openmp with .Fortran?
...gt;> *This is my Fortran module:* >> >> module hello_openmp >> use omp_lib >> implicit none >> contains >> >> subroutine hello(ncores) bind(C, name="hello_") >> use, intrinsic :: >> iso_c_binding, only : c_double, c_int >> integer(c_int), intent(in) :: ncores >> integer :: iam >> ! Specify number of threads to use: >> !$call omp_set_num_threads(ncores) >> !$omp parallel priv...
2015 Jul 27
2
R package with Fortran module on Windows? undefined reference to `__stack_chk_fail'
..._number(x_coord) call random_number(y_coord) if ((x_coord**2 + y_coord**2) <= 1.0d0) then score = score + 1 end if end do dartsscore = 4.0d0*score/darts end subroutine dboard subroutine pi(avepi, DARTS, ROUNDS) bind(C, name="pi_") use, intrinsic :: iso_c_binding, only : c_double, c_int real(c_double), intent(out) :: avepi integer(c_int), intent(in) :: DARTS, ROUNDS integer :: MASTER, rank, i, n integer, allocatable :: seed(:) double precision ::...
2019 Feb 02
0
Set the number of threads using openmp with .Fortran?
...t; > LDFLAGS = "-fopenmp" > > *This is my Fortran module:* > > module hello_openmp > use omp_lib > implicit none > contains > > subroutine hello(ncores) bind(C, name="hello_") > use, intrinsic :: iso_c_binding, > only : c_double, c_int > integer(c_int), intent(in) :: ncores > integer :: iam > ! Specify number of threads to use: > !$call omp_set_num_threads(ncores) > !$omp parallel private(iam) >...
2015 Jul 27
0
R package with Fortran module on Windows? undefined reference to `__stack_chk_fail'
...if ((x_coord**2 + y_coord**2) <= 1.0d0) then > score = score + 1 > end if > end do > > dartsscore = 4.0d0*score/darts > > end subroutine dboard > > subroutine pi(avepi, DARTS, ROUNDS) bind(C, name="pi_") > use, intrinsic :: iso_c_binding, only : > c_double, c_int > real(c_double), intent(out) :: avepi > integer(c_int), intent(in) :: DARTS, ROUNDS > integer :: MASTER, rank, i, n > integer, allocatable :: seed(:) > double precis...
2019 May 03
0
R problems with lapack with gfortran
...as lengths of the character strings (functions taking a string of unspecified length are trivial and re-implemented in C). This has been working fine for very many years as the Fortran code never needed to access the length it knew was 1. R has been using the same practice, which long predates ISO_C_BINDING/BIND(C), and I've seen online discussions where people assumed interoperability of length 1 strings, once mentioning also a citation from Fortran 2003 Handbook that says "A Fortran character string with a length other than 1 is not interoperable" (which invites interpretation t...
2019 Apr 24
2
R problems with lapack with gfortran
Hi, I have tried to pinpoint potential problems which could lead to the LAPACK issues that are currently seen in R. I built the current R trunk using AR=gcc-ar RANLIB=gcc-ranlib ./configure --prefix=$HOME --enable-lto --enable-BLAS-shlib=no --without-recommended-packages and used this to find problem areas. There are quite a few warnings that were flagged, due to mismatches in function