|
[Sponsors] |
March 3, 2020, 11:08 |
Nektar++ for windows10
|
#1 |
New Member
Join Date: Feb 2018
Posts: 27
Rep Power: 8 |
I am trying to compile Nektar++ on a windows 10 machine, Does anyone have recent (positive) experience with this? I have tried several times with different software versions but to no effect. After a long process it ends up giveing some kind of visual studio project related error. The documentation that describes the process seems to be outdated as it keeps referring to visual studio 15. I have tried this version as well as visual studio 19, and several versions of cmake and the boost libraries without success. Some help would be much appreciated!
*** I have been able to compile the code with vs 2019, cmake 3.16 and boost libraries 1.72 and great help from J. Cohen from Imperial College. Turns out there is an issue with the 5.0.0 version that is downloadable from the web page but has been already solved in the master branch on gitlab, so use that version for building on windows 10. You need also have extra care with setting up the correct path variables so that all relevant libraries can be readily allocated (you basically need to add to the path all directories within the nektar folder that contain .exe, .dll. and folders /lib Last edited by CarlosLozano; March 5, 2020 at 04:22. Reason: problem solved |
|
June 16, 2020, 06:43 |
Nektar++ on a windows 10 machine
|
#2 |
New Member
SHAN xiangjun
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
Thank you very much for your sharing, it has helped me a lot. I now also intend to compile Nektar++ on Windows. Based on your suggestions, I used VS2019, integrated Parallel Studio XE 2019 Update 5, CMake3.18, boost libraries 1.72, and downloaded the GitLab version of Nektar++. The code was compiled according to the installation tutorial, but it was not successful. The settings in the CMake process are as shown in the picture. Under the default selection, I only selected the ARPACK and FFTW packages, but the error as shown in the compilation occurs. I want to try to solve this problem, but I don’t know where to start. Can you please share some more experience with the compilation of Nektar++ under Windows?
000000.jpg |
|
June 21, 2020, 10:45 |
|
#3 | |
New Member
Join Date: Feb 2018
Posts: 27
Rep Power: 8 |
Quote:
FOr example, I did install manually the boost libraries (point 4 of the tutorial). I also followed some other piece of advice from Jeremy Cohen from Imperial that I am copying below . Dear all, We're aware that there have been a few messages to the nektar-users list list recently regarding building on Windows 10. We've been investigating the issues and apologise where we've not been able to respond individually to these queries. Some updated instructions will appear in the Nektar++ user guide shortly for building on Windows 10 with recent versions of Visual Studio. In the meantime, we'd like to highlight that building Boost as a third party dependency as part of the Nektar++ build is not currently supported on Windows 10 with recent versions of Visual Studio. Instead you'll need to install the boost binaries from SourceForge and ensure that CMake correctly finds Boost during the configuration process. Instead of installing Boost 1.61 (as currently detailed in the user guide), if you're using Visual Studio 2017, we recommend that you install Boost 1.68 from https://sourceforge.net/projects/boo...naries/1.68.0/. For VS2017 on 64-bit Windows you should use the 14.1-64 installer - boost_1_68_0-msvc-14.1-64.exe. If you're using Visual Studio 2019, we recommend that you install Boost 1.72 from https://sourceforge.net/projects/boo...naries/1.72.0/. For VS2019 on 64-bit Windows you should use the 14.2-64 installer - boost_1_72_0-msvc-14.2-64.exe. Assuming that BOOST_HOME is set (as detailed in the current user guide) to the correct path for the location of the version of Boost that you have installed, configuring with CMake should find Boost successfully. Also note that you should run the cmake and msbuild commands within a Visual Studio command prompt. Assuming you're using a 64-bit version of Windows 10, this is the "x64 Native Tools Command Prompt for VS 2017" or "x64 Native Tools Command Prompt for VS 2019" for which there should be a shortcut in your Start menu. Rather than running the cmake-gui as detailed in the user guide, you should be able to use the command line cmake command to generate a standard Windows build configuration. You will need to specify the "Generator" to use when running cmake on the command line, e.g. 'cmake -G "Visual Studio 15 2017 Win64" ..' or 'cmake -G "Visual Studio 16 2019" ..' If you are still experiencing issues building Nektar++ under Windows 10, please continue to post any issues to the nektar-users list and we will try to assist in resolving build issues. Cheers, Jeremy Finally, I enclose the mails that I exchanged woth J. Cohen regarding the installation problems. Hope it helps somehow and best regards. Dear all, I am trying to build Nektar 5.0.0 on windows 10. I am using vs 2019 and I have installed boost from boost_1_72_0-msvc-14.2-64.exe following advice from Jeremy Cohen https://mailman.ic.ac.uk/mailman/htd...ch/001320.html I build scripts for Visual Studio 16 2019 and x64. cmake seems to correctly locate boost, the c++ compilers and everything else (configuration and generation run smoothly). I then issue msbuild INSTALL.vcxproj /p:Configuration=Release After a lenghty process, I get 7910 warnings and the following 6 errors (I apologize for it being in Spanish): "C:\nektar++-5.0.0\builds\INSTALL.vcxproj" (destino predeterminado) (1) -> "C:\nektar++-5.0.0\builds\ALL_BUILD.vcxproj" (destino predeterminado) (3) -> "C:\nektar++-5.0.0\builds\solvers\CardiacEPSolver\CardiacEPSolv er-obj.vcxproj" (destino predeterminado) (4) -> "C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj" (destino predeterminado) (5) -> (ClCompile destino) -> C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(10 8,46): error C2065: '_TWO_DIGIT_EXPONENT': identificado r no declarado [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(10 8,27): error C3861: '_set_output_format': no se encontr ó el identificador [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(11 1,5): error C3861: '_set_output_format': no se encontró el identificador [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(16 9,46): error C2065: '_TWO_DIGIT_EXPONENT': identificado r no declarado [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(16 9,27): error C3861: '_set_output_format': no se encontr ó el identificador [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] C:\nektar++-5.0.0\library\SolverUtils\Core\CouplingFile.cpp(17 1,5): error C3861: '_set_output_format': no se encontró el identificador [C:\nektar++-5.0.0\builds\library\SolverUtils\SolverUtils.vcxpr oj] If I issue msbuild INSTALL.vcxproj /p:Configuration=Release again, I get just 10 warnings and still the same 6 errors any advice? Thanks a lot \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \_\_\_\_\_ Dear Carlos, Thanks for highlighting this and my apologies for forgetting to point this out in the advice I sent round the other day. This is a known issue and there is a fix in the current master branch of the Nektar++ repository, however it was resolved after the 5.0.0 release so isn't in the 5.0.0 source. I guess you are using the v5.0.0 source from https://www.nektar.info/downloads/? The _set_output_format function is not found because it is no longer present in recent versions of Visual Studio (https://docs.microsoft.com/en-us/cpp...t?view=vs-2019). I've prepared and attached a small patch to add the changes into the v5.0.0 source so you can apply this and it should resolve the problem. Another option is to clone the Nektar++ source from gitlab and build the master branch where this issue shouldn't be present. If you'd like to apply the patch, save the attached file into your nektar++-5.0.0 directory and then run: patch -p1 -i nektarpp5-output_format.patch If for any reason the patch command is not available on your system, I believe it's included with Git Bash (https://gitforwindows.org/) so you can install that and the command should then be available from the terminal. Hope that helps, let us know if you are able to build successfully with this configuration or if you experience any further issues. Thanks, Jeremy \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \_\_\_\_\_ Dear Jeremy, thank you very much for your help. I finally cloned the master branch (I couldn't get the patch to work) and the compilation ran smoothly. I also updated the path for the bin and lib directories. Unfortunately, all 483 tests have failed (including tests #338 - 342, which also show "Exception" and "Exit code 0xc0000135"). Regards, \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \_\_\_\_\_ Hi Carlos, Glad to hear you were able to get a build that has completed using master. Can you let me know what issue you had with the patch? I tested it here on Windows 10 with VS2019 and nektar++ 5.0.0 source and the patch applied successfully and the build completed. I've just investigated in the test build that I did this morning and the tests seem to be failing there too. When I try to run an installed executable, e.g. I run "IncNavierStokesSolver" in my VS x64 command prompt, it pops up an error telling me that libblas.dll and liblapack.dll are not found. On a previous working copy I have, I note that libblas.dll and liblapack.dll are present in %NEKTAR_HOME%\ThirdParty\ but they are not there on the copy I just built. Can you check if you have the libblas.dll and liblapack.dll libraries %NEKTAR_HOME%\ThirdParty\? (%NEKTAR_HOME% is the directory that the nektar++ source code has been cloned into). I'm assuming you'll find that they're not there. I'm not sure why the required DLLs are not there but you can obtain then by downloading https://www.nektar.info/thirdparty/w...las-lapack.zip and unzipping it into %NEKTAR_HOME%\ThirdParty You'll need to set the path to these libraries and your installed libraries/executables - this is explained in the documentation (http://doc.nektar.info/userguide/5.0...tml#x7-60001.3) in section 1.3.4.1 of the linked page, point 13, where it shows the directories that you'll need to add to your path. You'll also need to add %NEKTAR_HOME%\ThirdParty and %NEKTAR_HOME%\builds\ThirdParty\dist\lib so you should end up with four entries in your PATH environment that look something like: C:\<full path to Nektar++ location>\nektar\ThirdParty C:\<full path to Nektar++ location>\nektar\builds\ThirdParty\dist\lib C:\<full path to Nektar++ location>\nektar\builds\dist\lib C:\<full path to Nektar++ location>\nektar\builds\dist\bin Once you've made these changes to your PATH configuration, you'll need to close your VS command prompt and open a fresh one for the PATH changes to take effect. You should now find that if you change into the %NEKTAR_HOME%\builds directory and run "ctest -C Release", the tests should start to run successfully. I've just tested with the local version I built this morning and the tests are now running fine so far (the first 300+ tests have completed and all passed). I hope all this makes sense, let me know if you're having further issues getting things running. Regards, Jeremy \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \_\_\_\_\_ Hi Jeremy, thanks again for your assistance. I've checked and the dll's were there, but I had not set the path to %NEKTAR_HOME%\ThirdParty\ . I've done this and now all the tests run smoothly. As for the patch, I downloaded git but the system still did not recognize the command patch, so I tried with git apply and it complained that it was not possible to apply the patch (I do not remember the details, and I did not pursue it further, I just tried by cloning the master branch). Best regards and thanks again! |
||
June 21, 2020, 22:13 |
|
#4 |
New Member
SHAN xiangjun
Join Date: Feb 2019
Posts: 2
Rep Power: 0 |
Dear Carlos,
Thanks for your reply and displayed me with so detailed experience about installing this software. I have attempted to revise someplace that I didn't consider before according to your shared messages, for example, use the 'x64 Native Tools Command Prompt for VS 2019' and the command line CMake command to generate a standard Windows build configuration. But in present, some optional libraries such as the NEKTAR_USE_ARPACK is still a problem, when I choose this option a mistake will appear as shown: Configuring incomplete, errors occurred! See also "D:/nektar/builds/ThirdParty/arpack-ng-1.0/CMakeFiles/CMakeOutput.log". See also "D:/nektar/builds/ThirdParty/arpack-ng-1.0/CMakeFiles/CMakeError.log". Could NOT find BLAS (missing: BLAS_LIBRARIES) Call Stack (most recent call first): D:/Program Files (x86)/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSA GE) D:/Program Files (x86)/CMake/share/cmake-3.18/Modules/FindBLAS.cmake:947 (find_package_handle_standard_args) CMakeLists.txt:53 (find_package) it says missing BLAS_LIBRARIES, but I have installed this library. Besides, I can run the NEKTAR_USE_MPI successfully, so I think that the NEKTAR_USE_ARPACK option may not be used on Windows, as for the saying 'only serial execution is supported with a minimal amount of additional build packages' in user-guide of Nektar. After searching online, I find another way to use Nektar on Windows that installs the Linux environment through the WLS. Through this method, I install the pre-compiled binary packages of this software in Linux and successfully run it. Thanks for all the help! Best regards Jarius |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nektar Documentation | Giorgos | Main CFD Forum | 0 | January 26, 2007 09:02 |
some problem about compiling Nektar | ztdep | Main CFD Forum | 0 | July 30, 2005 09:43 |