Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function #2

Open
njzjz opened this issue Dec 1, 2023 · 1 comment

Comments

@njzjz
Copy link

njzjz commented Dec 1, 2023

See conda-forge/abacus-feedstock#16 (comment)

2023-12-01T02:03:19.1843447Z In file included from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:10,
2023-12-01T02:03:19.1848894Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.h:48,
2023-12-01T02:03:19.1851473Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.hpp:9,
2023-12-01T02:03:19.1853760Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.h:95,
2023-12-01T02:03:19.1855671Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/Comm_Assemble.h:8,
2023-12-01T02:03:19.1857548Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map.h:10,
2023-12-01T02:03:19.1859615Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map_Judge.h:8,
2023-12-01T02:03:19.1861436Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.hpp:9,
2023-12-01T02:03:19.1863033Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.h:58,
2023-12-01T02:03:19.1864894Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx.h:8,
2023-12-01T02:03:19.1866277Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI.h:14,
2023-12-01T02:03:19.1867659Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI_interface.h:2,
2023-12-01T02:03:19.1869258Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_esolver/esolver_ks_lcao.h:12,
2023-12-01T02:03:19.1870850Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_hamilt_lcao/module_tddft/evolve_elec.h:6,
2023-12-01T02:03:19.1872504Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_elecstate/potentials/H_TDDFT_pw.cpp:5:
2023-12-01T02:03:19.1875347Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/MPI_Wrapper.h:85:42: error: the address of the 'ompi_datatype_t' subobject of 'ompi_mpi_char' is not a valid template argument
2023-12-01T02:03:19.1877453Z    85 |  static MPI_Type_Contiguous_Pool<MPI_CHAR> char_contiguous;
2023-12-01T02:03:19.1878052Z       |                                          ^
2023-12-01T02:03:19.1938769Z In file included from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.h:48,
2023-12-01T02:03:19.1941615Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.hpp:9,
2023-12-01T02:03:19.1943933Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.h:95,
2023-12-01T02:03:19.1946004Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/Comm_Assemble.h:8,
2023-12-01T02:03:19.1947879Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map.h:10,
2023-12-01T02:03:19.1949875Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map_Judge.h:8,
2023-12-01T02:03:19.1951713Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.hpp:9,
2023-12-01T02:03:19.1953294Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.h:58,
2023-12-01T02:03:19.1954804Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx.h:8,
2023-12-01T02:03:19.1956165Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI.h:14,
2023-12-01T02:03:19.1957537Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI_interface.h:2,
2023-12-01T02:03:19.1959043Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_esolver/esolver_ks_lcao.h:12,
2023-12-01T02:03:19.1960623Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_hamilt_lcao/module_tddft/evolve_elec.h:6,
2023-12-01T02:03:19.1962255Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_elecstate/potentials/H_TDDFT_pw.cpp:5:
2023-12-01T02:03:19.1964941Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp: In function 'std::size_t Comm::Cereal_Func::align_stringstream(std::stringstream&)':
2023-12-01T02:03:19.1968603Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:37:46: error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function
2023-12-01T02:03:19.1970428Z    37 |   MPI_Wrapper::char_contiguous(exponent_align);
2023-12-01T02:03:19.1971056Z       |                                              ^
2023-12-01T02:03:19.2035876Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp: In function 'void Comm::Cereal_Func::mpi_send(const string&, std::size_t, int, int, ompi_communicator_t* const&)':
2023-12-01T02:03:19.2039770Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:53:110: error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function
2023-12-01T02:03:19.2042124Z    53 |   MPI_CHECK( MPI_Send  ( str.c_str(), str.size()>>exponent_align, MPI_Wrapper::char_contiguous(exponent_align), rank_recv, tag, mpi_comm ) );
2023-12-01T02:03:19.2043194Z       |                                                                                                              ^
2023-12-01T02:03:19.2044984Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:17:26: note: in definition of macro 'MPI_CHECK'
2023-12-01T02:03:19.2047028Z    17 | #define MPI_CHECK(x) if((x)!=MPI_SUCCESS) throw std::runtime_error(std::string(__FILE__)+" line "+std::to_string(__LINE__));
2023-12-01T02:03:19.2146736Z       |                          ^
2023-12-01T02:03:19.2149751Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp: In function 'void Comm::Cereal_Func::mpi_isend(const string&, std::size_t, int, int, ompi_communicator_t* const&, ompi_request_t*&)':
2023-12-01T02:03:19.2155483Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:79:111: error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function
2023-12-01T02:03:19.2158029Z    79 |   MPI_CHECK( MPI_Isend  ( str.c_str(), str.size()>>exponent_align, MPI_Wrapper::char_contiguous(exponent_align), rank_recv, tag, mpi_comm, &request ) );
2023-12-01T02:03:19.2159320Z       |                                                                                                               ^
2023-12-01T02:03:19.2161200Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:17:26: note: in definition of macro 'MPI_CHECK'
2023-12-01T02:03:19.2163350Z    17 | #define MPI_CHECK(x) if((x)!=MPI_SUCCESS) throw std::runtime_error(std::string(__FILE__)+" line "+std::to_string(__LINE__));
2023-12-01T02:03:19.2164412Z       |                          ^
2023-12-01T02:03:19.2165751Z In file included from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.h:48,
2023-12-01T02:03:19.2168195Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.hpp:9,
2023-12-01T02:03:19.2170531Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/Comm_Keys_31-gather.h:95,
2023-12-01T02:03:19.2172500Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/Comm_Assemble.h:8,
2023-12-01T02:03:19.2174751Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map.h:10,
2023-12-01T02:03:19.2176799Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/../comm/mix/Communicate_Tensors_Map_Judge.h:8,
2023-12-01T02:03:19.2178665Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.hpp:9,
2023-12-01T02:03:19.2180424Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx_Post_2D.h:58,
2023-12-01T02:03:19.2181975Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibRI/include/RI/physics/Exx.h:8,
2023-12-01T02:03:19.2183787Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI.h:14,
2023-12-01T02:03:19.2185455Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_ri/Exx_LRI_interface.h:2,
2023-12-01T02:03:19.2186978Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_esolver/esolver_ks_lcao.h:12,
2023-12-01T02:03:19.2188647Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_hamilt_lcao/module_tddft/evolve_elec.h:6,
2023-12-01T02:03:19.2190343Z                  from /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/source/module_elecstate/potentials/H_TDDFT_pw.cpp:5:
2023-12-01T02:03:19.2193232Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp: In function 'std::vector<char> Comm::Cereal_Func::mpi_recv(ompi_communicator_t* const&, MPI_Status&)':
2023-12-01T02:03:19.2196780Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:105:77: error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function
2023-12-01T02:03:19.2198841Z   105 |    const MPI_Datatype mpi_type = MPI_Wrapper::char_contiguous(exponent_align);
2023-12-01T02:03:19.2199619Z       |                                                                             ^
2023-12-01T02:03:19.2201835Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp: In function 'std::vector<char> Comm::Cereal_Func::mpi_mrecv(ompi_message_t*&, const MPI_Status&)':
2023-12-01T02:03:19.2205336Z /home/conda/feedstock_root/build_artifacts/abacus_1701395655281/work/deps/LibComm/include/Comm/Comm_Assemble/../Comm_Keys/../global/Cereal_Func.hpp:149:77: error: 'Comm::MPI_Wrapper::char_contiguous' cannot be used as a function
2023-12-01T02:03:19.2216303Z   149 |    const MPI_Datatype mpi_type = MPI_Wrapper::char_contiguous(exponent_align);
2023-12-01T02:03:19.2217357Z       |                                                                             ^
2023-12-01T02:03:19.4450128Z [ 41%] Building CXX object source/module_hamilt_pw/hamilt_pwdft/CMakeFiles/hamilt_pwdft.dir/stress_func_har.cpp.o
2023-12-01T02:03:20.6557310Z gmake[2]: *** [source/module_elecstate/CMakeFiles/elecstate.dir/potentials/H_TDDFT_pw.cpp.o] Error 1
2023-12-01T02:03:20.6572426Z gmake[1]: *** [source/module_elecstate/CMakeFiles/elecstate.dir/all] Error 2
2023-12-01T02:03:20.6585916Z gmake[1]: *** Waiting for unfinished jobs....

Then, I rolled back to v0.1.0, and it worked. So, the issue should happen in recent commits.

@QuantumMisaka
Copy link

This problem is from OpenMPI have different MPI env variable.
Using MPICH ad Intel-MPI may help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants