AW: compiling charm++ Error: can not find mpi library

From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Thu Sep 27 2012 - 01:46:23 CDT

Hi Thomas,

 

while compiling the mpi, it will create some wrapper compilers, for example
mpicc which will call the compiler you used for the mpi build, so in this
case icc, and will pass all required librarys by default, so you don't have
to care about this anymore. That's the trick, so just use the mpicc now.

 

Good luck

 

Norman Geist.

 

Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im Auftrag
von Thomas Evangelidis
Gesendet: Donnerstag, 27. September 2012 00:15
An: namd-l
Betreff: namd-l: compiling charm++ Error: can not find mpi library

 

Greetings,

I have compiled mpich-1.4.1p1 using the Intel compilers. When I try to
compile charmm++ the following command line completes successfully:

./build charm++ mpi-linux-x86_64 -j8 --basedir /usr/local/mpich-1.4.1p1_icc
-O

but when I add the icc flag to use the Intel compiler I get:

checking "whether build on MPI"... "yes"
checking "whether need to specify MPI library"... "yes"
checking "whether -lmpich"... "no"
checking "whether -lmpi"... "no"
Error: can not find mpi library
*** Please find detailed output in charmconfig.out ***

My charmmconfig.out has the following stack trace:

### whether -lmpich
#include "mpi.h"
int main(int argc, char **argv)
{
  MPI_Init(&argc, &argv);
}
icpc -fpic -I../include -I. -fno-stack-protector
-I/usr/local/mpich-1.4.1p1_icc/include -c test.cpp -o test.o -lmpich
icpc -shared-intel -o testlink test.o -L/usr/local/mpich-1.4.1p1_icc/lib
-lmpich
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(init.o): In function `MPI_Init':
init.c:(.text+0x6e): undefined reference to `MPL_env2str'
init.c:(.text+0x268): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(initthread.o): In function
`MPI_Init_thread':
initthread.c:(.text+0x113): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(mpiu_thread.o): In function
`MPIU_Thread_create':
mpiu_thread.c:(.text+0x5f): undefined reference to `pthread_create'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x10): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x28): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x40): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x58): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x70): undefined reference to `MPL_env2int'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o):param_vals.c:(.tex
t+0x88): more undefined references to `MPL_env2int' follow
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x328): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x340): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x358): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x370): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x388): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o):param_vals.c:(.tex
t+0x3a0): more undefined references to `MPL_env2bool' follow
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x448): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x460): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x478): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x490): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x4a8): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x4c0): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x4d8): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o):param_vals.c:(.tex
t+0x4f0): more undefined references to `MPL_env2bool' follow
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x508): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x520): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x538): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x550): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x568): undefined reference to `MPL_env2str'
param_vals.c:(.text+0x580): undefined reference to `MPL_env2str'
param_vals.c:(.text+0x598): undefined reference to `MPL_env2str'
param_vals.c:(.text+0x5b0): undefined reference to `MPL_env2str'
param_vals.c:(.text+0x5c8): undefined reference to `MPL_env2str'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o):param_vals.c:(.tex
t+0x5e0): more undefined references to `MPL_env2str' follow
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x5f8): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x610): undefined reference to `MPL_env2int'
param_vals.c:(.text+0x628): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x640): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x658): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x670): undefined reference to `MPL_env2bool'
param_vals.c:(.text+0x688): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o):param_vals.c:(.tex
t+0x6a0): more undefined references to `MPL_env2bool' follow
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(param_vals.o): In function
`MPIR_Param_init_params':
param_vals.c:(.text+0x6ed): undefined reference to `MPL_env2range'
param_vals.c:(.text+0x70a): undefined reference to `MPL_env2range'
param_vals.c:(.text+0x727): undefined reference to `MPL_env2range'
param_vals.c:(.text+0x740): undefined reference to `MPL_env2range'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(mpid_init.o): In function
`MPID_Init':
mpid_init.c:(.text+0x172): undefined reference to `MPL_env2bool'
/usr/local/mpich-1.4.1p1_icc/lib/libmpich.a(mpid_vc.o): In function
`MPIDI_Populate_vc_node_ids':
mpid_vc.c:(.text+0xcd0): undefined reference to `MPL_env2int'
mpid_vc.c:(.text+0xce2): undefined reference to `MPL_env2int'

Any idea why this is happening?

Thomas

-- 
======================================================================
Thomas Evangelidis
PhD student
University of Athens
Faculty of Pharmacy
Department of Pharmaceutical Chemistry
Panepistimioupoli-Zografou
157 71 Athens
GREECE
email: tevang_at_pharm.uoa.gr
          tevang3_at_gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
 
 

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:22:37 CST