10

Is there anywhere I can get pre-compiled BLAS and LAPACK binaries for Windows in OMF object format? I want to link some D language code to these. I'm aware of where I can get the relevant libs in COFF format. I'm also aware of the objconv tool, which converts COFF to OMF, though this doesn't seem to work in practice for reasons I don't fully understand. These seem to be related to underscores in symbols, though I tried just about every setting for dealing with these and none seem to work.

Alternatively, does anyone know how to convert the reference binaries to OMF such that they'll actually link properly to DMD-compiled code? As a last resort, does anyone know how to get CLAPACK, CBLAS and F2CLIB to build with DMC? The build process that comes with these seems entirely geared towards the GCC toolchain.

menjaraz
  • 7,551
  • 4
  • 41
  • 81
dsimcha
  • 67,514
  • 53
  • 213
  • 334
  • 2
    The multiarray package linked in my previous answer http://stackoverflow.com/questions/4937699/fast-linear-system-solver-for-d/4942608#4942608 ships with a dll + wrapper (see http://dsource.org/projects/multiarray/browser/downloads/win32-deps) that should work (I haven't tested). If that does not work, let me know and I will try to build one. BTW, if you are new to LAPACK, there are two gotchas: 1) all Fortran functions take all parameters (even ints) by reference unless the LAPACK distribution has a C wrapper; 2) Fortran arrays are column-major layout whereas C arrays are row-major. – stephan Feb 14 '11 at 09:01
  • 2
    @stephan: You should have put that as an answer. I'd accept it since I found the same thing myself around the same time you posted. As far as Fortran and all, I have no intention of using BLAS and LAPACK directly. I'm going to use Lars Kyllingstad's SciD library, which provides pretty wrappers around it. – dsimcha Feb 14 '11 at 16:14

1 Answers1

-1

"...seams entirely geared towards the GCC toolchain."

That is an understatemant. Blas is highly "optimized" to complile under one, specific, version of gcc, 2.4.3??.

It would, perhaps, be possible , starting with the un-optimized version of the source, to compile with the OpenWatcom toolchain, so as to generate 32 bit OMF but, I fear, much foo would be involved and the result would be dead slow code.

starbolin
  • 840
  • 5
  • 13
  • 1
    Huh? LAPACK and BLAS are in no way targeted exclusively at gcc; they are targeted at a very generic fortran/c/make build system, which is trivially portable to essentially everything *except* windows. – Stephen Canon May 16 '12 at 21:38
  • Thank you Steven for the correction. Was I thinking Octave? I destinctly recall having to use 2.4.3 to compile Octave and I remembered wrong it was due to lapack. – starbolin May 17 '12 at 00:59
  • P.S. Timed out while editing last comment. Disregard the last bit. – starbolin May 17 '12 at 03:41
  • The package in question was Atlas. My apologies to the blas/lapack community. – starbolin May 29 '12 at 17:46