- Thank you received: 0
Linux building issue
5 years 4 months ago #1712
by Presley
Linux building issue was created by Presley
Hi,
I was trying to install from sources NGSolve into my ubuntu 16.04. Unfortunately it failed:
I was trying to install from sources NGSolve into my ubuntu 16.04. Unfortunately it failed:
Code:
[ 3%] Creating directories for 'netgen_project'
[ 7%] Creating directories for 'suitesparse'
[ 11%] Performing download step (git clone) for 'suitesparse'
[ 15%] No download step for 'netgen_project'
[ 19%] No patch step for 'netgen_project'
-- suitesparse download command succeeded. See also /home/user/ngsuite/ngsolve-build/umfpack/src/suitesparse-stamp/suitesparse-download-*.log
[ 23%] No update step for 'netgen_project'
[ 26%] No update step for 'suitesparse'
[ 34%] No configure step for 'netgen_project'
[ 34%] No patch step for 'suitesparse'
[ 42%] Performing configure step for 'suitesparse'
[ 42%] Performing build step for 'netgen_project'
[ 10%] Performing check_submodules1 step for 'netgen'
[ 42%] Built target check_submodules_start
-- Could NOT find LAPACK (missing: LAPACK_DIR)
CMake Warning (dev) at CMakeLists.txt:210 (SET):
implicitly converting 'FILE' to 'STRING' type.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:211 (SET):
implicitly converting 'FILE' to 'STRING' type.
This warning is for project developers. Use -Wno-dev to suppress it.
[ 20%] Performing build step for 'netgen'
[ 0%] Building CXX object libsrc/core/CMakeFiles/ngcore.dir/localheap.cpp.o
[ 0%] Building CXX object libsrc/core/CMakeFiles/ngcore.dir/taskmanager.cpp.o
[ 2%] Built target togl
[ 3%] Building CXX object libsrc/core/CMakeFiles/ngcore.dir/utils.cpp.o
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/ngsuite/ngsolve-build/umfpack/src/suitesparse-build
[ 46%] Performing build step for 'suitesparse'
In file included from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp:16:0,
from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:11:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp: In function ‘void ngcore::QuickSort(ngcore::FlatArray<TELEM>, TLESS)’:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1290:5: error: ‘ptrdiff_t’ was not declared in this scope
ptrdiff_t i = 0;
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1290:5: note: suggested alternatives:
In file included from /usr/include/c++/5/exception:37:0,
from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:7:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note: ‘std::ptrdiff_t’
typedef __PTRDIFF_TYPE__ ptrdiff_t;
^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note: ‘std::ptrdiff_t’
In file included from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp:16:0,
from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:11:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1291:15: error: expected ‘;’ before ‘j’
ptrdiff_t j = data.Size()-1;
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1293:23: error: ‘i’ was not declared in this scope
T midval = data[ (i+j)/2 ];
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1293:25: error: ‘j’ was not declared in this scope
T midval = data[ (i+j)/2 ];
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp: In function ‘void ngcore::QuickSortI(ngcore::FlatArray<TELEM>, ngcore::FlatArray<int>, TLESS)’:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1343:5: error: ‘ptrdiff_t’ was not declared in this scope
ptrdiff_t i = 0;
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1343:5: note: suggested alternatives:
In file included from /usr/include/c++/5/exception:37:0,
from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:7:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note: ‘std::ptrdiff_t’
typedef __PTRDIFF_TYPE__ ptrdiff_t;
^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note: ‘std::ptrdiff_t’
In file included from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp:16:0,
from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:11:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1344:15: error: expected ‘;’ before ‘j’
ptrdiff_t j = index.Size()-1;
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1346:26: error: ‘i’ was not declared in this scope
int midval = index[ (i+j)/2 ];
^
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/array.hpp:1346:28: error: ‘j’ was not declared in this scope
int midval = index[ (i+j)/2 ];
^
In file included from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/localheap.cpp:11:0:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp: At global scope:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp:395:24: warning: requested alignment 4096 is larger than 256 [-Wattributes]
class alignas(4096) AtomicRange : public AlignedAlloc<AtomicRange>
^
In file included from /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.cpp:16:0:
/home/user/ngsuite/ngsolve-src/external_dependencies/netgen/libsrc/core/taskmanager.hpp:395:24: warning: requested alignment 4096 is larger than 256 [-Wattributes]
class alignas(4096) AtomicRange : public AlignedAlloc<AtomicRange>
^
libsrc/core/CMakeFiles/ngcore.dir/build.make:75: recipe for target 'libsrc/core/CMakeFiles/ngcore.dir/localheap.cpp.o' failed
make[8]: *** [libsrc/core/CMakeFiles/ngcore.dir/localheap.cpp.o] Error 1
make[8]: *** Waiting for unfinished jobs....
-- suitesparse build command succeeded. See also /home/user/ngsuite/ngsolve-build/umfpack/src/suitesparse-stamp/suitesparse-build-*.log
[ 50%] Performing install step for 'suitesparse'
-- suitesparse install command succeeded. See also /home/user/ngsuite/ngsolve-build/umfpack/src/suitesparse-stamp/suitesparse-install-*.log
[ 53%] Completed 'suitesparse'
[ 53%] Built target suitesparse
CMakeFiles/Makefile2:1058: recipe for target 'libsrc/core/CMakeFiles/ngcore.dir/all' failed
make[7]: *** [libsrc/core/CMakeFiles/ngcore.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make[6]: *** [all] Error 2
CMakeFiles/netgen.dir/build.make:115: recipe for target 'dependencies/src/netgen-stamp/netgen-build' failed
make[5]: *** [dependencies/src/netgen-stamp/netgen-build] Error 2
CMakeFiles/Makefile2:77: recipe for target 'CMakeFiles/netgen.dir/all' failed
make[4]: *** [CMakeFiles/netgen.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/netgen_project.dir/build.make:111: recipe for target 'dependencies/Stamp/netgen_project/netgen_project-build' failed
make[2]: *** [dependencies/Stamp/netgen_project/netgen_project-build] Error 2
CMakeFiles/Makefile2:113: recipe for target 'CMakeFiles/netgen_project.dir/all' failed
make[1]: *** [CMakeFiles/netgen_project.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
5 years 4 months ago #1713
by hvwahl
Replied by hvwahl on topic Linux building issue
Hi Presley,
it looks to me like you are using gcc 5. NGSolve needs a compiler with c++17 support, so gcc7.3 or clang 7 or higher (see ngsolve.org/forum/ngspy-forum/747-build-...lem-new-version#1478 ).
Best wishes,
Henry
it looks to me like you are using gcc 5. NGSolve needs a compiler with c++17 support, so gcc7.3 or clang 7 or higher (see ngsolve.org/forum/ngspy-forum/747-build-...lem-new-version#1478 ).
Best wishes,
Henry
5 years 4 months ago #1718
by Presley
Replied by Presley on topic Linux building issue
Hi Henry! Thanks a lot! After I updated the gcc to 7 it worked through the making and installing step. But when I tried to run an example it failed...
What did I do wrong? May I also ask how to turn the cmake options ON? I need PARDISO to run a code but by default it's turned off.
Thanks in advance!
Regards,
Rob
Code:
➜ intro netgen navierstokes.py
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
optfile ./ng.opt does not exist - using default values
togl-version : 2
loading ngsolve library
NGSolve-6.2.1905-166-g03a9230
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 8 thread(s)
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'ngsolve'
(should) load python file 'navierstokes.py'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'ngsolve'
Traceback (most recent call last):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
ImportError: No module named 'ngsolve'
Finished executing navierstokes.py
ImportError: No module named 'netgen'
Thank you for using NGSolve
What did I do wrong? May I also ask how to turn the cmake options ON? I need PARDISO to run a code but by default it's turned off.
Thanks in advance!
Regards,
Rob
5 years 4 months ago #1719
by hvwahl
Replied by hvwahl on topic Linux building issue
Hi Rob,
with respect to PARDISO: As far as I'm aware, the best way is to have PARDISO available is to build NGSolve with Intel MKL software.intel.com/en-us/mkl . You then need to add the following cmake flags when building NGSolve
c.f.
ngsolve.org/forum/ngspy-forum/670-build-with-pardiso
Your error looks to me like ngsolve is not in your PYTHONPATH path variable. Maybe check if all you path/pythonpath variables are set correctly: You should have a directory similar to
(depending on you python3 version and where you installed NGSolve) which contains a folder "ngsolve" within which there are then a load of python files. Make sure that the "site_packages" directory is in you pythonpath.
Best wishes,
Henry
with respect to PARDISO: As far as I'm aware, the best way is to have PARDISO available is to build NGSolve with Intel MKL software.intel.com/en-us/mkl . You then need to add the following cmake flags when building NGSolve
Code:
-DMKL_ROOT=${MKLROOT} -DUSE_MKL=ON
Your error looks to me like ngsolve is not in your PYTHONPATH path variable. Maybe check if all you path/pythonpath variables are set correctly: You should have a directory similar to
Code:
NGSolve/inst/lib64/python3.6/site-packages
Best wishes,
Henry
5 years 4 months ago #1720
by Presley
Replied by Presley on topic Linux building issue
Hi Henry,
Thanks a lot! It worked after I set up the PYTHONPATH variable properly!
Regarding to PARDISO, I downloaded it from what you pointed me to and installed it. Here is the error msg from cmake:
It seems adding that flag is not enough and there is need to set up some other environment variables for Cmake to find MKL?
Best regards,
Rob
Thanks a lot! It worked after I set up the PYTHONPATH variable properly!
Regarding to PARDISO, I downloaded it from what you pointed me to and installed it. Here is the error msg from cmake:
Code:
➜ ngsolve-build cmake -DCMAKE_INSTALL_PREFIX=${BASEDIR}/ngsolve-install -DMKL_ROOT=${MKLROOT} -DUSE_MKL=ON ${BASEDIR}/ngsolve-src
-- Build Netgen from git submodule
Configure Netgen from submodule...
Checking for write permissions in install directory...
Checking for write permissions in install directory...
-- Found Pybind11: /home/user/ngsuite/ngsolve-src/external_dependencies/netgen/external_dependencies/pybind11/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/ngsuite/ngsolve-build/netgen
CMake Warning (dev) at cmake/SuperBuild.cmake:129 (find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
CMake variable MKL_ROOT is set to:
/home/user/intel
For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
CMakeLists.txt:61 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_LIBRARY
MKL_MINIMAL_LIBRARY)
Call Stack (most recent call first):
/usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/cmake_modules/FindMKL.cmake:151 (find_package_handle_standard_args)
cmake/SuperBuild.cmake:129 (find_package)
CMakeLists.txt:61 (include)
-- Configuring incomplete, errors occurred!
See also "/home/user/ngsuite/ngsolve-build/CMakeFiles/CMakeOutput.log".
See also "/home/user/ngsuite/ngsolve-build/CMakeFiles/CMakeError.log".
It seems adding that flag is not enough and there is need to set up some other environment variables for Cmake to find MKL?
Best regards,
Rob
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
5 years 4 months ago #1721
by christopher
Replied by christopher on topic Linux building issue
Hi Rob,
Usually the mkl root is intel/mkl and not intel. Can you check setting mkl root to /home/user/intel/mkl?
Best
Christopher
Usually the mkl root is intel/mkl and not intel. Can you check setting mkl root to /home/user/intel/mkl?
Best
Christopher
Time to create page: 0.113 seconds