Software Archive
Read-only legacy content
17061 Discussions

Need Help! An error when linking netcdf during compiling a MPI program on MIC

Yuchen_Q_
Beginner
527 Views

Friends:

I met a compile error when I was trying to build an application on mic.

I wanted to build a MPI program in fortran, which failed with an error as below:

x86_64-k1om-linux-ld: skipping incompatible /usr/local/netcdf/lib/libnetcdf.a when searching for -lnetcdf
x86_64-k1om-linux-ld: cannot find -lnetcdf

That meant the compiler can't get the netcdf linked correctly for the file libnetcdf.a is incompatible with the compilier. However, if I remove the compilie opition "-mmic", which means I want to get an version for cpu not mic, it will be successful. I don't know why!

If any one of you has an ideal, help me, please!

Thank you

0 Kudos
1 Reply
TimP
Honored Contributor III
527 Views

Apparently, you have a libnetcdf.a built for host but are missing the corresponding build with -mmic, which you would have to create yourself.  Several different ways of doing this should be found by a web search.

0 Kudos
Reply