MPI: Difference between revisions

409 bytes added ,  7 years ago
Line 99: Line 99:
<source lang="c">
<source lang="c">
  int MPI_Init(int *argc, char **argv[]);
  int MPI_Init(int *argc, char **argv[]);
</source>
</tab>
<tab name="Boost (C++)">
<source lang="cpp">
boost::mpi::environment(int &, char **&, bool = true);
</source>
</source>
</tab>
</tab>
Line 118: Line 123:
  int MPI_Finalize(void);
  int MPI_Finalize(void);
</source>
</source>
</tab>
<tab name="C++">
Nothing needed
</tab>
</tab>
<tab name="Fortran">
<tab name="Fortran">
Line 147: Line 155:
     MPI_Finalize();
     MPI_Finalize();
     return(0);
     return(0);
}
}}
</tab>
<tab name="C++">
{{File
  |name=phello0.cpp
  |lang="cpp"
  |contents=
#include <iostream>
#include <boost/mpi.h>
int main(int argc, char *argv[])
{
    mpi::environment env(argc, argv);
    cout << "Hello, world!" << endl;
    return 0;
}
}
}}
}}
Bureaucrats, cc_docs_admin, cc_staff, rsnt_translations
2,837

edits