Advice on C/FORTRAN wrapper library

447 views Asked by At

I am trying to compile some source code and I am having issues. The code is written in C and FORTRAN and I am running into an issue with my compilers going from one to the other. This is the error message being returned;

mod_par.o: In function `__mod_par_MOD_domdec':
mod_par.f90:(.text+0x35a47): undefined reference to `partition_'
collect2: error: ld returned 1 exit status
make: *** [fvcom] Error 1

This is what I believe to be the offending bit of code from the file mod_par.F;

# if !defined (PARTITION_SPECIAL)

So I have been advised that this is a common problem encountered due to different naming conventions in C and FORTRAN. I have been give some advice on how to go about solving the problem, however, I don't understand the advice. It is as follows;

1) Work out which library hosts this partition function

2) Read through the docs for that library to find out how to generate a fortran wrapper library

3) Make sure you link through to the wrapper library as well as the original library

Anyone able to put this into laymans terms for me/advise on how to proceed/point me on to info to help me proceed? Let me know if you need anymore info.

1

There are 1 answers

3
Armali On

I actually resolved this the issue was that I was building the application using mpi compilers and the METIS library that was required for a parallel build was not linked. I linked this and the application is now built. – deiniol