Re: [Lapackpp-devel] Compiling LaPack++ on TACC Ranger
Status: Beta
Brought to you by:
cstim
From: Christian S. <sti...@tu...> - 2011-06-15 06:56:14
|
Dear Craig, thanks for your interest and your well-thought questions. Unfortunately I don't work with lapack++ anymore, so for the most part I can't really help here, except for two of your questions below. Also, I don't know about TACC at all but it's an interesting use case :-) Am Mittwoch, 15. Juni 2011 schrieb Craig Jolley: > Hi... I've been using LaPack++ for a while on my laptop machine, and I'm > now trying to parallelize my code and run it on the TACC Ranger cluster ( > http://www.tacc.utexas.edu/resources/hpc/#constellation). Unfortunately, > I'm running into some trouble -- I've tried building it using GCC, Intel, > and PGI compiler sets and they all run into different problems. I've also > contacted the TACC staff about this (I'm cc-ing the person I've been > talking to on this e-mail), but I thought that you might have some > experience with running LaPack++ in HPC environments, or at least with > using different compilers. In case you're wondering, I don't plan on > parallelizing the actual matrix calculations -- my code will be > diagonalizing a large number of fairly small matrices, so each matrix > operation will only be running on a single CPU. > > *********************** > > The PGI compiler fails while I'm trying to run "make", with the following > error: > > libtool: compile: pgCC -DHAVE_CONFIG_H -I. -I.. -I../include -I../include > -I../include -DLA_COMPLEX_SUPPORT -DLinux -g -c genmd.cc -fpic -DPIC -o > .libs/genmd.o > "genmd.cc", line 68: error: exception specification is incompatible with > that > of previous function "drand48" (declared at line 508 of > "/usr/include/stdlib.h") > extern "C" double drand48(void) throw (); > > It's not clear to me what this error is all about -- is there anything > special I need to do when compiling LaPack++ using the PGI suite? In src/genmd.cc line 68 you can safely remove the trailing "throw()" from the declaration of drand48. This should get rid of this error. In SVN, I've also remove that throws-clause. I thought the prototype of drand48() were standarized, including its exception specification aka throws-clause (even though in C++ the exception specification is almost useless anyway), but apparently this is not the case. Hence, that workaround of a local declaration of drand48 should simply be changed to not contain any throws-clause. > *********************** > > When I build in the GCC environment, configure and make work fine, but > "make check" fails with the following error: > > libtool: link: g++ -g -O2 -Wall -o .libs/tblasd++ tblasd++.o > ../../src/.libs/liblapackpp.so -Wl,-rpath > -Wl,/share/home/01055/tg803190/lapackpp/lib > /opt/apps/gcc4_4/atlas/3.9.32/lib/libatlas.so: undefined reference to > `pthread_attr_setaffinity_np' > > I've tried adding the environment CFLAGS=pthread and LDFLAGS=pthread when I > run configure (based on what I understood from > http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_attr_setaffin > ity_np.3.html), but then LaPack++ won't compile at all. If you want to have lapackp++ be linking against libpthread, you shouldn't modify CFLAGS and you should set LDFLAGS=-lpthread (your setting was missing the preceding "-l", a minus and a lower-case ell character). This should work with gcc and should probably fix the undefined-reference error. > *********************** > > Finally, when I build using Intel compilers, configure and make run > properly, but then "make check" gives me a bunch of lines that look like: > > ld: Dwarf Error: mangled line number section (bad file number). > > followed by a whole slew of "undefined reference" errors, all of them to > things in the std namespace. I'm not sure what a "dwarf error" is, but > this looks like a linking problem. Is there something special that I need > to do when building LaPack++ with Intel compilers? I used the CXX=icc, > CC=icc, F77=ifort, and FC=ifort environment variables with "configure"; > compilation failed when I tried using CXX=icpc instead. I have no idea about this error. It is a linking problem, yes, but this sort of problem rather shows up if the compiler tools have been mixed-up between different compilers. I.e. this error might occur if you have some object files compiled with gcc's compiler but which are now being linked with the Intel linker. Or vice versa: Maybe you correctly chose Intel compiler but didn't choose Intel's linker by setting LD=ild or something similar. > I know this is a lot of problems all at once and you probably aren't > familiar with the details of the TACC Ranger setup, but if you've had any > similar experiences with these compiler sets it could help me get this > resolved a lot more quickly. > > Thank you for taking the time to look at this. No experiences from my side, but those guesses as outlined above. Feel free to ask more questions, especially those well-thought and precise ones as above :-) and I'll see what I can help. Best Regards, Christian |