Open tongshu83 opened 5 years ago
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 toadios2::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 toadios2::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 toadios2::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 toadios2::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 toadios2::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 toadios2::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 toadios2::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 toadios2::IO::SetParameters(std::map<std::string, std::string, std::less, 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 toadios2::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 toadios2::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 toadios2::Attribute adios2::IO::DefineAttribute(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 toadios2::Engine::LockWriterDefinitions()' collect2: error: ld returned 1 exit status make: *** [heatSimulation] Error 1
IO::~IO()': /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:89: undefined reference to
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
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::BeginStep()' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:101: 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
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::DeclareIO(std::string)' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:28: 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::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::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::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::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
@tongshu83 thanks for reporting this. In the meantime, please use gray-scott as it's the example that has been maintained.
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::Span adios2::Engine::Put(adios2::Variable)'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:103: undefined reference to , 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::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 ::Name() const'
/lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:58: undefined reference to adios2::IO::DefineAttribute(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
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 functionIO::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 tovoid 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 toadios2::Engine::BeginStep()' /lcrc/project/PACC/tong/HPC_Autotuner/adiosvm/Tutorial/heat2d/cpp/simulation/IO_adios2.cpp:101: undefined reference to
adios2::Variableadios2::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 functionIO::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 toadios2::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 toadios2::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::lessadios2::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::Variableadios2::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::Variableadios2::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::Attributeadios2::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