Xyce / Xyce

The Xyce™ Parallel Electronic Simulator
GNU General Public License v3.0
389 stars 58 forks source link

Compilation fails #107

Open KrzysztofHerman opened 1 month ago

KrzysztofHerman commented 1 month ago

I am trying to compile xyce following the steps form IIC-OCIS-TOOLS. I was able to build Trilinos however the compilation of Xyce fails with this errors:

../../../Xyce/src/NonlinearSolverPKG/N_NLS_NOX_PseudoTransientSolver.C: In member function ‘virtual void Xyce::Nonlinear::N_NLS_NOX::PseudoTransientBased::init()’:
../../../Xyce/src/NonlinearSolverPKG/N_NLS_NOX_PseudoTransientSolver.C:113:34: error: ‘parseObserver’ is not a member of ‘NOX::Solver’
  113 |   prePostOperator = NOX::Solver::parseObserver(paramsPtr->sublist("Solver Options"));
      |                                  ^~~~~~~~~~~~~
make[3]: *** [Makefile:564: N_NLS_NOX_PseudoTransientSolver.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
../../../Xyce/src/NonlinearSolverPKG/N_NLS_NOX_Interface.C: In member function ‘int Xyce::Nonlinear::N_NLS_NOX::Interface::pseudoTransientSolve(Xyce::Nonlinear::N_NLS_NOX::ParameterSet*)’:
../../../Xyce/src/NonlinearSolverPKG/N_NLS_NOX_Interface.C:1224:20: error: invalid new-expression of abstract class type ‘Xyce::Nonlinear::N_NLS_NOX::PseudoTransientBased’
 1224 |         maxStepSize));

I was trying also the steps from the Xyce building guide website using 7.6.0 and 7.8.0 releases however it fails with the same output. Any reason for that ? I am compiling on Ubuntu 22.04 LTS.

tvrusso commented 1 month ago

Are you using the recommended version of Trilinos (12.12.1) and the recommended Trilinos build procedure in the Xyce Building Guide? These errors are errors with Xyce's trying to use Trilinos capabilities, and point to a mistake in how Trilinos was built and installed, or in how you're telling Xyce to get at the Trilinos you've built.

Problems like this are invariably due to using a much later version of Trilinos, or one that is prepackaged in a system package management system. Other potential problems are not using the exact set of Trilinos CMake options we give in that building guide, or mistakes in following the building guide.

I routinely build Xyce on Ubuntu 22.04, and just did so yesterday, so I know that the procedure described in the Xyce Building Guide (including the correct build of Trilinos) works there.

If you could post the exact CMake invocation you used to build Trilinos, the version of Trilinos you've built, and the exact configure invocation you used to configure Xyce, it might point more clearly at where the actual problem is on your end.