Comments (9)
@JanssensNick :
Hello,
I experienced the same problem when trying to install bitpit, (You can check the closed issues).
If I remember well, then you can proceed as follows:
Below, I am using ccmake instead of CMake.
In my case, bitpit doesn't detect the content of the variables PETSC_DIR
and PETSC_ARCH
so you must change them manually in ccmake (make sure that they are correct). That is, in ccmake, make sure that:
PETSC_DIR
is /home/nick/bitpit-bitpit-1.6.0/build/petsc-3.9.4
PETSC_ARCH
is arch-linux2-c-debug
After that I guess, you will get another error, about the variable PETSC_RUN_EXECUTABLES
(I don't rememeber exactly). So in order to solve that, you need to run ccmake like this:
cmake .. -DPETSC_EXECUTABLE_RUNS=ON
from bitpit.
from bitpit.
Dear,
Thank you very much for your answer! Regarding the first 2 remarks:
- I've installed PETSc and I've set the variables PETSC_DIR and PETSC_ARCH as environmental variable, which I verified with echo:
- PETSC_DIR = .../petsc-3.94 (the root folder of PETSC)
- PETSC_ARCH = arch-linux2-c-debug
and these are also the values that the installer suggested. However, when I run the ccmake command with the error from my previous post, I also see this:
where the PETSC_DIR is not set anymore (even though I verified it that I set it as an environmental variable).
I've also included the requested log files.
configure.log
make.log
Thank you very much in advance.
Nick Janssens
from bitpit.
Dear Nick,
your files contain only your path to the files, I need their original content in order to help you.
Your variable values are quite weird:
PETSC_DIR = .../petsc-3.94 ? What does it mean, please?
I give you an example:
$ echo $PETSC_DIR
/opt/petsc/petsc-3.7.5
In PETSc configuration what do you set as prefix? If you didn't set it the default value is /usr/local. Therefore, echo $PETSC_DIR should answer either /usr/local or what you set as prefix. If you set "../petsc-3.94" as prefix, I hope you used 2 points and not 3, PETSc has been installed in the build folder parent folder.
Probably, we can solve the problem if you send us the right configure.log and make.log.
Thanks,
Marco Cisternino
from bitpit.
Dear Marco
Oops, I didn't notice that, the correct log files should now be attached:
configure.log
make.log
Concerning the variable values, .. was an abbreviation of the full path, so:
- echo $PETSC_DIR: /home/nick/bitpit-bitpit-1.6.0/build/petsc-3.9.4
- echo $PETSC_ARCH: arch-linux2-c-debug
(I've installed my petsc directory in the bitpit build directory, this is not ideal but shouldn't be a problem, right?)
Maybe something else that can be useful: I've set the PETSC_DIR and PETSC_ARCH values as environmental variables in my .bashrc file after the installation of PETSC. If I did echo $PETSC_DIR right after the installation of PETSC, the variables were empty. This is why I manually set them in .bashrc.
Thank you in advance
Nick
from bitpit.
Dear,
Thank very much, this did the trick! However, now I am getting this error message:
which I don't quite understand. Any thoughts? I tried to set the path to my cmake executables like this:
by setting the value in CMakeLists.txt, but the Path is not recognised.
Nick
from bitpit.
@JanssensNick
I think this is a CMake internal error, so:
- First try to remove the build folder, close the terminal, and open a new one. Now try again to build bitpit (of course, follow the instructions above regarding
PETSC_DIR
andPETSC_ARCH
. - If you still get the same error, please try to re-install your cmake. Then try to build bitpit.
from bitpit.
I tried both suggestions, but they didn't work. Any other ideas?
from bitpit.
In top-level CMakeLists.txt (from current master branch), actually cmake variables PETSC_DIR and PETSC_ARCH are hardwired respectively to an empty string and "arch-linux2-c", which somehow short-circuits the job that should be done inside FindPETSc.cmake :
...
if (MODULE_LA_ENABLED)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/external/PETSc/cmake")
set(PETSC_DIR "" CACHE PATH "Directory in which PETSc resides")
set(PETSC_ARCH "arch-linux2-c" CACHE STRING "Build architecture")
find_package(PETSc REQUIRED)
list (APPEND BITPIT_EXTERNAL_DEPENDENCIES "PETSc")
list (APPEND BITPIT_EXTERNAL_LIBRARIES "${PETSC_LIBRARIES}")
list (APPEND BITPIT_EXTERNAL_INCLUDE_DIRS "${PETSC_INCLUDES}" )
endif()
Setting cmake variables PETSC_DIR and PETSC_VAR in top-level CMakeLists.txt completely shadows env variable with the same name, which are then never taken into account inside FindPETSc.cmake.
I suggest to first use values optionnal given in the cmake (or ccmake) configure command line and then check if the env variable were set, something like :
# create a cmake cache variable
set(PETSC_DIR "" CACHE PATH "Installation directory of PETSC library")
# if user gave value on the command line -DPETSC_DIR=/some/location/to/petsc it will be used
# then consider using the env. var. PETSC_DIR only if not already given through the CMake cache var.
if (NOT PETSC_DIR AND DEFINED ENV{PETSC_DIR})
set(PETSC_DIR "$ENV{PETSC_DIR}")
message(STATUS "PETSC_DIR found in environment : ${PETSC_DIR}")
endif()
These checks should probably be done at the begining of the FindPETSc.cmake
from bitpit.
Related Issues (20)
- Fix Cmake min version for pointcloud and lineunstructured modules
- voloctree: DDT Memory Failure when running with guard pages HOT 2
- Bitpit Debug MPI : assertion fails in PatchKernel::getOwner method
- PABLO: *UBSAN runtime_error* Morton left shift by 16 places cannot be represented in type uint64_t HOT 2
- cmake: activate address sanitizer for MSVC compiler
- Outputting RBF objects to text file HOT 5
- patchKernel: Fix documentation in patch_skd_tree.cpp
- Compilation errors with llvm's libc++ : `binary_stream.tpp:72:18: error: reinterpret_cast <...> is not allowed` HOT 6
- CMake error : `check_compiler_flag: C: needs to be enabled before use.`
- Problem with bitpit::CGElem::distancePointPolygon when compiling bitpit in Debug Mode HOT 6
- CMake : errors concerning GetGitRevisionDescription.cmake during configure step
- does bitpit support defining a domain with different lengths in different directions HOT 4
- IO: STLReader::detectFormat returning FormatUnknown for STL case HOT 1
- Example for volOctree with refinement and MPI HOT 9
- Warnings in RBF module
- Parallel RBF for large set of nodes
- Parallel RBF for large set of nodes HOT 2
- After building, headers aren't available HOT 1
- Undefined Reference to `bitpit::ParaTree::ParaTree` HOT 1
- Levelset values on vertices of volOctree HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitpit.