[Trilinos-Users] Teuchos_MPIReduction

Marco Morandini morandini at aero.polimi.it
Wed Mar 8 02:28:37 MST 2006


Bill Spotz wrote:
> Marco,
> 
> I think I have found the issue that is causing you problems building the 
> python wrappers.  If you look at the compilation line for the wrapper code:
> 
>     mpicc -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mtune=i686 ...
> 
> it really should be calling mpic++ instead of mpicc.  I may need to 
> change some logic so that the python script that generates this 
> compilation line is smarter about choosing the compiler.  You could help 
> me out by doing a
> 
>     $ cd BUILD/packages/epetraext/python/src
>     $ grep CXX Makefile
> 
> and sending me the results.
> 

----------------------------------------------------------------

marco at mbdyn-mm:~/Programmi/Trilinos/trilinos-6.0.15/Build/packages/epetraext/python/src> 
grep CXX Makefile
CXX = mpicxx
CXXCPP = mpicxx -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS =          -I/home/marco/Math/UFsparse/UMFPACK/Include 
  -I/home/marco/Math/UFsparse/AMD/Include 
-I/home/marco/Math/Taucs/src 
-I/home/marco/Math/Taucs/build/linux 
-I/home/marco/Math/SuperLU_3.0/SRC 
-I/home/marco/Math/metis-4.0/Lib 
-I/home/marco/local/openmpi-1.0.1/include 
-I/home/marco/local/openmpi-1.0.1/include/openmpi/ompi       -g -Wall -O2
MPI_CXX = mpicxx
MPI_CXX_EXISTS = yes
MPI_TEMP_CXX = mpicxx
ac_ct_CXX =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
SWIGCOMPILE = $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_CXXFLAGS)
SWIG_CXXFLAGS = $(EPETRAEXT_INCLUDES)                \

----------------------------------------------------------------

Note however that, trying to compile by hand Triutils_wrap.cpp I still
get the same compilation error:

----------------------------------------------------------------
marco at mbdyn-mm:~/Programmi/Trilinos/trilinos-6.0.15/Build/packages/triutils/python/src> 
mpicxx -fno-strict-aliasing
-DNDEBUG -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall 
-D_FORTIFY_SOURCE=2 -g -I/home/marco/Math/UFsparse/UMF
PACK/Include -I/home/marco/Math/UFsparse/AMD/Include 
-I/home/marco/Math/Taucs/src -I/home/marco/Math/Taucs/build/lin
ux -I/home/marco/Math/SuperLU_3.0/SRC -I/home/marco/Math/metis-4.0/Lib 
-I/home/marco/local/openmpi-1.0.1/include -I/
home/marco/local/openmpi-1.0.1/include/openmpi/ompi -g -Wall -O2 
-I/home/marco/Math/UFsparse/UMFPACK/Include -I/home
/marco/Math/UFsparse/AMD/Include -I/home/marco/Math/Taucs/src 
-I/home/marco/Math/Taucs/build/linux -I/home/marco/Mat
h/SuperLU_3.0/SRC -I/home/marco/Math/metis-4.0/Lib 
-I/home/marco/local/openmpi-1.0.1/include -I/home/marco/local/ope
nmpi-1.0.1/include/openmpi/ompi -fPIC -DHAVE_CONFIG_H=1 
-I../../../../../packages/triutils/python/src -I/home/marco/
Programmi/Trilinos/trilinos-6.0.15/packages/epetra/thyra/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/Build/
packages/epetra/thyra/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/ad
apter_support 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/adapter_suppor
t/mpi 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/adapter_support/serial
 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/ana_support 
-I/home/marco/P
rogrammi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/extended_interfaces 
-I/home/marco/Programmi
/Trilinos/trilinos-6.0.15/packages/thyra/src/ana/operator_vector/interfaces 
-I/home/marco/Programmi/Trilinos/trilino
s-6.0.15/packages/thyra/src/ana/rtop/ops_lib 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/ana
/rtop/base 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/thyra/src/utils 
-I/home/marco/Programmi/Trilino
s/trilinos-6.0.15/packages/thyra/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/Build/packages/thyra/src 
-I/ho
me/marco/Programmi/Trilinos/trilinos-6.0.15/Build/packages/teuchos/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0
.15/packages/teuchos/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/epetra/src 
-I/home/marco/Programm
i/Trilinos/trilinos-6.0.15/Build/packages/epetra/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/packages/triut
ils/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/Build/packages/triutils/src 
-I/home/marco/Programmi/Trilino
s/trilinos-6.0.15/packages/PyTrilinos/src 
-I/home/marco/Programmi/Trilinos/trilinos-6.0.15/Build/packages/PyTrilinos
/src -I../../../../../packages/triutils/../epetra/python/src 
-I/usr/include/python2.4 -c Triutils_wrap.cpp -o build/
temp.linux-i686-2.4/Triutils_wrap.o 
-I/home/marco/Math/UFsparse/UMFPACK/Include 
-I/home/marco/Math/UFsparse/AMD/Incl
ude -I/home/marco/Math/Taucs/src -I/home/marco/Math/Taucs/build/linux 
-I/home/marco/Math/SuperLU_3.0/SRC -I/home/mar
co/Math/metis-4.0/Lib -I/home/marco/local/openmpi-1.0.1/include 
-I/home/marco/local/openmpi-1.0.1/include/openmpi/om
pi -g -Wall -O2
Triutils_wrap.cpp: In function ‘void* 
_p_Epetra_FECrsMatrixTo_p_Epetra_CrsMatrix(void*)’:
Triutils_wrap.cpp:3316: error: ‘Epetra_FECrsMatrix’ was not declared in 
this scope
Triutils_wrap.cpp:3316: error: expected primary-expression before ‘void’
Triutils_wrap.cpp:3316: error: expected `)' before ‘void’
Triutils_wrap.cpp: In function ‘void* 
_p_p_Epetra_FECrsMatrixTo_p_p_Epetra_CrsMatrix(void*)’:
Triutils_wrap.cpp:3319: error: ‘Epetra_FECrsMatrix’ was not declared in 
this scope
Triutils_wrap.cpp:3319: error: expected primary-expression before ‘void’
Triutils_wrap.cpp:3319: error: expected `)' before ‘void’
Triutils_wrap.cpp: In function ‘void* 
_p_Epetra_LocalMapTo_p_Epetra_BlockMap(void*)’:
Triutils_wrap.cpp:3325: error: ‘Epetra_LocalMap’ was not declared in 
this scope
Triutils_wrap.cpp:3325: error: expected primary-expression before ‘void’
Triutils_wrap.cpp:3325: error: expected `)' before ‘void’
Triutils_wrap.cpp: In function ‘void* 
_p_Epetra_LocalMapTo_p_Epetra_Map(void*)’:
Triutils_wrap.cpp:3346: error: ‘Epetra_LocalMap’ was not declared in 
this scope
Triutils_wrap.cpp:3346: error: expected primary-expression before ‘void’
Triutils_wrap.cpp:3346: error: expected `)' before ‘void’
Triutils_wrap.cpp: In function ‘void* 
_p_p_Epetra_LocalMapTo_p_p_Epetra_Map(void*)’:
Triutils_wrap.cpp:3349: error: ‘Epetra_LocalMap’ was not declared in 
this scope
Triutils_wrap.cpp:3349: error: expected primary-expression before ‘void’
Triutils_wrap.cpp:3349: error: expected `)' before ‘void’
Triutils_wrap.cpp: At global scope:
Triutils_wrap.cpp:231: warning: ‘swig_type_info* 
SWIG_TypeDynamicCast(swig_type_info*, void**)’ defined but not used
Triutils_wrap.cpp:419: warning: ‘const char* SWIG_UnpackDataName(const 
char*, void*, size_t, const char*)’ defined b
ut not used
Triutils_wrap.cpp:499: warning: ‘void 
SWIG_PropagateClientData(swig_type_info*)’ defined but not used
Triutils_wrap.cpp:1198: warning: ‘void* 
SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)’ defined but no
t used
Triutils_wrap.cpp:1212: warning: ‘int 
SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, 
int)’ def
ined but not used
Triutils_wrap.cpp:1480: warning: ‘int SWIG_CheckLongInRange(long int, 
long int, long int, const char*)’ defined but
not used
Triutils_wrap.cpp:3537: warning: ‘void SWIG_Python_addvarlink(PyObject*, 
char*, PyObject* (*)(), int (*)(PyObject*))
’ defined but not used

----------------------------------------------------------------



> Also, it won't solve any of the problems you are seeing, but you could 
> simplify your configure invocation by getting rid of --with-trilinos and 
> --enable-pytrilinos; they are obsolete.
> 

Thanks


Another issue with setup.py.
The problem: I often get unresolved symbols at run time.
The quick and dirty solution: I comment out, in setup.py, this line:

uniquifyList(options)

The (possible) reason:

I _think_ that the problem is in these lines:

options = EPETRA_INCLUDES.split()     + \
           EPETRA_LIBS.split()         + \
           PYTRILINOS_INCLUDES.split() + \
           PYTRILINOS_LIBS.split()
uniquifyList(options)

where library duplicate entries are not
removed leaving the last one in place,
as would be with

uniquifyList(options, True)

, but leaving the first one.

Again, I'm not sure about this, and
I can give you more detail if you think
this is worth.

Marco




More information about the Trilinos-Users mailing list