MNE CPP on Neuromag Linux
Warning: You should know what you are doing and be familiar with the Neuromag system!
Contents
Pre-Requisites
Qt 5
./configure -no-xcb -no-eglfs -no-directfb -no-linuxfb -no-kms -no-glib -no-gui -no-widgets -no-opengl -no-openssl -opensource -nomake examples -prefix /home/neuromag/RT_MNE_CPP/Qt/Qt5.3.0 make
It's likely that following error occurs: Futex Error (RHEL 5.1 with gcc 4.1.2 compiler)
You can fix this error by replacing following line in src/corelib/thread/qmutex_linux.cpp
# include <linux/futex.h>
with
# define FUTEX_WAIT 0 # define FUTEX_WAKE 1
You can ignore further Qt5 build errors. Since only qmake and the most important libraries are needed. Finish the installation with:
make install
MNE-CPP
Download MNE-CPP
Edit _mne-cpp.pri_ by commenting _withGui_ out:
#MNECPP_CONFIG += withGui
run:
qmake -r
make
Edit .bashrc
After you compiled mne-cpp succesfully edit your .bashrc to make the shared libraries globally available:
# # Qt # export QT_HOME=/home/neuromag/RT_MNE_CPP/Qt/Qt5.3.0 if [[ $QT_HOME && ${QT_HOME-_} ]]; then PATH=$PATH:$QT_HOME/bin if [[ $LD_LIBRARY_PATH && ${LD_LIBRARY_PATH-_} ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QT_HOME/lib else export LD_LIBRARY_PATH=$QT_HOME/lib fi fi # # MNE-CPP # export MNE_CPP=/home/neuromag/RT_MNE_CPP/Git_Repos/mne-cpp if [[ $MNE_CPP && ${MNE_CPP-_} ]]; then PATH=$PATH:$MNE_CPP/bin if [[ $LD_LIBRARY_PATH && ${LD_LIBRARY_PATH-_} ]]; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MNE_CPP/lib else export LD_LIBRARY_PATH=$MNE_CPP/lib fi fi
Firewall Configuration
Open port 4217 & 4218 and add allowed clients by editing /etc/sysconfig/iptables. Insert the following:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4217 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4218 -j ACCEPT -A RH-Firewall-1-INPUT -s ip.of.your.client -m tcp -p tcp --dport 4217 -j ACCEPT -A RH-Firewall-1-INPUT -s ip.of.your.client -m tcp -p tcp --dport 4218 -j ACCEPT
run _mne_rt_server_
If all previous steps were successfully processed you are now able to run _mne_rt_server_ - well done :)!
Hints
The collectors
You can use telnet to monitor the interaction of _mne_rt_server_ with the neuromag machine: Therefore connect to the collectors running on the real-time computers:
telnet megacq collector
or
telnet ip.of.megacq 11122
Authorize your self:
PASS ***
Check the status by typing (They should be setup but not measuring. If this is not the case run a simple dummy project using the neuromag acqusition software, afterwards they will be setup.):
STAT
Check the values of the variables by typing:
VARS
Save the variables in a text file and make sure that they are the same after you have finished (your colleagues will appreciate this)
You can change variable names by typing
VARA ``<var> = <value>``
Switch on the monitoring to follow all interactions with the real-time computers:
MONI ON
You can start the acqusition manually with:
MEAS
And stopping it again with:
STOP
All available commands you'll find by typing:
HELP
You can leave the collectors by typing:
QUIT
Neuromag Acqusition
It's recommended to start the Neuromag Acquisition program. The software will be remotely controlled by MNE-X since the collectors mirror the instructions received. You can use the Neuromag data display to check your MNE-X measurements.