Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving quality of HPX build #3

Closed
wants to merge 2 commits into from
Closed

Improving quality of HPX build #3

wants to merge 2 commits into from

Conversation

sithhell
Copy link
Member

  • Adding jemalloc as allocator
  • Forwarding the proper build type
  • Setting build type to release in QUICKSTART script

@@ -15,9 +20,11 @@ ExternalProject_Add(
-DHPX_WITH_THREAD_IDLE_RATES=On
-DBOOST_ROOT=${Boost_INCLUDE_DIRS}/..
-DHWLOC_ROOT=${Hwloc_INCLUDE_DIRS}/..
-DJEMALLOC_FOUND=True
-DJEMALLOC_LIBRARIES=${JEMALLOC_}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be JEMALLOC_LIBRARY ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This is now fixed.

 - Adding jemalloc as allocator
 - Forwarding the proper build type
@W4RH4WK
Copy link
Member

W4RH4WK commented Nov 30, 2017

I have done some slight modifications, please have a look and if they are okay with you.

@sithhell
Copy link
Member Author

Looks good, thanks!

@W4RH4WK
Copy link
Member

W4RH4WK commented Nov 30, 2017

It seems like this change causes the runtime library name to change. Before this, it was liballscale.so, now it is libhpx_allscale.so. Yet the runtime submodule did not change.

Do you have an idea what could have changed this? Maybe I am mistaken and the error does not come from this commit.

@sithhell
Copy link
Member Author

No, I have no idea where this comes from. The name was alwaus libhpx_allscale.so.

@philippgs
Copy link
Member

Nope, it wasn't. I built the project today in the morning from scratch using commit 59cadb3255d00a92b57853f79107246139f693f5 of the allscale-compiler project, and this is the path and name of the lib in my build directory:
allscale_runtime-prefix/src/allscale_runtime-build/src/liballscale.so

@sithhell
Copy link
Member Author

I have a few more changes incoming regarding the build settings. The build type mismatches are really severe.

@sithhell
Copy link
Member Author

Nope, it wasn't. I built the project today in the morning from scratch using commit 59cadb3 of the allscale-compiler project, and this is the path and name of the lib in my build directory:
allscale_runtime-prefix/src/allscale_runtime-build/src/liballscale.so

shrug it has always been libhpx_allscale.so when the runtime was built standalone. I have no idea what was messing up the names previously.

@W4RH4WK
Copy link
Member

W4RH4WK commented Nov 30, 2017

I think I found the culprit. With these changes we now set CMAKE_BUILD_TYPE for the AllScale Runtime , which is set to Release by default in our cmake/build_settings.cmake.

@sithhell You are correct that the library should indeed be named libhpx_allscale.so, yet for us it was always liballscale.so since we have never set the build type before.

More interestingly, I found that the bottom layer of this error seems to be in HPX. Their CMake infrastructure basically relies on having a build type set -- yet the logic for setting the default build type is flawed.

See STEllAR-GROUP/hpx#3033.

@W4RH4WK
Copy link
Member

W4RH4WK commented Nov 30, 2017

Posted a detailed description to STEllAR-GROUP/hpx#3033, which also mentions this issue.

@sithhell
Copy link
Member Author

sithhell commented Dec 1, 2017

I am completely clueless as to why a unset build type would lead to an omission of the hpx_ prefix in the library name... Let's fix this now.

For the time being, I'd also suggest to fix the build type for HPX and AllScale Runtime to release, as a default, this avoids various problems due to mismatch of debug vs. release build flags and should get us going for a short term solution. Please see #4 for further discussion on how to improve the situation overall.

insieme-github-user pushed a commit that referenced this pull request Dec 1, 2017
 - Adding jemalloc as allocator
 - Forwarding the proper build type
 - Adjust backend library linking name (see #3)
@W4RH4WK
Copy link
Member

W4RH4WK commented Dec 1, 2017

This was merged in a3b9778, yet I just discovered that we need to forward different Jemalloc flags. I am testing this locally right now, should be live soon.

@sithhell
Copy link
Member Author

sithhell commented Dec 1, 2017

Ok, merging this just yet was not a good idea ;)
You will get allscalecc failures if you set CMAKE_BUILD_TYPE=Debug since the HPX build then generates a libhpxd.so library instead of libhpx.so. This was the main motivation to suggest to fix the HPX and AllScale Runtime build to be Release, to match the compiler flags set in allscalecc and the integration tests. Everything else would generate more subtile problems at this point in time.

@W4RH4WK
Copy link
Member

W4RH4WK commented Dec 1, 2017

The correct Jemalloc flags are now passed with f02da19.

I set the build type for HPX and the AllScale Runtime to Release for now, we'll change this together with #4.

@sithhell
Copy link
Member Author

sithhell commented Dec 1, 2017

This has been resolved on master.

@sithhell sithhell closed this Dec 1, 2017
@sithhell sithhell deleted the hpx_build_fixes branch December 1, 2017 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants