From 63626431123da4ba16b116ecc9165231a355b82a Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Tue, 17 Sep 2024 09:15:23 +0200 Subject: [PATCH 01/11] Add support for Fortran/GFortran with MKL This patch introduces 3 modifications to the package MKL: - added support of Fortran and GFortran to compile with the MKL libraries - changed download paths following some changes made on the Intel channel of conda (see https://community.intel.com/t5/Intel-Integrated-Performance/Problems-installing-with-conda-HTTP-403-FORBIDDEN/m-p/1631577 for details). - added support of latest version of MKL as of September 2024: 2024.2.1 Note that the support of Intel processors on OS X seems to have been dropped by Intel. No path could be found. Content of the repository can be parsed from the JSON files in each architecture-dependent path: https://software.repos.intel.com/python/conda//repodata.json with being one of the following: - "linux-32" - "linux-64" - "win-32" - "win-64" Minimum example with GFortran: Fortran code ``` program test_mkl use iso_fortran_env, only: real64 integer, parameter :: N = 10 integer :: info integer, dimension(N) :: iwork real(real64), dimension(N,N) :: A, B, C call random_number(A) call random_number(B) call dgemm('T','N',N,N,N,1.0_real64,A,N,B,N,0.0_real64,C,N) call dgetrf(N,N,C,N,iwork,info) end program test_mkl ``` xmake.lua ``` add_rules("mode.debug", "mode.release") add_repositories("local-repo xmake-repo") add_requires("mkl", { configs = { threading = "gomp" } }) target("test_mkl") set_kind("binary") set_policy("check.auto_ignore_flags", false) add_packages("mkl") add_files("test_mkl.f90") add_tests("default") ``` --- packages/m/mkl/fetch.lua | 3 +- packages/m/mkl/xmake.lua | 101 +++++++++++++++++++++------------------ 2 files changed, 57 insertions(+), 47 deletions(-) diff --git a/packages/m/mkl/fetch.lua b/packages/m/mkl/fetch.lua index 40cfd73b4be..44c2f0f37f3 100644 --- a/packages/m/mkl/fetch.lua +++ b/packages/m/mkl/fetch.lua @@ -45,7 +45,8 @@ function _find_package(package, opt) table.join2(group, {"mkl_intel_thread", "mkl_core"}) end - if package:has_tool("cc", "gcc", "gxx") then + if (package:has_tool("cc", "gcc", "gxx") or + package:has_tool("fc", "gfortran")) then result.ldflags = "-Wl,--start-group " for _, lib in ipairs(group) do result.ldflags = result.ldflags .. "-l" .. lib .. " " diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index db3a4dc35ae..b45c654c6cc 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -5,88 +5,96 @@ package("mkl") if is_plat("windows") then if is_arch("x64") then - add_urls("https://anaconda.org/intel/mkl-static/$(version).tar.bz2", {version = function (version) + add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") - return format("%s/download/win-64/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) + return format("win-64/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2021.2.0+296", "54209e5d9c4778381f08b9a90e900c001494db020cda426441cd624cb0f7ebdc") - add_resources("2021.2.0+296", "headers", "https://anaconda.org/intel/mkl-include/2021.2.0/download/win-64/mkl-include-2021.2.0-intel_296.tar.bz2", "ba222ea4ceb9e09976f23a3df39176148b4469b297275f3d05c1ad411b3d54c3") + add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2021.2.0-intel_296.tar.bz2", "ba222ea4ceb9e09976f23a3df39176148b4469b297275f3d05c1ad411b3d54c3") add_versions("2021.3.0+524", "842628a8621f2ca19d7f1809e50420e311edf20b9bea18404dd1c20af798f5e6") - add_resources("2021.3.0+524", "headers", "https://anaconda.org/intel/mkl-include/2021.3.0/download/win-64/mkl-include-2021.3.0-intel_524.tar.bz2", "8ca8f77d0c57a434541d62a9c61781aa37225f5e669de01b8cc98488b3f9e82f") + add_resources("2021.3.0+524", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2021.3.0-intel_524.tar.bz2", "8ca8f77d0c57a434541d62a9c61781aa37225f5e669de01b8cc98488b3f9e82f") add_versions("2022.1.0+192", "fd9a529c0caa27ee3068e8d845f07e536970b0cbf713118d1f3daa32fb2b9e8c") - add_resources("2022.1.0+192", "headers", "https://anaconda.org/intel/mkl-include/2022.1.0/download/win-64/mkl-include-2022.1.0-intel_192.tar.bz2", "b6452e8c4891fcfab452bc23c6adc9c61ab6635fa494bb2b29725473c1013abc") + add_resources("2022.1.0+192", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.1.0-intel_192.tar.bz2", "b6452e8c4891fcfab452bc23c6adc9c61ab6635fa494bb2b29725473c1013abc") add_versions("2023.2.0+49496", "21a9fe03ba80009934a50b9d75f16757b9e49415e44245ced3b896fd471351ca") - add_resources("2023.2.0+49496", "headers", "https://anaconda.org/intel/mkl-include/2023.2.0/download/win-64/mkl-include-2023.2.0-intel_49496.tar.bz2", "daa93c899e6c7627232fa60e67a2b6079cd29752e8ba1251ae895a57e51defa7") + add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2023.2.0-intel_49496.tar.bz2", "daa93c899e6c7627232fa60e67a2b6079cd29752e8ba1251ae895a57e51defa7") add_versions("2024.1.0+692", "6431647057cd8757a464a3f6ab2099139e059d04446f04443afd2570febe42bf") - add_resources("2024.1.0+692", "headers","https://anaconda.org/intel/mkl-include/2024.1.0/download/win-64/mkl-include-2024.1.0-intel_692.tar.bz2","28229844aa6c19870531452e5805ab876da4a5df896a9e753e6b481da2d389cb") + add_resources("2024.1.0+692", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.1.0-intel_692.tar.bz2","28229844aa6c19870531452e5805ab876da4a5df896a9e753e6b481da2d389cb") add_versions("2024.2.0+661", "e760103a484d5132f0af35e58ccad7b576536d38744141e776f3ad1673adc455") - add_resources("2024.2.0+661", "headers","https://anaconda.org/intel/mkl-include/2024.2.0/download/win-64/mkl-include-2024.2.0-intel_661.tar.bz2","34f5cc20b6d2ab7c82f301b108fa2ac48e1f6c0acd8ad166897fb53184d5c93e") + add_resources("2024.2.0+661", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.0-intel_661.tar.bz2","34f5cc20b6d2ab7c82f301b108fa2ac48e1f6c0acd8ad166897fb53184d5c93e") + add_versions("2024.2.1+102", "fa0767ee84e93f59fd4ae92434a1110cd0830b254229b9ffdce36c60adebd574") + add_resources("2024.2.1+102", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.1-intel_102.tar.bz2","54f362cbb74c9cb787e76248e30910316b24dfda273d872149b3f2ecb5893057") elseif is_arch("x86") then - add_urls("https://anaconda.org/intel/mkl-static/$(version).tar.bz2", {version = function (version) + add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") - return format("%s/download/win-32/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) + return format("win-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2021.2.0+296", "eaf0df027d58c5fd948f86b83dfc4d608855962cbdb04551712c9aeeb7b26eca") - add_resources("2021.2.0+296", "headers", "https://anaconda.org/intel/mkl-include/2021.2.0/download/win-32/mkl-include-2021.2.0-intel_296.tar.bz2", "8ed173edff75783426de1bbc1d122266047fc84d4cfc5a9b810b1f2792f02c37") + add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2021.2.0-intel_296.tar.bz2", "8ed173edff75783426de1bbc1d122266047fc84d4cfc5a9b810b1f2792f02c37") add_versions("2021.3.0+524", "799a42ab4422d1532be65e40ed4ac5e81692b796ae3de37a7489389f9e10f112") - add_resources("2021.3.0+524", "headers", "https://anaconda.org/intel/mkl-include/2021.3.0/download/win-32/mkl-include-2021.3.0-intel_524.tar.bz2", "9ff8e58dc98da8ec2fe3b15eac2abfef4eb3335d90feeb498f84126371ccea8c") + add_resources("2021.3.0+524", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2021.3.0-intel_524.tar.bz2", "9ff8e58dc98da8ec2fe3b15eac2abfef4eb3335d90feeb498f84126371ccea8c") add_versions("2022.0.3+171", "b34d5e5d0dd779b117666c9fc89d008431f6239ad60fc08a52a6b874fdf24517") - add_resources("2022.0.3+171", "headers", "https://anaconda.org/intel/mkl-include/2022.0.3/download/win-32/mkl-include-2022.0.3-intel_171.tar.bz2", "f696cd98b2f33b2c21bf7b70f57e894a763dad1831c721a348614cfeb17a4541") + add_resources("2022.0.3+171", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2022.0.3-intel_171.tar.bz2", "f696cd98b2f33b2c21bf7b70f57e894a763dad1831c721a348614cfeb17a4541") add_versions("2023.2.0+49496", "4795b6a00b1b7ae5c608de67ba2c79ad152223d0eaf4aba46db848bbae268718") - add_resources("2023.2.0+49496", "headers", "https://anaconda.org/intel/mkl-include/2023.2.0/download/win-32/mkl-include-2023.2.0-intel_49496.tar.bz2", "0ed907ecc2eaae0ed8c280814392b5b80cc19df78838d9688273a12bd72c7bf8") + add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2023.2.0-intel_49496.tar.bz2", "0ed907ecc2eaae0ed8c280814392b5b80cc19df78838d9688273a12bd72c7bf8") add_versions("2024.1.0+692", "7a8622f23a27fa487f08653645b6dc3f46b10f5b60ea2b90377812571730d0d9") - add_resources("2024.1.0+692", "headers","https://anaconda.org/intel/mkl-include/2024.1.0/download/win-32/mkl-include-2024.1.0-intel_692.tar.bz2","8994e1c5b5599934e83eb964a136be98dc5a6355f3f5b35cab44cdc0e8b970dd") + add_resources("2024.1.0+692", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.1.0-intel_692.tar.bz2","8994e1c5b5599934e83eb964a136be98dc5a6355f3f5b35cab44cdc0e8b970dd") add_versions("2024.2.0+661", "0a126754b76cf41e9fbc10e7cb70d69018059a2a413560938184b7886bced28b") - add_resources("2024.2.0+661", "headers","https://anaconda.org/intel/mkl-include/2024.2.0/download/win-32/mkl-include-2024.2.0-intel_661.tar.bz2","431feac62519a0d65c85e801d7329cb7caa66ced53a0b4d26f15420d06d1717d") + add_resources("2024.2.0+661", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.0-intel_661.tar.bz2","431feac62519a0d65c85e801d7329cb7caa66ced53a0b4d26f15420d06d1717d") + add_versions("2024.2.1+102", "133b0d10a1225293742a6355c08752a8d6c9ef1ec744be8ed60b92d035558006") + add_resources("2024.2.1+102", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.1-intel_102.tar.bz2","ac7bc36bd84a144c03ba44f4f146caa91af549a3ddcf302513b3ed75dd0a153e") end - elseif is_plat("macosx") and is_arch("x86_64") then - add_urls("https://anaconda.org/intel/mkl-static/$(version).tar.bz2", {version = function (version) - local mv = version:split("%+") - return format("%s/download/osx-64/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) - end}) - add_versions("2021.2.0+269", "b7af248f01799873333cbd388b5efa19601cf6815dc38713509974783f4b1ccd") - add_resources("2021.2.0+269", "headers", "https://anaconda.org/intel/mkl-include/2021.2.0/download/osx-64/mkl-include-2021.2.0-intel_269.tar.bz2", "5215d62cadeb3f8021230163dc35ad38259e3688aa0f39d7da69ebe54ab45624") - add_versions("2021.3.0+517", "85a636642ee4f76fba50d16c45099cd22082eb1f8b835a4a0b455ec4796ebf8f") - add_resources("2021.3.0+517", "headers", "https://anaconda.org/intel/mkl-include/2021.3.0/download/osx-64/mkl-include-2021.3.0-intel_517.tar.bz2", "db9896e667b31908b398d515108433d8df95e6429ebfb9d493a463f25886019c") - add_versions("2022.1.0+208", "06e5dcd7b8f11f9736d4e4d7d5a9972333ee8822cf2263ecccf4cb0e3cc95530") - add_resources("2022.1.0+208", "headers", "https://anaconda.org/intel/mkl-include/2022.1.0/download/osx-64/mkl-include-2022.1.0-intel_208.tar.bz2", "569ea516148726b2698f17982aba2d9ec1bfb321f0180be938eddbc696addbc5") - add_versions("2023.2.0+49499", "2e2f6bd275e439f82f081e28e774dec663718b199a696da635934536a51faa73") - add_resources("2023.2.0+49499", "headers", "https://anaconda.org/intel/mkl-include/2023.2.0/download/osx-64/mkl-include-2023.2.0-intel_49499.tar.bz2", "c3940a33498df821821c28dc292f7d7a739b11892856fd9fbbc3de5cf0990b00") + -- elseif is_plat("macosx") and is_arch("x86_64") then + -- add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) + -- local mv = version:split("%+") + -- return format("%s/download/osx-64/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) + -- end}) + -- add_versions("2021.2.0+269", "b7af248f01799873333cbd388b5efa19601cf6815dc38713509974783f4b1ccd") + -- add_resources("2021.2.0+269", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2021.2.0-intel_269.tar.bz2", "5215d62cadeb3f8021230163dc35ad38259e3688aa0f39d7da69ebe54ab45624") + -- add_versions("2021.3.0+517", "85a636642ee4f76fba50d16c45099cd22082eb1f8b835a4a0b455ec4796ebf8f") + -- add_resources("2021.3.0+517", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2021.3.0-intel_517.tar.bz2", "db9896e667b31908b398d515108433d8df95e6429ebfb9d493a463f25886019c") + -- add_versions("2022.1.0+208", "06e5dcd7b8f11f9736d4e4d7d5a9972333ee8822cf2263ecccf4cb0e3cc95530") + -- add_resources("2022.1.0+208", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2022.1.0-intel_208.tar.bz2", "569ea516148726b2698f17982aba2d9ec1bfb321f0180be938eddbc696addbc5") + -- add_versions("2023.2.0+49499", "2e2f6bd275e439f82f081e28e774dec663718b199a696da635934536a51faa73") + -- add_resources("2023.2.0+49499", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2023.2.0-intel_49499.tar.bz2", "c3940a33498df821821c28dc292f7d7a739b11892856fd9fbbc3de5cf0990b00") elseif is_plat("linux") then if is_arch("x86_64") then - add_urls("https://anaconda.org/intel/mkl-static/$(version).tar.bz2", {version = function (version) + add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") - return format("%s/download/linux-64/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) + return format("linux-64/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2021.2.0+296", "2bcaefefd593e4fb521e1fc88715f672ae5b9d1706babf10e3a10ef43ea0f983") - add_resources("2021.2.0+296", "headers", "https://anaconda.org/intel/mkl-include/2021.2.0/download/linux-64/mkl-include-2021.2.0-intel_296.tar.bz2", "13721fead8a3eddee15b914fd3ae9cf2095966af79bbc2f086462eda9fff4d62") + add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2021.2.0-intel_296.tar.bz2", "13721fead8a3eddee15b914fd3ae9cf2095966af79bbc2f086462eda9fff4d62") add_versions("2021.3.0+520", "c1e21988bbf05b455077a512cb719ef59ec6e06a6807cfefb892945ec19de5d0") - add_resources("2021.3.0+520", "headers", "https://anaconda.org/intel/mkl-include/2021.3.0/download/linux-64/mkl-include-2021.3.0-intel_520.tar.bz2", "b0df7fb4c2071fdec87b567913715a2e47dca05e8c3ac4e5bcf072d7804085af") + add_resources("2021.3.0+520", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2021.3.0-intel_520.tar.bz2", "b0df7fb4c2071fdec87b567913715a2e47dca05e8c3ac4e5bcf072d7804085af") add_versions("2022.1.0+223", "9dfb2940447cc8cf7ca3e647e2b62be714e89cbca162998cbf4e05deb69b6bd2") - add_resources("2022.1.0+223", "headers", "https://anaconda.org/intel/mkl-include/2022.1.0/download/linux-64/mkl-include-2022.1.0-intel_223.tar.bz2", "704e658a9b25a200f8035f3d0a8f2e094736496a2169f87609f1cfed2e2eb0a9") + add_resources("2022.1.0+223", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_223.tar.bz2", "704e658a9b25a200f8035f3d0a8f2e094736496a2169f87609f1cfed2e2eb0a9") add_versions("2023.2.0+49495", "5c91829865f36f7f5845f5b38e509bb05bee1a38ccfd2caa0eabc0c28aaa4082") - add_resources("2023.2.0+49495", "headers", "https://anaconda.org/intel/mkl-include/2023.2.0/download/linux-64/mkl-include-2023.2.0-intel_49495.tar.bz2", "0dfb6ca3c17d99641f20877579c78155cf95aa0b22363bcc91b1d57df4646318") + add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2023.2.0-intel_49495.tar.bz2", "0dfb6ca3c17d99641f20877579c78155cf95aa0b22363bcc91b1d57df4646318") add_versions("2024.1.0+691", "be8833b094253d51abe49de418f7db2260f4c8f32514969a4a2eabaadc5d55c2") - add_resources("2024.1.0+691", "headers", "https://anaconda.org/intel/mkl-include/2024.1.0/download/linux-64/mkl-include-2024.1.0-intel_691.tar.bz2", "e36b2e74f5c28ff91565abe47a09dc246c9cf725e0d05b5fb08813b4073ea68b") + add_resources("2024.1.0+691", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.1.0-intel_691.tar.bz2", "e36b2e74f5c28ff91565abe47a09dc246c9cf725e0d05b5fb08813b4073ea68b") add_versions("2024.2.0+663", "7ee44680030cf187c430a34051ccf37a2c697ad82b62fb0508dfe7a94d7e27f7") - add_resources("2024.2.0+663", "headers", "https://anaconda.org/intel/mkl-include/2024.2.0/download/linux-64/mkl-include-2024.2.0-intel_663.tar.bz2", "2e29ca36f199bafed778230b054256593c2d572aeb050389fd87355ba0466d13") + add_resources("2024.2.0+663", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.2.0-intel_663.tar.bz2", "2e29ca36f199bafed778230b054256593c2d572aeb050389fd87355ba0466d13") + add_versions("2024.2.1+103", "cde63703ea42627c50ad6dfb3ec336e18fa957964d40e5472783d82c461c083a") + add_resources("2024.2.1+103", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.2.1-intel_103.tar.bz2", "df19cbc68fda9e125445df8ea94a7af2c6a8cb009193104741c9f2d1223de193") elseif is_arch("i386") then - add_urls("https://anaconda.org/intel/mkl-static/$(version).tar.bz2", {version = function (version) + add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") - return format("%s/download/linux-32/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) + return format("linux-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2021.2.0+296", "34a1bc80a4a39ca5a55d29e9fcc803380fbc4d029ae496e60a918e8d12db68c2") - add_resources("2021.2.0+296", "headers", "https://anaconda.org/intel/mkl-include/2021.2.0/download/linux-32/mkl-include-2021.2.0-intel_296.tar.bz2", "7fcbc945377b486b40d29b170d0b6c39bbc5b430ac7284dae2046bbf610f643d") + add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2021.2.0-intel_296.tar.bz2", "7fcbc945377b486b40d29b170d0b6c39bbc5b430ac7284dae2046bbf610f643d") add_versions("2021.3.0+520", "4df801f5806d1934c5f3887e8f2153fb0c929be9545627cf99ce9e72c907653b") - add_resources("2021.3.0+520", "headers", "https://anaconda.org/intel/mkl-include/2021.3.0/download/linux-32/mkl-include-2021.3.0-intel_520.tar.bz2", "dce1f2a08499f34ed4883b807546754c1547a9cc2424b7b75b9233641cf044c1") + add_resources("2021.3.0+520", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2021.3.0-intel_520.tar.bz2", "dce1f2a08499f34ed4883b807546754c1547a9cc2424b7b75b9233641cf044c1") add_versions("2022.0.2+136", "157c09248cb5e5cbcb28ef8db53d529ab2f049e9269b2a2bc90601c0c420080e") - add_resources("2022.0.2+136", "headers", "https://anaconda.org/intel/mkl-include/2022.0.2/download/linux-32/mkl-include-2022.0.2-intel_136.tar.bz2", "16882aeddbd33a2dc9210e61c59db6ad0d7d9efdd40ad1544b369b0830683371") + add_resources("2022.0.2+136", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2022.0.2-intel_136.tar.bz2", "16882aeddbd33a2dc9210e61c59db6ad0d7d9efdd40ad1544b369b0830683371") add_versions("2023.2.0+49495", "9cdcb26ebbbe1510611f01f75780c0e69522d5df73395370a73c81413beaa56a") - add_resources("2023.2.0+49495", "headers", "https://anaconda.org/intel/mkl-include/2023.2.0/download/linux-32/mkl-include-2023.2.0-intel_49495.tar.bz2", "b4433c6839bb7f48951b2dcf409dec7306aee3649c539ee0513d8bfb1a1ea283") + add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2023.2.0-intel_49495.tar.bz2", "b4433c6839bb7f48951b2dcf409dec7306aee3649c539ee0513d8bfb1a1ea283") add_versions("2024.1.0+691", "8bd52f73844edc59fe925fa9edef66a7158e502df7c06ddc532d1b370df4fb7d") - add_resources("2024.1.0+691", "headers", "https://anaconda.org/intel/mkl-include/2024.1.0/download/linux-32/mkl-include-2024.1.0-intel_691.tar.bz2", "88529f8bea2498e88b2cf8dc7aa3735f46f348cf5047006dfc6455f8e2bbdd30") + add_resources("2024.1.0+691", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.1.0-intel_691.tar.bz2", "88529f8bea2498e88b2cf8dc7aa3735f46f348cf5047006dfc6455f8e2bbdd30") add_versions("2024.2.0+663", "505eea9981643dac10f342eca80603982365f6b598e6435e07c9d5385622f578") - add_resources("2024.2.0+663", "headers", "https://anaconda.org/intel/mkl-include/2024.2.0/download/linux-32/mkl-include-2024.2.0-intel_663.tar.bz2", "d97e655707590ba38d1240a4f9be3f60df2bc82f3ab5f7b16cf2735d4d9ba401") + add_resources("2024.2.0+663", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.2.0-intel_663.tar.bz2", "d97e655707590ba38d1240a4f9be3f60df2bc82f3ab5f7b16cf2735d4d9ba401") + add_versions("2024.2.1+103", "def6c66abfcefd2d9cb0ed32a2d4bd2b4961ef4e5f5f72a4c699fd63456fc959") + add_resources("2024.2.1+103", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.2.1-intel_103.tar.bz2", "4595375b6b04847721f84a88122089fa4a9d28a4d26afe89d44334c6edf56e84") end end @@ -109,7 +117,8 @@ package("mkl") package:add("links", package:is_arch("x64", "x86_64") and "mkl_blas95_" .. suffix or "mkl_blas95") package:add("links", package:is_arch("x64", "x86_64") and "mkl_lapack95_" .. suffix or "mkl_lapack95") - if package:has_tool("cc", "gcc", "gxx") then + if (package:has_tool("cc", "gcc", "gxx") or + package:has_tool("fc", "gfortran")) then local flags = {"-Wl,--start-group"} table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") local threading = package:config("threading") From 532d08dccf257c6c158433576b0675eed10f1883 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Tue, 17 Sep 2024 16:21:30 +0200 Subject: [PATCH 02/11] Fixed deprecated packages in new repository. --- packages/m/mkl/xmake.lua | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index b45c654c6cc..9555ca7a089 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -9,12 +9,10 @@ package("mkl") local mv = version:split("%+") return format("win-64/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) - add_versions("2021.2.0+296", "54209e5d9c4778381f08b9a90e900c001494db020cda426441cd624cb0f7ebdc") - add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2021.2.0-intel_296.tar.bz2", "ba222ea4ceb9e09976f23a3df39176148b4469b297275f3d05c1ad411b3d54c3") - add_versions("2021.3.0+524", "842628a8621f2ca19d7f1809e50420e311edf20b9bea18404dd1c20af798f5e6") - add_resources("2021.3.0+524", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2021.3.0-intel_524.tar.bz2", "8ca8f77d0c57a434541d62a9c61781aa37225f5e669de01b8cc98488b3f9e82f") - add_versions("2022.1.0+192", "fd9a529c0caa27ee3068e8d845f07e536970b0cbf713118d1f3daa32fb2b9e8c") - add_resources("2022.1.0+192", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.1.0-intel_192.tar.bz2", "b6452e8c4891fcfab452bc23c6adc9c61ab6635fa494bb2b29725473c1013abc") + add_versions("2022.2.0+9563", "82ed56af423fa6f2fef46085e267695feb5fd079a5eabb6353a99598ff2a7879") + add_resources("2022.2.0+9563", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.0-intel_9563.tar.bz2", "da4458b2c8f86b7e8d2772e1d992b8913dd74fb9d0822559eb9538aa36125a45") + add_versions("2022.2.1+19754", "a1c3592caeb248ec16698d2a0971b6c6fa8eae1ddfd0cc575d8ec1d02e607ee6") + add_resources("2022.2.1+19754", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.1-intel_19754.tar.bz2", "675519d77dfbf38bfa3dd94f37d3d1fa9f74b32f089e50123605ff3d45752c44") add_versions("2023.2.0+49496", "21a9fe03ba80009934a50b9d75f16757b9e49415e44245ced3b896fd471351ca") add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2023.2.0-intel_49496.tar.bz2", "daa93c899e6c7627232fa60e67a2b6079cd29752e8ba1251ae895a57e51defa7") add_versions("2024.1.0+692", "6431647057cd8757a464a3f6ab2099139e059d04446f04443afd2570febe42bf") @@ -28,12 +26,10 @@ package("mkl") local mv = version:split("%+") return format("win-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) - add_versions("2021.2.0+296", "eaf0df027d58c5fd948f86b83dfc4d608855962cbdb04551712c9aeeb7b26eca") - add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2021.2.0-intel_296.tar.bz2", "8ed173edff75783426de1bbc1d122266047fc84d4cfc5a9b810b1f2792f02c37") - add_versions("2021.3.0+524", "799a42ab4422d1532be65e40ed4ac5e81692b796ae3de37a7489389f9e10f112") - add_resources("2021.3.0+524", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2021.3.0-intel_524.tar.bz2", "9ff8e58dc98da8ec2fe3b15eac2abfef4eb3335d90feeb498f84126371ccea8c") - add_versions("2022.0.3+171", "b34d5e5d0dd779b117666c9fc89d008431f6239ad60fc08a52a6b874fdf24517") - add_resources("2022.0.3+171", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2022.0.3-intel_171.tar.bz2", "f696cd98b2f33b2c21bf7b70f57e894a763dad1831c721a348614cfeb17a4541") + add_versions("2022.2.0+9563", "2cf2098ce3f6c14f1c86c850a6c4f5519966f6a70589ac4bf4cb0013b575f282") + add_resources("2022.2.0+9563", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.0-intel_9563.tar.bz2", "4b05540349b3aaa55e5b0e3b51d4286649ae76b1c1d763a56ffcdad1bb927bf9") + add_versions("2022.2.1+19754", "b663b6916996d7b090ef4a8c1d270b9a1a84b1bdefe85cc01e778f8e629b7a6c") + add_resources("2022.2.1+19754", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.1-intel_19754.tar.bz2", "04c3ce3f1e6e23e575f904fbdafd089f3241bf28ca1005b2464d87795295dc50") add_versions("2023.2.0+49496", "4795b6a00b1b7ae5c608de67ba2c79ad152223d0eaf4aba46db848bbae268718") add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2023.2.0-intel_49496.tar.bz2", "0ed907ecc2eaae0ed8c280814392b5b80cc19df78838d9688273a12bd72c7bf8") add_versions("2024.1.0+692", "7a8622f23a27fa487f08653645b6dc3f46b10f5b60ea2b90377812571730d0d9") @@ -62,12 +58,10 @@ package("mkl") local mv = version:split("%+") return format("linux-64/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) - add_versions("2021.2.0+296", "2bcaefefd593e4fb521e1fc88715f672ae5b9d1706babf10e3a10ef43ea0f983") - add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2021.2.0-intel_296.tar.bz2", "13721fead8a3eddee15b914fd3ae9cf2095966af79bbc2f086462eda9fff4d62") - add_versions("2021.3.0+520", "c1e21988bbf05b455077a512cb719ef59ec6e06a6807cfefb892945ec19de5d0") - add_resources("2021.3.0+520", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2021.3.0-intel_520.tar.bz2", "b0df7fb4c2071fdec87b567913715a2e47dca05e8c3ac4e5bcf072d7804085af") - add_versions("2022.1.0+223", "9dfb2940447cc8cf7ca3e647e2b62be714e89cbca162998cbf4e05deb69b6bd2") - add_resources("2022.1.0+223", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_223.tar.bz2", "704e658a9b25a200f8035f3d0a8f2e094736496a2169f87609f1cfed2e2eb0a9") + add_versions("2022.2.0+8748", "cbcff4024be9830a9fb7f640d4555ea4f3a9c4dd503df67a42f11b940286b7b3") + add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_8748.tar.bz2", "9dd06c499ec890294b2909a0784303e94b14d88c6e95ae4ffee308f16fd55121") + add_versions("2022.2.1+16993", "4f1e738b7b54763a211b52702dea763d1c5dff352cb14a6155244634b58b28f9") + add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_16993.tar.bz2", "144b4939c875ae52b5479317e73be839f5b26b3b0e2c3a52bd59507bc25be56c") add_versions("2023.2.0+49495", "5c91829865f36f7f5845f5b38e509bb05bee1a38ccfd2caa0eabc0c28aaa4082") add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2023.2.0-intel_49495.tar.bz2", "0dfb6ca3c17d99641f20877579c78155cf95aa0b22363bcc91b1d57df4646318") add_versions("2024.1.0+691", "be8833b094253d51abe49de418f7db2260f4c8f32514969a4a2eabaadc5d55c2") @@ -81,12 +75,10 @@ package("mkl") local mv = version:split("%+") return format("linux-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) - add_versions("2021.2.0+296", "34a1bc80a4a39ca5a55d29e9fcc803380fbc4d029ae496e60a918e8d12db68c2") - add_resources("2021.2.0+296", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2021.2.0-intel_296.tar.bz2", "7fcbc945377b486b40d29b170d0b6c39bbc5b430ac7284dae2046bbf610f643d") - add_versions("2021.3.0+520", "4df801f5806d1934c5f3887e8f2153fb0c929be9545627cf99ce9e72c907653b") - add_resources("2021.3.0+520", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2021.3.0-intel_520.tar.bz2", "dce1f2a08499f34ed4883b807546754c1547a9cc2424b7b75b9233641cf044c1") - add_versions("2022.0.2+136", "157c09248cb5e5cbcb28ef8db53d529ab2f049e9269b2a2bc90601c0c420080e") - add_resources("2022.0.2+136", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2022.0.2-intel_136.tar.bz2", "16882aeddbd33a2dc9210e61c59db6ad0d7d9efdd40ad1544b369b0830683371") + add_versions("2022.2.0+8748", "af6b8cb0a6b61a97c6048bf57c5e807ff7052e845da69078f992671e393262a6") + add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_8748.tar.bz2", "64f7d55059d0d85e0a88507304a54356ec9713f5dee1b205462aa0f97b0f6683") + add_versions("2022.2.1+16993", "e588ea2583d2e5cbf072574531610cf0acae8490dc4432b41a9f3ddb5e67dece") + add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_16993.tar.bz2", "2deec097b972d7784b26b454169af302a0d4e26cc1d65cbb4ed72baf00a8849e") add_versions("2023.2.0+49495", "9cdcb26ebbbe1510611f01f75780c0e69522d5df73395370a73c81413beaa56a") add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2023.2.0-intel_49495.tar.bz2", "b4433c6839bb7f48951b2dcf409dec7306aee3649c539ee0513d8bfb1a1ea283") add_versions("2024.1.0+691", "8bd52f73844edc59fe925fa9edef66a7158e502df7c06ddc532d1b370df4fb7d") From 5c6d269d47d0f9a94f1c89ee9d8be0452b0d58dc Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Wed, 18 Sep 2024 10:12:32 +0200 Subject: [PATCH 03/11] This patch restores support of Intel Mac versions The repository was also available in the new repository. Versions listed in the package and not available in the repository have been removed or replaced with more recent ones from the same year. --- packages/m/mkl/xmake.lua | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index 9555ca7a089..69c2828c809 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -39,19 +39,17 @@ package("mkl") add_versions("2024.2.1+102", "133b0d10a1225293742a6355c08752a8d6c9ef1ec744be8ed60b92d035558006") add_resources("2024.2.1+102", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.1-intel_102.tar.bz2","ac7bc36bd84a144c03ba44f4f146caa91af549a3ddcf302513b3ed75dd0a153e") end - -- elseif is_plat("macosx") and is_arch("x86_64") then - -- add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) - -- local mv = version:split("%+") - -- return format("%s/download/osx-64/mkl-static-%s-intel_%s", mv[1], mv[1], mv[2]) - -- end}) - -- add_versions("2021.2.0+269", "b7af248f01799873333cbd388b5efa19601cf6815dc38713509974783f4b1ccd") - -- add_resources("2021.2.0+269", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2021.2.0-intel_269.tar.bz2", "5215d62cadeb3f8021230163dc35ad38259e3688aa0f39d7da69ebe54ab45624") - -- add_versions("2021.3.0+517", "85a636642ee4f76fba50d16c45099cd22082eb1f8b835a4a0b455ec4796ebf8f") - -- add_resources("2021.3.0+517", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2021.3.0-intel_517.tar.bz2", "db9896e667b31908b398d515108433d8df95e6429ebfb9d493a463f25886019c") - -- add_versions("2022.1.0+208", "06e5dcd7b8f11f9736d4e4d7d5a9972333ee8822cf2263ecccf4cb0e3cc95530") - -- add_resources("2022.1.0+208", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2022.1.0-intel_208.tar.bz2", "569ea516148726b2698f17982aba2d9ec1bfb321f0180be938eddbc696addbc5") - -- add_versions("2023.2.0+49499", "2e2f6bd275e439f82f081e28e774dec663718b199a696da635934536a51faa73") - -- add_resources("2023.2.0+49499", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2023.2.0-intel_49499.tar.bz2", "c3940a33498df821821c28dc292f7d7a739b11892856fd9fbbc3de5cf0990b00") + elseif is_plat("macosx") and is_arch("x86_64") then + add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) + local mv = version:split("%+") + return format("osx-64/mkl-static-%s-intel_%s", mv[1], mv[2]) + end}) + add_versions("2022.2.0+8687", "cd5ecb73ec922d2b8ae6e06f6caa0549113911f76b2eac1969566a8edb92c301") + add_resources("2022.2.0+8687", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2022.2.0-intel_8687.tar.bz2", "2efc298a72ef7e49ba6142055352666c261ca592a3d5779e62a012334bf52a6b") + add_versions("2022.2.1+15346", "bce4e4d72117242c2a3cf75fcac134e7c3baabf7334003ec0f377ab7123ce30d") + add_resources("2022.2.1+15346", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2022.2.1-intel_15346.tar.bz2", "fa14e44b3adbcc156aa7b531c4e83143cf9d31fe990210cb6d5d5456f8a417a8") + add_versions("2023.2.0+49499", "2e2f6bd275e439f82f081e28e774dec663718b199a696da635934536a51faa73") + add_resources("2023.2.0+49499", "headers", "https://software.repos.intel.com/python/conda/osx-64/mkl-include-2023.2.0-intel_49499.tar.bz2", "c3940a33498df821821c28dc292f7d7a739b11892856fd9fbbc3de5cf0990b00") elseif is_plat("linux") then if is_arch("x86_64") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) From adb9d01f7178518739659bdfcc9667ea5b7dc2dd Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Wed, 18 Sep 2024 15:08:51 +0200 Subject: [PATCH 04/11] Fixed URLs to some packages. Fixed URLs to some Windows 32 packages and Linux (32 and 64 bits) packages. --- packages/m/mkl/xmake.lua | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index 69c2828c809..b85b6814556 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -16,28 +16,32 @@ package("mkl") add_versions("2023.2.0+49496", "21a9fe03ba80009934a50b9d75f16757b9e49415e44245ced3b896fd471351ca") add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2023.2.0-intel_49496.tar.bz2", "daa93c899e6c7627232fa60e67a2b6079cd29752e8ba1251ae895a57e51defa7") add_versions("2024.1.0+692", "6431647057cd8757a464a3f6ab2099139e059d04446f04443afd2570febe42bf") - add_resources("2024.1.0+692", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.1.0-intel_692.tar.bz2","28229844aa6c19870531452e5805ab876da4a5df896a9e753e6b481da2d389cb") + add_resources("2024.1.0+692", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.1.0-intel_692.tar.bz2", "28229844aa6c19870531452e5805ab876da4a5df896a9e753e6b481da2d389cb") add_versions("2024.2.0+661", "e760103a484d5132f0af35e58ccad7b576536d38744141e776f3ad1673adc455") - add_resources("2024.2.0+661", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.0-intel_661.tar.bz2","34f5cc20b6d2ab7c82f301b108fa2ac48e1f6c0acd8ad166897fb53184d5c93e") + add_resources("2024.2.0+661", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.0-intel_661.tar.bz2", "34f5cc20b6d2ab7c82f301b108fa2ac48e1f6c0acd8ad166897fb53184d5c93e") add_versions("2024.2.1+102", "fa0767ee84e93f59fd4ae92434a1110cd0830b254229b9ffdce36c60adebd574") - add_resources("2024.2.1+102", "headers","https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.1-intel_102.tar.bz2","54f362cbb74c9cb787e76248e30910316b24dfda273d872149b3f2ecb5893057") + add_resources("2024.2.1+102", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.1-intel_102.tar.bz2", "54f362cbb74c9cb787e76248e30910316b24dfda273d872149b3f2ecb5893057") + add_versions("2024.2.2+14", "b80676e8fa65e5e5d82cfc6759ea2a61088bddf3ab144161bf2323ec8fe474c3") + add_resources("2024.2.2+14", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2024.2.2-intel_14.tar.bz2", "06b8cba21654bb21f6d535d6757c805e93330f11dc7dc5eaa55e926be9e20c4b") elseif is_arch("x86") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") return format("win-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2022.2.0+9563", "2cf2098ce3f6c14f1c86c850a6c4f5519966f6a70589ac4bf4cb0013b575f282") - add_resources("2022.2.0+9563", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.0-intel_9563.tar.bz2", "4b05540349b3aaa55e5b0e3b51d4286649ae76b1c1d763a56ffcdad1bb927bf9") + add_resources("2022.2.0+9563", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2022.2.0-intel_9563.tar.bz2", "4b05540349b3aaa55e5b0e3b51d4286649ae76b1c1d763a56ffcdad1bb927bf9") add_versions("2022.2.1+19754", "b663b6916996d7b090ef4a8c1d270b9a1a84b1bdefe85cc01e778f8e629b7a6c") - add_resources("2022.2.1+19754", "headers", "https://software.repos.intel.com/python/conda/win-64/mkl-include-2022.2.1-intel_19754.tar.bz2", "04c3ce3f1e6e23e575f904fbdafd089f3241bf28ca1005b2464d87795295dc50") + add_resources("2022.2.1+19754", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2022.2.1-intel_19754.tar.bz2", "04c3ce3f1e6e23e575f904fbdafd089f3241bf28ca1005b2464d87795295dc50") add_versions("2023.2.0+49496", "4795b6a00b1b7ae5c608de67ba2c79ad152223d0eaf4aba46db848bbae268718") add_resources("2023.2.0+49496", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2023.2.0-intel_49496.tar.bz2", "0ed907ecc2eaae0ed8c280814392b5b80cc19df78838d9688273a12bd72c7bf8") add_versions("2024.1.0+692", "7a8622f23a27fa487f08653645b6dc3f46b10f5b60ea2b90377812571730d0d9") - add_resources("2024.1.0+692", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.1.0-intel_692.tar.bz2","8994e1c5b5599934e83eb964a136be98dc5a6355f3f5b35cab44cdc0e8b970dd") + add_resources("2024.1.0+692", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.1.0-intel_692.tar.bz2", "8994e1c5b5599934e83eb964a136be98dc5a6355f3f5b35cab44cdc0e8b970dd") add_versions("2024.2.0+661", "0a126754b76cf41e9fbc10e7cb70d69018059a2a413560938184b7886bced28b") - add_resources("2024.2.0+661", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.0-intel_661.tar.bz2","431feac62519a0d65c85e801d7329cb7caa66ced53a0b4d26f15420d06d1717d") + add_resources("2024.2.0+661", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.0-intel_661.tar.bz2", "431feac62519a0d65c85e801d7329cb7caa66ced53a0b4d26f15420d06d1717d") add_versions("2024.2.1+102", "133b0d10a1225293742a6355c08752a8d6c9ef1ec744be8ed60b92d035558006") - add_resources("2024.2.1+102", "headers","https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.1-intel_102.tar.bz2","ac7bc36bd84a144c03ba44f4f146caa91af549a3ddcf302513b3ed75dd0a153e") + add_resources("2024.2.1+102", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.1-intel_102.tar.bz2", "ac7bc36bd84a144c03ba44f4f146caa91af549a3ddcf302513b3ed75dd0a153e") + add_versions("2024.2.2+14", "bcfb0170aa7bac9bd633b9d8965b3e4b3633802bb537165f22db7c7a15f70ead") + add_resources("2024.2.2+14", "headers", "https://software.repos.intel.com/python/conda/win-32/mkl-include-2024.2.2-intel_14.tar.bz2", "81e1cc1960b10626f0c2209e21bf013bf4bf8cfc4a1ba38b2301d20aa0e1d6d6") end elseif is_plat("macosx") and is_arch("x86_64") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) @@ -57,26 +61,26 @@ package("mkl") return format("linux-64/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2022.2.0+8748", "cbcff4024be9830a9fb7f640d4555ea4f3a9c4dd503df67a42f11b940286b7b3") - add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_8748.tar.bz2", "9dd06c499ec890294b2909a0784303e94b14d88c6e95ae4ffee308f16fd55121") + add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.2.0-intel_8748.tar.bz2", "9dd06c499ec890294b2909a0784303e94b14d88c6e95ae4ffee308f16fd55121") add_versions("2022.2.1+16993", "4f1e738b7b54763a211b52702dea763d1c5dff352cb14a6155244634b58b28f9") - add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_16993.tar.bz2", "144b4939c875ae52b5479317e73be839f5b26b3b0e2c3a52bd59507bc25be56c") - add_versions("2023.2.0+49495", "5c91829865f36f7f5845f5b38e509bb05bee1a38ccfd2caa0eabc0c28aaa4082") - add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2023.2.0-intel_49495.tar.bz2", "0dfb6ca3c17d99641f20877579c78155cf95aa0b22363bcc91b1d57df4646318") + add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.2.1-intel_16993.tar.bz2", "144b4939c875ae52b5479317e73be839f5b26b3b0e2c3a52bd59507bc25be56c") add_versions("2024.1.0+691", "be8833b094253d51abe49de418f7db2260f4c8f32514969a4a2eabaadc5d55c2") add_resources("2024.1.0+691", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.1.0-intel_691.tar.bz2", "e36b2e74f5c28ff91565abe47a09dc246c9cf725e0d05b5fb08813b4073ea68b") add_versions("2024.2.0+663", "7ee44680030cf187c430a34051ccf37a2c697ad82b62fb0508dfe7a94d7e27f7") add_resources("2024.2.0+663", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.2.0-intel_663.tar.bz2", "2e29ca36f199bafed778230b054256593c2d572aeb050389fd87355ba0466d13") add_versions("2024.2.1+103", "cde63703ea42627c50ad6dfb3ec336e18fa957964d40e5472783d82c461c083a") add_resources("2024.2.1+103", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.2.1-intel_103.tar.bz2", "df19cbc68fda9e125445df8ea94a7af2c6a8cb009193104741c9f2d1223de193") + add_versions("2024.2.2+15", "5dc0f934f4a8dbb8e297f5f57b4e069fd71cbb87c4e3225f12670f802b246b3a") + add_resources("2024.2.2+15", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2024.2.2-intel_15.tar.bz2", "a64890440a9155104472f32a6c83215386edfd26b6a5a881548a74f3a2e65981") elseif is_arch("i386") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) local mv = version:split("%+") return format("linux-32/mkl-static-%s-intel_%s", mv[1], mv[2]) end}) add_versions("2022.2.0+8748", "af6b8cb0a6b61a97c6048bf57c5e807ff7052e845da69078f992671e393262a6") - add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_8748.tar.bz2", "64f7d55059d0d85e0a88507304a54356ec9713f5dee1b205462aa0f97b0f6683") + add_resources("2022.2.0+8748", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2022.2.0-intel_8748.tar.bz2", "64f7d55059d0d85e0a88507304a54356ec9713f5dee1b205462aa0f97b0f6683") add_versions("2022.2.1+16993", "e588ea2583d2e5cbf072574531610cf0acae8490dc4432b41a9f3ddb5e67dece") - add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-64/mkl-include-2022.1.0-intel_16993.tar.bz2", "2deec097b972d7784b26b454169af302a0d4e26cc1d65cbb4ed72baf00a8849e") + add_resources("2022.2.1+16993", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2022.2.1-intel_16993.tar.bz2", "2deec097b972d7784b26b454169af302a0d4e26cc1d65cbb4ed72baf00a8849e") add_versions("2023.2.0+49495", "9cdcb26ebbbe1510611f01f75780c0e69522d5df73395370a73c81413beaa56a") add_resources("2023.2.0+49495", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2023.2.0-intel_49495.tar.bz2", "b4433c6839bb7f48951b2dcf409dec7306aee3649c539ee0513d8bfb1a1ea283") add_versions("2024.1.0+691", "8bd52f73844edc59fe925fa9edef66a7158e502df7c06ddc532d1b370df4fb7d") @@ -85,6 +89,8 @@ package("mkl") add_resources("2024.2.0+663", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.2.0-intel_663.tar.bz2", "d97e655707590ba38d1240a4f9be3f60df2bc82f3ab5f7b16cf2735d4d9ba401") add_versions("2024.2.1+103", "def6c66abfcefd2d9cb0ed32a2d4bd2b4961ef4e5f5f72a4c699fd63456fc959") add_resources("2024.2.1+103", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.2.1-intel_103.tar.bz2", "4595375b6b04847721f84a88122089fa4a9d28a4d26afe89d44334c6edf56e84") + add_versions("2024.2.2+15", "47207da3090687f1ca042a09cfff3c39e0bb63093eb9319afc1694ce9f33bc56") + add_resources("2024.2.2+15", "headers", "https://software.repos.intel.com/python/conda/linux-32/mkl-include-2024.2.2-intel_15.tar.bz2", "347cf16676df797ddcba3a4289c7dc64624138583ba35f0c63d0a19b48c89596") end end From 154419afb748f8df387b6617eecd055b1bdb59a8 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Thu, 19 Sep 2024 09:38:59 +0200 Subject: [PATCH 05/11] Check on linker instead of compiler to set flags The tests to set the linker flags are now based on "ld/fcld" instead of the compilers "cc/fc" to avoid problems with toolchains combining different tools. --- packages/m/mkl/fetch.lua | 32 +++++++++++----- packages/m/mkl/xmake.lua | 82 ++++++++++++++++++++++++---------------- 2 files changed, 72 insertions(+), 42 deletions(-) diff --git a/packages/m/mkl/fetch.lua b/packages/m/mkl/fetch.lua index 44c2f0f37f3..57b91022225 100644 --- a/packages/m/mkl/fetch.lua +++ b/packages/m/mkl/fetch.lua @@ -1,6 +1,8 @@ import("lib.detect.find_path") import("lib.detect.find_library") +-- add_configs("runtime", {description = "Set MKL runtime for gcc/clang like compilers.", default = "default", type = "string", values = {"default", "custom"}}) + function _find_package(package, opt) local rdir = (package:is_arch("x64", "x86_64") and "intel64" or "ia32") local suffix = (package:config("interface") == 32 and "lp64" or "ilp64") @@ -45,15 +47,27 @@ function _find_package(package, opt) table.join2(group, {"mkl_intel_thread", "mkl_core"}) end - if (package:has_tool("cc", "gcc", "gxx") or - package:has_tool("fc", "gfortran")) then - result.ldflags = "-Wl,--start-group " - for _, lib in ipairs(group) do - result.ldflags = result.ldflags .. "-l" .. lib .. " " - end - result.ldflags = result.ldflags .. "-Wl,--end-group" - else - table.join2(result.links, group) + for _, toolkind in ipairs({"ld", "fcld"}) do + -- if package:config("runtime") == "default" then + if (package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran")) then + local flags = {"-Wl,--start-group"} + for _, lib in ipairs(group) do + table.insert(flags, "-l" .. lib) + end + table.insert(flags, "-Wl,--end-group") + if package:has_tool(toolkind, "gcc", "gxx") then + result.ldflags = table.concat(flags, " ") + result.shflags = table.concat(flags, " ") + else + -- result.fcldflags = table.concat(flags, " ") + -- result.fcshflags = table.concat(flags, " ") + result.fcldflags = table.concat(flags, " ") + result.fcshflags = table.concat(flags, " ") + end + else + table.join2(result.links, group) + end + -- end end -- find include diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index b85b6814556..f3cf833e154 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -3,6 +3,8 @@ package("mkl") set_homepage("https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html") set_description("IntelĀ® oneAPI Math Kernel Library") + add_configs("runtime", {description = "Set MKL runtime for gcc/clang like compilers.", default = "default", type = "string", values = {"default", "custom"}}) + if is_plat("windows") then if is_arch("x64") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) @@ -113,43 +115,57 @@ package("mkl") package:add("links", package:is_arch("x64", "x86_64") and "mkl_blas95_" .. suffix or "mkl_blas95") package:add("links", package:is_arch("x64", "x86_64") and "mkl_lapack95_" .. suffix or "mkl_lapack95") - if (package:has_tool("cc", "gcc", "gxx") or - package:has_tool("fc", "gfortran")) then - local flags = {"-Wl,--start-group"} - table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") - local threading = package:config("threading") - if threading == "tbb" then - table.insert(flags, "-lmkl_tbb_thread") - package:add("deps", "tbb") - elseif threading == "seq" then - table.insert(flags, "-lmkl_sequential") - elseif threading == "openmp" then - table.insert(flags, "-lmkl_intel_thread") - table.insert(flags, "-lomp") - elseif threading == "gomp" then - table.insert(flags, "-lmkl_gnu_thread") - table.insert(flags, "-lgomp") - end - table.insert(flags, "-lmkl_core") - table.insert(flags, "-Wl,--end-group") - package:add("ldflags", table.concat(flags, " ")) - else - package:add("links", package:is_arch("x64", "x86_64") and "mkl_intel_" .. suffix or "mkl_intel_c") - local threading = package:config("threading") - if threading == "tbb" then - package:add("links", "mkl_tbb_thread") - package:add("deps", "tbb") - elseif threading == "seq" then - package:add("links", "mkl_sequential") - elseif threading == "openmp" then - package:add("links", "mkl_intel_thread", "omp") - elseif threading == "gomp" then - package:add("links", "mkl_gnu_thread", "gomp") + for _, toolkind in ipairs({"ld", "fcld"}) do + if package:config("runtime") == "default" then + if (package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran")) then + if package:has_tool(toolkind, "gcc", "gxx") then + var_ldflags = 'ldflags' + var_shflags = 'shflags' + else + var_ldflags = 'ldflags' + var_shflags = 'shflags' + -- var_ldflags = 'fcldflags' + -- var_shflags = 'fcshflags' + end + local flags = {"-Wl,--start-group"} + table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") + local threading = package:config("threading") + if threading == "tbb" then + table.insert(flags, "-lmkl_tbb_thread") + package:add("deps", "tbb") + elseif threading == "seq" then + table.insert(flags, "-lmkl_sequential") + elseif threading == "openmp" then + table.insert(flags, "-lmkl_intel_thread") + table.insert(flags, "-lomp") + elseif threading == "gomp" then + table.insert(flags, "-lmkl_gnu_thread") + table.insert(flags, "-lgomp") + end + table.insert(flags, "-lmkl_core") + table.insert(flags, "-Wl,--end-group") + package:add(var_ldflags, table.concat(flags, " ")) + package:add(var_shflags, table.concat(flags, " ")) + else + package:add("links", package:is_arch("x64", "x86_64") and "mkl_intel_" .. suffix or "mkl_intel_c") + local threading = package:config("threading") + if threading == "tbb" then + package:add("links", "mkl_tbb_thread") + package:add("deps", "tbb") + elseif threading == "seq" then + package:add("links", "mkl_sequential") + elseif threading == "openmp" then + package:add("links", "mkl_intel_thread", "omp") + elseif threading == "gomp" then + package:add("links", "mkl_gnu_thread", "gomp") + end + package:add("links", "mkl_core") + end end - package:add("links", "mkl_core") end end) + on_install("windows|!arm64", "macosx|!arm64", "linux|x86_64", "linux|i386", function (package) local headerdir = package:resourcedir("headers") if package:is_plat("windows") then From 1b75df6c93e0a7cc10ae2cc7c3e7dbb45caa8e66 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Fri, 20 Sep 2024 09:47:34 +0200 Subject: [PATCH 06/11] Fixed code layout to match conventions * Use of "" instead of '' for strings. * Removal of unnecessary parentheses. * Use of "local" for local variables. * Removed unnecessary comments. --- packages/m/mkl/fetch.lua | 34 ++++++++++++++-------------------- packages/m/mkl/xmake.lua | 16 +++++++--------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/packages/m/mkl/fetch.lua b/packages/m/mkl/fetch.lua index 57b91022225..c06068ca697 100644 --- a/packages/m/mkl/fetch.lua +++ b/packages/m/mkl/fetch.lua @@ -1,8 +1,6 @@ import("lib.detect.find_path") import("lib.detect.find_library") --- add_configs("runtime", {description = "Set MKL runtime for gcc/clang like compilers.", default = "default", type = "string", values = {"default", "custom"}}) - function _find_package(package, opt) local rdir = (package:is_arch("x64", "x86_64") and "intel64" or "ia32") local suffix = (package:config("interface") == 32 and "lp64" or "ilp64") @@ -48,26 +46,22 @@ function _find_package(package, opt) end for _, toolkind in ipairs({"ld", "fcld"}) do - -- if package:config("runtime") == "default" then - if (package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran")) then - local flags = {"-Wl,--start-group"} - for _, lib in ipairs(group) do - table.insert(flags, "-l" .. lib) - end - table.insert(flags, "-Wl,--end-group") - if package:has_tool(toolkind, "gcc", "gxx") then - result.ldflags = table.concat(flags, " ") - result.shflags = table.concat(flags, " ") - else - -- result.fcldflags = table.concat(flags, " ") - -- result.fcshflags = table.concat(flags, " ") - result.fcldflags = table.concat(flags, " ") - result.fcshflags = table.concat(flags, " ") - end + if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then + local flags = {"-Wl,--start-group"} + for _, lib in ipairs(group) do + table.insert(flags, "-l" .. lib) + end + table.insert(flags, "-Wl,--end-group") + if package:has_tool(toolkind, "gcc", "gxx") then + result.ldflags = table.concat(flags, " ") + result.shflags = table.concat(flags, " ") else - table.join2(result.links, group) + result.ldflags = table.concat(flags, " ") + result.shflags = table.concat(flags, " ") end - -- end + else + table.join2(result.links, group) + end end -- find include diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index f3cf833e154..14daa346984 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -117,15 +117,13 @@ package("mkl") for _, toolkind in ipairs({"ld", "fcld"}) do if package:config("runtime") == "default" then - if (package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran")) then - if package:has_tool(toolkind, "gcc", "gxx") then - var_ldflags = 'ldflags' - var_shflags = 'shflags' - else - var_ldflags = 'ldflags' - var_shflags = 'shflags' - -- var_ldflags = 'fcldflags' - -- var_shflags = 'fcshflags' + if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then + + local var_ldflags = "ldflags" + local var_shflags = "shflags" + if package:has_tool(toolkind, "gfortran") then + var_ldflags = "ldflags" + var_shflags = "shflags" end local flags = {"-Wl,--start-group"} table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") From e1846a68d859bc777c6545e7e3ace2d17affb5f3 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Fri, 20 Sep 2024 09:49:28 +0200 Subject: [PATCH 07/11] Remove misleading reference to runtime config. Previous patches incorrectly referred to the runtime configuration, which is supposed to be built in and not set in package. --- packages/m/mkl/xmake.lua | 82 +++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index 14daa346984..09549779cdb 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -3,8 +3,6 @@ package("mkl") set_homepage("https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html") set_description("IntelĀ® oneAPI Math Kernel Library") - add_configs("runtime", {description = "Set MKL runtime for gcc/clang like compilers.", default = "default", type = "string", values = {"default", "custom"}}) - if is_plat("windows") then if is_arch("x64") then add_urls("https://software.repos.intel.com/python/conda/$(version).tar.bz2", {version = function (version) @@ -116,49 +114,47 @@ package("mkl") package:add("links", package:is_arch("x64", "x86_64") and "mkl_lapack95_" .. suffix or "mkl_lapack95") for _, toolkind in ipairs({"ld", "fcld"}) do - if package:config("runtime") == "default" then - if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then + if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then - local var_ldflags = "ldflags" - local var_shflags = "shflags" - if package:has_tool(toolkind, "gfortran") then - var_ldflags = "ldflags" - var_shflags = "shflags" - end - local flags = {"-Wl,--start-group"} - table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") - local threading = package:config("threading") - if threading == "tbb" then - table.insert(flags, "-lmkl_tbb_thread") - package:add("deps", "tbb") - elseif threading == "seq" then - table.insert(flags, "-lmkl_sequential") - elseif threading == "openmp" then - table.insert(flags, "-lmkl_intel_thread") - table.insert(flags, "-lomp") - elseif threading == "gomp" then - table.insert(flags, "-lmkl_gnu_thread") - table.insert(flags, "-lgomp") - end - table.insert(flags, "-lmkl_core") - table.insert(flags, "-Wl,--end-group") - package:add(var_ldflags, table.concat(flags, " ")) - package:add(var_shflags, table.concat(flags, " ")) - else - package:add("links", package:is_arch("x64", "x86_64") and "mkl_intel_" .. suffix or "mkl_intel_c") - local threading = package:config("threading") - if threading == "tbb" then - package:add("links", "mkl_tbb_thread") - package:add("deps", "tbb") - elseif threading == "seq" then - package:add("links", "mkl_sequential") - elseif threading == "openmp" then - package:add("links", "mkl_intel_thread", "omp") - elseif threading == "gomp" then - package:add("links", "mkl_gnu_thread", "gomp") - end - package:add("links", "mkl_core") + local var_ldflags = "ldflags" + local var_shflags = "shflags" + if package:has_tool(toolkind, "gfortran") then + var_ldflags = "ldflags" + var_shflags = "shflags" + end + local flags = {"-Wl,--start-group"} + table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") + local threading = package:config("threading") + if threading == "tbb" then + table.insert(flags, "-lmkl_tbb_thread") + package:add("deps", "tbb") + elseif threading == "seq" then + table.insert(flags, "-lmkl_sequential") + elseif threading == "openmp" then + table.insert(flags, "-lmkl_intel_thread") + table.insert(flags, "-lomp") + elseif threading == "gomp" then + table.insert(flags, "-lmkl_gnu_thread") + table.insert(flags, "-lgomp") + end + table.insert(flags, "-lmkl_core") + table.insert(flags, "-Wl,--end-group") + package:add(var_ldflags, table.concat(flags, " ")) + package:add(var_shflags, table.concat(flags, " ")) + else + package:add("links", package:is_arch("x64", "x86_64") and "mkl_intel_" .. suffix or "mkl_intel_c") + local threading = package:config("threading") + if threading == "tbb" then + package:add("links", "mkl_tbb_thread") + package:add("deps", "tbb") + elseif threading == "seq" then + package:add("links", "mkl_sequential") + elseif threading == "openmp" then + package:add("links", "mkl_intel_thread", "omp") + elseif threading == "gomp" then + package:add("links", "mkl_gnu_thread", "gomp") end + package:add("links", "mkl_core") end end end) From e55dc933247f552687126156cba86e1b5f63ab34 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Sat, 21 Sep 2024 17:26:47 +0200 Subject: [PATCH 08/11] Switch to fcldflags/fcshflags for GFortran The variables for the linker with GFortran are now set to fcldflags and fcshflags following the latest changes in xmake. Some redundant or awkward constructs were also fixed. --- packages/m/mkl/fetch.lua | 10 +++++----- packages/m/mkl/xmake.lua | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/m/mkl/fetch.lua b/packages/m/mkl/fetch.lua index c06068ca697..8646f769de3 100644 --- a/packages/m/mkl/fetch.lua +++ b/packages/m/mkl/fetch.lua @@ -46,18 +46,18 @@ function _find_package(package, opt) end for _, toolkind in ipairs({"ld", "fcld"}) do - if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then + if package:has_tool(toolkind, "gcc", "gxx", "gfortran") then local flags = {"-Wl,--start-group"} for _, lib in ipairs(group) do table.insert(flags, "-l" .. lib) end table.insert(flags, "-Wl,--end-group") if package:has_tool(toolkind, "gcc", "gxx") then - result.ldflags = table.concat(flags, " ") - result.shflags = table.concat(flags, " ") + result.ldflags = flags + result.shflags = flags else - result.ldflags = table.concat(flags, " ") - result.shflags = table.concat(flags, " ") + result.fcldflags = flags + result.fcshflags = flags end else table.join2(result.links, group) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index 09549779cdb..d0d6e0f5d18 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -114,13 +114,13 @@ package("mkl") package:add("links", package:is_arch("x64", "x86_64") and "mkl_lapack95_" .. suffix or "mkl_lapack95") for _, toolkind in ipairs({"ld", "fcld"}) do - if package:has_tool(toolkind, "gcc", "gxx") or package:has_tool(toolkind, "gfortran") then + if package:has_tool(toolkind, "gcc", "gxx", "gfortran") then local var_ldflags = "ldflags" local var_shflags = "shflags" if package:has_tool(toolkind, "gfortran") then - var_ldflags = "ldflags" - var_shflags = "shflags" + var_ldflags = "fcldflags" + var_shflags = "fcshflags" end local flags = {"-Wl,--start-group"} table.insert(flags, package:is_arch("x64", "x86_64") and "-lmkl_intel_" .. suffix or "-lmkl_intel") @@ -139,8 +139,8 @@ package("mkl") end table.insert(flags, "-lmkl_core") table.insert(flags, "-Wl,--end-group") - package:add(var_ldflags, table.concat(flags, " ")) - package:add(var_shflags, table.concat(flags, " ")) + package:add(var_ldflags, flags) + package:add(var_shflags, flags) else package:add("links", package:is_arch("x64", "x86_64") and "mkl_intel_" .. suffix or "mkl_intel_c") local threading = package:config("threading") From 039c45b5057368f38faba2eb5cd540464dc68373 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Mon, 23 Sep 2024 09:50:31 +0200 Subject: [PATCH 09/11] Added Fortran test for the MKL package Added Fortran test if gfortran available. --- packages/m/mkl/xmake.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index d0d6e0f5d18..bee551e9418 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -180,4 +180,17 @@ package("mkl") cblas_dgemm(CblasColMajor,CblasNoTrans,CblasTrans,3,3,2,1,A,3,B,3,2,C,3); } ]]}, {includes = "mkl_cblas.h"})) + import("lib.detect.find_tool") + if package.check_fcsnippets and find_tool("gfortran") then + assert(package:check_fcsnippets({test = [[ + program test + use iso_fortran_env, only: r64 => real64 + real(r64) :: A(3,2), B(3,2), C(3,3) + data A/1.0_r64,1.0_r64,4.0_r64,2.0_r64,-3.0_r64,-1.0_r64/, & + B/1.0_r64,1.0_r64,4.0_r64,2.0_r64,-3.0_r64,-1.0_r64/, & + C/9*.5_r64/ + call dgemm('N','T',3,3,2,1.0_r64,A,3,B,3,2.0_r64,C,3) + end program test + ]]})) + end end) From 3c77ada90542f974c5c1cc66e3329f951d6350f5 Mon Sep 17 00:00:00 2001 From: Julien Bloino Date: Wed, 25 Sep 2024 16:26:33 +0200 Subject: [PATCH 10/11] Added check that fcsnippets only run if fcld set The test on the presence of gfortran may not guarantee the linker is properly set. The new test check that fcld is also set, for now to gfortran since the test on the Fortran compiler only considers this compiler. Note: this way, fcsnippets are only run if --toolchain=gfortran is set. --- packages/m/mkl/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index bee551e9418..dd90161c14c 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -181,7 +181,7 @@ package("mkl") } ]]}, {includes = "mkl_cblas.h"})) import("lib.detect.find_tool") - if package.check_fcsnippets and find_tool("gfortran") then + if package.check_fcsnippets and find_tool("gfortran") and package:has_tool("fcld", "gfortran") then assert(package:check_fcsnippets({test = [[ program test use iso_fortran_env, only: r64 => real64 From 02faa26afcc4461cd5aac8505c131997d0f837b2 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 26 Sep 2024 23:11:12 +0800 Subject: [PATCH 11/11] Update xmake.lua --- packages/m/mkl/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/m/mkl/xmake.lua b/packages/m/mkl/xmake.lua index dd90161c14c..b3a9cbc4982 100644 --- a/packages/m/mkl/xmake.lua +++ b/packages/m/mkl/xmake.lua @@ -191,6 +191,6 @@ package("mkl") C/9*.5_r64/ call dgemm('N','T',3,3,2,1.0_r64,A,3,B,3,2.0_r64,C,3) end program test - ]]})) + ]]}, {linkerkind = "cxx", configs = {syslinks = "gfortran"}})) end end)