{"action":"created","issue":{"url":"https://api.github.com/repos/intel/hyperscan/issues/107","repository_url":"https://api.github.com/repos/intel/hyperscan","labels_url":"https://api.github.com/repos/intel/hyperscan/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/intel/hyperscan/issues/107/comments","events_url":"https://api.github.com/repos/intel/hyperscan/issues/107/events","html_url":"https://github.com/intel/hyperscan/issues/107","id":362203065,"node_id":"MDU6SXNzdWUzNjIyMDMwNjU=","number":107,"title":"hs_alloc_scratch failed: -6 ","user":{"login":"hughesac","id":3402111,"node_id":"MDQ6VXNlcjM0MDIxMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/3402111?v=4","gravatar_id":"","url":"https://api.github.com/users/hughesac","html_url":"https://github.com/hughesac","followers_url":"https://api.github.com/users/hughesac/followers","following_url":"https://api.github.com/users/hughesac/following{/other_user}","gists_url":"https://api.github.com/users/hughesac/gists{/gist_id}","starred_url":"https://api.github.com/users/hughesac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughesac/subscriptions","organizations_url":"https://api.github.com/users/hughesac/orgs","repos_url":"https://api.github.com/users/hughesac/repos","events_url":"https://api.github.com/users/hughesac/events{/privacy}","received_events_url":"https://api.github.com/users/hughesac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-20T14:02:32Z","updated_at":"2018-09-26T14:37:02Z","closed_at":null,"author_association":"NONE","body":"I was getting a -6 error from hs_alloc_scratch.  It looks like that happens when the CPU features at compile time don't match those of the currently running host.  We are using fat binaries and building on a host that doesn't support AVX512 and AVX2.  The host we're running on does support those CPU features.  When we got that -6 error we were passing NULL for the platform argument to hs_compile.  I changed the code to use hs_populate_platform to populate the platform struct and then cleared the CPU features to match what was used at compile time.  Then I passed that to hs_compile.  We don't get the error anymore but is that the correct way to fix that error?  Is it possible to compile on a host that doesn't support AVX512 and AVX2 but have those enabled on a host that does support them?\r\n\r\nThanks,\r\nAaron"},"comment":{"url":"https://api.github.com/repos/intel/hyperscan/issues/comments/424739775","html_url":"https://github.com/intel/hyperscan/issues/107#issuecomment-424739775","issue_url":"https://api.github.com/repos/intel/hyperscan/issues/107","id":424739775,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDczOTc3NQ==","user":{"login":"xiangwang1","id":15205002,"node_id":"MDQ6VXNlcjE1MjA1MDAy","avatar_url":"https://avatars0.githubusercontent.com/u/15205002?v=4","gravatar_id":"","url":"https://api.github.com/users/xiangwang1","html_url":"https://github.com/xiangwang1","followers_url":"https://api.github.com/users/xiangwang1/followers","following_url":"https://api.github.com/users/xiangwang1/following{/other_user}","gists_url":"https://api.github.com/users/xiangwang1/gists{/gist_id}","starred_url":"https://api.github.com/users/xiangwang1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiangwang1/subscriptions","organizations_url":"https://api.github.com/users/xiangwang1/orgs","repos_url":"https://api.github.com/users/xiangwang1/repos","events_url":"https://api.github.com/users/xiangwang1/events{/privacy}","received_events_url":"https://api.github.com/users/xiangwang1/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T14:37:02Z","updated_at":"2018-09-26T14:37:02Z","author_association":"CONTRIBUTOR","body":"To compile on a host that doesn't support AVX512 and AVX2 and run on a target host that does support them, you need to specify the target CPU features (HS_CPU_FEATURES_AVX2 and HS_CPU_FEATURES_AVX512) in `hs_platform_info_t` and pass it to hs_compile() function."}}
{"actor":{"display_login":"xiangwang1"}}