<@U01SBMJT5BP>: I am unable to build Xyce from so...
# xyce
t
@User: I am unable to build Xyce from source. I am not even able to get past the first stage. I am getting back the error
Copy code
Trilinos was not built with LOCA support in NOX.
Enable the following in the Trilinos build:
  -D NOX_ENABLE_LOCA=ON
The problem is that I did add
-D NOX_ENABLE_LOCA=ON
to the Trilinos build, and if I look at the configuration file for Trilinos, it seems to indicate that "loca" has been compiled in. So I have no idea what cmake for xyce is complaining about, and since I followed the instructions and got no errors, I have absolutely no idea how to proceed.
m
This is my complete instructions to install the parallel version: 0) dependencies sudo apt install libfftw3-dev mpich libblas-dev liblapack-dev libsuitesparse-dev libfl-dev 1) Install Trilinos git clone --depth 1 --branch trilinos-release-12-12-1 https://github.com/trilinos/Trilinos.git cd Trilinos mkdir build cd build SRCDIR=$HOME/repos/Trilinos ARCHDIR=/software/XyceLibs/Parallel FLAGS="-O3 -fPIC" cmake \ -G "Unix Makefiles" \ -DCMAKE_C_COMPILER=mpicc \ -DCMAKE_CXX_COMPILER=mpic++ \ -DCMAKE_Fortran_COMPILER=mpif77 \ -DCMAKE_CXX_FLAGS="$FLAGS" \ -DCMAKE_C_FLAGS="$FLAGS" \ -DCMAKE_Fortran_FLAGS="$FLAGS" \ -DCMAKE_INSTALL_PREFIX=$ARCHDIR \ -DCMAKE_MAKE_PROGRAM="make" \ -DTrilinos_ENABLE_NOX=ON \ -DNOX_ENABLE_LOCA=ON \ -DTrilinos_ENABLE_EpetraExt=ON \ -DEpetraExt_BUILD_BTF=ON \ -DEpetraExt_BUILD_EXPERIMENTAL=ON \ -DEpetraExt_BUILD_GRAPH_REORDERINGS=ON \ -DTrilinos_ENABLE_TrilinosCouplings=ON \ -DTrilinos_ENABLE_Ifpack=ON \ -DTrilinos_ENABLE_ShyLU=ON \ -DTrilinos_ENABLE_Isorropia=ON \ -DTrilinos_ENABLE_AztecOO=ON \ -DTrilinos_ENABLE_Belos=ON \ -DTrilinos_ENABLE_Teuchos=ON \ -DTeuchos_ENABLE_COMPLEX=ON \ -DTrilinos_ENABLE_Amesos=ON \ -DAmesos_ENABLE_KLU=ON \ -DTrilinos_ENABLE_Sacado=ON \ -DTrilinos_ENABLE_Kokkos=ON \ -DTrilinos_ENABLE_Zoltan=ON \ -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF \ -DTrilinos_ENABLE_CXX11=ON \ -DTPL_ENABLE_AMD=ON \ -DAMD_LIBRARY_DIRS="/usr/lib" \ -DTPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \ -DTPL_ENABLE_BLAS=ON \ -DTPL_ENABLE_LAPACK=ON \ -DTPL_ENABLE_MPI=ON \ $SRCDIR make -j 4 sudo make install 1.5) (If you want ADMS) git clone git@github.com:Qucs/ADMS.git cd ADMS ./bootstrap.sh ./configure make sudo make install 2) Install Xyce git clone git@github.com:Xyce/Xyce.git cd Xyce ./bootstrap mkdir build cd build ../configure CXXFLAGS="-O3 -std=c++11" ARCHDIR="/software/XyceLibs/Parallel" CPPFLAGS="-I/usr/include/suitesparse" --enable-mpi CXX=mpicxx CC=mpicc F77=mpif77 --prefix=/software/Xyce/Parallel --enable-shared --enable-xyce-shareable make -j 4 sudo make install
t
That is one freaking long command line. But I'll give it a shot.
Looks like bootstrap + configure works a lot better than trying to use cmake. . .
e
@Tim Edwards let me know if the above doesn’t work for you.
PS. In general our support for CMake to build Xyce is much newer than the autotools. We’ve been using the autotools since 2002 or so. CMake only came together in the last year or two.
t
I prefer autotools but I didn't see instructions for them in the online documentation. configure + make gets me a lot further, but now I'm getting a halt with the following error:
Copy code
/bin/ld: //usr/local/lib/libteuchoscore.a(Teuchos_GlobalMPISession.cpp.o): in function `Teuchos::GlobalMPISession::~GlobalMPISession()':
Teuchos_GlobalMPISession.cpp:(.text+0x1b2): undefined reference to `Kokkos::finalize_all()'
/bin/ld: ./.libs/libxyce.a(N_DEV_ReactionNetwork.o): in function `Kokkos::abort(char const*)':
N_DEV_ReactionNetwork.C:(.text._ZN6Kokkos5abortEPKc[_ZN6Kokkos5abortEPKc]+0x14): undefined reference to `Kokkos::Impl::host_abort(char const*)'
collect2: error: ld returned 1 exit status
Any ideas?
e
Instructions based on the autotools can be found here. https://xyce.sandia.gov/documentation/BuildingGuide.html
t
Okay. It's likely that the error above has to do with the fact that Matt compiled with MPI and I'm not; I tried to rework the configure options accordingly but probably did something wrong. I'll follow the instructions on the link you posted.
e
Yes, at the moment we have two different build instructions for parallel and serial.
You may also find useful info here: https://github.com/tvrusso/XyceBundle
t
@Eric Keiter: I continue to have the problem that compilation fails with `undefined reference to
Kokkos::finalize_all()'
. This is being a persistent and unresolvable error. If there is some package I could disable to work around it, I could try that, but otherwise I have no hints as to why the failure occurs. "finalize_all" appears to be defined in /usr/local/lib/libkokkoscore.a. In the xyce Makefile, I don't see any references to kokkos in the XYCELIBS definition, although there are plenty of references to teuchos, nox, etc.
m
@Tim Edwards Is there any reason you aren't building the parallel version? You can still run with 1 thread...
t
@Matthew Guthaus: I am building the parallel version (since realizing I was mixing options for the two versions).
m
Did you install Trilinos with the Kokkos option enabled? Is it properly pointing to the correct Trilinos install (ARCHDIR in my example)?
t
@Matthew Guthaus: That could be the issue. I'm not sure what ARCHDIR represents, or what it is supposed to point to. I left it out, assuming it would default to the usual install location, which seems to be /usr/local/lib/.
m
@Tim Edwards The serial and parallel versions need different versions of Trilinos, so they don't just put it in the default location, as far as I understand.
You probably could but then it might link to the wrong version
t
@Matthew Guthaus: Yep, that was the issue. I had to clean out everything and rebuild and reinstal both Trilinos and Xyce from the top, but it worked. Thanks for the help.
👍 1
e
Glad this worked out. I was out yesterday so I didn’t see this until today.
t
@Eric Keiter: Now I just have run-time issues. I'll bug you about those later, though. Have a good holiday weekend meanwhile!