#6 [WHC] Weekly Report

Did you know? OpenCL is very error-prone. A bug in you program can crash  device driver and if you use Linux, only restart can help.

This is the 6th and probably the last blog post. WHC IDE is almost finished and it’s marked now as beta version. I’ve managed to code all important components and they work really well. Since my last blogpost i’ve added two new key features:

- Device Query

- Execution with temporary folders and running on multiple devices simultaneously.

Device query implementation raised a big problem: To add or not to add an additional OpenCL dependency to IDE. Theoretically you can’t work with no OpenCL SDK installed, because you can’t compile and execute, but we decided that maybe, IDE will be used as Text Editor. And i added a build-in OpenCL library for queering available devices.

Available devices are used when executing on multiple devices, you have an option to select which devices you want to use.

Temporary folders were added to extend diagram flexibility and to pack execution together with copying output files to multiple data folders and to allow task-to-task interconnections.

Few task still remain, but it’s only some basics: add save files before building, tune settings menu,display device info as a tree …

Want to tell that i’m really happy with the result, because WHC IDE is a fully functional Ide and it will become a powerful tool for OpenCL developers.

#5 [WHC] Weekly Report

Did you know? Blog post’s title states that this is weekly report, but it’s actually posted every 2 weeks :D

Hello, it’s time for another major feature and this time, I’ve managed to get some tasks execution based on workflow diagram. Well, I only managed to execute a task with one data folder as input and one output folder to store the result.

First part of this feature was to figure out de order of task execution. Because all tasks are stored random, and it can’t execute one task if data from another one is required. While I was thinking about this problem, I remembered that we learnt an algorithm: Topological Sort. After few hours all tasks were sorted, and i was ready to execute them.

The second part, execution itself, I used a queue to store task location and command line arguments. This approach allows me easily to modify the way that data are stored in queue, when execution itself remain untouched. Now, the execution queue is a default FIFO that simply take a task from execution order and add all inputs, but it’s not suited for workflow optimization. Another algorithm coming soon.

Also, i must define a way to store outputs, when from task’s output connector goes multiple arrows.

Execution was the last, most difficult part, from now I must fix all bugs,implement missing features, optimize execution and test entire application :)

Cosmin, tell us what you did this 2 weeks :


this time I worked at the deploy part for Windows.The point was that:I needed to copy all static dependencies in an install folder specified trough an install wizard.First I needed to know all dependencies, I have found them with Dependency Walker,after that I used a script for Inno Setup Compiler to make the installer.

I also changed the highlight class to load into memory the data and
I began to make the interface for editor settings.

#4 [WHC] Weekly Report

Did you know? Nokia wants to sell Qt, but Digia is ready to buy it, and more important, they asked KDE to collaborate

Workflow Diagram was quite an interesting task for me. After this one i really think that is nothing difficult to do with Qt, and because I don’t want to be just words, I’ll show you a screenshot:


As you can see Diagram is fully integrated into WHC IDE. All tasks  and data added with Project Tree will be added automatically in Diagram’s combo Boxes. Also Diagram support:

- Adding new Task/Data

- Select and Move an object

- Delete selected object

- Draw and delete arrows between connectors(green circles)

I must think a way to store diagram in .whc project file and draw it when opening an existing project.

Also, my mentor, Grigore Lupescu, said he will provide me with some code that they wrote last year, and I’ll finally proceed to last and most complex task: Task execution based on workflow diagram (the RUN button for IDE).

That’s all for now, if everything goes nice and smooth I’ll have enough time to fix minor issues and bring code to a release state :)


#3 – [WHC] Weekly Report

Did you know? Qt is the best C++ framework fro writing cross-platform application.

As I promised, this report will be mainly about Project Compilation in WHC IDE. When i said about it on previous post, I didn’t think that it won’t be that complicated.
First of all I didn’t know anything about how to run a program inside of another program (some sort of inception, i know :) ) , but Qt helped me a lot by providing a really useful thing: QProcess – class for running shell commands and executables.
And here comes the first big challenge: Running make inside of my program made my application simply freeze, until make is done. Here i learned a lot about running QProcess in synchronous mode and and asynchronous mode. Asynchronous mode is a little bit tricky, and requested me to make a “ring” of 3 methods: configureTask, makeTask, nextTask.
It worked really nice and even porting it to windows wasn’t that hard, only replaced make with nmake and set some specific options for each OS.
Second big challenge was to fix, or maybe to re-implement ProjectTree. It didn’t provide some options and after operating some changes on project tree, i must reload the project. Building a big tree over and over again isn’t reasonable if you have a lot of source files and since i didn’t manage to fix the old one, i build my own ProjectTree. With the old one even deleting files ran in O(n lg n)- because i was forced to find that files. Now all operations Add Task/ Add File/ Delete File/ work in O(lg n), where n is the number of files.
The third and the last big challenge: Setting cmake paths for Windows. Well Then i tested last week, WHC IDE was build using cl(Visual Studio Compiler in QtCreator) and everything worked just fine, but when I tried to compile it with minGW, cmake wasn’t able to configure because “cl” was not found. So I started to add environment variables to QProcess. I wasn’t able to find out what variables are requested and after few fails I added all extra 16(!) from Visial Studio Command line … after successful configuration, i was able to reduce their number to 9. Everything that work so nice and well on Linux, end up in the worst way on Windows.
But I’ve managed to do all of this and I’m happy.

So, WHC IDE got these new options:
- Build all task in a separate build folder
- Clean all
- Faster and better Add Task/ Add File/Delete Selected options for project management

Next weeks, I’ll work on Diagram View, part that let the user configure tasks and assign inputs and outputs, according to my mentor’s opinion, this is the most difficult part and it will require some time to make it. Hope Qt will help me one more time and provide some useful classes so i wouldn’t need to implement all by myself.

My colleague Cosmin, also want to tell you something:

Hello, in this report I will write about saving project and some problems that occurred during highlighting the code.
Basically, for saving project I had to create a listener which activates a method whenever someone tries to close a tab, or the main window. Those methods act like triggers, also as explicit save button.Then I iterate through unclosed tabs and save the ones that are not saved.
The problem with text highlight is that Windows 7 does not always support the actual implementation, for example on my computer it doesn’t work, but on my colleague’s it does, I also read on some forums about that and it seems that the OS is the problem.
Another problem was that some libraries were included in .cpp files, when I tried to move them I received an error completely irrelevant(; missing), the solution was to declare the prototype of some classes at the beginning of the .h file.
There is also the problem that currently the program does not load in memory the highlight rules but load them every time a tab is opened, that causes a little bit of delay especially for languages with a large number of keywords(OpenCL).
I hope that I will finish the other projects that I’m working on soon and implement the things that I have in mind, one of them is swap files, the other is to complete highlight(load the highlight rules in memory) and a interface for editor.
See you on next report, I hope with better results :)

#2 – [WHC] Weekly Report

Did you know? OpenCL is very fast at matrix multiplication and floating point operations.

Hello, my name is Veaceslav Munteanu and this is my second report.

Almost 3 weeks passed since the last blog post and I’m glad to tell you that WHC IDE looks pretty nice and can do a lot of stuff as editor :)

First week I spent learning OpenCL in order to understand for what I’m building an IDE and want to say that i was pretty impressed about the raw power that can provide a small GPU.  It works ten times faster than a top level processor when it comes to floating point operation.
I didn’t manage to do something really big in OpenCL, only some basic stuff like “double each value” in a vector.

After learning a little bit of OpenCL, I came back to adding functionalities to WHC, mainly some options to manage a WHC Project:

-  Creating a new Task

- Adding existing files to Task

- Creating a new Data Group

- Adding Data Files

- New File

- Delete Selected Task/DataGroup/File

- Close buttons on opened file’s tab

Still some work must be done, like show/hide diagram, better diagram representation, adding links between tasks,  but we decided that is much better to begin our work on application core. Building and running a WHC project will be the most difficult part since we need to take into consideration that IDE must work on both Windows and Linux.

Next Step: Compile the project. A cmake file will be used because it’s cross-platform. In a .whc project every task is an application with user defined inputs and outputs(data files). Every task must be compiled and executable must be stored in a separated directory.

That’s all for now, next report will be about Project Compilation. Stay Tuned! Bye!

#1 – [WHC]Weekly Report

Hello, my name is Veaceslav Munteanu and I’m working for WHC IDE project. Our main goal is to create a reliable IDE that will help programmers to code in OpenCL and run their projects over network with WHC Application. We use QT to develop it.

First week was a little bit hard for me and I didn’t code too much because was unable to compile project on both Linux and Windows.  One of four main requirements is to validate IDE on both operating systems and without it I couldn’t proceed any further.

Another problem was that graphic interface was done with Qt proprietary designed that stores information in a specific .ui file. It wasn’t a big problem, but it constraints you to use only QtCreator.

After all, at the beginning i was able to compile project only with cmake under Linux.


- Fixed .PRO file, so the project can be compiled and run with QtCreator under Linux

- Fixed compilation error under Windows 7 using QtCreator

- Fixed compilation warnings when building with QtCreator

- New Project Dialog added to IDE and it can create an empty project.

- Added About/Credits page

- GUI polish: Application status bar Icon was not set

The most interesting thing is the workflow diagram shown on an empty project, it contains name of project and zeros. This thing must not happen and i think my next task will be to look how Workflow diagram works and to add options for adding a new task and new files to project.

Also, i think is a good idea to start learning OpenCL, or from now on, I will be working on some key features, that will require a full understanding of what I’m doing.

That’s all for now, my colleague will tell my next what he managed to do.

Hi, I’m Cosmin Mihai, I am very excited by the idea of using the video card for general purpose, it was a lightning relief for me.

- I managed to implement a find tool with usual options(normal, regex, case sensitivity and search entire project), that also contains a replace tool.

- I extended the highlight feature, it takes the groups of keywords or regex from an xml file and the font color and style(only bold option until now but it is easy to be extended) from another one. This feature is loaded only when it is needed, the next step is to load it in memory when the program starts.

For more technical details check the repository.

There are also things that I didn’t manage to make for the moment, for example drag and drop option, I was surprised by the fact that it is not as easy as I expected.

I also made mistakes, it happened that I cloned the repository in hurry on Windows, I didn’t check if Veaceslav pushed something and when I pushed the repository…It was a little embarrassing.

Overall I can feel the weight of Qt API, even with XML forms it’s a lot of code to be written.

I think it would be nice to see that in a two or three years WHC IDE will be used by programmers, will have extensions maybe for CUDA and so on…

Until now it was a good experience for me.

All the best, see you next time.