Here are the updated 'Makefile' and 'spm_platform.m' for Matlab on 64bit
Linux.
'Makefile':
-----------
Mex-files on Matlab for 64bit linux getthe extension mexa64.
So I added this to the architecture list:
Linux.a64:
make all SUF=mexa64 CC="gcc -O3 -funroll-loops -fPIC -march=x86-64"
MEX="mex COPTIMFLAGS='-O3 -funroll-loops -fPIC -march=x86-64'"
The '-fPIC' option is nexessary to allow the linking proces to complete.
'-march=x86-64' provides generic optimisations for both Opteron and 64bit
Xeon.
If the code is running on a 64bit Xeon you can change '-march=x86-64' to
'-march=nocona', when running on an Opteron, change it to '-march=opteron'.
This might give you a performance boost.
I added his to 'clean' details:
clean.Linux.a64:
make clean SUF=mexa64
and this to the 'messages'
verb.mexa64:
@ echo "_____________________________________________________________"
@ echo ""
@ echo "Linux compilation (Matlab 7.x) - using gcc for x86-64"
@ echo "_____________________________________________________________"
@ echo ""
To build the mex-files, you go to the spm2 directory and do a 'make
Linux.a64'.
If you run into troubles, I can provide binaries for Opteron, Xeon and generic
'x86-64'.
'spm_platform.m':
-----------------
Matlab for 64bit Linux identifies itself as 'GLNXA64' as opposed to 'GLNX86'.
It has the same 'endian-ness' as GLNX86, so I added this to the 'PDefs' cell
list:
'GLNXA64', 'unx', 0;...
and added 'GLNXA64' to the list of other unix platforms at the font
configuration.
My system configuration:
dual opteron 242 on a Tyan Tiger K8W
Gentoo Linux for amd64 (also runs on Xeon with EM64T)
Matlab 7.0.1.24704 (R14) Service Pack 1 for AMD64
gcc 3.4.3
glibc 2.3.4
--
Wouter Depuydt
KUL - Neurofysiologie
Herestraat 49, bus 801
B-3000 Leuven
Tel. +32 (0)16 347112
Fax. +32 (0)16 345993
email [log in to unmask]
|