User experience

From LIBISIS
Revision as of 12:34, 4 October 2011 by Alex Buts (talk | contribs)
Jump to navigation Jump to search

ISIS LET control machine

The PC came prepared for Libisis and Horace. NeXus, Matlab and Intel Fortran compiler are installed. The task is to identify the locations of all parts, necessary for instillation and run the installation script resolving all dependencies.

1) Verify if nexus is installed

   $ locate libNeXus
   ...
  /usr/lib/libNeXus.so
  ...

2) Check if ifort works form command line:

  $ifort --version
  ifort (IFORT) 11.1 20100414
  Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

3) Identify where Matlab is really installed and if it has all files necessary to use it.

   $what matlab:
   /usr/local/bin/matlab
   $
   $ls -l /usr/local/bin
   ...
   lrwxrwxrwx 1 root   root        38 2011-03-18 11:48 matlab -> /usr/local/MATLAB/Matlab2010bSP1/bin/matlab
   ...

/usr/local/MATLAB/Matlab2010bSP1 is in our case or $MATLAB_ROOT folder which we will use everywhere, referring to matlab


4) Verify if mwdebug.c file is present:

  $
  $ls $MATLAB_ROOT/extern
  examples  include  lib

4a) etc folder is not there, so we have to make it and place mwdebug.c there.

  $
  $sudo mkdir $MATLAB_ROOT/extern/etc
  $sudo mv ~/Downdloads/mwdebug.c  $MATLAB_ROOT/extern/etc/

5) Download libisis from the repository

  $svn co https://svn.libisis.org/code/trunk Libisis


6) Use autotools to build libisis:

  $cd Libisis
  $ sh autogen.sh
  ...
  A lot of messages, no errors
  ...
  $./configure --with-matlabroot=/usr/local/MATLAB/Matlab2010bSP1
  ...
  A Lot of messages, no errors
  ...
  $make
  ...
  A lot of messages no errors
  ...

6) Check if libisis has been build successfully.

  $ls -l ~/Libisis/Libisis/DLL/_glnxa64
  ...
  -rwxr-xr-x 1 User Group 36434653 2011-09-14 19:09 libisisexc.mexa64
  ...

I assume 64 bit linux here. If it is 32-bit linux, check ~/Libisis/Libisis/DLL/_glnxa folder;


7) Building binary part of libisis is now completed. Start Matlab and check if it was successful.

  $matlab&
  in matlab:
  >>cd ~/Libisis/Libisis/DLL/_glnxa64
  >> aa=libisisexc();
  >> aa =
    $Revision:: 1808 $ ($Date:: 2011-03-29 21:43:21 +0000 (Tue, 29 Mar 2011) $)

Follow Windows Maltab installation steps, described on Libisis page.

University of Colorado Group

Special thanks to Dan Parshall; dan.parshall_AT_colorado.edu, who shared his experience with us.


This took a while to get back to, but eventually we got this sorted out. It was a combination of legacy files, compilers, permissions issues, and typos. I'm posting the solution here in order to help future Ubuntu users.

1) >>> Get legacy file mwdebug.c in place <<<

The file mwdebug.c (which one can get from Alex or Freddie) must be placed into matlabroot/extern/src/ (one needs to make the src directory). Do the standard:

  chown -R root matlabroot/*
  chmod -R 755 matlabroot/*

2) >>> set up IFORT <<<

A 30-day trial is free, academic licenses fairly cheap (I've mucked about a bit, and gfortran seems to also be functional, but as a rule it's 20% slower). In order to invoke IFORT on the command line, one has to use the "source" command and link to the "compilervars.sh" script.

Because one can't use "source" in combination with "sudo", one must change to the root account, then complete the remaining steps:

    cd /path/to/libisis
    sudo su
    source /path/to/ifort/compilervars.sh intel64

3) >>> run autogen.sh / configure / make (as root) <<<

One must set matlabroot directly- simlinks aren't followed properly

  bash autogen.sh
  ./configure --with-f77=ifort --with-f90=ifort --with-matlabroot=/path
  make

4) >>> set ownership and permissions of files made during compilation <<

  chown -R <username> *
  chmod -R 777 *

Jülich Centre for Neutron Science

Special thanks to Johannes Reim, j.reim_AT_fz-juelich.de; who shared his experience with us;


And afterwards I have to say, actually it is not that complex, if you know a bit about matlab, linux and how horace and libisis works but well, neither of that applied to me *g*.


Okay what did I do for the installation:


1. Installation of libisis, I actually did not do that myself, but the IT did it, because it should be installed for all users within our institute, but I sent them the instructions found on the subversion server of Libisis: http://svn.libisis.org/viewvc/LIBISISCode/trunk/Linux/README.linux?revision=1577

I will call the libisis directory $1 (think of $1as the variable for the full path to the directory)

2. check if there is a matlab folder within the libisis folder (we will need that later on)

3. download the up-to-date version of horace (not the one which is specified for linux)

4. Just extract it to your directory of choice, I will call the directory $2 (like $1)

5. download the homer-standalone from: http://download.libisis.org/kits/homer_standalone.zip

6. create a folder called InstrumentFiles, my suggestion would be creating it next to the Horace directory.

7. extract the content of the instrument_setup folder within into the created directory, I will call the directory $3 (like $1)

8. if not existing, create a lib directory within your home directory, and into that a matlab directory, access the matlab directory

9. link the Horace installation to the current directory: "ln -s $2 ."

10. go to the parent folder (should be "lib")

11. link the InstrumentFiles folder to this directory: "ln -s $3 ."

12. create a file called startup.m within this directory

13. edit it and insert the following: try

   libisis_off

catch end addpath('$1/matlab') %if there is a matlabfolder within the libsis directory use that, if all the matlab routines are directly within the libisis folder, then omit the "/matlab" libisis_init try

   horace_off

catch end addpath('$2') horace_init

14. Now you can start matlab, go to the lib folder and run the startup routine -> Libisis and Horace should be initialised.