Trilinos
Trilinos copied to clipboard
Trilinos and mingw (msys2)
I was able to compile Trillions in the mingw environment but had to exclude a few packages, due to the fact that I compiled the new seacas separately, I excluded its packages.
-DTrilinos_ENABLE_SEACAS=OFF and -DTrilinos_ENABLE_Zoltan=OFF
Errors encountered:
- With -GNinja:
ninja -C . ./all
ninja: Entering directory `.'
ninja: error: Stat(C:/msys64/usr/local/pkg_trilinos/reczne/build/packages/kokkos-kernels/src/impl/generated_specializations_cpp/gauss_seidel_symbolic/Sparse_gauss_seidel_symbolic_eti_DOUBLE_ORDINAL_INT_OFFSET_INT_LAYOUTLEFT_EXECSPACE_OPENMP_MEMSPACE_HOSTSPACE_MEMSPACE_HOSTSPACE.cpp): Filename longer than 260 characters
make: *** [C:\msys64\usr\local\pkg_trilinos\reczne\cmake\tribits\core\utils\NinjaMakefileCommon.make:20: all] Error 1
after changing to "MSYS Makefile" problem no longer exists, but a ninja generator is recommended.
- Error with Kokkos:
[ 2%] Building CXX object packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_Error.cpp.obj
In file included from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/Kokkos_Atomic.hpp:190,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_Atomic_View.hpp:48,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:58,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/Kokkos_View.hpp:522,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/Kokkos_Parallel.hpp:53,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/Kokkos_Serial.hpp:56,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/Kokkos_Core.hpp:54,
from C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_Core.cpp:45:
C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_Atomic_Windows.hpp: In function 'T Kokkos::atomic_compare_exchange(volatile T*, const T&, typename std::enable_if<(sizeof (T) == sizeof (char)), const T&>::type)':
C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_Atomic_Windows.hpp:86:11: error: there are no arguments to '_InterlockedCompareExchange8' that depend on a template parameter, so a declaration of '_InterlockedCompareExchange8' must be available [-fpermissive]
86 | tmp.i = _InterlockedCompareExchange8((CHAR*)dest, *((CHAR*)&val),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/usr/local/pkg_trilinos/reczne/packages/kokkos/core/src/impl/Kokkos_Atomic_Windows.hpp:86:11: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
[ 2%] Generating multigrid.tex
- After Kokkos and Tpetra =OFF:
[ 20%] Building CXX object packages/epetra/src/CMakeFiles/epetra.dir/Epetra_Import.cpp.obj
In file included from C:/msys64/usr/local/pkg_trilinos/reczne/packages/epetra/src/Epetra_Fortran_wrappers.cpp:43:
C:/msys64/usr/local/pkg_trilinos/reczne/packages/epetra/src/Epetra_C_wrappers.cpp: In function 'EPETRA_OBJECT_PTR epetra_serialcomm_create__()':
C:/msys64/usr/local/pkg_trilinos/reczne/packages/epetra/src/Epetra_C_wrappers.cpp:82:12: error: cast from 'Epetra_Comm*' to 'EPETRA_OBJECT_PTR' {aka 'long int'} loses precision [-fpermissive]
82 | return((EPETRA_OBJECT_PTR ) comm);
- add Epetra, Xpetra, Galeria and MueLu =OFF (excluding one forces the other):
[100%] Building CXX object packages/piro/src/CMakeFiles/piro.dir/Piro_PerformAnalysis.cpp.obj
In file included from C:/msys64/usr/local/pkg_trilinos/reczne/packages/piro/src/Piro_PerformAnalysis.cpp:70:
C:/msys64/usr/local/pkg_trilinos/reczne/packages/rol/adapters/thyra/src/function/ROL_ThyraProductME_Constraint_SimOpt.hpp:54:10: fatal error: Tpetra_CrsMatrix.hpp: No such file or directory
54 | #include "Tpetra_CrsMatrix.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [packages/piro/src/CMakeFiles/piro.dir/build.make:188: packages/piro/src/CMakeFiles/piro.dir/Piro_PerformAnalysis.cpp.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:4456: packages/piro/src/CMakeFiles/piro.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
and error only for mingw32 and shared library (-DBUILD_SHARED_LIBS=ON):
[213/214] Linking CXX shared library packages\ml\src\libml.dll
FAILED: packages/ml/src/libml.dll packages/ml/src/libml.dll.a
cmd.exe /C "cd . && D:\a\_temp\msys\msys64\mingw32\bin\g++.exe -march=pentium4 -mtune=generic -O2 -pipe -O3 -DNDEBUG -pipe -Wl,--dynamicbase,--nxcompat,--no-seh -shared -o packages\ml\src\libml.dll -Wl,--out-implib,packages\ml\src\libml.dll.a -Wl,--major-image-version,13,--minor-image-version,0 @CMakeFiles\ml.rsp && cd ."
D:/a/_temp/msys/msys64/mingw32/lib/gcc/i686-w64-mingw32/10.3.0/../../../../i686-w64-mingw32/bin/ld.exe: packages/ml/src/CMakeFiles/ml.dir/Utils/ml_utils.c.obj:ml_utils.c:(.text+0x254c): undefined reference to `gethostname'
collect2.exe: error: ld returned 1 exit status