Week 2, 3 status

Last to last week I was able to produce working results and successfully ran HPX functionality directly from int main. With this work done, I had two main tasks at hand. First was to integrate my experimental code into HPX and the second was to produce working results for MSVC.

While I was successfully able to integrate my code into HPX (see the pull request), I am still working on producing working results for MSVC. I spent the week 2 understanding the MSVC runtime system and various methods to hook into runtime functions. I succeeded in hooking into a few runtime functions, but could not seem to hook into mainCRTStartup which is responsible to initialize the C runtime system in MSVC. After clearing doubts with my mentor, I decided to leave this section as of now and work on a different case scenario for gcc, clang based compilers.

As of now, my implementation will work perfectly for any function call from C main function. But, it would not work with global scope object or any section based function (formed using the “__attribute__ ((“section_name”))”). This would simply result in a runtime failure.

A very simple example of the same is given as:

The above code will break the HPX runtime system, throwing a null id exception, asking if the code actually ran on an HPX thread (which it did not since the runtime system was yet to initialize).

I am currently figuring out ways to make HPX functionality work for global scope objects. This will be my prime focus for this week and I will attempt to implement the same.

Until then, I bid you farewell!