.TH "environment" 2rheolef "Version 7.2" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME environment \- initialization of distributed computations (rheolef-7\&.2) .SH "DESCRIPTION" .PP This class is mainly used to initialize the MPI library: it should be called juste after the \fCmain(argc,argv)\fP declaration: .PP .nf #include 'rheolef\&.h' using namespace rheolef; int main (int argc, char**argv) { environment rheolef (argc, argv); \&.\&.\&. } .fi .PP An optional third argument of the \fCenvironment\fP constructor allows one to set the MPI thread feature\&. By default, its value is \fCMPI_THREAD_MULTIPLE\fP, as defined in \fCmpi\&.h\fP\&. Other possible values are related to MPI multi-threaded: see the MPI documentation for more details\&. .PP When compiling in a non-distributed \fBconfiguration\fP of the Rheolef library, this is a do-nothing class\&. .SH "NOTE" .PP The interface of this class is inspirated from the \fCboost::mpi::environment\fP class\&. Instead of the \fCboost\fP implementation that calls \fCMPI_Init()\fP, here this class calls \fCMPI_Init_thread()\fP instead\&. This extension allows one to support the \fCscotch\fP library when it has been compiled with the threads feature\&. .SH "IMPLEMENTATION" .PP This documentation has been generated from file linalg/lib/environment\&.h .PP .PP .nf class environment { public: environment (int& argc, char**& argv, const environment_option_type& opt = environment_option_type()); ~environment(); .fi .PP .PP .nf }; .fi .PP .PP .nf struct environment_option_type { static const int no_thread = 100; .fi .PP .PP .nf static const int default_thread = MPI_THREAD_MULTIPLE; .fi .PP .PP .nf environment_option_type() : thread_level (default_thread) {} int thread_level ; }; .fi .PP .SH AUTHOR Pierre Saramito .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.