소스 검색

examples/fortran90: make sure the example uses its own init function and not the one from the public interface

Nathalie Furmento 10 년 전
부모
커밋
071429947e
3개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      examples/fortran90/f90_example.f90
  2. 1 1
      examples/fortran90/marshalling.c
  3. 7 0
      examples/fortran90/mod_interface.f90

+ 1 - 1
examples/fortran90/f90_example.f90

@@ -48,7 +48,7 @@ PROGRAM f90_example
   ENDDO
 
   !Initialization of StarPU
-  res = starpu_init_c(C_NULL_PTR)
+  res = starpu_my_init_c()
 
   !Registration of elements
   DO i = 1,Nelt

+ 1 - 1
examples/fortran90/marshalling.c

@@ -152,7 +152,7 @@ void starpu_copy_element_task_c(void **ro_h, void **dro_h)
 }
 
 //--------------------------------------------------------------//
-int starpu_init_c()
+int starpu_my_init_c()
 {
 	/* Initialize StarPU with default configuration */
 	int ret;

+ 7 - 0
examples/fortran90/mod_interface.f90

@@ -17,6 +17,13 @@
 MODULE mod_interface
 
   INTERFACE
+     FUNCTION starpu_my_init_c() BIND(C)
+       USE iso_c_binding
+       INTEGER(KIND=C_INT)                   :: starpu_my_init_c
+     END FUNCTION starpu_my_init_c
+  END INTERFACE
+
+  INTERFACE
      SUBROUTINE starpu_register_element_c(Neq,Np,Ng,ro,dro,basis,ro_h,dro_h,basis_h) BIND(C)
        USE iso_c_binding
        INTEGER(KIND=C_INT),VALUE             :: Neq,Np,Ng