I have a C code that does some linear algebra. On another machine I have used the GSL library for this, but it isn’t available on the machine I want to use and on which I am using pgcc to compile. Is my best option to install GSL and use that, or should I use some other library, such as LAPACK. And if the latter, how do I link to it?
The nice thing about C code is that there is no external symbol altering
in the code. If you have a procedure called vadd in C, the symbol is vadd.
If you call vadd in pgfortran, the symbol the linker seeks is vadd_, in pgc++,
it is ‘mangled/flowered’, but matches what g++ would create.
So add the proper prototype (math.h? cblas.h?) headers, and compiling
with pgcc should be the same as compiling with icc or gcc.