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.edu


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.edu


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(..)/
/
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.edu


Best,
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.edu


Best,
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)
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?
Well, segfaults are never an expected thing ;)

Generally, using TBB together with HPX is probably not a good idea
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.
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
reproducing
example?
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, Hartmut
Kaiser
           wrote:<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
on
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?
</pre>
           </blockquote>
           <pre wrap="">
Well, segfaults are never an expected thing ;)
Generally, using TBB together with HPX is probably not a good idea
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.
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
reproducing
example?
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
&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 '--
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&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="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
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 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
self-
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="">
&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
size:  &lt;i&gt;-
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"

href="mailto:mid:[email protected]";>"mid:004001d20
[email protected]"</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
on
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
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.
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
reproducing
example?
Regards Hartmut
---------------
&lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-
rfc2396E"
href="http://boost-spirit.com";>"http://boost-
spirit.com"</a>&gt;<a class="moz-txt-link-freetext"
href="http://boost-
spirit.com">http://boost-spirit.com</a>&lt;/a&gt;
&lt;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>&gt;<a
class="moz-txt-link-freetext"

href="http://stellar.cct.lsu.edu";>http://stellar.cct.lsu.edu</a>&lt;/a&gt;
_______________________________________________
hpx-users mailing list
&lt;a class="moz-txt-link-abbreviated" href=<a class="moz-txt-link-
rfc2396E" href="mailto:[email protected]";>"mailto:hpx-
[email protected]"</a>&gt;<a class="moz-txt-link-abbreviated"
href="mailto:[email protected]";>hpx-
[email protected]</a>&lt;/a&gt;
&lt;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>&gt;<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>&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>
<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 &lt;hpx/hpx_main.hpp&gt;/   by /#include
&lt;hpx/hpx_init.hpp&gt;/
- 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&amp; vm)
{
     // do command line option analysis here
     int blocksize = vm["blockSize"].as&lt;int&gt;();
     // ...
     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&lt;int&gt;()-
&gt;default_value(1000),
          "...my block size...")
         // ... more options
     ;
     std::vector&lt;std::string&gt; 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&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="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="">&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
size:  &lt;i&gt;-
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?
</pre>
             </blockquote>
           </blockquote>
           <pre wrap="">&lt;br&gt;
</pre>
           <blockquote type="cite">
             <blockquote type="cite">
               <pre wrap="">      &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
</pre>
             </blockquote>
           </blockquote>
           <pre wrap="">Kaiser
</pre>
           <blockquote type="cite">
             <blockquote type="cite">
               <pre wrap="">        wrote:&lt;br&gt;
       &lt;/div&gt;
       &lt;blockquote cite=<a class="moz-txt-link-rfc2396E"
href="mailto:mid:[email protected]";>"mid:004001d20
[email protected]"</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
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="">&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>
           </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
---------------
&lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E"
href="http://boost-spirit.com";>"http://boost-
spirit.com"</a>&gt;<a class="moz-txt-link-freetext" href="http://boost-
spirit.com">http://boost-spirit.com</a>&lt;/a&gt;
&lt;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>&gt;<a
class="moz-txt-link-freetext"
href="http://stellar.cct.lsu.edu";>http://stellar.cct.lsu.edu</a>&lt;/a&gt;
_______________________________________________
hpx-users mailing list
&lt;a class="moz-txt-link-abbreviated" href=<a class="moz-txt-link-
rfc2396E" href="mailto:[email protected]";>"mailto:hpx-
[email protected]"</a>&gt;<a class="moz-txt-link-abbreviated"
href="mailto:[email protected]";>hpx-
[email protected]</a>&lt;/a&gt;
&lt;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>&gt;<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>&lt;/a&gt;
&lt;/pre&gt;
       &lt;/blockquote&gt;
       &lt;br&gt;
     &lt;/body&gt;
&lt;/html&gt;
</pre>
             </blockquote>
             <pre wrap="">
</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;Hello,&lt;/p&gt;
     &lt;p&gt;thanks! Looks promising.&lt;/p&gt;
     &lt;p&gt;So I did the following changes:&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;- Replaced &lt;i&gt;#include
&amp;lt;hpx/hpx_main.hpp&amp;gt;&lt;/i&gt;   by   &lt;i&gt;#include
         &amp;lt;hpx/hpx_init.hpp&amp;gt;&lt;/i&gt;&lt;/p&gt;
     &lt;p&gt;- Renamed &lt;i&gt;int main(int argc, char* argv[])&lt;/i&gt;
to &lt;i&gt;int
         hpx_main(int argc, char* argv[])&lt;/i&gt;&lt;/p&gt;
     &lt;p&gt;&lt;i&gt;- &lt;/i&gt;Added&lt;i&gt; return hpx::finalize();
&lt;/i&gt;at end of
       hpx_main&lt;/p&gt;
     &lt;p&gt;- Added your &lt;i&gt;int main(..)&lt;/i&gt;&lt;/p&gt;
     &lt;p&gt;&lt;i&gt;&lt;br&gt;
       &lt;/i&gt;But now I get the following
output:     &lt;i&gt;runtime_support::load_components:
         command line processing: unrecognised option '--
</pre>
         </blockquote>
         <pre wrap="">blockSize'&lt;/i&gt;&lt;/p&gt;
</pre>
         <blockquote type="cite">
           <pre wrap="">    &lt;p&gt;I'm doing some boost::program_options
parsing in my (original)
       main() function.  &lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;So does now HPX try to interpret my custom arguments in
       hpx::init?&lt;/p&gt;
     &lt;p&gt;Best,&lt;/p&gt;
     &lt;p&gt;Tim&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;&lt;br&gt;
     &lt;/p&gt;
     &lt;p&gt;&lt;br&gt;
     &lt;/p&gt;
     &lt;br&gt;
     &lt;div class="moz-cite-prefix"&gt;On 09/01/2016 02:29 PM, Hartmut
Kaiser
       wrote:&lt;br&gt;
     &lt;/div&gt;
     &lt;blockquote cite=<a class="moz-txt-link-rfc2396E"
href="mailto:mid:[email protected]";>"mid:001c01d20
[email protected]"</a>
       type="cite"&gt;
       &lt;pre wrap=""&gt;Tim,
&lt;/pre&gt;
       &lt;blockquote type="cite"&gt;
         &lt;pre wrap=""&gt;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?
&lt;/pre&gt;
       &lt;/blockquote&gt;
       &lt;pre wrap=""&gt;
This should have the same effect:
int main(int argc, char* argv[])
{
     std::vector&amp;lt;std::string&amp;gt; const cfg =
     {
         "hpx.stacks.small_size=0x20000"
     };
     return hpx::init(argc, argv, cfg);
}
HTH
Regards Hartmut
---------------
&lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E"
href="http://boost-spirit.com";>"http://boost-
spirit.com"</a>&gt;<a class="moz-txt-link-freetext" href="http://boost-
spirit.com">http://boost-spirit.com</a>&lt;/a&gt;
&lt;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>&gt;<a
class="moz-txt-link-freetext"
href="http://stellar.cct.lsu.edu";>http://stellar.cct.lsu.edu</a>&lt;/a&gt;
&lt;/pre&gt;
       &lt;blockquote type="cite"&gt;
         &lt;pre wrap=""&gt;Best,
Tim
On 08/31/2016 06:06 PM, Hartmut Kaiser wrote:
&lt;/pre&gt;
         &lt;blockquote type="cite"&gt;
           &lt;blockquote type="cite"&gt;
             &lt;pre wrap=""&gt;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
&lt;/pre&gt;
           &lt;/blockquote&gt;
         &lt;/blockquote&gt;
         &lt;pre wrap=""&gt;the
&lt;/pre&gt;
         &lt;blockquote type="cite"&gt;
           &lt;blockquote type="cite"&gt;
             &lt;pre wrap=""&gt;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?
&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
&lt;/pre&gt;
         &lt;/blockquote&gt;
         &lt;pre wrap=""&gt;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.
&lt;/pre&gt;
         &lt;blockquote type="cite"&gt;
           &lt;pre wrap=""&gt;
What TBB facilities do you rely on?
For the segfault - it's difficult to tell what's going on without seeing
&lt;/pre&gt;
         &lt;/blockquote&gt;
         &lt;pre wrap=""&gt;some code. Could you provide us with a minimal
</pre>
         </blockquote>
         <pre wrap="">self-
</pre>
         <blockquote type="cite">
           <pre wrap="">contained reproducing
example?
&lt;/pre&gt;
         &lt;blockquote type="cite"&gt;
           &lt;pre wrap=""&gt;
Regards Hartmut
---------------
&lt;a class="moz-txt-link-freetext" href=<a class="moz-txt-link-rfc2396E"
href="http://boost-spirit.com";>"http://boost-
spirit.com"</a>&gt;<a class="moz-txt-link-freetext" href="http://boost-
spirit.com">http://boost-spirit.com</a>&lt;/a&gt;
&lt;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>&gt;<a
class="moz-txt-link-freetext"
href="http://stellar.cct.lsu.edu";>http://stellar.cct.lsu.edu</a>&lt;/a&gt;
_______________________________________________
hpx-users mailing list
&lt;a class="moz-txt-link-abbreviated" href=<a class="moz-txt-link-
rfc2396E" href="mailto:[email protected]";>"mailto:hpx-
[email protected]"</a>&gt;<a class="moz-txt-link-abbreviated"
href="mailto:[email protected]";>hpx-
[email protected]</a>&lt;/a&gt;
&lt;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>&gt;<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>&lt;/a&gt;
&lt;/pre&gt;
         &lt;/blockquote&gt;
         &lt;pre wrap=""&gt;
&amp;lt;html&amp;gt;
   &amp;lt;head&amp;gt;
     &amp;lt;meta content="text/html; charset=windows-1252"
       http-equiv="Content-Type"&amp;gt;
   &amp;lt;/head&amp;gt;
   &amp;lt;body bgcolor="#FFFFFF" text="#000000"&amp;gt;
     &amp;lt;p&amp;gt;Hi,&amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;thanks for the feedback!  &amp;lt;br&amp;gt;
     &amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;I solved the issue by increasing the stack
</pre>
         </blockquote>
         <pre wrap="">size:  &amp;lt;i&amp;gt;-
</pre>
         <blockquote type="cite">
           <pre wrap="">Ihpx.stacks.small_size=0x20000
         &amp;lt;br&amp;gt;
       &amp;lt;/i&amp;gt;&amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;So it was not TBB-related.&amp;lt;br&amp;gt;
     &amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;Is it possible to increase the stack size
programmatically?
&amp;lt;br&amp;gt;
     &amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;Best,&amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;Tim&amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;&amp;lt;br&amp;gt;
     &amp;lt;/p&amp;gt;
     &amp;lt;p&amp;gt;&amp;lt;br&amp;gt;
     &amp;lt;/p&amp;gt;
     &amp;lt;div class="moz-cite-prefix"&amp;gt;On 08/31/2016 06:06 PM,
Hartmut
Kaiser
       wrote:&amp;lt;br&amp;gt;
     &amp;lt;/div&amp;gt;
     &amp;lt;blockquote cite=&lt;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>&gt;"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>"&lt;/a&gt;
       type="cite"&amp;gt;
       &amp;lt;pre wrap=""&amp;gt;
&amp;lt;/pre&amp;gt;
       &amp;lt;blockquote type="cite"&amp;gt;
         &amp;lt;pre wrap=""&amp;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?
&amp;lt;/pre&amp;gt;
       &amp;lt;/blockquote&amp;gt;
       &amp;lt;pre wrap=""&amp;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
---------------
&amp;lt;a class="moz-txt-link-freetext" href=&lt;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>&gt;<a
class="moz-txt-link-rfc2396E" href="http://boost-
spirit.com">"http://boost-
spirit.com"</a>&lt;/a&gt;&amp;gt;&lt;a class="moz-txt-link-freetext"
href=<a class="moz-txt-link-rfc2396E" href="http://boost-
spirit.com">"http://boost-
spirit.com"</a>&gt;<a class="moz-txt-link-freetext" href="http://boost-
spirit.com">http://boost-spirit.com</a>&lt;/a&gt;&amp;lt;/a&amp;gt;
&amp;lt;a class="moz-txt-link-freetext"
href=&lt;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>&gt;<a
class="moz-txt-link-rfc2396E"
href="http://stellar.cct.lsu.edu";>"http://stellar.cct.lsu.edu";</a>&lt;/a&g
t;&amp;gt;&lt;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>&gt;<a
class="moz-txt-link-freetext"
href="http://stellar.cct.lsu.edu";>http://stellar.cct.lsu.edu</a>&lt;/a&gt;
&amp;lt;/a&amp;gt;
</pre>
         <blockquote type="cite">
           <pre wrap="">_______________________________________________
hpx-users mailing list
&amp;lt;a class="moz-txt-link-abbreviated" href=&lt;a class="moz-txt-link-
rfc2396E" href=<a class="moz-txt-link-rfc2396E" href="mailto:hpx-
[email protected]">"mailto:hpx-
[email protected]"</a>&gt;<a class="moz-txt-link-rfc2396E"
href="mailto:[email protected]";>"mailto:hpx-
[email protected]"</a>&lt;/a&gt;&amp;gt;&lt;a class="moz-txt-link-
abbreviated"
href=<a class="moz-txt-link-rfc2396E" href="mailto:hpx-
[email protected]">"mailto:hpx-
[email protected]"</a>&gt;hpx-
<a class="moz-txt-link-abbreviated"
href="mailto:[email protected]";>[email protected]</a>&lt;/
a&gt;&amp;lt;/a&amp;gt;
&amp;lt;a class="moz-txt-link-freetext"
href=&lt;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>&gt;<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>&lt;/a&gt;&amp;gt;&lt;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>&gt;<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>&lt;/a&gt;&amp;lt;/a&amp;gt;
&amp;lt;/pre&amp;gt;
     &amp;lt;/blockquote&amp;gt;
     &amp;lt;br&amp;gt;
   &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
       &lt;/blockquote&gt;
       &lt;pre wrap=""&gt;
&lt;/pre&gt;
     &lt;/blockquote&gt;
     &lt;br&gt;
   &lt;/body&gt;
&lt;/html&gt;
</pre>
         </blockquote>
       </blockquote>
       <pre wrap="">
</pre>
     </blockquote>
     <br>
   </body>
</html>



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to