PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Prelink error and templates in pgCC

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Michael Xu



Joined: 30 Sep 2005
Posts: 1

PostPosted: Fri Sep 30, 2005 8:48 pm    Post subject: Prelink error and templates in pgCC Reply with quote

Dear PGI users and developers:

I tried to use pgCC-5.2 to compile a finite element library (libmesh from sourceforge) in a linux cluster. The compilation halted and reported error during prelink:

Linking /home/m254/minxu/libmesh/lib/i686-pc-linux-gnu_opt/libmesh.so
C++ prelinker: executing: /usr/pgi/linux86/5.2/bin/pgCC -DNDEBUG -O2 --no_using_std --instantiate=none --one_instantiation_per_object --prelink_objects -DPETSC_USE_DYNAMIC_LIBRARIES -I/home/m254/minxu/libmesh/include/base -I/home/m254/minxu/libmesh/include/enums -I/home/m254/minxu/libmesh/include/fe -I/home/m254/minxu/libmesh/include/geom -I/home/m254/minxu/libmesh/include/mesh -I/home/m254/minxu/libmesh/include/numerics -I/home/m254/minxu/libmesh/include/partitioning -I/home/m254/minxu/libmesh/include/quadrature -I/home/m254/minxu/libmesh/include/solvers -I/home/m254/minxu/libmesh/include/utils -I/home/m254/minxu/libmesh/contrib/boost -I/home/m254/minxu/libmesh/contrib/laspack -I/home/m254/minxu/libmesh/contrib/parmetis/Lib -I/home/m254/minxu/libmesh/contrib/metis/Lib -I/home/m254/minxu/libmesh/contrib/sfcurves -I/home/m254/minxu/libmesh/contrib/tecplot/include -I/home/m254/minxu/libmesh/contrib/tetgen -I/home/m254/minxu/libmesh/contrib/triangle -I/home/m254/minxu/petsc-2.3.0/include -I/home/m254/minxu/petsc-2.3.0/bmake/linux-gnu -o src/base/dof_map.i686-pc-linux-gnu.opt.o -c src/base/dof_map.C
unlink failed: Bad address
rename failed: Bad address
C++ prelinker: error: "std::basic_string<char, std::char_traits<char>, std::allocator<char>> Utility::enum_to_string<T1>(T1) [with T1=libMeshEnums::Order]" has been referenced as both an explicit specialization and a generated instantiation
C++ prelinker: error: "std::basic_string<char, std::char_traits<char>, std::allocator<char>> Utility::enum_to_string<T1>(T1) [with T1=libMeshEnums::FEFamily]" has been referenced as both an explicit specialization and a generated instantiation
C++ prelinker: error: "double FE<N1, N2>::shape(const Elem *, libMeshEnums::Order, unsigned int, const Point &) [with N1=(unsigned int)2, N2=(libMeshEnums::FEFamily)4]" has been referenced as both an explicit specialization and a generated instantiation
C++ prelinker: error: "double FE<N1, N2>::shape(const Elem *, libMeshEnums::Order, unsigned int, const Point &) [with N1=(unsigned int)2, N2=(libMeshEnums::FEFamily)1]" has been referenced as both an explicit specialization and a generated instantiation
C++ prelinker: error: "double FE<N1, N2>::shape(const Elem *, libMeshEnums::Order, unsigned int, const Point &) [with N1=(unsigned int)3, N2=(libMeshEnums::FEFamily)3]" has been referenced as both an explicit specialization and a generated instantiation
C++ prelinker: error: "double FE<N1, N2>::shape(const Elem *, libMeshEnums::Order, unsigned int, const Point &) [with N1=(unsigned int)2, N2=(libMeshEnums::FEFamily)3]" has been referenced as both an explicit specialization and a generated instantiation
make: *** [/home/m254/minxu/libmesh/lib/i686-pc-linux-gnu_opt/libmesh.so] Error 2

The same code has been compiled without error using gnu g++-3.4 and g++-4.0. The options used for pgCC are: -O2 --no_using_std --instantiate=none --one_instantiation_per_object --prelink_objects.

Questions:
(1) What is the error causing "unlink failed: Bad address
rename failed: Bad address"?

(2) What is the error for "both an explicit specialization and a generated instantiation"?

(3) How to fix?

Thanks for your help.

Michael
Back to top
View user's profile
Deborah Caruso



Joined: 20 Oct 2004
Posts: 43

PostPosted: Mon Oct 03, 2005 1:03 pm    Post subject: Reply with quote

Michael-

I suspect that you are using the specialized template:

std::basic_string<char, std::char_traits<char>, std::allocator<char>>
Utility::enum_to_string<T1>(T1) [with T1=libMeshEnums::Order]"

Without a declaration of that specialized template in the file in which it is used.

This is a violation of the standard that Gnu compilers do not catch. We are
looking into relaxing this requirement, but for now, you'll need to declare the specializations
where you use them.

Note the "unlink failed" will go away when pgprelink executes without failure.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group