Skip to content

Fail to compile heat2d/cpp #41

@tongshu83

Description

@tongshu83

I fail to compile heat2d/cpp . Could you please help me fix the compiling issue? Thank you very much!

in make.settings:
ADIOS2_DIR=.../install/adios2
CXX=mpicxx

in Makefile
override ADIOS2_INC=-I${ADIOS2_DIR}/include
override ADIOS2_LIB=-L${ADIOS2_DIR}/lib64

$ make all
mpicxx -g -std=gnu++11 -O2 -c -I/lcrc/project/PACC/tong/HPC_Autotuner/install/adios2/include -o simulation/HeatTransfer.o simulation/HeatTransfer.cpp
mpicxx -g -std=gnu++11 -O2 -c -I/lcrc/project/PACC/tong/HPC_Autotuner/install/adios2/include -o simulation/IO_adios2.o simulation/IO_adios2.cpp
mpicxx -g -std=gnu++11 -O2 -c -I/lcrc/project/PACC/tong/HPC_Autotuner/install/adios2/include -o simulation/Settings.o simulation/Settings.cpp
mpicxx -g -std=gnu++11 -O2 -c -I/lcrc/project/PACC/tong/HPC_Autotuner/install/adios2/include -o simulation/heatSimulation.o simulation/heatSimulation.cpp
mpicxx -g -std=gnu++11 -O2 -o heatSimulation simulation/HeatTransfer.o simulation/IO_adios2.o simulation/Settings.o simulation/heatSimulation.o -L/lcrc/project/PACC/tong/HPC_Autotuner/install/adios2/lib64
simulation/IO_adios2.o: In function IO::~IO()': /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:89: undefined reference to adios2::Engine::Close(int)'
simulation/IO_adios2.o: In function IO::write(int, HeatTransfer const&, Settings const&, int)': /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:109: undefined reference to adios2::Engine::BeginStep()'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:115: undefined reference to void adios2::Engine::Put<double>(adios2::Variable<double>, double const*, adios2::Mode)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:116: undefined reference to adios2::Engine::EndStep()'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:99: undefined reference to adios2::Engine::BeginStep()' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:101: undefined reference to adios2::Variable::Span adios2::Engine::Put(adios2::Variable)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:103: undefined reference to adios2::detail::Span<double>::data() const' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:105: undefined reference to adios2::Engine::EndStep()'
simulation/IO_adios2.o: In function IO::IO(Settings const&, int)': /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:25: undefined reference to adios2::ADIOS::ADIOS(std::string const&, int, bool)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:27: undefined reference to adios2::ADIOS::DeclareIO(std::string)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:28: undefined reference to adios2::IO::InConfigFile() const'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:32: undefined reference to adios2::IO::SetEngine(std::string)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:33: undefined reference to adios2::IO::SetParameters(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > > const&)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:37: undefined reference to adios2::IO::AddTransport(std::string, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:53: undefined reference to adios2::Variable adios2::IO::DefineVariable(std::string const&, std::vector<unsigned long, std::allocator > const&, std::vector<unsigned long, std::allocator > const&, std::vector<unsigned long, std::allocator > const&, bool)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:56: undefined reference to adios2::Attribute<std::string> adios2::IO::DefineAttribute<std::string>(std::string const&, std::string const&, std::string const&, std::string)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:58: undefined reference to adios2::Variable::Name() const'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:58: undefined reference to adios2::Attribute<std::string> adios2::IO::DefineAttribute<std::string>(std::string const&, std::string const&, std::string const&, std::string)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:77: undefined reference to adios2::Attributestd::string adios2::IO::DefineAttributestd::string(std::string const&, std::string const&, std::string const&, std::string)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:79: undefined reference to adios2::IO::Open(std::string const&, adios2::Mode, int)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:84: undefined reference to adios2::Engine::LockWriterDefinitions()'
collect2: error: ld returned 1 exit status
make: *** [heatSimulation] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions