- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My code implements boost::mpi and the build process is handled by cmake.
If I change the compiler to mpiicpc and build the project using cmake, then during the running of makefile (after building with cmake) it shows the following error.
ld: warning: libmpi.so.40, needed by ${BOOST_INSTALL_DIR}/lib/libboost_mpi.so.1.74.0, may conflict with libmpi.so.12
ld: CMakeFiles/s_stage.dir/src/main/s_stage.cpp.o: in function `void boost::mpi::detail::broadcast_impl<bool>(boost::mpi::communicator const&, bool*, int, int, boost::mpl::bool_<true>)':
${BOOST_INSTALL_DIR}/include/boost/mpi/collectives/broadcast.hpp:96: undefined reference to `boost::mpi::communicator::operator int() const'
Note:
${BOOST_INSTALL_DIR} is the installation directoty of boost library.
libmpi.so.40 is located at /usr/lib/x86_64-linux-gnu/ and /usr/lib/x86_64-linux-gnu/openmpi/lib/
libmpi.so.12 is located at /opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/lib/ inside debug and release folder.
I am not sure if this question is relevant to intel compilers, but I thought that this could happen due to the conflict between openmpi that boost uses and MPICH2 that intel compiler uses. Is this true? if yes, could you please share how to solve this? if not, could you understand the reason?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Thanks for the suggestion regarding the inclusion of ${HDF5_HL_LIBRARIES} , it worked.
I am able to build the sassesna without any errors with the same steps you have given. The only difference is I haven't installed the packages you have suggested to me.
I don't have OpenMPI in my environment and I think that made the difference.
Now if we have two different mpi's in LD_LIBRARY_PATH the build picks the library that came first.
So before building run mpivars.sh/setvars.sh and set CC and CXX to mpiicc and mpiicpc respectively.
Let us know if you still face any errors.
Regards
Prasanth
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Could you please provide the build steps you have used to build boost library along with Intel MPI
Also, if possible provide us with a reproducer of the code to debug.
Regards
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your reply.
This is how I built the boost library
1) cd ${Boost_root_dir} (Boost_root_dir is the directory where I extracted the boost folder from .tar.gz, my version for boost is boost_1_74_0)
2) ./bootstrap.sh --prefix=${Boost_root_dir}/../installdir (Note: I have multiple project-config.jam.<number> and I worked on the highest value of <number>, I mentioned the prefix path in relative here but actually I used the global path)
3) which mpiicpc (this shows PATH_TO_MPIICPC)
4) opened project-config.jam.<highest number> and added following lines at the end:
#MPI
using mpi : ${PATH_TO_MPIICPC}
5) b2 --prefix=${Boost_root_dir}/../installdir toolset=intel install
Now for the building of my make file using cmake, I write the following command
cmake -S ${Source_path_cmake} -B${Build_path_cmake} -DCMAKE_INSTALL_PREFIX=${Boost_root_dir}/../installdir
For the code to Debug, should I send the whole code?
In yes, it is a rather big code and not written by me. So I share the github link.
https://github.com/benlabs/sassena
If no, please write back, what exactly should I share.
Also, if you need any other information, please write back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanth,
In case you want the source code from git, please use the following link instead of the link given in my previous answer.
https://github.com/camm/sassena
With regards,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Sorry for the late response.
We have tried to reproduce this error on our environment with the steps you have provided. The CMake went fine but during make, we have faced a different issue related to HDFS.
Below is the error:
[ 81%] Building CXX object CMakeFiles/sassena.dir/src/common.cpp.o
[ 83%] Building CXX object CMakeFiles/sassena.dir/src/main/sassena.cpp.o
[ 85%] Linking CXX executable sassena
libsass_services.so: undefined reference to `H5LTmake_dataset_char'
libsass_services.so: undefined reference to `H5LTread_dataset_double'
libsass_services.so: undefined reference to `H5LTmake_dataset_string'
libsass_services.so: undefined reference to `H5LTfind_dataset'
libsass_services.so: undefined reference to `H5LTget_dataset_info'
CMakeFiles/sassena.dir/build.make:148: recipe for target 'sassena' failed
make[2]: *** [sassena] Error 1
Have you faced any similar error? if so let us know or else could you let us know is there any HDF5 requirements for this sassena project?
Regards
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanth,
Thank you for your reply.
I edited the following on my computer.
In the sassena/cmake/CMakeLists.txt.intern file, I added ${HDF5_HL_LIBRARIES} after ${Boost_LIBRARIES}. [this is inside target link libraries sass_scatter_devices]
I think this could be the problem
Also, I installed the following packages on my computer.
build-essential, libfftw3-dev, openmpi-bin, libblas-dev, liblapack-dev, gfortran libxml2-dev, libboost-mpi-dev, libboost-all-dev, libboost-regex-dev, libboost-mpi-dev, libboost-thread-dev, libboost-serialization-dev, libboost-system-dev, libboost-filesystem-dev, libboost-program-options-dev, zlib1g-dev, libhdf5-dev.
Could you please check with these and give me a reply? If it does not work, could you please share the error once again?
With regards,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Thanks for the suggestion regarding the inclusion of ${HDF5_HL_LIBRARIES} , it worked.
I am able to build the sassesna without any errors with the same steps you have given. The only difference is I haven't installed the packages you have suggested to me.
I don't have OpenMPI in my environment and I think that made the difference.
Now if we have two different mpi's in LD_LIBRARY_PATH the build picks the library that came first.
So before building run mpivars.sh/setvars.sh and set CC and CXX to mpiicc and mpiicpc respectively.
Let us know if you still face any errors.
Regards
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanth,
It worked. I successfully built sassena. I uninstalled openmpi and it worked.
Thank you for your solution.
I have two last questions.
1) Is it possible to do the same work with openmpi installed?
2) Is there an openmpi in the intel parallel studio package as well? If yes, do we have to activate it or it is automatically set up when we execute psxevars.sh?
With regards,
Arnab Majumdar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
We haven't heard back from you, are you able to build sassena successfully now?
Let us know if you are still facing any issues.
Regards
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanth,
I am really sorry for the late reply.
I am still not able to build sassena using mpiicpc.
However, I am still trying.
In the meantime,
1) My LD_LIBRARY_PATH is the following: /opt/intel/itac/2020.2.031/intel64/slib:/opt/intel/compilers_and_libraries_2020.2.254/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/libfabric/lib:/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/lib/release:/opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2020.2.254/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2020.2.254/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.2.254/linux/tbb/lib/intel64/gcc4.8:/opt/intel/debugger_2020/python/intel64/lib:/opt/intel/debugger_2020/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2020.2.254/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.2.254/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2020.2.254/linux/daal/../tbb/lib/intel64_lin/gcc4.8
I can see that the intel path is there in the libraray path. Isn't it enough?
2) I can not find mpivars.sh/setvars.sh in the opt/intel folder. However I ran psxevars.sh when I installed parallel studio and added it in the .bashrc. isnt that enough?
3) I have set CMAKE_CXX_COMPILER to mpiicpc, isn't that enough?
With regards,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Sorry for the delay in response. to answer your questions:
Q) I ran psxevars.sh when I installed parallel studio and added it in the .bashrc. isn't that enough?
A) Yes, running psxevars script is enough for setting the environment for every component in Parallel Studio unless you want a different library configuration.
Q) I have set CMAKE_CXX_COMPILER to mpiicpc, isn't that enough?
If your code only uses C++, then it is enough if you need other compilers then set them too. For example, FCC when using mpiifort and CC for mpiicc for C compiler
Q) Is it possible to do the same work with openmpi installed?
A) I think it should work but i haven't tried with OpenMPI installed in my system. But if you are fine with this we can continue.
Q)Is there an openmpi in the intel parallel studio package as well?
A) No i think Parallel studio comes with Intel MPI only.
I haven't seen the OpenMPI path in your LD_LIBRARY_PATH but not sure why even without loading it is causing conflicts with Intel MPI.
As far as I can tell both OpenMPI and IMPI cannot run concurrently. But they can co-exist in a single system given only one is loaded.
Let me know if you have any further questions.
Regards
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanth,
I was also wondering, why this conflict occurred. I also could not find openmpi path in the LD_LIBRARY_PATH.
However, I don't have any further questions. Thank you for your help.
With regards,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Arnab,
Thanks for the confirmation.
We are closing the thread as the issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only
Regards
Prasanth
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page