MNE Realt time Server on Neuromag Linux - labp/na-online_ow-toolbox GitHub Wiki
WARNING: Be careful when modifying the production system!
- Create folder
na-online
,na-online/mne-cpp_dependencies
,na-online/mne-cpp_dependencies/qt5
inhome
- Get Qt5
- Setup Qt5
- Get MNE-CPP
- Compile MNE Realt-time Server
- Start
mne_rt_server
cd ~
mkdir na-online
mkdir na-online/mne-dependencies
Download Qt5 code. You may have to do it on another workstation with git!
# Workstation with git
cd ~
mkdir ~/mne-cpp_dependencies
cd ~/mne-cpp_dependencies
git clone git://gitorious.org/qt/qt5.git qt5_repository
cd qt5_repository
git checkout v5.1.1
./init-repository --module-subset=qtbase
# Neuromag workstation
cd ~/na-online/mne-cpp_dependencies
scp -r <user>@<git workstation>:~/mne-cpp_dependencies/qt5_repository ./
There is a problem with the Linux (CentOS/RedHat kernel 2.6.18) of the Neuromag workstation: linux/futex.h ... undecleared
Solution:
cd ~/na-online/mne-cpp_dependencies/qt5_repository
# Modify: qmutex_linux.cpp
nano qtbase/src/corelib/thread/qmutex_linux.cpp
#include <linux/futex.h> // replace this line ...
// ... with this two defines
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
Configure and compile Qt5 on Neuromag workstation:
mkdir ~/na-online/mne-cpp_dependencies/qt5
cd ~/na-online/mne-cpp_dependencies/qt5_repository
# Configure
./configure -prefix ~/na-online/mne-cpp_dependencies/qt5 \
-confirm-license -opensource -release \
-nomake tests -nomake examples \
-no-icu -no-glib -no-sql-sqlite \
-no-libjpeg -no-libpng -no-gif \
-no-gui -no-widgets \
-qt-zlib -qt-pcre
# Compile and install
make -j8
make install
Download MNE-CPP code. You may have to do it on another workstation with git!
# Workstation with git
cd ~
mkdir ~/na-online_dependencies
cd ~/na-online_dependencies
git clone https://github.com/mne-tools/mne-cpp.git
# Neuromag workstation
cd na-online
scp -r <user>@<git workstation>:~/na-online_dependencies/mne-cpp ./
Compile MNE library:
cd ~/na-online/mne-cpp/MNE
# Modify: MNE.pro
# Comment out lines with disp and disp3D
<path to qt5>/bin/qmake -r
make -j8
Compile MNE Real-time Server:
cd ~/na-online/mne-cpp/applications/mne_rt_server
<path to qt5>/bin/qmake -r
make -j8
Open the ports 4217 and 4218 in the firewall.
cd ~/na-online/mne-cpp/bin
export LD_LIBRARY_PATH=~/na-online/mne-cpp/lib
./mne_rt_server