Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAGMC not compatible with Geant4 10.6 #696

Closed
ljacobson64 opened this issue Jul 30, 2020 · 3 comments
Closed

DAGMC not compatible with Geant4 10.6 #696

ljacobson64 opened this issue Jul 30, 2020 · 3 comments

Comments

@ljacobson64
Copy link
Member

There appear to have been some changes in Geant4 10.6 that break our ability to build Dag-Geant4 applications. Stuff like this appears during build:

/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc: In function ‘int main(int, char**)’:
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:5: error: ‘G4UIExecutive’ was not declared in this scope
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |     ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:20: error: ‘ui’ was not declared in this scope
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |                    ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:29: error: expected type-specifier before ‘G4UIExecutive’
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |                             ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:87:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   87 |     delete ui;
      |            ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:5: error: ‘G4VisManager’ was not declared in this scope; did you mean ‘G4VPCManager’?
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |     ^~~~~~~~~~~~
      |     G4VPCManager
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:19: error: ‘visManager’ was not declared in this scope; did you mean ‘scManager’?
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |                   ^~~~~~~~~~
      |                   scManager
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:36: error: ‘G4VisExecutive’ does not name a type
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |                                    ^~~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:5: error: ‘G4UIExecutive’ was not declared in this scope
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |     ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:20: error: ‘UI’ was not declared in this scope
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |                    ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:29: error: expected type-specifier before ‘G4UIExecutive’
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |                             ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:96:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   96 |     delete visManager;
      |            ^~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:97:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   97 |     delete UI;
      |            ^~
@gonuke
Copy link
Member

gonuke commented Jul 23, 2021

We are building against GEANT4 still, aren't we? (we're certainly burning a lot of CI cycles building it!) Is this still a problem @ljacobson64 @bam241 @makeclean ?

@ljacobson64
Copy link
Member Author

Everything still works with Geant4 10.5 (which is what we use on the CI) and lower. Something in Geant4 changed with the 10.6 release that broke our ability to compile against it.

@helen-brooks
Copy link
Collaborator

I've just started a project commissioned by @makeclean with a student who needs to use Geant4 10.6+ because a downstream dependency requires a more recent version. So far I've identified the following from the Geant4 10.6 release notes which are of relevance:

  • The preprocessor macros G4UI_USE and G4VIS_USE are deprecated in 10.6 - these are used in /src/geant4/app/exampleN01.cc to test whether to include some headers. This can be fixed easily via cmake checking the version from /path-to-geant4/lib/Geant4-X.Y.Z/Geant4ConfigVersion.cmake then adding some ifdef type statements.
  • added namespace scope to MeshScoreMap - the class MeshScoreMap has been moved inside the class G4VScoringMesh. The file ExN01UserScoreWriter.cc needs the statement
    using MeshScoreMap = G4VScoringMesh::MeshScoreMap;

I'll tidy this up and make a PR.... (I also haven't checked the tests yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants