Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
S src
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #109

Closed
Open
Created May 19, 2017 by snuverink_j@snuverink_jDeveloper

OPAL does not compile with AMR Solver and unit tests

Compiling OPAL with ENABLE_AMR_SOLVER=1 and DBUILD_OPAL_UNIT_TESTS=1 gives the following compile error:

/home/scratch/OPAL/src/tests/opal_src/Distribution/GaussTest.cpp: In member function ‘virtual void GaussTest_FullSigmaTest1_Test::TestBody()’:
<command-line>:0:6: error: expected unqualified-id before numeric constant
/home/scratch/OPAL/src/tests/opal_src/Distribution/GaussTest.cpp:74:15: note: in expansion of macro ‘OPAL’
     OpalData *OPAL = OpalData::getInstance();
               ^

This is because OPAL is defined as preprocessor macro within CMake (with value 1):

[ 93%] Building CXX object tests/CMakeFiles/opal_unit_tests.dir/opal_src/Distribution/GaussTest.cpp.o
g++   -DBL_FORT_USE_UNDERSCORE -DBL_Linux -DBL_NOLINEVALUES -DBL_PARALLEL_IO -DBL_SPACEDIM=3 -DBL_USE_DOUBLE -DBL_USE_MPI -DMG_USE_F90_SOLVERS -DMG_USE_FBOXLIB -DNDEBUG -DOPAL  .... tests/opal_src/Distribution/GaussTest.cpp

This is done in CMakeModules/CCSEOptions.cmake :

list(APPEND BL_DEFINES "OPAL")

I don't see a reason to add OPAL here since afaik it is not used anywhere as such.

That said it might good to adopt camelCase for the variable name.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking