|
|
$ mpic++ gaussian.cpp gaussian.cpp: In function ‘int main(int, char**)’: gaussian.cpp:28:12: error: aggregate ‘std::ifstream inFile’ has incomplete type and cannot be defined ifstream inFile; ^~~~~~ gaussian.cpp:40:34: error: reference to ‘rank’ is ambiguous MPI_Comm_rank(MPI_COMM_WORLD, &rank); ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:52:7: error: reference to ‘rank’ is ambiguous if(!rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:76:9: error: reference to ‘rank’ is ambiguous if(!rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:121:23: error: reference to ‘rank’ is ambiguous if(cur_control == rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:144:23: error: reference to ‘rank’ is ambiguous if(cur_control == rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:162:23: error: reference to ‘rank’ is ambiguous if(cur_control == rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank ^~~~ gaussian.cpp:196:7: error: reference to ‘rank’ is ambiguous if(!rank) ^~~~ gaussian.cpp:24:5: note: candidates are: int rank int rank, size; ^~~~ In file included from /usr/include/c++/7/bits/move.h:54:0, from /usr/include/c++/7/bits/nested_exception.h:40, from /usr/include/c++/7/exception:143, from /usr/include/c++/7/ios:39, from /usr/include/c++/7/ostream:38, from /usr/include/c++/7/iostream:39, from gaussian.cpp:8: /usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank struct rank |
#include <fstream>
using namespace std;
pollutes your naming, don't use it.
|
|
mpic++ gaussian.cpp gaussian.cpp:17:20: error: variable or field ‘sortByProcess’ declared void void sortByProcess(vector<double> list1, double* list2, int count); ^~~~~~ gaussian.cpp:17:20: error: ‘vector’ was not declared in this scope gaussian.cpp:17:20: note: suggested alternative: In file included from /usr/include/c++/7/vector:64:0, from gaussian.cpp:12: /usr/include/c++/7/bits/stl_vector.h:216:11: note: ‘std::vector’ class vector : protected _Vector_base<_Tp, _Alloc> ^~~~~~ gaussian.cpp:17:27: error: expected primary-expression before ‘double’ void sortByProcess(vector<double> list1, double* list2, int count); ^~~~~~ gaussian.cpp:17:42: error: expected primary-expression before ‘double’ void sortByProcess(vector<double> list1, double* list2, int count); ^~~~~~ gaussian.cpp:17:57: error: expected primary-expression before ‘int’ void sortByProcess(vector<double> list1, double* list2, int count); ^~~ gaussian.cpp: In function ‘int main(int, char**)’: gaussian.cpp:28:3: error: ‘ifstream’ was not declared in this scope ifstream inFile; ^~~~~~~~ gaussian.cpp:28:3: note: suggested alternative: In file included from /usr/include/c++/7/ios:38:0, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/fstream:38, from gaussian.cpp:8: /usr/include/c++/7/iosfwd:162:34: note: ‘std::ifstream’ typedef basic_ifstream<char> ifstream; ^~~~~~~~ gaussian.cpp:36:3: error: ‘vector’ was not declared in this scope vector<double> file_buffer; ^~~~~~ gaussian.cpp:36:3: note: suggested alternative: In file included from /usr/include/c++/7/vector:64:0, from gaussian.cpp:12: /usr/include/c++/7/bits/stl_vector.h:216:11: note: ‘std::vector’ class vector : protected _Vector_base<_Tp, _Alloc> ^~~~~~ gaussian.cpp:36:10: error: expected primary-expression before ‘double’ vector<double> file_buffer; ^~~~~~ gaussian.cpp:46:5: error: ‘cout’ was not declared in this scope cout << "No input file given." << endl; ^~~~ gaussian.cpp:46:5: note: suggested alternative: In file included from /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/cxx/mpicxx.h:55:0, from /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:2704, from gaussian.cpp:10: /usr/include/c++/7/iostream:61:18: note: ‘std::cout’ extern ostream cout; /// Linked to standard output ^~~~ gaussian.cpp:46:39: error: ‘endl’ was not declared in this scope cout << "No input file given." << endl; |
|
|
|
|
C:\test>"C:\Program Files\Microsoft MPI\bin"\mpiexec -n 16 try Processor 12 of 16 is alive Processor 7 of 16 is alive Processor 14 of 16 is alive Processor 10 of 16 is alive Processor 9 of 16 is alive Processor 1 of 16 is alive Processor 13 of 16 is alive Processor 3 of 16 is alive Processor 8 of 16 is alive Processor 5 of 16 is alive Processor 0 of 16 is alive Processor 11 of 16 is alive Processor 6 of 16 is alive Processor 4 of 16 is alive Processor 15 of 16 is alive Processor 2 of 16 is alive |
|
|