mandelbrot_generated.jl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. if length(ARGS) != 7
  2. println("Usage : julia prog.jl cr ci start_dim step_dim stop_dim nslices nbr_tests")
  3. quit()
  4. end
  5. if (parse(Int64,ARGS[3]) % parse(Int64,ARGS[6]) != 0)
  6. println("The number of slices should divide all the dimensions.")
  7. quit()
  8. end
  9. include("../../src/Wrapper/Julia/starpu_include.jl")
  10. using StarPU
  11. @debugprint "starpu_init"
  12. starpu_init(extern_task_path = "../build/generated_tasks_mandelbrot.so")
  13. perfmodel = StarpuPerfmodel(
  14. perf_type = STARPU_HISTORY_BASED,
  15. symbol = "history_perf"
  16. )
  17. cl = StarpuCodelet(
  18. cpu_func = "mandelbrot",
  19. gpu_func = "CUDA_mandelbrot",
  20. modes = [STARPU_W, STARPU_R, STARPU_R],
  21. perfmodel = perfmodel
  22. )
  23. clcpu = StarpuCodelet(
  24. cpu_func = "mandelbrot",
  25. modes = [STARPU_W, STARPU_R, STARPU_R],
  26. perfmodel = perfmodel
  27. )
  28. clgpu = StarpuCodelet(
  29. gpu_func = "CUDA_mandelbrot",
  30. modes = [STARPU_W, STARPU_R, STARPU_R],
  31. perfmodel = perfmodel
  32. )
  33. include("mandelbrot_def.jl")
  34. display_time(parse(Float64,ARGS[1]), parse(Float64,ARGS[2]), map((x -> parse(Int64, x)), ARGS[3:7])...)
  35. @debugprint "starpu_shutdown"
  36. starpu_shutdown()