building high-performance Octave
Pascal Dupuis
cdemills at gmail.com
Fri Jun 15 08:13:36 PDT 2012
Hello,
I'm an Octave contributor in some specific fields like localisation.
I recently changed of job and now I have at my disposal an Intel Mac
running OSX 10.5. I would like to build a high-performance version of
Octave, this implies to built it with either gcc46 either gcc47, using
64 bits mode and some specific flags. I did this routinely under linux
for years.
I thus first install macports, then gcc47 that I built with the
+universal variant. Next I tried to compile one of Octave dependency,
namely openmpi. I downloaded its Portfile, created a local repository,
added this repository to MacPorts source.conf, and created my own
local copy. I just added a few lines:
variant gcc47 description {build mpif77 and mpif90 using gcc47}
conflicts gcc42 gcc43 gc
c44 gcc45 gcc46 g95 {
configure.compiler macports-gcc-4.7
configure.args-append --enable-mpi-f77 --enable-mpi-f90
configure.f77 ${prefix}/bin/gfortran-mp-4.7
configure.fc ${prefix}/bin/gfortran-mp-4.7
depends_lib-append port:gcc47
lappend wrappers mpif77 mpif90
}
variant hpc description {build mpif77 and mpif90 using
-ftree-vectorize} conflicts gcc42
gcc43 gcc44 gcc45 g95 {
configure.args-delete --disable-mpi-f77 --disable-mpi-f90
configure.cflags-delete -m32
configure.cflags-append -O3 -m64 -ftree-vectorize
configure.fflags-delete -m32
configure.fflags-append -O3 -m64 -ftree-vectorize
depends_lib-append port:gcc47
}
I did first a "portindex" in the local repository, and a "sudo port
sync". The new variant +hpc is recognised, and pull as a dependency
gcc47; this one was built as universal binary.
This is a snippet of the messages produced during the configure phase
following the command
sudo port -v configure openmpi +gcc47 +hpc +threads
checking for the C compiler vendor... gnu
checking for ANSI C header files... (cached) yes
checking if /opt/local/bin/gcc-mp-4.7 supports -finline-functions... yes
checking if /opt/local/bin/gcc-mp-4.7 supports -fno-strict-aliasing... yes
configure: WARNING: -fno-strict-aliasing has been added to CFLAGS
checking if /opt/local/bin/gcc-mp-4.7 supports __builtin_expect... yes
checking if /opt/local/bin/gcc-mp-4.7 supports __builtin_prefetch... yes
checking for C optimization flags... -DNDEBUG -pipe -O2 -O3 -m64
-ftree-vectorize -m32 -finline-functions -fno-strict-aliasing
checking for Interix environment... no
checking for C ident string support... static const char
It seems that openmpi configure script add itself this
"-fno-strict-aliasing -m32" flag. How can I afterwards remove the -m32
from CFLAGS ?
Regards
Pascal
More information about the macports-users
mailing list