Thank you! It's almost working again as before.Only I was also using positional options (boost::program_options::positional_options_description)
in addition to the normal options. So filling the variable map looked like this: /boost::program_options::variables_map vm;////boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(allOptionDescriptions)*.positional(positionalOptionsDescription)*.run(), vm);/
Is it also possible to forward a positional options description? Best, Tim On 09/01/2016 03:21 PM, Hartmut Kaiser wrote:
Resending to hpx-users... Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.eduthanks! Looks promising. So I did the following changes: - Replaced /#include <hpx/hpx_main.hpp>/ by /#include <hpx/hpx_init.hpp>/ - Renamed /int main(int argc, char* argv[])/ to /int hpx_main(int argc, char* argv[])/ /- /Added/return hpx::finalize(); /at end of hpx_main - Added your /int main(..)/ /Yes, sorry. I should have mentioned that./But now I get the following output: /runtime_support::load_components: command line processing: unrecognised option '--blockSize'/HPX allows 'unknown' (to HPX) command line options by default if you use hpx_main.hpp. It does not allow that in the expanded use case.I'm doing some boost::program_options parsing in my (original) main() function. So does now HPX try to interpret my custom arguments in hpx::init?To combine your command line handling with HPX', do: int hpx_main(boost::program_options::variables_map& vm) { // do command line option analysis here int blocksize = vm["blockSize"].as<int>(); // ... return hpx::finalize(); } int main(int argc, char* argv[]) { // Configure application-specific options. boost::program_options::options_description desc_commandline; desc_commandline.add_options() ("blockSize", boost::program_options::value<int>()->default_value(1000), "...my block size...") // ... more options ; std::vector<std::string> const cfg = { "hpx.stacks.small_size=0x20000" }; return hpx::init(desc_commandline, argc, argv, cfg); } IOW, you need to move your command line option definitions into the 'C' main() function but leave the option analysis to hpx_main (note the changed interface of hpx_main()). HPX will do all the necessary command line parsing in between. HTH Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.eduBest, Tim On 09/01/2016 02:29 PM, Hartmut Kaiser wrote:Tim,thanks for the feedback! I solved the issue by increasing the stack size: /-Ihpx.stacks.small_size=0x20000 / So it was not TBB-related. Is it possible to increase the stack size programmatically?This should have the same effect: int main(int argc, char* argv[]) { std::vector<std::string> const cfg = { "hpx.stacks.small_size=0x20000" }; return hpx::init(argc, argv, cfg); } HTH Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.eduBest, Tim On 08/31/2016 06:06 PM, Hartmut Kaiser wrote:I'm trying to use an existing library based on Intel TBB in my HPX application, however when calling the library within a (single)tasktheapplication segfaults. Doing the same call in the HPX main()functiondoes work. Is this expected? Is there some technical conflict between HPX andTBB?Well, segfaults are never an expected thing ;) Generally, using TBB together with HPX is probably not a good ideaunless you make sure to control the core-affinities used by HPX andbyTBB. If you don't do that then both libraries will fight over thecores.This will cause for your application to expose horrible performance.What TBB facilities do you rely on? For the segfault - it's difficult to tell what's going on withoutseeingsome code. Could you provide us with a minimal self-containedreproducingexample?Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu _______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users<html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>Hi,</p> <p>thanks for the feedback! <br> </p> <p>I solved the issue by increasing the stack size: <i>- Ihpx.stacks.small_size=0x20000 <br> </i></p> <p>So it was not TBB-related.<br> </p> <p>Is it possible to increase the stack size programmatically?<br></p> <p>Best,</p> <p>Tim</p> <p><br> </p> <p><br> </p> <div class="moz-cite-prefix">On 08/31/2016 06:06 PM, HartmutKaiserwrote:<br> </div> <blockquote cite="mid:[email protected]" type="cite"> <pre wrap=""> </pre> <blockquote type="cite"> <pre wrap="">I'm trying to use an existing library based onIntelTBB in my HPX application, however when calling the library within a (single) tasktheapplication segfaults. Doing the same call in the HPX main() function does work. Is this expected? Is there some technical conflict between HPX andTBB?</pre> </blockquote> <pre wrap=""> Well, segfaults are never an expected thing ;) Generally, using TBB together with HPX is probably not a good ideaunlessyou make sure to control the core-affinities used by HPX and by TBB.Ifyou don't do that then both libraries will fight over the cores. Thiswillcause for your application to expose horrible performance. What TBB facilities do you rely on? For the segfault - it's difficult to tell what's going on withoutseeingsome code. Could you provide us with a minimal self-containedreproducingexample? Regards Hartmut --------------- <a class="moz-txt-link-freetext" href="http://boost- spirit.com">http://boost-spirit.com</a> <a class="moz-txt-link-freetext" href="http://stellar.cct.lsu.edu">http://stellar.cct.lsu.edu</a> _______________________________________________ hpx-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:hpx- [email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="https://mail.cct.lsu.edu/mailman/listinfo/hpx- users">https://mail.cct.lsu.edu/mailman/listinfo/hpx-users</a> </pre> </blockquote> <br> </body> </html><html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>Hello,</p> <p>thanks! Looks promising.</p> <p>So I did the following changes:<br> </p> <p>- Replaced <i>#include <hpx/hpx_main.hpp></i> by <i>#include <hpx/hpx_init.hpp></i></p> <p>- Renamed <i>int main(int argc, char* argv[])</i> to <i>int hpx_main(int argc, char* argv[])</i></p> <p><i>- </i>Added<i> return hpx::finalize(); </i>at end of hpx_main</p> <p>- Added your <i>int main(..)</i></p> <p><i><br> </i>But now I get the following output: <i>runtime_support::load_components: command line processing: unrecognised option '--blockSize'</i></p><p>I'm doing some boost::program_options parsing in my (original) main() function. <br> </p> <p>So does now HPX try to interpret my custom arguments in hpx::init?</p> <p>Best,</p> <p>Tim<br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <br> <div class="moz-cite-prefix">On 09/01/2016 02:29 PM, Hartmut Kaiser wrote:<br> </div> <blockquote cite="mid:[email protected]" type="cite"> <pre wrap="">Tim, </pre> <blockquote type="cite"> <pre wrap="">thanks for the feedback! I solved the issue by increasing the stack size: /-Ihpx.stacks.small_size=0x20000 / So it was not TBB-related. Is it possible to increase the stack size programmatically? </pre> </blockquote> <pre wrap=""> This should have the same effect: int main(int argc, char* argv[]) { std::vector<std::string> const cfg = { "hpx.stacks.small_size=0x20000" }; return hpx::init(argc, argv, cfg); } HTH Regards Hartmut --------------- <a class="moz-txt-link-freetext" href="http://boost- spirit.com">http://boost-spirit.com</a> <a class="moz-txt-link-freetext" href="http://stellar.cct.lsu.edu">http://stellar.cct.lsu.edu</a> </pre> <blockquote type="cite"> <pre wrap="">Best, Tim On 08/31/2016 06:06 PM, Hartmut Kaiser wrote: </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">I'm trying to use an existing library based on Intel TBB in my HPX application, however when calling the library within a (single) task </pre> </blockquote> </blockquote> <pre wrap="">the </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">application segfaults. Doing the same call intheHPX main() function does work. Is this expected? Is there some technical conflict between HPX and TBB? </pre> </blockquote> <pre wrap="">Well, segfaults are never an expected thing ;) Generally, using TBB together with HPX is probably not a good idea </pre> </blockquote> <pre wrap="">unless you make sure to control the core-affinities used by HPX and by TBB. If you don't do that then both libraries will fight over the cores. This will cause for your application to expose horrible performance. </pre> <blockquote type="cite"> <pre wrap=""> What TBB facilities do you rely on? For the segfault - it's difficult to tell what's going on without seeing </pre> </blockquote> <pre wrap="">some code. Could you provide us with a minimalself-contained reproducing example? </pre> <blockquote type="cite"> <pre wrap=""> Regards Hartmut --------------- <a class="moz-txt-link-freetext" href="http://boost- spirit.com">http://boost-spirit.com</a> <a class="moz-txt-link-freetext" href="http://stellar.cct.lsu.edu">http://stellar.cct.lsu.edu</a> _______________________________________________ hpx-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:hpx- [email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="https://mail.cct.lsu.edu/mailman/listinfo/hpx- users">https://mail.cct.lsu.edu/mailman/listinfo/hpx-users</a> </pre> </blockquote> <pre wrap=""> <html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>Hi,</p> <p>thanks for the feedback! <br> </p> <p>I solved the issue by increasing the stacksize: <i>-Ihpx.stacks.small_size=0x20000 <br> </i></p> <p>So it was not TBB-related.<br> </p> <p>Is it possible to increase the stack size programmatically? <br> </p> <p>Best,</p> <p>Tim</p> <p><br> </p> <p><br> </p> <div class="moz-cite-prefix">On 08/31/2016 06:06 PM, Hartmut Kaiser wrote:<br> </div> <blockquote cite=<a class="moz-txt-link-rfc2396E"href="mailto:mid:[email protected]">"mid:004001d20[email protected]"</a> type="cite"> <pre wrap=""> </pre> <blockquote type="cite"> <pre wrap="">I'm trying to use an existing library basedonIntel TBB in my HPX application, however when calling the library within a (single) task the application segfaults. Doing the same call in the HPX main() function does work. Is this expected? Is there some technical conflict between HPX and TBB? </pre> </blockquote> <pre wrap=""> Well, segfaults are never an expected thing ;) Generally, using TBB together with HPX is probably not a good ideaunlessyou make sure to control the core-affinities used by HPX and by TBB. If you don't do that then both libraries will fight over the cores. Thiswillcause for your application to expose horrible performance. What TBB facilities do you rely on? For the segfault - it's difficult to tell what's going on without seeing some code. Could you provide us with a minimal self-containedreproducingexample? Regards Hartmut --------------- <a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E"href="http://boost-spirit.com">"http://boost- spirit.com"</a>><a class="moz-txt-link-freetext" href="http://boost- spirit.com">http://boost-spirit.com</a></a> <a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E" href="http://stellar.cct.lsu.edu">"http://stellar.cct.lsu.edu"</a>><a class="moz-txt-link-freetext"href="http://stellar.cct.lsu.edu">http://stellar.cct.lsu.edu</a></a>_______________________________________________ hpx-users mailing list <a class="moz-txt-link-abbreviated" href=<a class="moz-txt-link- rfc2396E" href="mailto:[email protected]">"mailto:hpx- [email protected]"</a>><a class="moz-txt-link-abbreviated" href="mailto:[email protected]">hpx- [email protected]</a></a> <a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E" href="https://mail.cct.lsu.edu/mailman/listinfo/hpx- users">"https://mail.cct.lsu.edu/mailman/listinfo/hpx- users"</a>><a class="moz-txt-link-freetext" href="https://mail.cct.lsu.edu/mailman/listinfo/hpx- users">https://mail.cct.lsu.edu/mailman/listinfo/hpx-users</a></a> </pre> </blockquote> <br> </body> </html> </pre> </blockquote> <pre wrap=""> </pre> </blockquote> <br> </body> </html>
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
