Linux building issue

More
6 years 1 month 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
More
6 years 1 month 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...
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
More
6 years 1 month 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
Code:
-DMKL_ROOT=${MKLROOT} -DUSE_MKL=ON
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
Code:
NGSolve/inst/lib64/python3.6/site-packages
(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
More
6 years 1 month 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:
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
More
6 years 1 month 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
More
6 years 1 month ago #1723 by Presley
Replied by Presley on topic Linux building issue
YES it worked! Thanks a lot, Christopher!

Best regards,
Rob
Time to create page: 0.131 seconds