Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I updated Ubuntu from 10.04 to 12.04 and installed open-mpi1.6.1 from the site using the g95 compiler (because it is necessary to do so in order to run the chimere air pollution model). Two years ago I did the same thing using Ubuntu 10.04 and open-mpi1.4.1 without any problem. Now the program always stops with:

/opt/openmpi-1.6.1-g95/bin/mpif90 -o chimere.e -I/usr/local/include -I/include -cpp -O3  -DG95 -fno-second-underscore -i4  -DMPI -ffree-form -ffree-line-length-huge \
                chimere.o integrun.o master_message_subs.o master_locvalues.o \
                chimere_common.o message_defs.o chimere_consts.o chimere_params.o \
                -L.  -linitio -ltools -lmodel -ltools -liso -L/usr/local/lib -lnetcdf -L/lib -L/opt/openmpi-1.6.1-g95/lib/

ld: chimere.o: undefined reference to symbol 'mpi_null_delete_fn_'

ld: note: 'mpi_null_delete_fn_' is defined in DSO /opt/openmpi-1.6.1-g95/lib/ so try adding it to the linker command line

/opt/openmpi-1.6.1-g95/lib/ could not read symbols: Invalid operation

make: *** [chimere] Error 1

I set links (ln -s) of the open-mpi libraries to /usr/lib and

objdump -T /usr/lib/ 

indicates mpi_null_delete_fn and mpi_null_delete_fn_ describes a similar problem.

Does anybody has an idea how to solve this problem?

share|improve this question

Add -lmpi to your call.

You specified where the correct library is located, but you didn't tell your linker to link it.

share|improve this answer
Thank you for your answer. I added -lmpi but the error remains. – Frank Sep 14 '12 at 14:18
He is using mpif90, which already takes care of linking against libmpi, so adding -lmpi has no effect. – kynan Aug 10 '13 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.