Changes between Version 30 and Version 31 of MpiKernels

Show
Ignore:
Timestamp:
02/28/12 18:36:29 (13 years ago)
Author:
mmamonski
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MpiKernels

    v30 v31  
    132132 
    133133== MPI Kernels as standalone executables == 
    134 The other approach is to run MUSCLE as separate API 
     134The other approach is to run MUSCLE as separate processes. The MUSCLE provide two base kernel classes: `NativeKernel` and `MPIKernel` that can be used to run application code as separate process. The process can comunicate with the library (and other kernels) via  a new C/C++ MUSCLE API: 
     135{{{ 
     136                muscle::env::init(); 
     137 
     138                cout << "c++: begin "<< argv[0] <<endl; 
     139                cout << "Kernel Name: " << muscle::cxa::kernel_name() << endl; 
     140 
     141                for(int time = 0; !muscle::env::will_stop(); time ++) { 
     142                                                                 
     143                        // process data 
     144                        for(int i = 0; i < 5; i++) { 
     145                                dataA[i] = i; 
     146                        } 
     147                                                 
     148                        // dump to our portals 
     149                        muscle::env::send("data", dataA, 5, MUSCLE_DOUBLE); 
     150                } 
     151 
     152                muscle::env::finalize(); 
     153}}} 
    135154=== Sources  === 
    136155* LHC2.cxa