From BCassanova at weather.com Thu Mar 4 17:07:20 2010 From: BCassanova at weather.com (Cassanova, Bill) Date: Thu, 4 Mar 2010 12:07:20 -0500 Subject: Number of Processes General Question Message-ID: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48B18@ATLMAIL01.corp.weather.com> Hi folks, Just wondering why would vsipl++ report a different number of processors than sysconf? The Program: int main(int argc, char **argv) { vsipl init(argc, argv); std::cout << "num_processors as reported by vsipl++: " << num_processors() << std::endl; std::cout << "num_processors as reported by sysconf( _SC_NPROCESSORS_CONF ): " << sysconf(_SC_NPROCESSORS_CONF) << std::endl; return(0); } The Result: num_processors as reported by vsipl++: 1 num_processors as reported by sysconf( _SC_NPROCESSORS_CONF ): 8 Do I need to necessarily run a vsipl++ program using mpirun, i.e: "mpirun -np${num_processors} ./vsipl_tester" In order for vsipl++ to recognize that there are multiple processors installed on the machine? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at codesourcery.com Thu Mar 4 17:29:20 2010 From: stefan at codesourcery.com (Stefan Seefeld) Date: Thu, 04 Mar 2010 12:29:20 -0500 Subject: [vsipl++] Number of Processes General Question In-Reply-To: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48B18@ATLMAIL01.corp.weather.com> References: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48B18@ATLMAIL01.corp.weather.com> Message-ID: <4B8FEDF0.2070409@codesourcery.com> Bill, On 03/04/2010 12:07 PM, Cassanova, Bill wrote: > Hi folks, > > Just wondering why would vsipl++ report a different number of processors > than sysconf? This is because they have different notions of what a "processor" is. One uses it for a piece of hardware, the other for an MPI-enabled process that participates in a parallel computation. > Do I need to necessarily run a vsipl++ program using mpirun, i.e: > > ?mpirun ?np${num_processors} ./vsipl_tester? > > In order for vsipl++ to recognize that there are multiple processors > installed on the machine? Yes. Or more specifically, Sourcery VSIPL++ still won't recognize the number of CPUs or cores. It will report the number of processes started via `mpirun`, which is the number of processes potentially participating in the computations of your program. Regards, Stefan -- Stefan Seefeld CodeSourcery stefan at codesourcery.com (650) 331-3385 x718 From BCassanova at weather.com Thu Mar 4 18:45:28 2010 From: BCassanova at weather.com (Cassanova, Bill) Date: Thu, 4 Mar 2010 13:45:28 -0500 Subject: [vsipl++] Number of Processes General Question In-Reply-To: <4B8FEDF0.2070409@codesourcery.com> References: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48B18@ATLMAIL01.corp.weather.com> <4B8FEDF0.2070409@codesourcery.com> Message-ID: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48BC8@ATLMAIL01.corp.weather.com> Thanks for the reply. So, reading between the lines here...VSIP++, via openMIP mechanisms, takes care of MPI intricacies. -----Original Message----- From: Stefan Seefeld [mailto:stefan at codesourcery.com] Sent: Thursday, March 04, 2010 12:29 PM To: vsipl++ at codesourcery.com Subject: Re: [vsipl++] Number of Processes General Question Bill, On 03/04/2010 12:07 PM, Cassanova, Bill wrote: > Hi folks, > > Just wondering why would vsipl++ report a different number of processors > than sysconf? This is because they have different notions of what a "processor" is. One uses it for a piece of hardware, the other for an MPI-enabled process that participates in a parallel computation. > Do I need to necessarily run a vsipl++ program using mpirun, i.e: > > "mpirun -np${num_processors} ./vsipl_tester" > > In order for vsipl++ to recognize that there are multiple processors > installed on the machine? Yes. Or more specifically, Sourcery VSIPL++ still won't recognize the number of CPUs or cores. It will report the number of processes started via `mpirun`, which is the number of processes potentially participating in the computations of your program. Regards, Stefan -- Stefan Seefeld CodeSourcery stefan at codesourcery.com (650) 331-3385 x718 From stefan at codesourcery.com Thu Mar 4 18:50:29 2010 From: stefan at codesourcery.com (Stefan Seefeld) Date: Thu, 04 Mar 2010 13:50:29 -0500 Subject: [vsipl++] Number of Processes General Question In-Reply-To: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48BC8@ATLMAIL01.corp.weather.com> References: <1D5F4E64B8C04F4C868B94AC9A532AF80CB48B18@ATLMAIL01.corp.weather.com> <4B8FEDF0.2070409@codesourcery.com> <1D5F4E64B8C04F4C868B94AC9A532AF80CB48BC8@ATLMAIL01.corp.weather.com> Message-ID: <4B9000F5.3060903@codesourcery.com> On 03/04/2010 01:45 PM, Cassanova, Bill wrote: > Thanks for the reply. So, reading between the lines here...VSIP++, via > openMIP mechanisms, takes care of MPI intricacies. Yes, that's right. Stefan -- Stefan Seefeld CodeSourcery stefan at codesourcery.com (650) 331-3385 x718