Shared library version of pnetcdf

Bruno Pagani bruno.pagani at astrophysics.eu
Mon Sep 25 07:29:52 CDT 2017


Le 25/09/2017 à 14:10, Ed Hartnett a écrit :
> You know, I believe I don't have shared pnetcdf libraries either!
>
> So I will echo Wadud's question: how do I build a pnetcdf shared library.
>

They apparently build the shared version on Debian, by adding -fPIC to
{C,CXX,FC,F}FLAGS and then after running make they do the following things:

cd src/lib && mpicxx -shared -o libpnetcdf.so.0d -Wl,--soname
-Wl,libpnetcdf.so.0d $(LDFLAGS) -Wl,--whole-archive libpnetcdf.a
-Wl,--no-whole-archive -lgfortran
chrpath -d ./src/lib/libpnetcdf.so.0d

And finally they symlink this lib to libpnetcdf.so

Hope it helps,
Bruno


More information about the parallel-netcdf mailing list