| 1 |
/* |
| 2 |
* This file is part of MUSIC. |
| 3 |
* Copyright (C) 2012, 2022 INCF |
| 4 |
* |
| 5 |
* MUSIC is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 3 of the License, or |
| 8 |
* (at your option) any later version. |
| 9 |
* |
| 10 |
* MUSIC is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include <music.hh> |
| 20 |
|
| 21 |
#include <iostream> |
| 22 |
|
| 23 |
int |
| 24 |
main (int argc, char *argv[]) |
| 25 |
{ |
| 26 |
MUSIC::Setup* musicSetup = new MUSIC::Setup (argc, argv); |
| 27 |
MPI_Comm comm = musicSetup->communicator (); |
| 28 |
int rank = MUSIC::mpi_get_rank (comm); |
| 29 |
double param; |
| 30 |
if (!musicSetup->config ("param", ¶m)) |
| 31 |
param = -1.0; |
| 32 |
std::cout << "rank=" << rank << ":param=" << param; |
| 33 |
for (int i = 0; i < argc; ++i) |
| 34 |
std::cout << ':' << argv[i]; |
| 35 |
std::cout << std::endl; |
| 36 |
MPI_Finalize (); |
| 37 |
return 0; |
| 38 |
} |