[MacPorts] #48381: OpenBlas: difficulty detecting architecture
MacPorts
noreply at macports.org
Mon Aug 10 02:40:58 PDT 2015
#48381: OpenBlas: difficulty detecting architecture
--------------------------+---------------------
Reporter: aaron.koe@… | Owner: nicos@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.3
Resolution: | Keywords:
Port: openblas |
--------------------------+---------------------
Comment (by andy.nowacki@…):
I can confirm that the patched port of OpenBLAS builds and a test program
runs successfully after r139234. However, I guess the patch added might
be having an unexpected effect when added to the 0.2.14 release. It seems
to incorrectly identify the machine as having a Nehalem processor, not
Broadwell:
{{{
$
/opt/local/var/macports/build/_Users_user_macports_trunk_dports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.2.14/getarch
0
CORE=NEHALEM
LIBCORE=nehalem
-- snip --
$
/opt/local/var/macports/build/_Users_user_macports_trunk_dports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.2.14/getarch
1
#define NEHALEM
-- snip --
#define CORE_NEHALEM
#define CHAR_CORENAME "NEHALEM"
}}}
The same command on the OpenBLAS-devel branch gives the following output:
{{{
$ ./getarch 0
CORE=HASWELL
LIBCORE=haswell
--snip --
$ ./getarch 1
#define HASWELL
#define L2_SIZE 262144
-- snip --
#define CORE_HASWELL
#define CHAR_CORENAME "HASWELL"
}}}
The major difference is that the devel branch defines HAVE_FMA3.
A test program (mul.f90, attached) runs faster using the devel branch than
the 0.2.14 release port, which leads me to think that the
misidentification of the Broadwell processor in the MacBook Pro is
responsible.
{{{
$ ### Link to OpenBLAS at git commit
bb6e050509dc9aeb71f525b42444df57df2589d4 built at /tmp/OpenBLAS
$ gfortran -L/tmp/OpenBLAS/lib -lopenblas -fexternal-blas -fblas-matmul-
limit=1 -o /tmp/a.out /tmp/mul.f90 && time /tmp/a.out 5000
real 0m4.423s
user 0m7.901s
sys 0m0.485s
$ ### Link to MacPorts OpenBLAS @0.2.14_2 +gcc48
$ gfortran -L/opt/local/lib -lopenblas -fexternal-blas -fblas-matmul-
limit=1 -o /tmp/a.out /tmp/mul.f90 && time /tmp/a.out 5000
real 0m10.685s
user 0m20.366s
sys 0m0.492s
}}}
(Note that the numbers using -framework Accelerate for Apple's BLAS are
very similar to OpenBLAS-devel.)
Sorry to be the bearer of bad news.
--
Ticket URL: <https://trac.macports.org/ticket/48381#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list