MAGMA on ARM

Open discussion for MAGMA

MAGMA on ARM

Postby clattenb » Tue Apr 30, 2013 10:42 am

Hello Everyone,

I have a CARMA kit and I'm going to attempt to cross-compile MAGMA for ARM (from what I can tell so far shouldn't be too difficult). Once I'm done, would the instruction set be beneficial to anyone?

I had to use MAGMA because neither CULA nor ArrayFire were ARM compatible and they're both commercial products so there wasn't any source to try and cross-compile.

I'll be sure to update this thread with progress/hiccups if there is any interest.

-Nick
clattenb
 
Posts: 8
Joined: Mon Apr 29, 2013 11:46 pm

Re: MAGMA on ARM

Postby Stan Tomov » Wed May 01, 2013 12:00 pm

Nick,
I am sure there would be many people interested. We will be interested to include a make.inc.arm file in the magma distribution and add CARMA as one more device supported. Some tuning may be needed, e.g., at first just to tune the block sizes in control/get_nb.cpp.
Stan
Stan Tomov
 
Posts: 249
Joined: Fri Aug 21, 2009 10:39 pm

Re: MAGMA on ARM

Postby clattenb » Wed May 01, 2013 9:09 pm

Hi Stan,

Sounds good, glad to hear that I can help document this. I currently have everything compiling nicely but I'm having to play with the order of the libraries to fix some linker errors. Once that's done I'll use the test files to verify the function.

-Nick
clattenb
 
Posts: 8
Joined: Mon Apr 29, 2013 11:46 pm

Re: MAGMA on ARM

Postby clattenb » Thu May 02, 2013 10:20 am

I got everything compiled for ARM last night. Give me the weekend to play with the test files on the CARMA board and write up the instructions. There wasn't any unforeseen changes to the make.inc but there were some flags I had to add in other makefiles.
clattenb
 
Posts: 8
Joined: Mon Apr 29, 2013 11:46 pm

Re: MAGMA on ARM

Postby clattenb » Mon May 06, 2013 11:29 am

Hello,

Unfortunately I didn't have time to run any tests this weekend like I had hoped. Regardless here are the instructions for those who want to get started. Please note that I'm writing this assuming that you have cross-compiled for the CARMA kit before. If not I recommend this blog to get started: http://cudamusing.blogspot.com/.

-Download and install "arm-linux-gnueabi-gfortran-4.5" using sudo apt-get install.

-Download and save armel versions of lapack and blas from launchpad.com (CARMA users: be sure to use libraries for the Natty distro). You will point to these in your make.inc file.

-CARMA USERS ONLY: Apparently SECO didn't add the cuda/src directory to their version of the CUDA toolkit so I just downloaded the contents of that folder from the normal NVIDIA version and saved it in my CUDA directory

-CARMA USERS ONLY: Open the Makefile.internal file and change the -Dmagma_devptr_t flag to equal "integer(kind=4)". In the same file on line 41 (NVOPTS +=...) add the following flags: "-arch sm_21 -target-cpu-arch ARM --compiler-bindir /usr/bin/arm-linux-gnueabi-gcc-4.5 -m32"

-CARMA USERS ONLY: Open the CMakeLists.txt file and change the -Dmagma_devptr_t flag to equal "integer(kind=4)".

And I think that's all that I changed... It was over a few days of trial and error so please let me know if there was anything that I missed for those that are trying to compile.

Attached is my make.inc file for everyone look at. Again, I haven't tested anything yet so there's no guarantee that everything will work, but it will compile.

Good Luck!
Attachments
make.txt
(1.76 KiB) Downloaded 54 times
clattenb
 
Posts: 8
Joined: Mon Apr 29, 2013 11:46 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 2 guests