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

Superbuild cmake not passing tinyxml variables correctly #812

Open
c-denham opened this issue Feb 19, 2024 · 5 comments
Open

Superbuild cmake not passing tinyxml variables correctly #812

c-denham opened this issue Feb 19, 2024 · 5 comments
Assignees

Comments

@c-denham
Copy link

Hello,
I am trying to build hemelb on ARCHER2 and I am following the advice from issue #770 however some of this is out of date. I have changed Boost to 1.81.0 but I do not know if any of the others are out of date. I am following the superbuild method. TinyXML cannot be found.
Many thanks for your advice in advance.

CMake Error at /mnt/lustre/a2fs-work1/work/y07/shared/utils/core/cmake/3.21.3/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find TinyXML (missing: TINYXML_INCLUDE_DIR TINYXML_LIBRARIES)
Call Stack (most recent call first):
  /mnt/lustre/a2fs-work1/work/y07/shared/utils/core/cmake/3.21.3/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /home/e283/e283/cd3nham/hemelb/CMake/FindTinyXML.cmake:31 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /home/e283/e283/cd3nham/hemelb/dependencies/TinyXML/find.cmake:7 (find_package)
  /home/e283/e283/cd3nham/hemelb/CMake/HemeLbDependency.cmake:8 (include)
  /home/e283/e283/cd3nham/hemelb/CMake/HemeLbDependency.cmake:54 (hemelb_dependency)
  CMakeLists.txt:76 (find_hemelb_dependency)


-- Configuring incomplete, errors occurred!
See also "/home/e283/e283/cd3nham/hemelb/build/hemelb-prefix/src/hemelb-build/CMakeFiles/CMakeOutput.log".
See also "/home/e283/e283/cd3nham/hemelb/build/hemelb-prefix/src/hemelb-build/CMakeFiles/CMakeError.log".
gmake[2]: *** [CMakeFiles/hemelb.dir/build.make:92: hemelb-prefix/src/hemelb-stamp/hemelb-configure] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/hemelb.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
@rupertnash rupertnash self-assigned this Feb 20, 2024
@rupertnash
Copy link
Member

Hi @c-denham - please let me know:

  • the exact commit you're using
  • the list of modules you have loaded
  • commands used to configure

We can perhaps debug interactively on teams. Friday would suit me as I've lots of marking right now - please suggest a few times by email.

@c-denham
Copy link
Author

I copied below the 3 points, I included the entire history of my archer2 terminal in case there is something important

commit ccf4b458098761b34a137f9ff2b7f8e01e7fd843 (HEAD -> main, origin/main, origin/HEAD)
Author: Rupert Nash <[email protected]>
Date:   Mon Jan 29 17:13:27 2024 +0000
Currently Loaded Modules:
  1) craype-x86-rome            5) xpmem/2.5.2-2.4_3.30__gd0f7936.shasta   9) cmake/3.21.3           13) PrgEnv-gnu/8.3.3   17) parmetis/4.0.3
  2) libfabric/1.12.1.2.2.0.0   6) bolt/0.8                               10) craype/2.7.19          14) gcc/11.2.0         18) cray-hdf5-parallel/1.12.2.1
  3) craype-network-ofi         7) epcc-setup-env                         11) cray-dsmml/0.2.2       15) cray-mpich/8.1.23  19) boost/1.81.0
  4) perftools-base/22.12.0     8) load-epcc-module                       12) cray-libsci/22.12.1.1  16) metis/5.1.0

cd3nham@ln03:~/hemelb> history
    1  exit
    2  git clone https://github.com/hemelb-codes/hemelb.git
    3  ls
    4  cd hemelb
    5  mkdirbuild
    6  mkdir build
    7  ls
    8  cmake -S . -B build -DCMAKE_INSTALL_PREFIX=build -DHEMELB_BUILD_RBC=ON -DCMAKE_BUILD_TYPE=Release
    9  cmake --build build
   10  sudo apt install tinyxml
   11  apt install tinyxml
   12  exit
   13  cd hemelb
   14  ls
   15  cd build
   16  cd ..
   17  cmake --build build
   18  cd ..
   19  module list
   20  module restore PrgEnv-gnu
   21  module restore PrgEnv-cray
   22  module savelist
   23  module swap PrgEnv-cray PrgEnv-gnu
   24  cd hemelb
   25  cmake --build build
   26  cd ..
   27  module restore PrgEnv-gnu
   28  module savelist
   29  module list
   30  module show
   31  module help
   32  module save
   33  module savelist
   34  module restore PrgEnv-gnu
   35  cd hemelb
   36  cmake --build build
   37  cd ..
   38  module update
   39  module list
   40  module load cmake/3.21.3
   41  module load PrgEnv-gnu
   42  module swap gcc gcc/11.2.0
   43  module load boost/1.72.0
   44  module load parmetis/4.0.3
   45  module load cray-hdf5-parallel
   46  module list
   47  cmake --build build
   48  cd hemelb
   49  cmake --build build
   50  cd ..
   51  module load boost/1.77.0
   52  module load boost/1.81.0
   53  cd hemelb
   54  cmake --build build
   55  module avail
   56  module list
   57  cd ..
   58  module refresh
   59  module save
   60  cd hemelb
   61  cmake --build build
   62  rfm build
   63  rmdir build
   64  rm build
   65  rm -r build
   66  ls
   67  exit
   68  module list
   69  module refresh
   70  cd hemelb
   71  mkdir build
   72  ls
   73  cmake -S . -B build -DCMAKE_INSTALL_PREFIX=build -DCMAKE_BUILD_TYPE=Release -DHEMELB_BUILD_RBC=ON
   74  cmake --build build
   75  exit
   76  cd hemelb
   77  pip list
   78  python list
   79  cmake --build build
   80  module list
   81  module avail
   82  module spider
   83  module list
   84  exit
   85  cd hemelb
   86  git log -1
   87  module list
   88  history

@rupertnash rupertnash changed the title ARCHER2 Installation - TinyXML Not Found Superbuild cmake not passing tinyxml variables correctly Feb 23, 2024
@rupertnash
Copy link
Member

rupertnash commented Feb 23, 2024

Have confirmed that the problem is that the super build cmake is not correctly passing the TinyXML variables to the Code cmake when it is building tinyxml from source.

I'd consider this a low priority bug for now.

The work around is to first install the dependences and then to install the code separately. If you're going to have multiple installs of HemeLB for e.g. different boundary conditions, then I'd recommend using different directories. E.g. on Archer2 if $WORK is your directory on the parallel filesystem, you might do:

deps_prefix=$WORK/hemelb/dependencies

cmake -S hemelb/dependencies -B build-deps -DCMAKE_INSTALL_PREFIX=$deps_prefix -DHEMELB_BUILD_RBC=ON
pushd build-deps
make -j
popd

version=whatever!
code_prefix=$WORK/hemelb/$version
cmake -S hemelb/Code -B build-code-$version -DCMAKE_INSTALL_PREFIX=$code_prefix -DHEMELB_DEPENDENCIES_INSTALL_PREFIX=$deps_prefix -DHEMELB_BUILD_RBC=ON -DCMAKE_BUILD_TYPE=Release

pushd build-code-$version
make -j install

@mobernabeu
Copy link
Contributor

@rupertnash I think I need to edit the command that starts cmake -S hemelb/dependencies -B build-code-$version... to cmake -S hemelb/Code -B build-code-$version.... Is that right?

@rupertnash
Copy link
Member

Aye I think so

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

No branches or pull requests

3 participants