Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Intel compiled undefined reference errors (i.e. mpi_reduce_)
From: Elken, Tom (tom.elken_at_[hidden])
Date: 2013-06-24 14:21:53

I saw a couple of issues noted below ...

Now I am still getting some undefined reference errors. Namely:
[root_at_odie 060911_rmc_eam_gr_vk_t4]# make
ifort -g -debug all -check all -implicitnone -warn all -o rmc_test ran2.o globals.o read_inputs.o model.o rmc_functions.o scattering_factors.o fem1.o gr.o eam.o rmc_v_1_0.o -L /export/apps/openmpi_intel_20130618/lib -lmpi
>From your makefile below, this compile command is generated by your DEBUG target. Fixes to the FC_DEBUG command noted below in your makefile...

ifort: warning #10182: disabling optimization; runtime debug checks enabled
fem1.o: In function `fem':
/state/partition1/home/jjmaldonis/Jinwoo/2011/060911_rmc_eam_gr_vk_t4/fem1.f90:583: undefined reference to `mpi_reduce_'
/state/partition1/home/jjmaldonis/Jinwoo/2011/060911_rmc_eam_gr_vk_t4/fem1.f90:584: undefined reference to `mpi_reduce_'
fem1.o: In function `fem_update':
[Tom] <snip>

The above undefined reference errors are my problem.

Below are my PATH and LD_LIBRARY_PATH variables, if they are of help.
echo $PATH
You should try to get
earlier in your path, ahead of this part:
which comes from the intel compilers 'compilervars.[c]sh' script and points to the Intel MPI run-time libraries (which you don't want, since you are using Open MPI).
Either that, or use a full path to your OpenMPI/Intel mpirun when you are ready to run the app., such as:
/export/apps/openmpi_intel_20130618/bin/mpirun .... ./rmc_test

[Tom] <snip>

Below I will paste my makefile, and attached are the compressed "./configure ..." and "make all install" command logs. Please let me know anything else that you need.

# default makefile for ifort compiler with more or less
# appropriate options for debugging and high performance

# application name
APP = rmc_test

# list of source files
SRC = ran2.f90 globals.f90 read_inputs.f90 model.f90 rmc_functions.f90 scattering_factors.f90 fem1.f90 gr.f90 eam.f90 rmc_v_1_0.f90

# list of object files
OBJ = ran2.o globals.o read_inputs.o model.o rmc_functions.o scattering_factors.o fem1.o gr.o eam.o rmc_v_1_0.o

# define libraries needed by the linker
LIBS = -L /export/apps/openmpi_intel_20130618/lib -lmpi
Make this blank, so you will depend on 'mpif90' to provide the linking information:

# -rpath /state/partition1/apps/intel_20130618/composer_xe_2013.3.163/compiler/lib/

# compiler options for debugging
FC_DEBUG = ifort -g -debug all -check all -implicitnone -warn all
[Tom] You should make this more like your FC_OPT definition, using mpif90 rather than ifort, such as:
FC_DEBUG = mpif90 -g -debug all -check all -implicitnone -warn all

[Tom] Cheers, Tom

# compiler options for optmized running
#FC_OPT = ifort -O3 -xO -ipo -no-prec-div -static
#FC_OPT = mpif90 -O3 -ipo -static
FC_OPT = mpif90 -O3

# build rules

.SUFFIXES: .f90 .o
        ${FC_DEBUG} -c $<

debug: ${OBJ}
        ${FC_DEBUG} -o ${APP} ${OBJ} ${LIBS}

opt: ${SRC}
        ${FC_OPT} -o ${APP} ${SRC} ${LIBS}

        rm -f *.mod *.o ${APP}
        ln -s /export/apps/openmpi_intel_20130618/lib/mpi.mod ./mpi.mod