Works great! Thanks for your support! Best,
Tim On 09/01/2016 10:41 PM, Hartmut Kaiser wrote:
Tim,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_parse r(argc, argv).options(allOptionDescriptions)*.positional(positionalOptionsDescript ion)*.run(), vm);/You don't need that. Simply access the "hpx:positional" command line option (of type vector<string>) which will give you all positional arguments. I added a new example demonstrating this here: https://github.com/STEllAR-GROUP/hpx/blob/master/examples/quickstart/command _line_handling.cpp. HTH Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.eduIs 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(intargc,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 youusehpx_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 sizeprogrammatically?<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> <blockquotecite="mid:[email protected]"type="cite"> <pre wrap=""> </pre> <blockquote type="cite"> <pre wrap="">I'm trying to use an existing library basedonIntelTBB 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?</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, HartmutKaiserwrote:<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 basedonIntel 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 callintheHPX 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 idea </pre> </blockquote> <pre wrap="">unless you make sure to control the core-affinitiesused by HPX and by TBB. If you don't do that then both libraries will fight over thecores.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 withoutseeing</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 sizeprogrammatically?<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,HartmutKaiser 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 librarybasedonIntel TBB 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=<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>><aclass="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><html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <p>Thank you! It's almost working again as before.</p> <p>Only I was also using positional options (boost::program_options::positional_options_description) <br> </p> <p>in addition to the normal options. <br> </p> <p><br> </p> <p>So filling the variable map looked like this:</p> <p><i>boost::program_options::variables_map vm;</i><i><br> </i><i>boost::program_options::store(boost::program_options::command _line_parser(argc, argv).options(allOptionDescriptions)<b>.positional(positionalOptio nsDescription)</b>.run(), vm);</i></p> <p><br> </p> <p>Is it also possible to forward a positional options description?</p> <p>Best,</p> <p>Tim<br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <br> <div class="moz-cite-prefix">On 09/01/2016 03:21 PM, Hartmut Kaiser wrote:<br> </div> <blockquote cite="mid:[email protected]" type="cite"> <pre wrap="">Resending to hpx-users... 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"> <blockquote type="cite"> <pre wrap="">thanks! 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(..)/ / </pre> </blockquote> <pre wrap=""> Yes, sorry. I should have mentioned that. </pre> <blockquote type="cite"> <pre wrap="">/But now I get the following output: /runtime_support::load_components: command line processing: unrecognised option '--blockSize'/ </pre> </blockquote> <pre wrap=""> 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. </pre> <blockquote type="cite"> <pre wrap="">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? </pre> </blockquote> <pre wrap=""> 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 --------------- <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 09/01/2016 02:29 PM, Hartmut Kaiser wrote: </pre> <blockquote 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) </pre> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <pre wrap="">task </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">the </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">application segfaults. Doing the same call in the HPX main() </pre> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <pre wrap="">function </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">does work. Is this expected? Is there some technical conflict between HPX and </pre> </blockquote> </blockquote> </blockquote> </blockquote> <pre wrap="">TBB? </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <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 </pre> </blockquote> </blockquote> </blockquote> <pre wrap="">by </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">TBB. If you don't do that then both libraries will fight over the </pre> </blockquote> </blockquote> <pre wrap="">cores. </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">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 </pre> </blockquote> </blockquote> </blockquote> <pre wrap="">seeing </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">some code. Could you provide us with a minimal self-contained </pre> </blockquote> </blockquote> <pre wrap="">reproducing </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">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 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? </pre> </blockquote> </blockquote> <pre wrap=""><br> </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap=""> </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 </pre> </blockquote> </blockquote> <pre wrap="">Kaiser </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap=""> 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 based on </pre> </blockquote> </blockquote> <pre wrap="">Intel </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">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 in the HPX main() function does work. Is this expected? Is there some technical conflict between HPX and </pre> </blockquote> </blockquote> </blockquote> <pre wrap="">TBB? </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap=""></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> </blockquote> <pre wrap="">unless </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">you make sure to control the core-affinities used by HPX and by TBB. </pre> </blockquote> </blockquote> </blockquote> <pre wrap="">If </pre> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">you don't do that then both libraries will fight over the cores. This </pre> </blockquote> </blockquote> <pre wrap="">will </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">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 without </pre> </blockquote> </blockquote> <pre wrap="">seeing </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">some code. Could you provide us with a minimal self-contained </pre> </blockquote> </blockquote> <pre wrap="">reproducing </pre> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">example? 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> <pre wrap=""> <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 &lt;hpx/hpx_main.hpp&gt;</i> by <i>#include &lt;hpx/hpx_init.hpp&gt;</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 '-- </pre> </blockquote> <pre wrap="">blockSize'</i></p> </pre> <blockquote type="cite"> <pre wrap=""> <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=<a class="moz-txt-link-rfc2396E" href="mailto:mid:[email protected]">"mid:001c01d20 [email protected]"</a> 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&lt;std::string&gt; const cfg = { "hpx.stacks.small_size=0x20000" }; return hpx::init(argc, argv, cfg); } HTH 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> </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 in </pre> </blockquote> <pre wrap="">the </pre> <blockquote type="cite"> <pre wrap="">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 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 minimal </pre> </blockquote> <pre wrap="">self- </pre> <blockquote type="cite"> <pre wrap="">contained reproducing example? </pre> <blockquote type="cite"> <pre wrap=""> 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> <pre wrap=""> &lt;html&gt; &lt;head&gt; &lt;meta content="text/html; charset=windows-1252" http-equiv="Content-Type"&gt; &lt;/head&gt; &lt;body bgcolor="#FFFFFF" text="#000000"&gt; &lt;p&gt;Hi,&lt;/p&gt; &lt;p&gt;thanks for the feedback! &lt;br&gt; &lt;/p&gt; &lt;p&gt;I solved the issue by increasing the stack </pre> </blockquote> <pre wrap="">size: &lt;i&gt;- </pre> <blockquote type="cite"> <pre wrap="">Ihpx.stacks.small_size=0x20000 &lt;br&gt; &lt;/i&gt;&lt;/p&gt; &lt;p&gt;So it was not TBB-related.&lt;br&gt; &lt;/p&gt; &lt;p&gt;Is it possible to increase the stack size programmatically? &lt;br&gt; &lt;/p&gt; &lt;p&gt;Best,&lt;/p&gt; &lt;p&gt;Tim&lt;/p&gt; &lt;p&gt;&lt;br&gt; &lt;/p&gt; &lt;p&gt;&lt;br&gt; &lt;/p&gt; &lt;div class="moz-cite-prefix"&gt;On 08/31/2016 06:06 PM, Hartmut Kaiser wrote:&lt;br&gt; &lt;/div&gt; &lt;blockquote cite=<a class="moz-txt-link-rfc2396E" </pre> </blockquote> <pre wrap="">href=<a class="moz-txt-link-rfc2396E" href="mailto:mid:[email protected]">"mailto:mid:00 [email protected]"</a>>"mid:004001d20 </pre> <blockquote type="cite"> <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:[email protected]">3a1$a2809740$e781c5c0$@gmai l.com</a>"</a> type="cite"&gt; &lt;pre wrap=""&gt; &lt;/pre&gt; &lt;blockquote type="cite"&gt; &lt;pre wrap=""&gt;I'm trying to use an existing library based </pre> </blockquote> <pre wrap="">on </pre> <blockquote type="cite"> <pre wrap="">Intel 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? &lt;/pre&gt; &lt;/blockquote&gt; &lt;pre wrap=""&gt; Well, segfaults are never an expected thing ;) Generally, using TBB together with HPX is probably not a good idea </pre> </blockquote> <pre wrap="">unless </pre> <blockquote type="cite"> <pre wrap="">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 </pre> </blockquote> <pre wrap="">will </pre> <blockquote type="cite"> <pre wrap="">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 without seeing some code. Could you provide us with a minimal self-contained </pre> </blockquote> <pre wrap="">reproducing </pre> <blockquote type="cite"> <pre wrap="">example? Regards Hartmut --------------- &lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link- </pre> </blockquote> <pre wrap="">rfc2396E" </pre> <blockquote type="cite"> <pre wrap="">href=<a class="moz-txt-link-rfc2396E" href="http://boost-spirit.com">"http://boost-spirit.com"</a>><a class="moz-txt-link-rfc2396E" href="http://boost- spirit.com">"http://boost- spirit.com"</a></a>&gt;<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>&lt;/a&gt; &lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E" href=<a class="moz-txt-link-rfc2396E" href="http://stellar.cct.lsu.edu">"http://stellar.cct.lsu.edu"</a>><a class="moz-txt-link-rfc2396E" href="http://stellar.cct.lsu.edu">"http://stellar.cct.lsu.edu"</a></a&g t;&gt;<a class="moz-txt-link-freetext" </pre> </blockquote> <pre wrap="">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> &lt;/a&gt; </pre> <blockquote type="cite"> <pre wrap="">_______________________________________________ hpx-users mailing list &lt;a class="moz-txt-link-abbreviated" href=<a class="moz-txt-link- rfc2396E" href=<a class="moz-txt-link-rfc2396E" href="mailto:hpx- [email protected]">"mailto:hpx- [email protected]"</a>><a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">"mailto:hpx- [email protected]"</a></a>&gt;<a class="moz-txt-link- abbreviated" href=<a class="moz-txt-link-rfc2396E" href="mailto:hpx- [email protected]">"mailto:hpx- [email protected]"</a>>hpx- <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a></ a>&lt;/a&gt; &lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E" 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-rfc2396E" href="https://mail.cct.lsu.edu/mailman/listinfo/hpx- users">"https://mail.cct.lsu.edu/mailman/listinfo/hpx- users"</a></a>&gt;<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>&lt;/a&gt; &lt;/pre&gt; &lt;/blockquote&gt; &lt;br&gt; &lt;/body&gt; &lt;/html&gt; </pre> </blockquote> <pre wrap=""> </pre> </blockquote> <br> </body> </html> </pre> </blockquote> </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
