From 8ab0a42fbe28c55ebc90b9cf794659008ea9d3e5 Mon Sep 17 00:00:00 2001 From: anhzhang Date: Wed, 14 Oct 2015 14:50:26 +0800 Subject: [PATCH 1/4] Added an new item how to link intel statically This is the fix to #818, https://github.com/open-mpi/ompi/issues/818 --- faq/building.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/faq/building.inc b/faq/building.inc index 46721eabde..6371ccdb11 100644 --- a/faq/building.inc +++ b/faq/building.inc @@ -1744,3 +1744,19 @@ href=\"$topdir/community/help/\">Getting Help page -- it details how to send a request to the Open MPI mailing lists."; ///////////////////////////////////////////////////////////////////////// + +$q[] = "How do I statically link to the libraries of Intel compiler suite?"; + +$anchor[] = "statically-link-with-intel-libraries"; + +$a[] = "When compiled with Intel compiler suite, by default Openmpi binaries are + dynamically linked against several Intel libraries, this might cause those executalbes + to crash if you install Intel compiler suite on local disk. To statically link to the + libraries of Intel compiler suite, pass \"LDFLAGS=-Wc,-static-intel\" to configure like + the following: + + +shell$$./configure CC=icc CXX=icpc FC=ifort LDFLAGS=-Wc,-static-intel ... + + +///////////////////////////////////////////////////////////////////////// From adc2ef8660425705f56a4352c39ee5b05a9c9350 Mon Sep 17 00:00:00 2001 From: anhzhang Date: Thu, 15 Oct 2015 16:04:02 +0800 Subject: [PATCH 2/4] Update building.inc Improved it based on Jeff's nice review comments. --- faq/building.inc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/faq/building.inc b/faq/building.inc index 6371ccdb11..51809ff851 100644 --- a/faq/building.inc +++ b/faq/building.inc @@ -1749,14 +1749,20 @@ $q[] = "How do I statically link to the libraries of Intel compiler suite?"; $anchor[] = "statically-link-with-intel-libraries"; -$a[] = "When compiled with Intel compiler suite, by default Openmpi binaries are - dynamically linked against several Intel libraries, this might cause those executalbes - to crash if you install Intel compiler suite on local disk. To statically link to the - libraries of Intel compiler suite, pass \"LDFLAGS=-Wc,-static-intel\" to configure like - the following: +$a[] = "The Intel compiler suite, by default, dynamically links its runtime + libraries against the Open MPI binaries and libraries. This can cause problems + if the Intel compiler libraries are installed in non-standard locations. + For example, you might get errors like: + + error while loading shared libraries: libimf.so: cannot open shared object file: + No such file or directory + + To avoid such problems, you can pass flags to Open MPI's configure script that + instruct the Intel compiler suite to statically link its runtime libraries with + Open MPI: -shell$$./configure CC=icc CXX=icpc FC=ifort LDFLAGS=-Wc,-static-intel ... - +shell$ ./configure CC=icc CXX=icpc FC=ifort LDFLAGS=-Wc,-static-intel ... +"; ///////////////////////////////////////////////////////////////////////// From 02481fb61b470ae0fa1abb9483f9a5428658c52b Mon Sep 17 00:00:00 2001 From: anhzhang Date: Fri, 16 Oct 2015 11:31:09 +0800 Subject: [PATCH 3/4] Update building.inc put the error message in geshi. --- faq/building.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/faq/building.inc b/faq/building.inc index 51809ff851..8d3b3389ae 100644 --- a/faq/building.inc +++ b/faq/building.inc @@ -1754,8 +1754,10 @@ $a[] = "The Intel compiler suite, by default, dynamically links its runtime if the Intel compiler libraries are installed in non-standard locations. For example, you might get errors like: + error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory + To avoid such problems, you can pass flags to Open MPI's configure script that instruct the Intel compiler suite to statically link its runtime libraries with From 0a1f14f883a39ccafc9fae55aa373a7575968b45 Mon Sep 17 00:00:00 2001 From: "anhzhang@cn.ibm.com" Date: Mon, 19 Oct 2015 14:32:13 +0800 Subject: [PATCH 4/4] updated faq/building.inc after checking its display with nignx/php5 --- faq/building.inc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/faq/building.inc b/faq/building.inc index 8d3b3389ae..765001d591 100644 --- a/faq/building.inc +++ b/faq/building.inc @@ -1749,19 +1749,18 @@ $q[] = "How do I statically link to the libraries of Intel compiler suite?"; $anchor[] = "statically-link-with-intel-libraries"; -$a[] = "The Intel compiler suite, by default, dynamically links its runtime - libraries against the Open MPI binaries and libraries. This can cause problems - if the Intel compiler libraries are installed in non-standard locations. - For example, you might get errors like: +$a[] = "The Intel compiler suite, by default, dynamically links its runtime libraries +against the Open MPI binaries and libraries. This can cause problems if the Intel +compiler libraries are installed in non-standard locations. For example, you might +get errors like: - - error while loading shared libraries: libimf.so: cannot open shared object file: - No such file or directory - +
+error while loading shared libraries: libimf.so: cannot open shared object file: +No such file or directory +
- To avoid such problems, you can pass flags to Open MPI's configure script that - instruct the Intel compiler suite to statically link its runtime libraries with - Open MPI: +To avoid such problems, you can pass flags to Open MPI's configure script that instruct +the Intel compiler suite to statically link its runtime libraries with Open MPI: shell$ ./configure CC=icc CXX=icpc FC=ifort LDFLAGS=-Wc,-static-intel ...