[gmx-users] How to call an external LAPACK function in gromacs

qian wang qq.wang630 at gmail.com
Tue Apr 14 16:15:38 CEST 2015


Hi,

Here is the information. Thank you.

cmake .. -DGMX_EXTERNAL_BLAS=on -DGMX_EXTERNAL_LAPACK=on
-DCMAKE_PREFIX_PATH=/usr/lib64:
....
 Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Checking for dlopen
-- Performing Test HAVE_DLOPEN
-- Performing Test HAVE_DLOPEN - Success
-- Checking for dlopen - found
-- Found the ability to use plug-ins when building shared libaries, so will
compile to use plug-ins (e.g. to read VMD-supported file formats)
.....
Configuring done

make
.....
Linking CXX executable ../../bin/template
/usr/bin/c++    -march=core-avx2   -std=c++0x -Wextra
-Wno-missing-field-initializers -Wpointer-arith -Wall
-Wno-unused-function   -fomit-frame-pointer -funroll-all-loops
-fexcess-precision=fast  -Wno-array-bounds  -O3 -DNDEBUG
CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template -rdynamic
../../lib/libgromacs.so.0.0.0 -fopenmp -ldl -lrt -lm -lfftw3f -lblas
-llapack -lblas -llapack -lpthread
-Wl,-rpath,/home/qw9/Downloads/gromacs-5.0/build/lib
../../lib/libgromacs.so.0.0.0: undefined reference to `dpotrf'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/template] Error 1
make[1]: *** [share/template/CMakeFiles/template.dir/all] Error 2
make: *** [all] Error 2

Sincerely,
Qian

On Tue, Apr 14, 2015 at 3:56 AM, Mark Abraham <mark.j.abraham at gmail.com>
wrote:

> Hi,
>
> When you ran cmake originally, what did it report about which LAPACK it
> found and will use? (You may need to clean your build tree and start again
> in order to find this out.) What is the linker command line now (e.g. make
> VERBOSE=1)
>
> Mark
>
> On Mon, Apr 13, 2015 at 11:30 PM, qian wang <qq.wang630 at gmail.com> wrote:
>
> > Dear All,
> >
> > I am a new user of gromacs 5.0. For my own purposes I made small changes
> in
> > a gromacs source code where I called a function named "DPOTRF". This is a
> > standard function in LAPACK library but not in the gromacs internal
> LAPACK
> > library.
> >
> > Now I have a problem of compiling. What I did is:
> >
> > cmake .. -DGMX_EXTERNAL_BLAS=on -DGMX_EXTERNAL_LAPACK=on
> > -DCMAKE_PREFIX_PATH=/usr/lib64 (this is the path of my extenal LAPACK
> > library)
> > this step is ok
> > but next when I "make", the error I got is:
> >
> > Linking CXX executable ../../bin/template
> > ../../lib/libgromacs.so.0.0.0: undefined reference to `dpotrf'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [bin/template] Error 1
> > make[1]: *** [share/template/CMakeFiles/template.dir/all] Error 2
> >
> > Could anyone help me with this problem? Thanks a lot.
> >
> > Sincerely,
> > Qian
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list