Bladeren bron

fortran module: final renaming

Nathalie Furmento 10 jaren geleden
bovenliggende
commit
c81911f317
4 gewijzigde bestanden met toevoegingen van 145 en 137 verwijderingen
  1. 4 4
      examples/Makefile.am
  2. 5 5
      examples/fortran90/f90_example.f90
  3. 1 1
      examples/fortran90/mod_compute.f90
  4. 135 127
      include/starpu_mod.f90

+ 4 - 4
examples/Makefile.am

@@ -934,12 +934,12 @@ if STARPU_HAVE_FC
 mod_types.mod: fortran90_f90_example-mod_types.o
 mod_compute.mod: fortran90_f90_example-mod_compute.o
 mod_interface.mod: fortran90_f90_example-mod_interface.o
-mod_starpu.mod: fortran90_f90_example-mod_starpu.o
+starpu_mod.mod: fortran90_f90_example-starpu_mod.o
 
-fortran90_f90_example-mod_starpu.o: 
-	$(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o fortran90_f90_example-mod_starpu.o '$(top_srcdir)/'include/mod_starpu.f90
+fortran90_f90_example-starpu_mod.o:
+	$(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o fortran90_f90_example-starpu_mod.o '$(top_srcdir)/'include/starpu_mod.f90
 
-fortran90_f90_example-mod_compute.o: fortran90/mod_compute.f90 mod_types.mod mod_interface.mod mod_starpu.mod
+fortran90_f90_example-mod_compute.o: fortran90/mod_compute.f90 mod_types.mod mod_interface.mod starpu_mod.mod
 	$(AM_V_FC)$(FC) $(fortran90_f90_example_FCFLAGS) $(FCFLAGS) -c -o fortran90_f90_example-mod_compute.o `test -f 'fortran90/mod_compute.f90' || echo '$(srcdir)/'`fortran90/mod_compute.f90
 
 fortran90_f90_example-f90_example.o: fortran90/f90_example.f90 mod_types.mod mod_interface.mod mod_compute.mod

+ 5 - 5
examples/fortran90/f90_example.f90

@@ -17,7 +17,7 @@
 PROGRAM f90_example
 
   USE mod_types
-  USE mod_starpu
+  USE starpu_mod
   USE mod_interface
   USE mod_compute
   USE iso_c_binding
@@ -51,7 +51,7 @@ PROGRAM f90_example
   res = starpu_my_init_c()
   cpus = starpu_cpu_worker_get_count()
   IF (cpus == 0) THEN
-     CALL starpu_shutdown_c()
+     CALL starpu_shutdown()
      STOP 77
   END IF
 
@@ -70,7 +70,7 @@ PROGRAM f90_example
         CALL starpu_loop_element_task_c(numpar%coeff,elt%ro_h,elt%dro_h,elt%basis_h)
      ENDDO
      ! sync (if needed by the algorithm)
-     CALL starpu_task_wait_for_all_c()
+     CALL starpu_task_wait_for_all()
 
      ! - - - - -
 
@@ -80,7 +80,7 @@ PROGRAM f90_example
          CALL starpu_copy_element_task_c(elt%ro_h,elt%dro_h)
      ENDDO
      ! sync (if needed by the algorithm)
-     CALL starpu_task_wait_for_all_c()
+     CALL starpu_task_wait_for_all()
 
   ENDDO
   !Unregistration of elements
@@ -90,7 +90,7 @@ PROGRAM f90_example
   ENDDO
 
   !Terminate StarPU, no task can be submitted after
-  CALL starpu_shutdown_c()
+  CALL starpu_shutdown()
 
   !Check data with StarPU
   WRITE(6,'(a)') " "

+ 1 - 1
examples/fortran90/mod_compute.f90

@@ -17,7 +17,7 @@
 MODULE mod_compute
 
   USE mod_types
-  USE mod_starpu
+  USE starpu_mod
   USE mod_interface
   USE iso_c_binding
 

+ 135 - 127
include/starpu_mod.f90

@@ -13,130 +13,138 @@
 !
 ! See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
-MODULE mod_starpu
-        ! == starpu.h ==
-
-        ! starpu_conf_init
-        INTERFACE starpu_conf_init_c
-                FUNCTION starpu_conf_init(conf) BIND(C)
-                        USE iso_c_binding
-                        TYPE(C_PTR), INTENT(INOUT) :: conf
-                END FUNCTION starpu_conf_init
-        END INTERFACE
-
-        ! starpu_init
-        INTERFACE starpu_init_c
-                FUNCTION starpu_init(conf) BIND(C)
-                        USE iso_c_binding
-                        TYPE(C_PTR), INTENT(IN) :: conf
-                END FUNCTION starpu_init
-        END INTERFACE
-
-        ! starpu_initialize
-
-        ! starpu_pause
-        INTERFACE starpu_pause_c
-                SUBROUTINE starpu_pause() BIND(C)
-                END SUBROUTINE starpu_pause
-        END INTERFACE
-
-        ! starpu_resume
-        INTERFACE starpu_resume_c
-                SUBROUTINE starpu_resume() BIND(C)
-                END SUBROUTINE starpu_resume
-        END INTERFACE
-
-        ! starpu_shutdown
-        INTERFACE starpu_shutdown_c
-                SUBROUTINE starpu_shutdown() BIND(C)
-                END SUBROUTINE starpu_shutdown
-        END INTERFACE
-
-        ! starpu_topology_print
-
-        ! starpu_asynchronous_copy_disabled
-        INTERFACE starpu_asynchronous_copy_disabled_c
-                SUBROUTINE starpu_asynchronous_copy_disabled() BIND(C)
-                END SUBROUTINE starpu_asynchronous_copy_disabled
-        END INTERFACE
-
-        ! starpu_asynchronous_cuda_copy_disabled
-        INTERFACE starpu_asynchronous_cuda_copy_disabled_c
-                SUBROUTINE starpu_asynchronous_cuda_copy_disabled() BIND(C)
-                END SUBROUTINE starpu_asynchronous_cuda_copy_disabled
-        END INTERFACE
-
-        ! starpu_asynchronous_opencl_copy_disabled
-        INTERFACE starpu_asynchronous_opencl_copy_disabled_c
-                SUBROUTINE starpu_asynchronous_opencl_copy_disabled() BIND(C)
-                END SUBROUTINE starpu_asynchronous_opencl_copy_disabled
-        END INTERFACE
-
-        ! starpu_asynchronous_mic_copy_disabled
-        INTERFACE starpu_asynchronous_mic_copy_disabled_c
-                SUBROUTINE starpu_asynchronous_mic_copy_disabled() BIND(C)
-                END SUBROUTINE starpu_asynchronous_mic_copy_disabled
-        END INTERFACE
-
-        ! starpu_display_stats
-        INTERFACE starpu_display_stats_c
-                SUBROUTINE starpu_display_stats() BIND(C)
-                END SUBROUTINE starpu_display_stats
-        END INTERFACE
-
-        ! starpu_get_version
-        INTERFACE starpu_get_version_c
-                FUNCTION starpu_get_version(major,minor,release) BIND(C)
-                        USE iso_c_binding
-                        TYPE(C_PTR), INTENT(OUT) :: major,minor,release
-                END FUNCTION starpu_get_version
-        END INTERFACE
-
-        ! starpu_cpu_worker_get_count
-        INTERFACE
-           FUNCTION starpu_cpu_worker_get_count() BIND(C)
-             USE iso_c_binding
-             INTEGER(KIND=C_INT)              :: starpu_cpu_worker_get_count
-           END FUNCTION starpu_cpu_worker_get_count
-        END INTERFACE
-
-        ! == starpu_task.h ==
-
-        ! starpu_tag_declare_deps
-        ! starpu_tag_declare_deps_array
-        ! starpu_task_declare_deps_array
-        ! starpu_tag_wait
-        ! starpu_tag_wait_array
-        ! starpu_tag_notify_from_apps
-        ! starpu_tag_restart
-        ! starpu_tag_remove
-        ! starpu_task_init
-        ! starpu_task_clean
-        ! starpu_task_create
-        ! starpu_task_destroy
-        ! starpu_task_submit
-        ! starpu_task_submit_to_ctx
-        ! starpu_task_finished
-        ! starpu_task_wait
-        ! starpu_task_wait_for_all
-        INTERFACE starpu_task_wait_for_all_c
-                SUBROUTINE starpu_task_wait_for_all() BIND(C)
-                END SUBROUTINE starpu_task_wait_for_all
-        END INTERFACE
-        ! starpu_task_wait_for_n_submitted
-        ! starpu_task_wait_for_all_in_ctx
-        ! starpu_task_wait_for_n_submitted_in_ctx
-        ! starpu_task_wait_for_no_ready
-        ! starpu_task_nready
-        ! starpu_task_nsubmitted
-        ! starpu_codelet_init
-        ! starpu_codelet_display_stats
-        ! starpu_task_get_current
-        ! starpu_parallel_task_barrier_init
-        ! starpu_parallel_task_barrier_init_n
-        ! starpu_task_dup
-        ! starpu_task_set_implementation
-        ! starpu_task_get_implementation
-
-END MODULE mod_starpu
-
+MODULE starpu_mod
+  ! == starpu.h ==
+
+  ! starpu_conf_init
+  INTERFACE
+     SUBROUTINE starpu_conf_init(conf) BIND(C)
+       USE iso_c_binding
+       TYPE(C_PTR), INTENT(INOUT) :: conf
+     END SUBROUTINE starpu_conf_init
+  END INTERFACE
+
+  ! starpu_init
+  INTERFACE
+     SUBROUTINE starpu_init(conf) BIND(C)
+       USE iso_c_binding
+       TYPE(C_PTR), INTENT(IN) :: conf
+     END SUBROUTINE starpu_init
+  END INTERFACE
+
+  ! starpu_initialize
+
+  ! starpu_pause
+  INTERFACE
+     SUBROUTINE starpu_pause() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_pause
+  END INTERFACE
+
+  ! starpu_resume
+  INTERFACE
+     SUBROUTINE starpu_resume() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_resume
+  END INTERFACE
+
+  ! starpu_shutdown
+  INTERFACE
+     SUBROUTINE starpu_shutdown() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_shutdown
+  END INTERFACE
+
+  ! starpu_topology_print
+
+  ! starpu_asynchronous_copy_disabled
+  INTERFACE
+     SUBROUTINE starpu_asynchronous_copy_disabled() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_asynchronous_copy_disabled
+  END INTERFACE
+
+  ! starpu_asynchronous_cuda_copy_disabled
+  INTERFACE
+     SUBROUTINE starpu_asynchronous_cuda_copy_disabled() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_asynchronous_cuda_copy_disabled
+  END INTERFACE
+
+  ! starpu_asynchronous_opencl_copy_disabled
+  INTERFACE
+     SUBROUTINE starpu_asynchronous_opencl_copy_disabled() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_asynchronous_opencl_copy_disabled
+  END INTERFACE
+
+  ! starpu_asynchronous_mic_copy_disabled
+  INTERFACE
+     SUBROUTINE starpu_asynchronous_mic_copy_disabled() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_asynchronous_mic_copy_disabled
+  END INTERFACE
+
+  ! starpu_display_stats
+  INTERFACE
+     SUBROUTINE starpu_display_stats() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_display_stats
+  END INTERFACE
+
+  ! starpu_get_version
+  INTERFACE
+     SUBROUTINE starpu_get_version(major,minor,release) BIND(C)
+       USE iso_c_binding
+       TYPE(C_PTR), INTENT(OUT) :: major,minor,release
+     END SUBROUTINE starpu_get_version
+  END INTERFACE
+
+  ! starpu_cpu_worker_get_count
+  INTERFACE
+     FUNCTION starpu_cpu_worker_get_count() BIND(C)
+       USE iso_c_binding
+       INTEGER(KIND=C_INT)              :: starpu_cpu_worker_get_count
+     END FUNCTION starpu_cpu_worker_get_count
+  END INTERFACE
+
+  ! == starpu_task.h ==
+
+  ! starpu_tag_declare_deps
+  ! starpu_tag_declare_deps_array
+  ! starpu_task_declare_deps_array
+  ! starpu_tag_wait
+  ! starpu_tag_wait_array
+  ! starpu_tag_notify_from_apps
+  ! starpu_tag_restart
+  ! starpu_tag_remove
+  ! starpu_task_init
+  ! starpu_task_clean
+  ! starpu_task_create
+  ! starpu_task_destroy
+  ! starpu_task_submit
+  ! starpu_task_submit_to_ctx
+  ! starpu_task_finished
+  ! starpu_task_wait
+  ! starpu_task_wait_for_all
+  INTERFACE
+     SUBROUTINE starpu_task_wait_for_all() BIND(C)
+       USE iso_c_binding
+     END SUBROUTINE starpu_task_wait_for_all
+  END INTERFACE
+  ! starpu_task_wait_for_n_submitted
+  ! starpu_task_wait_for_all_in_ctx
+  ! starpu_task_wait_for_n_submitted_in_ctx
+  ! starpu_task_wait_for_no_ready
+  ! starpu_task_nready
+  ! starpu_task_nsubmitted
+  ! starpu_codelet_init
+  ! starpu_codelet_display_stats
+  ! starpu_task_get_current
+  ! starpu_parallel_task_barrier_init
+  ! starpu_parallel_task_barrier_init_n
+  ! starpu_task_dup
+  ! starpu_task_set_implementation
+  ! starpu_task_get_implementation
+
+END MODULE starpu_mod