~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to skit/ptst2/polymorphic_array_mpi_io_tst.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
using namespace std;
33
33
 
34
34
int main(int argc, char**argv) {
35
 
    environment parallel (argc, argv);
 
35
    environment distributed (argc, argv);
36
36
    mpi::communicator comm;
37
37
    string head;
38
38
    size_t n;
39
 
    pcin >> head >> n;
 
39
    dcin >> head >> n;
40
40
    warning_macro ("read: n="<<n);
41
41
    // all on proc=0:
42
42
    distributor ownership (n, comm, (comm.rank()==0) ? n : 0);
43
43
    typedef polymorphic_traits<geo_element>::derived_type derived_type;
44
44
    const size_t n_derived = polymorphic_traits<geo_element>::n_derived;
45
45
    polymorphic_array_mpi_rep <geo_element, derived_type, n_derived>   elts (ownership);
46
 
    elts.get (pcin);
47
 
    pcout << "geo " << elts.par_size() << endl;
48
 
    elts.put (pcout);
 
46
    elts.get_values (dcin);
 
47
    dcout << "geo " << elts.dis_size() << endl;
 
48
    elts.put_values (dcout);
49
49
}
50
50
#endif // _RHEOLEF_HAVE_MPI