Comments (5)
I don't know if this is connected, but we have had a similar issue on the PIK-cluster for some days now:
________________________________________
In file included from /iplex/01/sys/applications/intel/impi/3.2.2.006/include64/mpi.h:1147,
from /home/mengel/pismDev/gh002/src/base/util/io/PISMNCFile.hh:24,
from /home/mengel/pismDev/gh002/src/base/util/io/PISMNC3File.hh:22,
from /home/mengel/pismDev/gh002/src/base/util/io/PISMNC3File.cc:19:
/iplex/01/sys/applications/intel/impi/3.2.2.006/include64/mpicxx.h:45:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
/iplex/01/sys/applications/intel/impi/3.2.2.006/include64/mpicxx.h:49:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
/iplex/01/sys/applications/intel/impi/3.2.2.006/include64/mpicxx.h:54:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
___________________________________________
The patch to make it work for us was to switch the order of #include <string>
and #include <mpi.h>
in src/base/util/io/PISMNC.hh. I did not commit this modification yet since I was not sure if something else could be affected?!
from pism.
I get the same error on my linux box as the PACMAN error if I turn off making static libraries, namely
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Intracomm::Create_graph(int, int const*, int const*, bool) const':
PISMNC3File.cc:(.text._ZNK3MPI9Intracomm12Create_graphEiPKiS2_b[MPI::Intracomm::Create_graph(int, int const*, int const*, bool) const]+0x28): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)':
PISMNC3File.cc:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)]+0x1d): undefined reference to `ompi_mpi_cxx_op_intercept'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Intercomm::Merge(bool)':
PISMNC3File.cc:(.text._ZN3MPI9Intercomm5MergeEb[MPI::Intercomm::Merge(bool)]+0x33): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Cartcomm::Clone() const':
PISMNC3File.cc:(.text._ZNK3MPI8Cartcomm5CloneEv[MPI::Cartcomm::Clone() const]+0x23): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Graphcomm::Clone() const':
PISMNC3File.cc:(.text._ZNK3MPI9Graphcomm5CloneEv[MPI::Graphcomm::Clone() const]+0x23): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Intracomm::Create_cart(int, int const*, bool const*, bool) const':
PISMNC3File.cc:(.text._ZNK3MPI9Intracomm11Create_cartEiPKiPKbb[MPI::Intracomm::Create_cart(int, int const*, bool const*, bool) const]+0x87): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o): In function `MPI::Cartcomm::Sub(bool const*)':
PISMNC3File.cc:(.text._ZN3MPI8Cartcomm3SubEPKb[MPI::Cartcomm::Sub(bool const*)]+0x79): undefined reference to `MPI::Comm::Comm()'
libpismutil.a(PISMNC3File.cc.o):PISMNC3File.cc:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[MPI::Intracomm::Create(MPI::Group const&) const]+0x34): more undefined references to `MPI::Comm::Comm()' follow
libpismutil.a(PISMNC3File.cc.o):(.data.rel.ro._ZTVN3MPI3WinE[vtable for MPI::Win]+0x48): undefined reference to `MPI::Win::Free()'
libpismutil.a(PISMNC3File.cc.o):(.data.rel.ro._ZTVN3MPI8DatatypeE[vtable for MPI::Datatype]+0x78): undefined reference to `MPI::Datatype::Free()'
collect2: ld returned 1 exit status
make[2]: *** [bedrough_test] Error 1
make[1]: *** [src/CMakeFiles/bedrough_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
As far as I can tell Torsten's patch does not work to fix this.
If I set BUILD_SHARED_LIBRARIES to ON, I get a different error,
libpismutil.so: undefined reference to `ompi_mpi_cxx_op_intercept'
libpismutil.so: undefined reference to `MPI::Datatype::Free()'
libpismutil.so: undefined reference to `MPI::Comm::Comm()'
libpismutil.so: undefined reference to `MPI::Win::Free()'
from pism.
When I checkout a few revisions back, it works. Specifically commit 1a53a58 does
work for me. I have not run git bisect
, as I don't know how, but I guess the range of possibilities is limited.
from pism.
I now get a similar error on OS X, Petsc compiled with open-mpi:
Undefined symbols:
"ompi_mpi_cxx_op_intercept", referenced from:
MPI::Op::Init(void ()(void const_, void_, int, MPI::Datatype const&), bool)in PISMNC3File.cc.o
MPI::Op::Init(void ()(void const, void_, int, MPI::Datatype const&), bool)in PISMNC4File.cc.o
MPI::Op::Init(void ()(void const, void_, int, MPI::Datatype const&), bool)in PISMNCFile.cc.o
"MPI::Win::Free()", referenced from:
vtable for MPI::Winin PISMNC3File.cc.o
vtable for MPI::Winin PISMNC4File.cc.o
vtable for MPI::Winin PISMNCFile.cc.o
"MPI::Datatype::Free()", referenced from:
vtable for MPI::Datatypein PISMNC3File.cc.o
vtable for MPI::Datatypein PISMNC4File.cc.o
vtable for MPI::Datatypein PISMNCFile.cc.o
"MPI::Comm::Comm()", referenced from:
MPI::Intracomm::Clone() constin PISMNC3File.cc.o
MPI::Graphcomm::Clone() constin PISMNC3File.cc.o
MPI::Intracomm::Create_graph(int, int const_, int const_, bool) constin PISMNC3File.cc.o
MPI::Intracomm::Create_cart(int, int const_, bool const_, bool) constin PISMNC3File.cc.o
MPI::Cartcomm::Clone() constin PISMNC3File.cc.o
MPI::Cartcomm::Sub(bool const_)in PISMNC3File.cc.o
MPI::Intracomm::Split(int, int) constin PISMNC3File.cc.o
MPI::Intracomm::Create(MPI::Group const&) constin PISMNC3File.cc.o
MPI::Intercomm::Merge(bool)in PISMNC3File.cc.o
MPI::Intracomm::Clone() constin PISMNC4File.cc.o
MPI::Graphcomm::Clone() constin PISMNC4File.cc.o
MPI::Intracomm::Create_graph(int, int const_, int const_, bool) constin PISMNC4File.cc.o
MPI::Intracomm::Create_cart(int, int const_, bool const_, bool) constin PISMNC4File.cc.o
MPI::Cartcomm::Clone() constin PISMNC4File.cc.o
MPI::Cartcomm::Sub(bool const_)in PISMNC4File.cc.o
MPI::Intercomm::Merge(bool)in PISMNC4File.cc.o
MPI::Intracomm::Split(int, int) constin PISMNC4File.cc.o
MPI::Intracomm::Create(MPI::Group const&) constin PISMNC4File.cc.o
MPI::Intracomm::Clone() constin PISMNCFile.cc.o
MPI::Intracomm::Create_graph(int, int const_, int const_, bool) constin PISMNCFile.cc.o
MPI::Graphcomm::Clone() constin PISMNCFile.cc.o
MPI::Cartcomm::Sub(bool const_)in PISMNCFile.cc.o
MPI::Intracomm::Create_cart(int, int const_, bool const_, bool) constin PISMNCFile.cc.o
MPI::Cartcomm::Clone() constin PISMNCFile.cc.o
MPI::Intercomm::Merge(bool)in PISMNCFile.cc.o
MPI::Intracomm::Split(int, int) constin PISMNCFile.cc.o
MPI::Intracomm::Create(MPI::Group const&) constin PISMNCFile.cc.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [src/libpismutil.dylib] Error 1
make[1]: *** [src/CMakeFiles/pismutil.dir/all] Error 2
make: *** [all] Error 2
However it compiles with mpich.
from pism.
I can build both on my "linux box" and on pacman without generating any such error. I am fine with closing the issue if Constantine is.
from pism.
Related Issues (20)
- SSAFD KSP (linear solver) failed HOT 2
- Conservative regridding (averaging) for 2D fields HOT 1
- Put projection info into files HOT 1
- Building user manual with Sphinx >= 5.0 fails with 'language = None'
- Black-hole calving HOT 15
- Unable to read from a compressed NetCDF file with permuted dimensions HOT 1
- Update citation recommendations: explain how to cite PISM's versions archived by Zenodo HOT 9
- Bed deformation models need to use the load averaged over the duration of a time step HOT 3
- Antarctic example has a reprojection error HOT 1
- Error building pism 2.1 since switch to pkg-conf HOT 4
- no difference between ncap scripts in doc/sphinx/manual/practical-usage/conservation HOT 2
- Use of "0001-1-1" as reference year instead of "1-1-1" for compatibility with Xarray HOT 1
- PISM's continous integration setup should include tests that use PETSc --with-64bit-indices HOT 1
- Is PISM able to do global simulation? HOT 3
- Add "tendency_of_ice_mass_due_to_grounding_line_flux"
- PETSc 3.21 compatibility
- Improve instructions describing how to cite PISM
- Fix PISM installation instructions for macOS
- Consider using `kelvin` instead if `Kelvin` for units HOT 4
- Goldsby (2006) rheology
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pism.