$ nm -D /gpfs/home/nkumar001/tools/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/precice-2.4.0-gnmnztidno3rzrws5xfrw2szmktdzyg5/lib64/libprecice.so | grep precice15SolverInterface
00000000002e5440 T _ZN7precice15SolverInterface10initializeEv
00000000002e55e0 T _ZN7precice15SolverInterface11setMeshEdgeEiii
00000000002e5610 T _ZN7precice15SolverInterface11setMeshQuadEiiiii
00000000002e5630 T _ZN7precice15SolverInterface13mapReadDataToEi
00000000002e5590 T _ZN7precice15SolverInterface13setMeshVertexEiPKd
00000000002e5450 T _ZN7precice15SolverInterface14initializeDataEv
00000000002e55f0 T _ZN7precice15SolverInterface15setMeshTriangleEiiii
00000000002e55b0 T _ZN7precice15SolverInterface15setMeshVerticesEiiPKdPi
00000000002e56b0 T _ZN7precice15SolverInterface15writeScalarDataEiid
00000000002e5670 T _ZN7precice15SolverInterface15writeVectorDataEiiPKd
00000000002e5640 T _ZN7precice15SolverInterface16mapWriteDataFromEi
00000000002e54e0 T _ZN7precice15SolverInterface19markActionFulfilledERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e5620 T _ZN7precice15SolverInterface20setMeshQuadWithEdgesEiiiii
00000000002e5690 T _ZN7precice15SolverInterface20writeBlockScalarDataEiiPKiPKd
00000000002e5650 T _ZN7precice15SolverInterface20writeBlockVectorDataEiiPKiPKd
00000000002e56c0 T _ZN7precice15SolverInterface23writeScalarGradientDataEiiPKd
00000000002e5680 T _ZN7precice15SolverInterface23writeVectorGradientDataEiiPKdb
00000000002e5600 T _ZN7precice15SolverInterface24setMeshTriangleWithEdgesEiiii
00000000002e56a0 T _ZN7precice15SolverInterface28writeBlockScalarGradientDataEiiPKiPKd
00000000002e5660 T _ZN7precice15SolverInterface28writeBlockVectorGradientDataEiiPKiPKdb
00000000002e5460 T _ZN7precice15SolverInterface7advanceEd
00000000002e5470 T _ZN7precice15SolverInterface8finalizeEv
00000000002e5280 T _ZN7precice15SolverInterfaceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ii
00000000002e5340 T _ZN7precice15SolverInterfaceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iiPv
00000000002e5280 T _ZN7precice15SolverInterfaceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ii
00000000002e5340 T _ZN7precice15SolverInterfaceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iiPv
00000000002e5410 T _ZN7precice15SolverInterfaceD1Ev
00000000002e5410 T _ZN7precice15SolverInterfaceD2Ev
00000000002e5510 T _ZNK7precice15SolverInterface10getMeshIDsEv
00000000002e5480 T _ZNK7precice15SolverInterface13getDimensionsEv
00000000002e5740 T _ZNK7precice15SolverInterface14readScalarDataEiidRd
00000000002e5730 T _ZNK7precice15SolverInterface14readScalarDataEiiRd
00000000002e5700 T _ZNK7precice15SolverInterface14readVectorDataEiidPd
00000000002e56f0 T _ZNK7precice15SolverInterface14readVectorDataEiiPd
00000000002e55c0 T _ZNK7precice15SolverInterface15getMeshVerticesEiiPKiPd
00000000002e54d0 T _ZNK7precice15SolverInterface16isActionRequiredERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e55a0 T _ZNK7precice15SolverInterface17getMeshVertexSizeEi
00000000002e5490 T _ZNK7precice15SolverInterface17isCouplingOngoingEv
00000000002e54a0 T _ZNK7precice15SolverInterface19isReadDataAvailableEv
00000000002e54b0 T _ZNK7precice15SolverInterface19isWriteDataRequiredEd
00000000002e5720 T _ZNK7precice15SolverInterface19readBlockScalarDataEiiPKidPd
00000000002e5710 T _ZNK7precice15SolverInterface19readBlockScalarDataEiiPKiPd
00000000002e56e0 T _ZNK7precice15SolverInterface19readBlockVectorDataEiiPKidPd
00000000002e56d0 T _ZNK7precice15SolverInterface19readBlockVectorDataEiiPKiPd
00000000002e5750 T _ZNK7precice15SolverInterface19setMeshAccessRegionEiPKd
00000000002e54c0 T _ZNK7precice15SolverInterface20isTimeWindowCompleteEv
00000000002e5760 T _ZNK7precice15SolverInterface21getMeshVerticesAndIDsEiiPiPd
00000000002e5580 T _ZNK7precice15SolverInterface22hasToEvaluateFineModelEv
00000000002e5540 T _ZNK7precice15SolverInterface22isGradientDataRequiredEi
00000000002e5530 T _ZNK7precice15SolverInterface26isMeshConnectivityRequiredEi
00000000002e5570 T _ZNK7precice15SolverInterface27hasToEvaluateSurrogateModelEv
00000000002e55d0 T _ZNK7precice15SolverInterface29getMeshVertexIDsFromPositionsEiiPKdPi
00000000002e5550 T _ZNK7precice15SolverInterface7hasDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi
00000000002e54f0 T _ZNK7precice15SolverInterface7hasMeshERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e5560 T _ZNK7precice15SolverInterface9getDataIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi
00000000002e5500 T _ZNK7precice15SolverInterface9getMeshIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
0000000000373250 W _ZNSt10unique_ptrIN7precice15SolverInterfaceESt14default_deleteIS1_EED1Ev
0000000000373250 W _ZNSt10unique_ptrIN7precice15SolverInterfaceESt14default_deleteIS1_EED2Ev
$ objdump -s --section .comment $FOAM_LIBBIN/libfiniteVolume.so
/gpfs/softs/contrib/apps/openfoam/6.0/OpenFOAM-6/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: file format elf64-x86-64
Contents of section .comment:
0000 4743433a 2028474e 55292034 2e382e35 GCC: (GNU) 4.8.5
0010 20323031 35303632 33202852 65642048 20150623 (Red H
0020 61742034 2e382e35 2d333629 00 at 4.8.5-36).
Please note that I am using OpenFOAM-6 which is available as a module which is available on the cluster. As the minimum requirement of GCC for preCICE is version 5, I am not sure how I can proceed to make the environments homogeneous.
Any suggestion regarding how to resolve the error would be helpful.
Thanks.
I am not sure if that immediately helps with our problem, but since you are already using Spack: Would it be an option for you to install OpenFOAM via Spack?
I guess installing OpenFOAM via Spack would be the easiest way to homogenize your environment. Current versions of Spack have both openfoam and openfoam-org packages available. You could put preCICE and OpenFOAM even in a Spack environment if you wanted in order to ensure consistency (and reproducibility) of the software environment.
$ nm -D /gpfs/home/nkumar001/tools/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/precice-2.4.0-q6j6kdt5anho7gmelrzhjs3mjppmlibu/lib64/libprecice.so | grep precice15SolverInterface
00000000002e5440 T _ZN7precice15SolverInterface10initializeEv
00000000002e55e0 T _ZN7precice15SolverInterface11setMeshEdgeEiii
00000000002e5610 T _ZN7precice15SolverInterface11setMeshQuadEiiiii
00000000002e5630 T _ZN7precice15SolverInterface13mapReadDataToEi
00000000002e5590 T _ZN7precice15SolverInterface13setMeshVertexEiPKd
00000000002e5450 T _ZN7precice15SolverInterface14initializeDataEv
00000000002e55f0 T _ZN7precice15SolverInterface15setMeshTriangleEiiii
00000000002e55b0 T _ZN7precice15SolverInterface15setMeshVerticesEiiPKdPi
00000000002e56b0 T _ZN7precice15SolverInterface15writeScalarDataEiid
00000000002e5670 T _ZN7precice15SolverInterface15writeVectorDataEiiPKd
00000000002e5640 T _ZN7precice15SolverInterface16mapWriteDataFromEi
00000000002e54e0 T _ZN7precice15SolverInterface19markActionFulfilledERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e5620 T _ZN7precice15SolverInterface20setMeshQuadWithEdgesEiiiii
00000000002e5690 T _ZN7precice15SolverInterface20writeBlockScalarDataEiiPKiPKd
00000000002e5650 T _ZN7precice15SolverInterface20writeBlockVectorDataEiiPKiPKd
00000000002e56c0 T _ZN7precice15SolverInterface23writeScalarGradientDataEiiPKd
00000000002e5680 T _ZN7precice15SolverInterface23writeVectorGradientDataEiiPKdb
00000000002e5600 T _ZN7precice15SolverInterface24setMeshTriangleWithEdgesEiiii
00000000002e56a0 T _ZN7precice15SolverInterface28writeBlockScalarGradientDataEiiPKiPKd
00000000002e5660 T _ZN7precice15SolverInterface28writeBlockVectorGradientDataEiiPKiPKdb
00000000002e5460 T _ZN7precice15SolverInterface7advanceEd
00000000002e5470 T _ZN7precice15SolverInterface8finalizeEv
00000000002e5280 T _ZN7precice15SolverInterfaceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ii
00000000002e5340 T _ZN7precice15SolverInterfaceC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iiPv
00000000002e5280 T _ZN7precice15SolverInterfaceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ii
00000000002e5340 T _ZN7precice15SolverInterfaceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_iiPv
00000000002e5410 T _ZN7precice15SolverInterfaceD1Ev
00000000002e5410 T _ZN7precice15SolverInterfaceD2Ev
00000000002e5510 T _ZNK7precice15SolverInterface10getMeshIDsEv
00000000002e5480 T _ZNK7precice15SolverInterface13getDimensionsEv
00000000002e5740 T _ZNK7precice15SolverInterface14readScalarDataEiidRd
00000000002e5730 T _ZNK7precice15SolverInterface14readScalarDataEiiRd
00000000002e5700 T _ZNK7precice15SolverInterface14readVectorDataEiidPd
00000000002e56f0 T _ZNK7precice15SolverInterface14readVectorDataEiiPd
00000000002e55c0 T _ZNK7precice15SolverInterface15getMeshVerticesEiiPKiPd
00000000002e54d0 T _ZNK7precice15SolverInterface16isActionRequiredERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e55a0 T _ZNK7precice15SolverInterface17getMeshVertexSizeEi
00000000002e5490 T _ZNK7precice15SolverInterface17isCouplingOngoingEv
00000000002e54a0 T _ZNK7precice15SolverInterface19isReadDataAvailableEv
00000000002e54b0 T _ZNK7precice15SolverInterface19isWriteDataRequiredEd
00000000002e5720 T _ZNK7precice15SolverInterface19readBlockScalarDataEiiPKidPd
00000000002e5710 T _ZNK7precice15SolverInterface19readBlockScalarDataEiiPKiPd
00000000002e56e0 T _ZNK7precice15SolverInterface19readBlockVectorDataEiiPKidPd
00000000002e56d0 T _ZNK7precice15SolverInterface19readBlockVectorDataEiiPKiPd
00000000002e5750 T _ZNK7precice15SolverInterface19setMeshAccessRegionEiPKd
00000000002e54c0 T _ZNK7precice15SolverInterface20isTimeWindowCompleteEv
00000000002e5760 T _ZNK7precice15SolverInterface21getMeshVerticesAndIDsEiiPiPd
00000000002e5580 T _ZNK7precice15SolverInterface22hasToEvaluateFineModelEv
00000000002e5540 T _ZNK7precice15SolverInterface22isGradientDataRequiredEi
00000000002e5530 T _ZNK7precice15SolverInterface26isMeshConnectivityRequiredEi
00000000002e5570 T _ZNK7precice15SolverInterface27hasToEvaluateSurrogateModelEv
00000000002e55d0 T _ZNK7precice15SolverInterface29getMeshVertexIDsFromPositionsEiiPKdPi
00000000002e5550 T _ZNK7precice15SolverInterface7hasDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi
00000000002e54f0 T _ZNK7precice15SolverInterface7hasMeshERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
00000000002e5560 T _ZNK7precice15SolverInterface9getDataIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi
00000000002e5500 T _ZNK7precice15SolverInterface9getMeshIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
0000000000373250 W _ZNSt10unique_ptrIN7precice15SolverInterfaceESt14default_deleteIS1_EED1Ev
0000000000373250 W _ZNSt10unique_ptrIN7precice15SolverInterfaceESt14default_deleteIS1_EED2Ev
The GCC version for both OpenFOAM-6 and preCICE-2.4.0 is the same:
(OpenFOAM)
Very cool to see that you installed all dependencies with Spack.
Did you try opening a new terminal and activate the Spack environment there? I sometimes had problems with using freshly set up Spack environments.
The symbol table you get for libprecice.so looks reasonable to me. I have basically the same symbols on a local installation. So it looks to me that your preCICE installation is fine. Besides that: Did you completely remove the earlier compiled OpenFOAM adapter? Maybe it still tries to use an old/other preCICE installation/version?
Hi Alex. Yes, I am able to activate the spack environment in a new terminal without error.
I had also removed the spack and the adapter installation directories from the previous attempt.
For sanity check, I will try to reproduce the errors in my personal machine but I will eventually need to make it work on the cluster.
Hello again. I tried to install in another machine but failed.
Now I am wondering if the adapter needs to be installed at a specific location because I see the following message when i run Allwmake:
Everything looks fine in wmake.log.
=== ERROR: Building completed with linking problems: there were undefined symbols. ===
Possible causes:
- Is preCICE discoverable at runtime? Check the content of ADAPTER_PKG_CONFIG_LIBS above.
See wmake.log and ldd.log for more details.
I can’t find ADAPTER_PKG_CONFIG_LIBS in the output. Also, preCICE seems to be discoverable as I see this message on the top:
Building the OpenFOAM-preCICE adapter...
If not already known by the system, preCICE may be located using:
pkg-config --cflags libprecice = -I/gpfs/home/nkumar001/tools/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/precice-2.4.0-q6j6kdt5anho7gmelrzhjs3mjppmlibu/include
pkg-config --libs libprecice = -L/gpfs/home/nkumar001/tools/spack/opt/spack/linux-centos7-skylake_avx512/gcc-7.3.0/precice-2.4.0-q6j6kdt5anho7gmelrzhjs3mjppmlibu/lib64 -lprecice
Apart from the preCICE symbols, there is also an OpenFOAM-related symbol (_ZN4FoamlsERNS_7OstreamERKSs). This may mean that something is wrong/incomplete with the OpenFOAM installation. But this should not be the main issue here.
OpenFOAM is installed via Spack, as the platform is linux64GccDPInt32-spack. Something that often happens when mixing Spack and non-Spack packages is that different compilers (or MPI versions) are used for each package. WMake should also build the adapter with the same compiler OpenFOAM was built with.
Now, something I could imagine happening here, is that different compilers have been used to compile libprecice.so and libpreciceAdapterFunctionObject.so, or with different options (e.g., here, DPInt32) and this somehow leads to issues. One way out would be to also build preCICE with the same compiler and options (not sure how).
Looking closer, I observe that the symbols are indeed missing in the table you provided in your first post, or they are different. Compare these two:
Could this have something to do with the breaking change of C++ std::string in C++11? I would have thought that if you used a GCC version older than 5, but with 7.3 this should not be an issue, I guess. I also see that this t7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE does not appear in any of the symbols that the adapter is looking for, while it appears in many of the symbols preCICE exports.
I may also misunderstand this as a problem and it may not be worth the effort recompiling everything. Could it just be that preCICE needs to somehow be loaded additionally in that system? Can you build and run anything else with preCICE (that does not involve OpenFOAM)?
I built both OpenFOAM and preCICE in the same spack environment, using GCC 7.3.0. I was under the impression that when I’m building the adapter with the spack environment activated, it is also using the same GCC compiler. But I was wrong and the shell was linked with an older version. I loaded GCC 7.3.0 and the adapter compiles without error.
Thanks for the inputs. I’ll run the tutorial cases to check the adapter.