<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Lapack_compilation</id>
	<title>Lapack compilation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Lapack_compilation"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Lapack_compilation&amp;action=history"/>
	<updated>2026-04-12T04:38:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Lapack_compilation&amp;diff=1309&amp;oldid=prev</id>
		<title>Adk44: Created page with &quot;I had some problems using the atlas modules, which seem to be not applicable to all machines (e.g. 64-bit P4s).  I compiled my own lapack routines (available from [http://www....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Lapack_compilation&amp;diff=1309&amp;oldid=prev"/>
		<updated>2019-05-13T12:25:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I had some problems using the atlas modules, which seem to be not applicable to all machines (e.g. 64-bit P4s).  I compiled my own lapack routines (available from [http://www....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I had some problems using the atlas modules, which seem to be not applicable to all machines (e.g. 64-bit P4s).  I compiled my own lapack routines (available from [http://www.netlib.org].  Their documentation is wrong in certain places, but it&amp;#039;s kind of obvious what paths they refer to.  As Catherine [http://www-theor.ch.cam.ac.uk/IT/software/atlas.html notes], it&amp;#039;s not worth doing much tuning, so I just used the bog-standard f77 configuration.  I installed it in ~/src/lib/lapack-3.1.1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jss43@keiko:~/src/lib&amp;gt; wget -O - http://www.netlib.org/lapack/lapack.tgz | tar xvzf -  # Download and extract to lapack-3.1.1&lt;br /&gt;
jss43@keiko:~/src/lib&amp;gt; cd lapack-3.1.1&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; cp make.inc.example make.inc        # Use g77 configuration.  Other examples exist in the INSTALL directory.&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; make                                # A (cursory) glance at the docs implies this makes everything (including BLAS).&lt;br /&gt;
[reams of output]&lt;br /&gt;
g77: ../../blas_LINUX.a: No such file or directory                      # FIBBERS!&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; cd BLAS/SRC &amp;amp;&amp;amp; make &amp;amp;&amp;amp; cd -         # Fine, we&amp;#039;ll make BLAS ourselves...&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; make                                # ...and finish the job.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last make command takes a while to run, so it&amp;#039;s worth having a [http://www.nicecupofteaandasitdown.com/ cup of tea] as you wait.&lt;br /&gt;
(You can avoid the error in the middle by editing the Makefile.)&lt;br /&gt;
&lt;br /&gt;
The makefile also runs tests which passed.  The libraries are blas_LINUX.a and lapack_LINUX.a, so we can link to them to give them more standard names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; ln -s lapack_LINUX.a liblapack.a&lt;br /&gt;
jss43@keiko:~/src/lib/lapack-3.1.1&amp;gt; ln -s blas_LINUX.a libblas.a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These can now be used in compilation by using:&lt;br /&gt;
&amp;lt;pre&amp;gt; -L ~/src/lib/lapack-3.1.1 -llapack -lblas &amp;lt;/pre&amp;gt;&lt;br /&gt;
in the link line.  This is somewhat platform dependent though, so we can make it even easier to use by using [[enviroment modules]] to reduce the link line to:&lt;br /&gt;
 -llapack -lblas&lt;br /&gt;
&lt;br /&gt;
ADDENDUM:&lt;br /&gt;
Actually, not so straightfoward.  I found using zdotc caused a segmentation fault.  Some google-fu implied this might be due to how g77 and gfortran  [http://developer.apple.com/hardwaredrivers/ve/errata.html return values from routines], and causes problems with 4 routines.  Catherine, Greg: did you have this issue?&lt;br /&gt;
&lt;br /&gt;
Anyway, I re-compiled using the INSTALL/make.inc.gfortran as the make.inc.  I had to do &amp;#039;&amp;#039;make cleanall&amp;#039;&amp;#039;, which is different from &amp;#039;&amp;#039;make clean&amp;#039;&amp;#039;.  zdotc no longer caused any issues.&lt;br /&gt;
&lt;br /&gt;
[[User:cen1001|Catherine]] 09:49, 7 July 2008 (BST) I haven&amp;#039;t encountered that, but we gave up supporting ATLAS other than by providing the precompiled binaries about the time gfortran succeeded g77 and I haven&amp;#039;t tried building it since, so I expect I&amp;#039;d get the same thing.&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>