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

Issue with building/creating executable - cmake version #801

Open
SRkumar97 opened this issue May 22, 2024 · 5 comments
Open

Issue with building/creating executable - cmake version #801

SRkumar97 opened this issue May 22, 2024 · 5 comments

Comments

@SRkumar97
Copy link

SRkumar97 commented May 22, 2024

Hello,
Thanks for this code.
I am trying to compile and build the code (GNU).
I am following the commands listed in the main page
git clone --recursive git@github.com:AMReX-Combustion/PeleC.git
cd PeleC/Exec/RegTests/PMF
make TPLrealclean && make realclean && make TPL && make -j
./Pele3d.xxx.yyy.ex example.inp
Here, I face an issue as soon as I run the third command
cmake_version_error_PeleC
It says cmake version 3.12 or higher is required. The default cmake is standard cmake - cmake 2.8.12.2 in /usr/bin/cmake. The system does have cmake3 in the same top directory as cmake i.e. /usr/bin/cmake3
I tried using alias and setting cmake to cmake3, but this didn't wotk as the code still used the standard cmake.
How do I tell the code to compile using this cmake3, in place of standard cmake? In which make files do I need to change and update?
Requesting for help

@marchdf
Copy link
Contributor

marchdf commented May 22, 2024

From what you posted, it looks like you need to go into the sundials submodule here: PeleC/Submodules/PelePhysics/Submodules/sundials) (one of third party libraries we use) and look for where it is using cmake.

Or do some other hacks like symlink cmake3 to somewhere and make sure that somewhere appears earlier in your PATH than /usr/bin.

@SRkumar97
Copy link
Author

Thank you, I was able to sort out the issue after I installed the latest cmake version in my personal user account and using alias to define this version as the cmake instead of the root level outdated old cmake version.

@SRkumar97
Copy link
Author

SRkumar97 commented Jun 7, 2024

Hi,
I'd like to clarify a bit further. Does running the code always involve only the case specific executable, generated using make command?
Or are there any general executables which are to be built in the top directories?
Further, is this full make command (set of 3) advised always,
make TPLrealclean && make realclean && make TPL && make -j
or one can simply do away with make -j command?

@SRkumar97 SRkumar97 reopened this Jun 7, 2024
@marchdf
Copy link
Contributor

marchdf commented Jun 7, 2024

Each executable is case specific. But they will share a lot of compiled library code. So you can just make -j in each executable directory.

@SRkumar97
Copy link
Author

SRkumar97 commented Jun 7, 2024

Oh, thanks

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

2 participants