@@ -23,26 +23,34 @@ subroutine init_blas(this, compiler, error)
23
23
integer :: i
24
24
character (len= :), allocatable :: include_flag, libdir
25
25
character (* ), parameter :: candidates(* ) = &
26
- [character (20 ) :: ' mkl-dynamic-lp64-tbb' , ' openblas' , ' blas' ]
26
+ [character (20 ) :: ' mkl-dynamic-lp64-tbb' , ' openblas' , ' blas' ]
27
27
28
28
include_flag = get_include_flag(compiler, " " )
29
29
30
30
! > Cleanup
31
31
call destroy(this)
32
- allocate (this % link_libs(0 ), this % incl_dirs(0 ), this % external_modules(0 ))
33
- this % link_flags = string_t(" " )
34
- this % flags = string_t(" " )
35
- this % has_external_modules = .false.
32
+ allocate (this% link_libs(0 ), this% incl_dirs(0 ), this% external_modules(0 ))
33
+ this% link_flags = string_t(" " )
34
+ this% flags = string_t(" " )
35
+ this% has_external_modules = .false.
36
+
37
+ if (compiler% is_intel()) then
38
+ this% flags = string_t(" -qmkl" )
39
+ this% has_build_flags = .true.
40
+ this% link_flags = string_t(" -qmkl" )
41
+ this% has_link_flags = .true.
42
+ return
43
+ end if
36
44
37
45
! > Assert pkg-config is installed
38
46
if (.not. assert_pkg_config()) then
39
- call fatal_error(error, ' blas metapackage requires pkg-config' )
47
+ call fatal_error(error, ' blas metapackage requires pkg-config to continue lookup ' )
40
48
return
41
49
end if
42
50
43
- do i= 1 , size (candidates)
51
+ do i = 1 , size (candidates)
44
52
if (pkgcfg_has_package(trim (candidates(i)))) then
45
- call add_pkg_config_compile_options(&
53
+ call add_pkg_config_compile_options( &
46
54
this, trim (candidates(i)), include_flag, libdir, error)
47
55
print * , ' found blas package: ' , trim (candidates(i))
48
56
return
0 commit comments