Intel MKL on Virtual Machine with ArrayFire

34 views
Skip to first unread message

Aaron Hsu

unread,
Jan 15, 2021, 8:24:48 PM1/15/21
to ArrayFire Users
I'm trying to run a Hyper-V virtual machine from Windows 10 host with an OpenSuse Tumbleweed guest running the latest ArrayFire release.

My code is compiling and running, but I am getting errors in some code whenever ArrayFire tries to load the Intel MKL libraries.

Specifically, I get the error that libmkl_avx2.so or libmkl_def.so could not be loaded. I am not sure what to do about this. Even with my LD_LIBRARY_PATH set properly and the like, I can't seem to figure out what is going wrong with this.

As far as I can tell, this is also not an issue with other people who are running this same code on Linux. My only thought is that maybe the fact that I am running this inside of a Hyper-V virtual machine means that for some reason the Intel MKL libraries aren't supported? That seems strange, but it would be nice to confirm one way or the other. I use these virtual machines for testing, and it would be good to know if I can't use ArrayFire inside of them.

--
Aaron W. Hsu | arc...@sacrideo.us | http://www.sacrideo.us

Pradeep Garigipati

unread,
Jan 18, 2021, 1:00:18 AM1/18/21
to Aaron Hsu, ArrayFire Users
Hey Aaron,

Using ArrayFire inside VM's shouldn't be a problem. We ourselves run them inside VMs and containers for various purposes internally.

I assume you have installed ArrayFire using our Website installer. Can you please confirm that. Also it would be great if you can share your VM configuration process for me to reproduce the issue on our end.

Regards,
Pradeep.

--
You received this message because you are subscribed to the Google Groups "ArrayFire Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arrayfire-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arrayfire-users/f04f389f-532d-441b-bf8d-6e688372d0cd%40www.fastmail.com.


--

Aaron Hsu

unread,
Jan 18, 2021, 1:07:20 PM1/18/21
to Pradeep Garigipati, ArrayFire Users
Yes, I installed it using the web container. To configure the VM, I built a custom Hyper-V image with disabled secure boot, 8G memory, 4 virtual processors, and booted off the latest OpenSUSE Tumbleweed ISO.

After going through the installation process, I installed ArrayFire and then tried to run some sample code. Code that doesn't rely on MKL seems to work fine, however, code that does rely on MKL seems to give the errors I mentioned previously.

In case it helps, this is a VM created on the latest version of Windows 10 using the Hyper-V manager.
On Mon, Jan 18, 2021, at 1:00 AM, Pradeep Garigipati wrote:
> Hey Aaron,
>
> Using ArrayFire inside VM's shouldn't be a problem. We ourselves run
> them inside VMs and containers for various purposes internally.
>
> I assume you have installed ArrayFire using our Website installer. Can
> you please confirm that. Also it would be great if you can share your
> VM configuration process for me to reproduce the issue on our end.
>
> Regards,
> Pradeep.
>
> On Sat, Jan 16, 2021 at 6:54 AM Aaron Hsu <arc...@sacrideo.us> wrote:
> > I'm trying to run a Hyper-V virtual machine from Windows 10 host with an OpenSuse Tumbleweed guest running the latest ArrayFire release.
> >
> > My code is compiling and running, but I am getting errors in some code whenever ArrayFire tries to load the Intel MKL libraries.
> >
> > Specifically, I get the error that libmkl_avx2.so or libmkl_def.so could not be loaded. I am not sure what to do about this. Even with my LD_LIBRARY_PATH set properly and the like, I can't seem to figure out what is going wrong with this.
> >
> > As far as I can tell, this is also not an issue with other people who are running this same code on Linux. My only thought is that maybe the fact that I am running this inside of a Hyper-V virtual machine means that for some reason the Intel MKL libraries aren't supported? That seems strange, but it would be nice to confirm one way or the other. I use these virtual machines for testing, and it would be good to know if I can't use ArrayFire inside of them.
> >
> > --
> > Aaron W. Hsu | arc...@sacrideo.us | http://www.sacrideo.us
> >
> > --
> > You received this message because you are subscribed to the Google Groups "ArrayFire Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to arrayfire-use...@googlegroups.com <mailto:arrayfire-users%2Bunsu...@googlegroups.com>.

Pradeep Garigipati

unread,
Jan 18, 2021, 10:23:22 PM1/18/21
to Aaron Hsu, ArrayFire Users
Thanks for the details Aaron.

Yeah, that doesn sound like Intel MKL is unable to dynamically load some shared libraries or perhaps it's own upstream dependencies. Intel MKL does load shared libraries at runtime so they wouldn't appear in readelf or ldd outputs.

Let me try it on my local Windows setup today or tomorrow and I shall get back to you on this.

Regards,
Pradeep.
--

Pradeep Garigipati

unread,
Jan 19, 2021, 5:33:17 AM1/19/21
to Aaron Hsu, ArrayFire Users
Hey Aaron,

Unfortunately, I was not able to reproduce this on my Windows local machine.

I have created a Hyper-V VM of OpenSUSE Tumbleweed, very similar (more RAM, less # of cores) to what you described: secure boot disabled. After installing ArrayFire, I had to install some development packages and cuda runtime package to build all backends examples successfully, but other than time I didn't add anything special. I have been able to run CPU backend examples such as fft, blas under benchmarks folder fine - fft, blas routines use Intel MKL.

I am not sure what is the deviation between our setups.

Kind of clueless as to what to check. Perhaps, your VM has another Intel MKL installation and that path is also under LD_LIBRARY_PATH ? Did you check that ?

- Pradeep.
--

Aaron Hsu

unread,
Jan 19, 2021, 9:52:27 AM1/19/21
to Pradeep Garigipati, ArrayFire Users
Thanks for this report! I'll try this out soon and see if I can replicate what you are seeing.
> >> > > To unsubscribe from this group and stop receiving emails from it, send an email to arrayfire-use...@googlegroups.com <mailto:arrayfire-users%2Bunsu...@googlegroups.com> <mailto:arrayfire-users%2Bunsu...@googlegroups.com <mailto:arrayfire-users%252Buns...@googlegroups.com>>.
Reply all
Reply to author
Forward
0 new messages