Executing MatlabFilter in V3.0
-
gdimitri
- Posts: 10
- Joined: 23 Jun 2010, 09:36
Executing MatlabFilter in V3.0
I seem to be having a problem loading the MatlabSignalProcessing Filter or the FieldTripBuffer Filter when I use the V3.0 I compiled with CW (in Win7 x32). All other filters seem to work ok (Signal Source, Signal Processing and Application Filters plus a Neuralynx SS Filter I have implemented). I can also load the Matlab filter when I use the V2.0 binaries without any problems.
The problem is that the module is loaded and then a second or two later stops running as I can see from a task manager I am running (only the Matlab and the FieldTrip modules stop running, the Source and Application modules are still active). The Operator's buttons remain grey since not all modules have been loaded.
Having a quick look at the code between V2.0 and V3.0 they seem to be identical. Any ideas as to what might be causing the problem?
Thanks in advance
The problem is that the module is loaded and then a second or two later stops running as I can see from a task manager I am running (only the Matlab and the FieldTrip modules stop running, the Source and Application modules are still active). The Operator's buttons remain grey since not all modules have been loaded.
Having a quick look at the code between V2.0 and V3.0 they seem to be identical. Any ideas as to what might be causing the problem?
Thanks in advance
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Please note that CodeWarrior is not an officially supported build environment for BCI2000. Depending on link order, filters may fail to be instantiated, causing the module to quit.
Other issues related to Matlab and the FieldTripBuffer:
*You need to manually copy pthreadVC2.dll from the FieldTripBuffer's source directory to the prog directory, otherwise the FieldTripBuffer will fail to start.
*Matlab R2010a adds a wrong path to the system path. You will need to add "\win32" at the end of the Matlab entry, otherwise Matlab libraries cannot be located when starting up MatlabSignalProcessing.
Other issues related to Matlab and the FieldTripBuffer:
*You need to manually copy pthreadVC2.dll from the FieldTripBuffer's source directory to the prog directory, otherwise the FieldTripBuffer will fail to start.
*Matlab R2010a adds a wrong path to the system path. You will need to add "\win32" at the end of the Matlab entry, otherwise Matlab libraries cannot be located when starting up MatlabSignalProcessing.
-
gdimitri
- Posts: 10
- Joined: 23 Jun 2010, 09:36
Thanks for the quick reply.
There was a typo in my original post. I meant CB (CodeBlocks with MinGW compiler) and not CW (sorry about that).
I am using Matlab 2009a and I checked my Path variables; the \win32 is in place.
After you mentioned the ptthread libraries I remembered that the FieldTrip buffer needs those to run. It won't work though with ptthreadVC2.dll but with ptthreadGC2.dll if the executable is made using the MinGW compiler (and thus linking to the ptthreadGC.dll). Thanks for that. Now the FieldTrip buffer Filter works ok.
I still can't get the Matlab filter to work though. Any extra help would be highly appreciated
Thanks again for you time
There was a typo in my original post. I meant CB (CodeBlocks with MinGW compiler) and not CW (sorry about that).
I am using Matlab 2009a and I checked my Path variables; the \win32 is in place.
After you mentioned the ptthread libraries I remembered that the FieldTrip buffer needs those to run. It won't work though with ptthreadVC2.dll but with ptthreadGC2.dll if the executable is made using the MinGW compiler (and thus linking to the ptthreadGC.dll). Thanks for that. Now the FieldTrip buffer Filter works ok.
I still can't get the Matlab filter to work though. Any extra help would be highly appreciated
Thanks again for you time
-
gdimitri
- Posts: 10
- Joined: 23 Jun 2010, 09:36
I am using 3.4.5
As I mentioned in a previous post the 4.x.x that comes with CB isn't supported by your system and if I remember correctly the problem had to do with your Qt distribution. So I am using the 3.4.5 I downloaded from MinGW.
I am not sure I understand your second question. In order to compile I am using the cmake files you provide for the MinGW compiler (by running the Generate MinGW Makefiles.bat). I would assume this would take care of linking any required libraries. I can see in the CB Workspace of the BCI2000 project the Qt4.cmake file (which should be called since the USE_STD_QT in findQt4.cmake is set to false) and the UseQt4.cmake files are in the build targets of CB.
I have done no other linking and even for the Neuralynx SignalSource module I made, I did all the required linking by creating a CMakeLists.txt for it rather than telling the compiller directly what to link.
Is the above relevant to your question? Do I need to link the Qt distribution of BCI2000 as an extra? And if yes do I have to do this through some makefile?
As I mentioned in a previous post the 4.x.x that comes with CB isn't supported by your system and if I remember correctly the problem had to do with your Qt distribution. So I am using the 3.4.5 I downloaded from MinGW.
I am not sure I understand your second question. In order to compile I am using the cmake files you provide for the MinGW compiler (by running the Generate MinGW Makefiles.bat). I would assume this would take care of linking any required libraries. I can see in the CB Workspace of the BCI2000 project the Qt4.cmake file (which should be called since the USE_STD_QT in findQt4.cmake is set to false) and the UseQt4.cmake files are in the build targets of CB.
I have done no other linking and even for the Neuralynx SignalSource module I made, I did all the required linking by creating a CMakeLists.txt for it rather than telling the compiller directly what to link.
Is the above relevant to your question? Do I need to link the Qt distribution of BCI2000 as an extra? And if yes do I have to do this through some makefile?
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
I needed the information because I wanted to reproduce the problem, no suggestions implied.
With USE_STD_QT set to false, you are linking against the Qt distribution in the BCI2000 source tree.
In the meantime, I upgraded the Qt distribution coming with BCI2000 to 4.6.3. Now, gcc 4.x.x is supported, and 3.x.x is not any more. It would be nice if you could try with the new configuration, and check whether your problem still persists.
Best regards,
Juergen
With USE_STD_QT set to false, you are linking against the Qt distribution in the BCI2000 source tree.
In the meantime, I upgraded the Qt distribution coming with BCI2000 to 4.6.3. Now, gcc 4.x.x is supported, and 3.x.x is not any more. It would be nice if you could try with the new configuration, and check whether your problem still persists.
Best regards,
Juergen
-
gdimitri
- Posts: 10
- Joined: 23 Jun 2010, 09:36
Hello, and sorry for the very long time it took me to reply.
I just updated the bci2000 v3 so that it compiles with mingw 4.x.x
I have recompiled the whole project (compiling with the BCI2000's QT) and I haven't managed to get the MatlabSignalProcessing to work. It behaves exactly like before where the module just dies after a few seconds.
the only thing that happened after the upgrade is that now the windows for the Launcher and the operator take a few seconds (3 or 4) to actually appear after their executables start. Not a problem really but just slightly annoying.
The main issue though remains. I still can't seem to make the Matlab module work in v3
Thanks for your time
George
I just updated the bci2000 v3 so that it compiles with mingw 4.x.x
I have recompiled the whole project (compiling with the BCI2000's QT) and I haven't managed to get the MatlabSignalProcessing to work. It behaves exactly like before where the module just dies after a few seconds.
the only thing that happened after the upgrade is that now the windows for the Launcher and the operator take a few seconds (3 or 4) to actually appear after their executables start. Not a problem really but just slightly annoying.
The main issue though remains. I still can't seem to make the Matlab module work in v3
Thanks for your time
George
Who is online
Users browsing this forum: No registered users and 0 guests
