Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Dennis McRitchie (dmcr_at_[hidden])
Date: 2006-12-13 18:15:22


When creating a static build of an MPI program, I get a number of fatal
error messages, as listed below. They are all regarding conflicts
between duplicate definitions and different sizes of malloc, free,
realloc, etc. for the RHEL4 and openmpi versions of these functions. I
could build openmpi with --without-memorymanager, but we are using
infiniband and need the memory manager features.

I am using openmpi v1.1.2 built against the Intel fortran compiler v9.1
on RHEL4.

"/usr/local/openmpi-intel/bin/mpif90 -showme" returns:

ifort -I/usr/local/openmpi-1.1.2-intel/include -pthread
-I/usr/local/openmpi-1.1.2-intel/lib
-L/usr/local/openmpi-1.1.2-intel/lib -lmpi_f90 -lmpi -lorte -lopal -lrt
-lpbs -ldl -Wl,--export-dynamic -lnsl -lutil -ldl

The offending line is the one that links the program. I've added the -v
option so you can see all the utilities invoked below.

Is there any way to prevent this behavior?

Thanks,
       Dennis
----------------------------------------------------

/usr/local/openmpi-intel/bin/mpif90 -v -traceback -mp -warn all -module
mod -X -I. -static -g -o OFDFT obj/dcstep.o obj/dcsrch.o
obj/F77flush.o obj/Constants.o obj/Timer.o obj/Fourier.o
obj/MathFunctions.o obj/DataTypes.o obj/GridUtilities.o obj/System.o
obj/Output.o obj/Ewald.o obj/FunctionalDataStruct.o
obj/FunctionalPotential.o obj/FunctionalKinetic.o obj/Calculator.o
obj/DiscretizePDE.o obj/DiscretizeOFDFT.o obj/Multigrid.o
obj/MultigridOptimizers.o obj/CellOptimizers.o obj/IonOptimizers.o
obj/RhoOptimizers.o obj/Optimizer.o obj/ReadInputFiles.o
obj/InitializeInputs.o obj/OFDFT.o -L/usr/local/intel/lib -lrfftw_mpi
-lfftw_mpi -lrfftw -lfftw
Version 9.1
/opt/intel/fc/9.1.039/bin/fortcom -mP1OPT_version=910
-mGLOB_source_language=GLOB_SOURCE_LANGUAGE_F90 -mGLOB_tune_for_fort
-mGLOB_use_fort_dope_vector -mP2OPT_static_promotion
-mP1OPT_print_version=FALSE -mP3OPT_use_mspp_call_convention
-mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE
"-mGLOB_options_string=-I/usr/local/openmpi-1.1.2-intel/include
-I/usr/local/openmpi-1.1.2-intel/lib -I. -pthread -v -traceback -mp
-warn all -module mod -X -static -g -o OFDFT -L/usr/local/intel/lib
-lrfftw_mpi -lfftw_mpi -lrfftw -lfftw
-L/usr/local/openmpi-1.1.2-intel/lib -lmpi_f90 -lmpi -lorte -lopal -lrt
-lpbs -ldl -Wl,--export-dynamic -lnsl -lutil -ldl"
-mGLOB_cxx_limited_range=FALSE -mGLOB_traceback
-mP3OPT_emit_line_numbers -mGLOB_debug_target=GLOB_DEBUG_TARGET_ALL
-mGLOB_debug_format=GLOB_DEBUG_FORMAT_DWARF20
-mGLOB_as_output_backup_file_name=/tmp/ifortABDp1Pas_.s
-mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE
-mGLOB_use_base_pointer -mGLOB_maintain_precision
-mGLOB_precision_mask=0xffffffff -mP2OPT_subs_out_of_bound=FALSE
-mIPOPT_ninl_user_level=2 -mIPOPT_activate -mP2OPT_hlo -mIPOPT_link
-mIPOPT_ipo_activate -mIPOPT_ipo_mo_activate -mIPOPT_ipo_mo_nfiles=1
-mIPOPT_source_files_list=/tmp/ifortighInHlst
-mIPOPT_short_data_info=/tmp/ifort0zku2Ysdata
-mIPOPT_link_script_file=/tmp/ifort4SghHgscript -mIPOPT_global_data
"-mIPOPT_link_version=2.15.92.0.220040927"
"-mIPOPT_cmdline_link="/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt
1.o" "/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crti.o"
"/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginT.o" "-static" "-m"
"elf_i386" "-o" "OFDFT" "/opt/intel/fc/9.1.039/lib/for_main.o"
"obj/dcstep.o" "obj/dcsrch.o" "obj/F77flush.o" "obj/Constants.o"
"obj/Timer.o" "obj/Fourier.o" "obj/MathFunctions.o" "obj/DataTypes.o"
"obj/GridUtilities.o" "obj/System.o" "obj/Output.o" "obj/Ewald.o"
"obj/FunctionalDataStruct.o" "obj/FunctionalPotential.o"
"obj/FunctionalKinetic.o" "obj/Calculator.o" "obj/DiscretizePDE.o"
"obj/DiscretizeOFDFT.o" "obj/Multigrid.o" "obj/MultigridOptimizers.o"
"obj/CellOptimizers.o" "obj/IonOptimizers.o" "obj/RhoOptimizers.o"
"obj/Optimizer.o" "obj/ReadInputFiles.o""obj/InitializeInputs.o"
"obj/OFDFT.o" "-L/usr/local/intel/lib" "-lrfftw_mpi" "-lfftw_mpi"
"-lrfftw" "-lfftw" "-L/usr/local/openmpi-1.1.2-intel/lib" "-lmpi_f90"
"-lmpi" "-lorte" "-lopal" "-lrt" "-lpbs" "-ldl" "--export-dynamic"
"-lnsl" "-lutil" "-ldl" "-L/opt/intel/fc/9.1.039/lib"
"-L/usr/lib/gcc/i386-redhat-linux/3.4.6/"
"-L/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../" "-lifport"
"-lifcoremt" "-limf" "-lm" "-lipgo" "-lpthread" "-lirc" "-ldl" "-lc"
"-lgcc" "-lgcc_eh" "-lirc_s" "-ldl" "-lc"
"/usr/lib/gcc/i386-redhat-linux/3.4.6/crtend.o"
"/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crtn.o"" -mIPOPT_save_il0
-mIPOPT_il_in_obj -mIPOPT_ipo_activate_warn=FALSE
-mIPOPT_obj_output_file_name=/tmp/ipo_ifortobAc47.o
"-mGLOB_linker_version=2.15.92.0.2 20040927"
-mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS
-mGLOB_obj_output_file=/tmp/ipo_ifortobAc47.o
-mP1OPT_source_file_name=/tmp/ipo_ifortobAc47.f obj/dcstep.o
obj/dcsrch.o obj/F77flush.o obj/Constants.o obj/Timer.o obj/Fourier.o
obj/MathFunctions.o obj/DataTypes.o obj/GridUtilities.o obj/System.o
obj/Output.o obj/Ewald.o obj/FunctionalDataStruct.o
obj/FunctionalPotential.o obj/FunctionalKinetic.o obj/Calculator.o
obj/DiscretizePDE.o obj/DiscretizeOFDFT.o obj/Multigrid.o
obj/MultigridOptimizers.o obj/CellOptimizers.o obj/IonOptimizers.o
obj/RhoOptimizers.o obj/Optimizer.o obj/ReadInputFiles.o
obj/InitializeInputs.o obj/OFDFT.o
-mIPOPT_object_files=/tmp/ifortUc3WIptxt
ld /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginT.o -static -melf_i386 -o
OFDFT /opt/intel/fc/9.1.039/lib/for_main.o obj/dcstep.o obj/dcsrch.o
obj/F77flush.o obj/Constants.o obj/Timer.o obj/Fourier.o
obj/MathFunctions.o obj/DataTypes.o obj/GridUtilities.o obj/System.o
obj/Output.o obj/Ewald.o obj/FunctionalDataStruct.o
obj/FunctionalPotential.o obj/FunctionalKinetic.o obj/Calculator.o
obj/DiscretizePDE.o obj/DiscretizeOFDFT.o obj/Multigrid.o
obj/MultigridOptimizers.o obj/CellOptimizers.o obj/IonOptimizers.o
obj/RhoOptimizers.o obj/Optimizer.o obj/ReadInputFiles.o
obj/InitializeInputs.o obj/OFDFT.o -L/usr/local/intel/lib -lrfftw_mpi
-lfftw_mpi -lrfftw -lfftw -L/usr/local/openmpi-1.1.2-intel/lib -lmpi_f90
-lmpi -lorte -lopal -lrt -lpbs -ldl --export-dynamic -lnsl -lutil -ldl
-L/opt/intel/fc/9.1.039/lib -L/usr/lib/gcc/i386-redhat-linux/3.4.6/
-L/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ -lifport -lifcoremt
-limf -lm -lipgo -lpthread -lirc -ldl -lc -lgcc -lgcc_eh -lirc_s -ldl
-lc /usr/lib/gcc/i386-redhat-linux/3.4.6/crtend.o
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crtn.o
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(ltdl.o)(.text+0xb1): In
function `sys_dl_open':
: warning: Using 'dlopen' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/local/openmpi-1.1.2-intel/lib/liborte.a(sys_info.o)(.text+0x12b):
In function `orte_sys_info':
: warning: Using 'getpwuid' in statically linked applications requires
at runtime theshared libraries from the glibc version used for linking
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(if.o)(.text+0x44d): In
function `opal_ifislocal':
: warning: Using 'gethostbyname' in statically linked applications
requires at runtime the shared libraries from the glibc version used for
linking
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
14fc): In function `free':
: multiple definition of `free'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x602):
first defined here
ld: Warning: size of symbol `free' changed from 196 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 175 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
3058): In function `malloc':
: multiple definition of `malloc'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x6c6):
first defined here
ld: Warning: size of symbol `malloc' changed from 328 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 373 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
360c): In function `realloc':
: multiple definition of `realloc'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x48e):
first defined here
ld: Warning: size of symbol `realloc' changed from 372 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 667 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
424): In function `_int_new_arena':
: multiple definition of `_int_new_arena'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x9aa):
first defined here
ld: Warning: size of symbol `_int_new_arena' changed from 392 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 180 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
dbc): In function `_int_free':
: multiple definition of `_int_free'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x1bda)
: first defined here
ld: Warning: size of symbol `_int_free' changed from 318 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 1658 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
15ac): In function `_int_malloc':
: multiple definition of `_int_malloc'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0xc48):
first defined here
ld: Warning: size of symbol `_int_malloc' changed from 1358 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 3101 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
229c): In function `_int_memalign':
: multiple definition of `_int_memalign'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x2020)
: first defined here
ld: Warning: size of symbol `_int_memalign' changed from 520 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 413 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
243c): In function `_int_valloc':
: multiple definition of `_int_valloc'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x3148)
: first defined here
ld: Warning: size of symbol `_int_valloc' changed from 56 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 63 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
25b0): In function `_int_realloc':
: multiple definition of `_int_realloc'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x18c8)
: first defined here
ld: Warning: size of symbol `_int_realloc' changed from 786 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 1065 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)(.text+0x
38a8): In function `__malloc_check_init':
: multiple definition of `__malloc_check_init'
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o)(.text+0x3f74)
: first defined here
ld: Warning: size of symbol `__malloc_check_init' changed from 136 in
/usr/local/openmpi-1.1.2-intel/lib/libopal.a(lt1-malloc.o) to 154 in
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libc.a(malloc.o)
rm /tmp/ifortKvfupQgnudirs

rm /tmp/ifortUc3WIptxt

rm /tmp/ifortighInHlst

rm /tmp/ifort0zku2Ysdata

rm /tmp/ifort4SghHgscript

rm /tmp/ipo_ifortobAc47.o

rm /tmp/ifortU0T4lygas

rm /tmp/ifortABDp1Pas_.s

rm /tmp/ifortcqBMG7ldashv

rm /tmp/ifortQFeRmpgnudirs

rm /tmp/ifortgAJO3Garg