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


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