Recompile freemat in ubuntu 10.10

261 views
Skip to first unread message

Liz

unread,
Nov 28, 2010, 9:34:56 PM11/28/10
to freemat
Hi there,

I am trying to import functions written by C in freemat, the following
error appears,

Error: Support for the import command requires that the LLVM library
be installed. FreeMat was compiled without this library being
available, and hence imported functions are unavailable. To enable
imported commands, please install llvm and recompile FreeMat.

after I install LLVM and clang library, how should I recompile
freemat ? I just use "apt-get remove freemat" and reinstall it, the
same error appears.

I am a newpie...thanks

Liz

Timothy Cyders

unread,
Nov 28, 2010, 10:52:35 PM11/28/10
to fre...@googlegroups.com
Liz,

As far as I know, the version of FreeMat in the Ubuntu repo's is a bit behind. To install freemat with llvm support in linux, you need to compile it from source. Relax. This is easy. I'll walk you through every step. First, uninstall freemat and purge its directories:

sudo apt-get --purge remove freemat

Easy, right? Now, we need to install some libraries that freemat will need to compile:

sudo apt-get install libqt4-dev libfftw3-dev cmake cmake-curses-gui libncurses5-dev build-essential llvm-dev gfortran liblapack-dev libsuitesparse-dev libpcre3-dev libportaudio-dev subversion

Nothing you haven't done before, or if you haven't, nothing too difficult, yeah? Next, we'll go get the most current version of FreeMat, from the repo's using a command called subversion (svn). The previous stable version's llvm doesn't play nicely with the one that comes with the newest Ubuntu release, so we need to use a newer compile. I like to do this in a directory called Sources in my home folder, but you can do it anywhere. Example:

cd ~
mkdir Sources
cd Sources
svn co https://freemat.svn.sourceforge.net/svnroot/freemat/trunk

Ok, so now we've downloaded the source files for FreeMat into a directory structure (by default, it will unpack them to a directory named trunk/FreeMat). Now, we just need to configure it for your machine, then compile and install it. We're almost there. Still easy, right? Nothing too difficult here.Let's make a build directory outside the source code directory to store our config settings, and navigate into it:

cd ~/Sources
mkdir cbuild && cd cbuild

Now, we'll configure our installation:

ccmake ../trunk/FreeMat

This will start up a GUI of sorts - it's a configuration script where you can turn compile options on and off. The default settings should be fine, except one. I've always had trouble with libportaudio, so arrow down to the option labeled 'FORCE_BUNDLED_PORTAUDIO' and hit enter to turn it on. Now, hit c once, and you'll get an error about lapack. Ignore it, and hit e. This will bring you back to the original screen. Hit c again, and it will give you the same error. This time, when you hit e, it will give you the option of generating a makefile by hitting g. Do so. This will spit you back out to a terminal prompt. Now, we're ready to compile! Do you have a multiple core machine? If you do, it will make the compiling process MUCH faster! With a single core machine, just type

make

and the process will start. If you have a quad core machine, you can type

make -j4

and it will speed the process up greatly. You'll see a lot of filenames fly by, and with some luck, you'll eventually get back to a terminal prompt. I just compiled, and one random file is missing. To correct for this, we'll temporarily create an empty file in its place:

touch ~/Sources/trunk/FreeMat/help/latex/FreeMat-4.1.pdf

You can install your new compile by typing

sudo make install

You're done! You can start FreeMat at the command prompt (or through the alt+F2 run dialog) by typing

FreeMat

Please let me know if you have any problems or questions, I'll be happy to help. Once you've done this once, it gets a lot easier. This should at least get the llvm library problem out of the way *crosses fingers*.

TJ



--
You received this message because you are subscribed to the Google Groups "freemat" group.
To post to this group, send email to fre...@googlegroups.com.
To unsubscribe from this group, send email to freemat+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freemat?hl=en.


Eugene

unread,
Nov 28, 2010, 11:14:51 PM11/28/10
to freemat
I strongly advise building llvm libraries from sources that come with
FreeMat (in directory dependencies/llvm).

LLVM library api is very unstable and you would need to use the exact
version that matches api that FreeMat uses. That's why we package the
sources for LLVM library we need.

There is a file called BuildInstructions.txt in the root of the source
tree when you check out FreeMat sources. It may help.

Good luck,
Eugene

Timothy Cyders

unread,
Nov 29, 2010, 8:57:27 AM11/29/10
to fre...@googlegroups.com
The current build of Ubuntu uses the same version of llvm as is currently included with the FreeMat dependencies, so I haven't had any problems with it. That's not to say that they won't upgrade the repo to a newer version, and llvm is notorious for a total lack of backwards compatibility. To avoid problems in the future, here are instructions on how to compile and install the llvm library for yourself, from our dependencies folder. It's even easier than installing FreeMat all together. First, let's clear out the Ubuntu installations of llvm and clang:

sudo apt-get --purge remove llvm clang

Now, I assume you've already checked out a svn revision of the FreeMat source code (like I explained in my last email). Go into trunk/FreeMat/dependencies/llvm-2.7/cmake:

cd ~/Sources/trunk/FreeMat/dependencies/llvm-2.7/cmake

Now, we'll use ccmake's interface to configure our installation, compile it then install it. I left all the default options on, and just hit c to configure, then g to generate the makefiles and exit.

ccmake ../

Back at the prompt, compile the source code:

make or if you have multiple cores (4 in my case)  make -j4

llvm takes a while to compile (my 3 GHz quad core took the better part of 5-10 minutes to chug through the whole thing). Once it's done, install it:

sudo make install

And you should be good to go! Go to your freemat source directory and compile like I discussed in my last email (AFTER you've done this procedure of installing llvm) and it should compile with no problems. Hope this helps.

TJ



--

Liz

unread,
Nov 30, 2010, 1:35:16 AM11/30/10
to freemat
Hi TJ,

Thank you very much for the detailed instruction. I followed the steps
successfully, while when I use "make" to make llvm library, the
following error appears,



[ 0%] Building CXX object lib/System/CMakeFiles/LLVMSystem.dir/
Atomic.cpp.o
In file included from /root/Sources/trunk/FreeMat/dependencies/
llvm-2.7/include/llvm/System/Atomic.h:17,
from /root/Sources/trunk/FreeMat/dependencies/
llvm-2.7/lib/System/Atomic.cpp:14:
/root/Sources/trunk/FreeMat/dependencies/llvm-2.7/cmake/include/llvm/
System/DataTypes.h:76: error: #error "Don't have a definition for
uint64_t on this platform"
make[2]: *** [lib/System/CMakeFiles/LLVMSystem.dir/Atomic.cpp.o] Error
1
make[1]: *** [lib/System/CMakeFiles/LLVMSystem.dir/all] Error 2
make: *** [all] Error 2




I can't install llvm which is in "cd ~/Sources/trunk/FreeMat/
dependencies/llvm-2.7/cmake". So I tried the one you suggested at
first, there is still an error


[ 16%] Building CXX object libs/libCore/CMakeFiles/Core.dir/
Audio.cpp.o
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:43: error: ISO C++
forbids declaration of ‘PaStreamCallbackTimeInfo’ with no type
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:43: error: expected
‘,’ or ‘...’ before ‘*’ token
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: In function ‘int
DoPlayBackCallback(const void*, void*, long unsigned int, int)’:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:55: error:
‘userData’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: At global scope:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:106: error: ISO C++
forbids declaration of ‘PaStreamCallbackTimeInfo’ with no type
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:106: error:
expected ‘,’ or ‘...’ before ‘*’ token
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: In function ‘int
DoRecordCallback(const void*, void*, long unsigned int, int)’:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:118: error:
‘userData’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: In function ‘void
PAShutdown()’:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:166: error:
‘Pa_IsStreamActive’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: In function ‘void
DoPlayBack(const void*, int, int, int, long unsigned int, int, bool,
Array)’:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:198: error:
‘PaStreamParameters’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:198: error:
expected ‘;’ before ‘outputParameters’
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:199: error:
‘outputParameters’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:199: error:
‘Pa_GetDefaultOutputDevice’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp: In function ‘void
DoRecord(void*, int, int, int, long unsigned int, int)’:
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:255: error:
‘PaStreamParameters’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:255: error:
expected ‘;’ before ‘inputParameters’
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:256: error:
‘inputParameters’ was not declared in this scope
/root/Sources/trunk/FreeMat/libs/libCore/Audio.cpp:256: error:
‘Pa_GetDefaultInputDevice’ was not declared in this scope
make[2]: *** [libs/libCore/CMakeFiles/Core.dir/Audio.cpp.o] Error 1
make[1]: *** [libs/libCore/CMakeFiles/Core.dir/all] Error 2
make: *** [all] Error 2


I don't know where is the problem, please help...thank you

Liz

Timothy Cyders

unread,
Nov 30, 2010, 7:23:22 AM11/30/10
to fre...@googlegroups.com
Liz,

Are you running 32 or 64 bit Ubuntu? Eugene, you ever compile llvm on a 32 bit machine? I haven't tried that before, but I can give it a shot sometime this week.

Also, Liz, did you remember to change the switch in the ccmake configuration on 'FORCE_BUNDLED_PORTAUDIO' to yes? It looks like that's the area causing you problems.

TJ


--

Timothy Cyders

unread,
Nov 30, 2010, 7:24:47 AM11/30/10
to fre...@googlegroups.com
By the way Liz, if you're not sure whether you're running 32 or 64 bit, just type uname -a at the terminal. If it says x86_64, you're running 64 bit.

TJ

Liz

unread,
Nov 30, 2010, 10:41:24 AM11/30/10
to freemat
Good morning !

I tried "uname -m", it says "i686", so I guess it is 32bits? Is this
the problem ?

I turned on 'FORCE_BUNDLED_PORTAUDIO' this time, while still lots of
error lines appears. It looks like "undefined reference to
llvmLinkInJIT" is the problem..

Liz

Liz

unread,
Nov 30, 2010, 2:11:30 PM11/30/10
to freemat
I also tried in a 64bits machine, instead, I can install llvm from cd
~/Sources/trunk/FreeMat/dependencies/llvm-2.7/cmake
after that, I install freemat from source. It is almost done, but
there is still an error

[100%] Building CXX object src/CMakeFiles/FreeMat.dir/
qrc_FreeMat.cxx.o
Linking CXX executable FreeMat
../libs/libMatC/libMatC.a(JIT.cpp.o): In function `(anonymous
namespace)::ForcePassLinking::ForcePassLinking()':
JIT.cpp:(.text+0x89): undefined reference to
`llvm::createScalarEvolutionAliasAnalysisPass()'
JIT.cpp:(.text+0xc0): undefined reference to
`llvm::createDomOnlyPrinterPass()'
JIT.cpp:(.text+0xc5): undefined reference to
`llvm::createDomPrinterPass()'
JIT.cpp:(.text+0xca): undefined reference to
`llvm::createDomOnlyViewerPass()'
JIT.cpp:(.text+0xcf): undefined reference to
`llvm::createDomViewerPass()'
JIT.cpp:(.text+0xd9): undefined reference to
`llvm::createOptimalEdgeProfilerPass()'
JIT.cpp:(.text+0x11f): undefined reference to
`llvm::createLazyValueInfoPass()'
JIT.cpp:(.text+0x17e): undefined reference to
`llvm::createProfileVerifierPass()'
JIT.cpp:(.text+0x197): undefined reference to
`llvm::createPostDomOnlyPrinterPass()'
JIT.cpp:(.text+0x19c): undefined reference to
`llvm::createPostDomPrinterPass()'
JIT.cpp:(.text+0x1a1): undefined reference to
`llvm::createPostDomOnlyViewerPass()'
JIT.cpp:(.text+0x1a6): undefined reference to
`llvm::createPostDomViewerPass()'
JIT.cpp:(.text+0x20a): undefined reference to
`llvm::createGVNPass(bool)'
JIT.cpp:(.text+0x2c4): undefined reference to
`llvm::createGEPSplitterPass()'
JIT.cpp:(.text+0x2c9): undefined reference to
`llvm::createSCCVNPass()'
JIT.cpp:(.text+0x2ce): undefined reference to `llvm::createABCDPass()'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function `JIT::JIT()':
JIT.cpp:(.text+0x47f): undefined reference to
`llvm::Module::Module(llvm::StringRef, llvm::LLVMContext&)'
JIT.cpp:(.text+0x4c8): undefined reference to
`llvm::ExecutionEngine::createJIT(llvm::Module*,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>*, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool,
llvm::CodeModel::Model)'
JIT.cpp:(.text+0x581): undefined reference to
`llvm::FunctionPassManager::FunctionPassManager(llvm::Module*)'
JIT.cpp:(.text+0x98c): undefined reference to
`llvm::createGVNPass(bool)'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function `JIT::JIT()':
JIT.cpp:(.text+0xb1f): undefined reference to
`llvm::Module::Module(llvm::StringRef, llvm::LLVMContext&)'
JIT.cpp:(.text+0xb68): undefined reference to
`llvm::ExecutionEngine::createJIT(llvm::Module*,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>*, llvm::JITMemoryManager*, llvm::CodeGenOpt::Level, bool,
llvm::CodeModel::Model)'
JIT.cpp:(.text+0xc21): undefined reference to
`llvm::FunctionPassManager::FunctionPassManager(llvm::Module*)'
JIT.cpp:(.text+0x102c): undefined reference to
`llvm::createGVNPass(bool)'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function
`JIT::Alloc(llvm::Type const*, QString)':
JIT.cpp:(.text+0x2708): undefined reference to
`llvm::AllocaInst::AllocaInst(llvm::Type const*, llvm::Twine const&,
llvm::BasicBlock*)'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function
`JIT::String(QString)':
JIT.cpp:(.text+0x280f): undefined reference to
`llvm::GlobalVariable::GlobalVariable(llvm::Type const*, bool,
llvm::GlobalValue::LinkageTypes, llvm::Constant*, llvm::Twine const&,
bool, unsigned int)'
JIT.cpp:(.text+0x2877): undefined reference to
`llvm::ConstantArray::get(llvm::LLVMContext&, llvm::StringRef, bool)'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function
`JIT::DefineFunction(llvm::FunctionType const*, QString)':
JIT.cpp:(.text+0x30da): undefined reference to
`llvm::Module::getOrInsertFunction(llvm::StringRef, llvm::FunctionType
const*)'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function
`llvm::FCmpInst::FCmpInst(llvm::BasicBlock&, llvm::CmpInst::Predicate,
llvm::Value*, llvm::Value*, llvm::Twine const&)':
JIT.cpp:
(.text._ZN4llvm8FCmpInstC1ERNS_10BasicBlockENS_7CmpInst9PredicateEPNS_5ValueES6_RKNS_5TwineE[llvm::FCmpInst::FCmpInst(llvm::BasicBlock&,
llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine
const&)]+0x114): undefined reference to
`llvm::Type::isFPOrFPVectorTy() const'
../libs/libMatC/libMatC.a(JIT.cpp.o): In function
`llvm::SmallVectorTemplateBase<unsigned char, true>::grow(unsigned
long)':
JIT.cpp:
(.text._ZN4llvm23SmallVectorTemplateBaseIhLb1EE4growEm[llvm::SmallVectorTemplateBase<unsigned
char, true>::grow(unsigned long)]+0x24): undefined reference to
`llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long)'
collect2: ld returned 1 exit status
make[2]: *** [src/FreeMat] Error 1
make[1]: *** [src/CMakeFiles/FreeMat.dir/all] Error 2
make: *** [all] Error 2

I don't know what happened..

Liz

Timothy Cyders

unread,
Nov 30, 2010, 8:26:50 PM11/30/10
to fre...@googlegroups.com
Liz,

Did you say you successfully compiled llvm before installing it, or no? If the 'make' command doesn't successfully execute, installing what it created won't do you any good. Did you first try simply using the Ubuntu llvm installation? It should work just fine (it works on my machine). To do this, try:

sudo apt-get install llvm clang

Then recompile freemat using the bundled portaudio library and see if that corrects your problem.

TJ


Liz

louis

unread,
Dec 17, 2010, 4:37:29 PM12/17/10
to freemat
I can confirm LLVM install works as advertised on my Mint 10 machine.
I have a small SSD for the OS, and a large HD for everything else.
The HD has two partitions of interest, one a NTFS for simple files,
the second an ext4 partition.
Once I installed the source files for freemat and llvm onto the ext4
partition llvm installed.

Now for compiling freemat.
ccmake ../trunk/FreeMat ran into an additional error in my case.
NCURSES_LIBRARY NOT FOUND.

So back to the Software manager, where various ncurses packages were
already installed.
I read somewhere that the header files are in the developer packages,
so I installed the two developer's packages, libncurses5-dev and
libncursesw5-dev.

Now I run sudo ccmake ../trunk/FreeMat and I can configure and
generate.

Next step, sudo make -j4 says

[ 32%] Built target umfpack
make[1]: *** [libs/libFreeMat/CMakeFiles/FreeMatlib.dir/all] Error 2
make: *** [all] Error 2

libumfpack5.4.0 is already installed so I go back to ccmake and say:
FORCED_BUNDELED_UMFPACK ON

rerun sudo make -j4

[ 1%] Built target zlib
[ 3%] Built target amd
[ 5%] Built target pcre
[ 6%] Built target portaudio
[ 6%] Building CXX object libs/libFreeMat/CMakeFiles/FreeMatlib.dir/
Interpreter.cpp.o
[ 6%] Building CXX object libs/libGraphics/CMakeFiles/Graphics.dir/
HandleAxis.cpp.o
[ 6%] Building CXX object libs/libXP/CMakeFiles/XP.dir/
KeyManager.cpp.o
In file included from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/FunctionDef.hpp:30,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Context.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Interpreter.hpp:24,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Interpreter.cpp:20:
/media/dtb/home/las/code/freemat/source/trunk/FreeMat/libs/libMatC/
JIT.hpp:43: fatal error: llvm/Module.h: No such file or directory
compilation terminated.
make[2]: *** [libs/libFreeMat/CMakeFiles/FreeMatlib.dir/
Interpreter.cpp.o] Error 1
make[1]: *** [libs/libFreeMat/CMakeFiles/FreeMatlib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/FunctionDef.hpp:30,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Context.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libGraphics/HandleAxis.hpp:30,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libGraphics/HandleAxis.cpp:19:
/media/dtb/home/las/code/freemat/source/trunk/FreeMat/libs/libMatC/
JIT.hpp:43: fatal error: llvm/Module.h: No such file or directory
compilation terminated.
[ 7%] make[2]: *** [libs/libGraphics/CMakeFiles/Graphics.dir/
HandleAxis.cpp.o] Error 1
make[1]: *** [libs/libGraphics/CMakeFiles/Graphics.dir/all] Error 2
Building CXX object libs/libXP/CMakeFiles/XP.dir/PathSearch.cpp.o
[ 7%] Building CXX object libs/libXP/CMakeFiles/XP.dir/QTTerm.cpp.o
In file included from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/FunctionDef.hpp:30,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Context.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libXP/KeyManager.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libXP/KeyManager.cpp:25:
/media/dtb/home/las/code/freemat/source/trunk/FreeMat/libs/libMatC/
JIT.hpp:43: fatal error: llvm/Module.h: No such file or directory
compilation terminated.
make[2]: *** [libs/libXP/CMakeFiles/XP.dir/KeyManager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/FunctionDef.hpp:30,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libFreeMat/Context.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libXP/KeyManager.hpp:26,
from /media/dtb/home/las/code/freemat/source/trunk/
FreeMat/libs/libXP/QTTerm.cpp:20:
/media/dtb/home/las/code/freemat/source/trunk/FreeMat/libs/libMatC/
JIT.hpp:43: fatal error: llvm/Module.h: No such file or directory
compilation terminated.
make[2]: *** [libs/libXP/CMakeFiles/XP.dir/QTTerm.cpp.o] Error 1
[ 32%] Built target umfpack
make[1]: *** [libs/libXP/CMakeFiles/XP.dir/all] Error 2
make: *** [all] Error 2

Thoughts?


On Dec 1, 1:26 am, Timothy Cyders <t.cyd...@gmail.com> wrote:
> Liz,
>
> Did you say you successfully compiled llvm before installing it, or no? If
> the 'make' command doesn't successfully execute, installing what it created
> won't do you any good. Did you first try simply using the Ubuntu llvm
> installation? It should work just fine (it works on my machine). To do this,
> try:
>
> sudo apt-get install llvm clang
>
> Then recompile freemat using the bundled portaudio library and see if that
> corrects your problem.
>
> TJ
>
> On Tue, Nov 30, 2010 at 10:41 AM, Liz <lizheng...@gmail.com> wrote:
> > Good morning !
>
> > I tried "uname -m", it says "i686", so I guess it is 32bits? Is this
> > the problem ?
>
> > I turned on  'FORCE_BUNDLED_PORTAUDIO'  this time, while still lots of
> > error lines appears. It looks like "undefined reference to
> > llvmLinkInJIT" is the problem..
>
> > Liz
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "freemat" group.
> > To post to this group, send email to fre...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > freemat+u...@googlegroups.com<freemat%2Bunsu...@googlegroups.com>
> > .

Timothy Cyders

unread,
Dec 17, 2010, 5:11:24 PM12/17/10
to fre...@googlegroups.com
Did you sudo make install after compiling llvm? It looks like it's still not seeing the library.

TJ

To unsubscribe from this group, send email to freemat+u...@googlegroups.com.

louis

unread,
Dec 17, 2010, 5:46:38 PM12/17/10
to freemat
Many thanks TJ, that was it.

In my last comment I noted that I had to install libncurses5-dev.
But you clearly make mention of it:

sudo apt-get install libqt4-dev libfftw3-dev cmake cmake-curses-gui
libncurses5-dev build-essential llvm-dev gfortran liblapack-dev
libsuitesparse-dev libpcre3-dev libportaudio-dev subversion

The final newbie mistake I made was to cut and paste the above into
the command line.
There is a carriage return line feed in the above. To install place
the apt-get on one line.

All is well after I corrected for the apt-get install, installed the
source on a proper linux file system ext4, and ran the instructions
verbatim for installing llvm and compiling freemat.


On Dec 17, 10:11 pm, Timothy Cyders <t.cyd...@gmail.com> wrote:
> Did you sudo make install after compiling llvm? It looks like it's still not
> seeing the library.
>
> TJ
>
> > <freemat%2Bunsu...@googlegroups.com<freemat%252Buns...@googlegroups.com>

Timothy Cyders

unread,
Dec 17, 2010, 6:09:33 PM12/17/10
to fre...@googlegroups.com
Excellent!

To unsubscribe from this group, send email to freemat+u...@googlegroups.com.

Nat

unread,
Jan 8, 2011, 2:51:52 PM1/8/11
to freemat
Hi all,

This was a great set of instructions, I was able to use it to get
FreeMat up and running. Also the ubuntu repositories are on version
2.8 of llvm and it does not work for compiling the latest version of
FreeMat.

I'm also interested in contributing to this project, but I'm not
really sure how to setup a dev environment. I guess the main question
I have is how can I build a debug version of FreeMat so I can use gdb?
Or are there better tools out there than gdb? It's been a few years
since I did any real coding so bear with me if some of my questions
are very basic.

Thanks,
Nat

On Dec 17 2010, 6:09 pm, Timothy Cyders <t.cyd...@gmail.com> wrote:
> Excellent!
>
> > > > <freemat%2Bunsu...@googlegroups.com<freemat%252Buns...@googlegroups.com>
> > <freemat%252Buns...@googlegroups.com<freemat%25252Bun...@googlegroups.com>

Nat

unread,
Jan 9, 2011, 1:41:44 AM1/9/11
to freemat
Never mind I got it sorted out. I just needed to change the
CMAKE_BUILD_TYPE to Debug.
> ...
>
> read more »

louis

unread,
Jan 12, 2011, 7:46:49 AM1/12/11
to freemat
One more thing... I noticed that earlier threads make note of using
ATLAS.
(See 4.0 Slowdown)
So I typed A = rand(1000);B = rand(1000); tic;A*B;toc
and it took 6.01 seconds to run.

Still a newbie when it comes to building, can you suggest how to
modify the build instructions to include using the ATLAS libraries?

Timothy Cyders

unread,
Jan 12, 2011, 8:53:06 AM1/12/11
to fre...@googlegroups.com
Also, go into FreeMat and type blaslib. Post the output here as well.

TJ

On Wed, Jan 12, 2011 at 8:24 AM, Timothy Cyders <t.cy...@gmail.com> wrote:
Louis,

Assuming you've built from source and then sudo make install 'd, your blas file should now be in /usr/local/bin/blas.ini. Paste the contents of that file here. Also, what operating system/architecture are you on again? Ubuntu 64?

TJ



--

louis

unread,
Jan 12, 2011, 12:57:58 PM1/12/11
to freemat
Hi TJ. I am on Mint 10 x64, which is based on Ubuntu 10.10

>>blaslib
Internal reference BLAS. Unoptimized

blas.ini:
[Win32]

ACML\libname=libacml_dll.dll

ACML\capfnames=true

ACML\prefix=

ACML\suffix=

ACML\desc="AMD performance library."



[Linux64]

ATLAS64\libname=/usr/lib64/atlas/libblas.so

ATLAS64\capfnames=false

ATLAS64\prefix=

ATLAS64\suffix=_

ATLAS64\desc="ATLAS BLAS. Optimized."



[Linux32]

ATLAS32\libname=/usr/lib/atlas/libblas.so

ATLAS32\capfnames=false

ATLAS32\prefix=

ATLAS32\suffix=_

ATLAS32\desc="ATLAS BLAS. Optimized."



[OSX]

VECLIB\libname=/usr/lib/libblas.dylib

VECLIB\capfnames=false

VECLIB\prefix=

VECLIB\suffix=_

VECLIB\desc="VecLIB BLAS. Optimized."


On Jan 12, 1:53 pm, Timothy Cyders <t.cyd...@gmail.com> wrote:
> Also, go into FreeMat and type blaslib. Post the output here as well.
>
> TJ
>
> On Wed, Jan 12, 2011 at 8:24 AM, Timothy Cyders <t.cyd...@gmail.com> wrote:
> > Louis,
>
> > Assuming you've built from source and then sudo make install 'd, your blas
> > file should now be in /usr/local/bin/blas.ini. Paste the contents of that
> > file here. Also, what operating system/architecture are you on again? Ubuntu
> > 64?
>
> > TJ
>
> > On Wed, Jan 12, 2011 at 7:46 AM, louis <louis.a.sc...@gmail.com> wrote:
>
> >> One more thing... I noticed that earlier threads make note of using
> >> ATLAS.
> >> (See 4.0 Slowdown)
> >> So I typed A = rand(1000);B = rand(1000); tic;A*B;toc
> >> and it took 6.01 seconds to run.
>
> >> Still a newbie when it comes to building, can you suggest how to
> >> modify the build instructions to include using the ATLAS libraries?
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "freemat" group.
> >> To post to this group, send email to fre...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> freemat+u...@googlegroups.com<freemat%2Bunsu...@googlegroups.com>
> >> .

Timothy Cyders

unread,
Jan 12, 2011, 1:10:09 PM1/12/11
to fre...@googlegroups.com
Ok, we can see that you're not using an optimized BLAS library, so we'll need to set one up. Give this a shot:

Step 1.) Close out FreeMat

Step 2.) Make sure you have these packages installed: sudo apt-get install libblas-dev libatlas-base-dev

Step 3.) Select the appropriate library in your blas.ini: sudo gedit /usr/local/bin/blas.ini  add an asterisk after [Linux64], save and close

Step 4.) Restart FreeMat, and run blaslib again. You should now be using the ATLAS Optimized set. Give your time test a god again, and post results here.

TJ


To unsubscribe from this group, send email to freemat+u...@googlegroups.com.

louis

unread,
Jan 12, 2011, 2:42:08 PM1/12/11
to freemat
Excellent! Thanks TJ

Atlas is in a different subdir in my case.
[Linux64]*

ATLAS64\libname=/usr/lib64/atlas-base/atlas/libblas.so

--> blaslib
*ATLAS64 - ATLAS BLAS. Optimized.
--> A = rand(1000);B = rand(1000); tic;A*B;toc
--> 0.4500

Now I am on a i7 950, and the 4.0 slowdown thread has this coming in
at .32 seconds. Close enough for now.


On Jan 12, 6:10 pm, Timothy Cyders <t.cyd...@gmail.com> wrote:
> Ok, we can see that you're not using an optimized BLAS library, so we'll
> need to set one up. Give this a shot:
>
> Step 1.) Close out FreeMat
>
> Step 2.) Make sure you have these packages installed: sudo apt-get install
> libblas-dev libatlas-base-dev
>
> Step 3.) Select the appropriate library in your blas.ini: sudo gedit
> /usr/local/bin/blas.ini  add an asterisk after [Linux64], save and close
>
> Step 4.) Restart FreeMat, and run blaslib again. You should now be using the
> ATLAS Optimized set. Give your time test a god again, and post results here.
>
> TJ
>
> > <freemat%2Bunsu...@googlegroups.com<freemat%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages