I am using the version 10.1.008 on a 64bit linux platform.
Your solution does fix the problem for that file, but the same error comes
out for other files:
Compiling C++ (in optimized mode) src/numerics/petsc_nonlinear_solver.C...
src/numerics/petsc_nonlinear_solver.C(90): error: more than one instance of
overloaded function "libmesh_assert_cast" ma
tches the argument list:
function template "Tnew libmesh_assert_cast<Tnew,Told>(Told &)"
function template "Tnew libmesh_assert_cast<Tnew,Told>(Told *)"
argument types are: (NumericVector<Number> *)
PetscVector<Number>& R_sys =
*libmesh_assert_cast<PetscVector<Number>*>(sys.rhs);
^
src/numerics/petsc_nonlinear_solver.C(135): error: more than one instance of
overloaded function "libmesh_assert_cast" m
atches the argument list:
function template "Tnew libmesh_assert_cast<Tnew,Told>(Told &)"
function template "Tnew libmesh_assert_cast<Tnew,Told>(Told *)"
argument types are: (SparseMatrix<Number> *)
PetscMatrix<Number>& Jac_sys =
*libmesh_assert_cast<PetscMatrix<Number>*>(sys.matrix);
BTW, As suggest by a google search, I need to set the following to compile
export libmesh_CXXFLAGS=-DMPICH_SKIP_MPICXX
otherwise, I failed at the first file:
Compiling C++ (in optimized mode) src/base/dof_map.C...
/opt/intel/impi/3.1/include64/mpicxx.h(45): catastrophic error: #error
directive: "SEEK_SET is #defined but must not be
for the C++ binding of MPI. Include mpi.h before stdio.h"
#error "SEEK_SET is #defined but must not be for the C++ binding of MPI.
Include mpi.h before stdio.h"
^
compilation aborted for src/base/dof_map.C (code 4)
make: *** [src/base/dof_map.x86_64-unknown-linux-gnu.opt.o] Error 4
Thanks,
Mengda
2009/1/15 Roy Stogner <[email protected]>
>
> On Thu, 15 Jan 2009, Mengda Wu wrote:
>
> I used intel compiler to build the latest svn version of libmesh.
>>
>
> Which version? It compiled fine with icc 10.1.017 for me, but if I've
> just inadvertantly broken older Intel compilers I'd definitely like to
> fix that.
>
> I got the following error in the middle.
>>
>> Compiling C++ (in optimized mode) src/numerics/mesh_function.C...
>> src/numerics/mesh_function.C(116): error: more than one instance of
>> overloaded function "libmesh_assert_cast" matches th
>> e argument list:
>> function template "Tnew libmesh_assert_cast<Tnew,Told>(Told &)"
>> function template "Tnew libmesh_assert_cast<Tnew,Told>(Told *)"
>> argument types are: (const FunctionBase *)
>> libmesh_assert_cast<const MeshFunction*>(this->_master);
>> ^
>>
>> compilation aborted for src/numerics/mesh_function.C (code 2)
>>
>
> So the compiler is seeing a "const MeshFunction*" argument, it's
> correctly noting that that could also be passed to a function which
> takes "const MeshFunction*&", but it looks like it's not correctly
> disambiguating the problem by choosing the most specific template
> specialization to use.
>
> Try replacing that line with:
> libmesh_assert_cast<const MeshFunction*, const
> FunctionBase*>(this->master);
>
> But even if that works it's pretty ugly, and I'd hate to have to do it
> everywhere. Anyone have any ideas for a better workaround?
> ---
> Roy
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users