Closed WangYun1995 closed 3 years ago
If the output of $(pkg-config --cflags --libs scifor) command is wrong then the linking is ineffective and returns undefined reference, i.e. the procedure can not be find in any provided library or object file. The explicit string you supply is correct and make the compilation works (you can safely replace fortran with mpif90). Follow the instructions on the other issue to fix pkg-config. Then everything should work fine.
Your code compiled as a piece of cake on my system.
Firstly, I installed mpi. And I follow the make post-install instructions completely. Secondly, I write one tested code for testing the interpolation functionality of scifor.
After I input
$ mpif90 $(pkg-config --cflags --libs scifor) test_cubic_spline.f95
It returned an error to me as follows.However, it works when I compile this code by
gfortran test_cubic_spline.f95 -I/home/wangy/opt/scifor/gnu/4.6.31/include -L/home/wangy/opt/scifor/gnu/4.6.31/lib -lscifor
.