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

build instructions unclear #92

Open
akostadinov opened this issue Apr 8, 2020 · 22 comments
Open

build instructions unclear #92

akostadinov opened this issue Apr 8, 2020 · 22 comments

Comments

@akostadinov
Copy link

Hi, current build instructions are not very helpful. After I managed to put proper boost I'm stuck on openmm setup. I can't find any patches to be applied. So I just cloned 7.4.1 tag into openmm dir. It builds fine on its own. But as part of fahbench build it fails

fahbench]$ cmake3 .
-- Fetching Boost
-- Fetching Boost - done
-- Boost found: 1.71.0 /home/user/fahbench/_deps/boost-src
-- Found the following ICU libraries:
--   uc (required)
--   dt (required)
--   i18n (required)
CMake Deprecation Warning at openmm/CMakeLists.txt:25 (CMAKE_POLICY):
  The OLD behavior for policy CMP0042 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Error at openmm/CMakeLists.txt:37 (INCLUDE):
  INCLUDE could not find load file:

    TargetArch


CMake Error at openmm/CMakeLists.txt:38 (target_architecture):
  Unknown CMake command "target_architecture".


-- Configuring incomplete, errors occurred!
See also "/home/user/fahbench/CMakeFiles/CMakeOutput.log".
See also "/home/user/fahbench/CMakeFiles/CMakeError.log".

I copied cmake files to cmake dir ti have them found, then build failed:

fahbench]$ make
Scanning dependencies of target ApiWrappers
[  0%] Parsing OpenMM header files with Doxygen...
Warning: Tag `SYMBOL_CACHE_SIZE' at line 289 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `SHOW_DIRECTORIES' at line 473 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 809 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
Warning: tag INPUT: input source `/home/user/fahbench/openmmapi' does not exist
Warning: tag INPUT: input source `/home/user/fahbench/olla/include/openmm/Platform.h' does not exist
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for files to exclude
Searching for files to process...
warning: source /home/user/fahbench/openmmapi is not a readable file or directory... skipping.
warning: source /home/user/fahbench/olla/include/openmm/Platform.h is not a readable file or directory... skipping.
Reading and parsing tag files
Parsing files
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Associating documentation with classes...
Computing nesting relations for classes...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Creating members for template instances...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Freeing entry tree
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Computing dependencies between directories...
Generating citations page...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Generating style sheet...
Generating example documentation...
Generating file sources...
Generating file documentation...
Generating page documentation...
Generating group documentation...
Generating class documentation...
Generating namespace index...
Generating graph info page...
Generating directory documentation...
finalizing index lists...
Generating XML output...
lookup cache used 0/65536 hits=0 misses=0
finished...
[  0%] Generating OpenMMCWrapper.h, OpenMMCWrapper.cpp, OpenMMFortranModule.f90, OpenMMFortranWrapper.cpp
Traceback (most recent call last):
  File "/home/user/fahbench/openmm/wrappers/generateWrappers.py", line 2073, in <module>
    builder.writeOutput()
  File "/home/user/fahbench/openmm/wrappers/generateWrappers.py", line 322, in writeOutput
    self.writeGlobalConstants()
  File "/home/user/fahbench/openmm/wrappers/generateWrappers.py", line 176, in writeGlobalConstants
    node = next((x for x in findNodes(self.doc.getroot(), "compounddef", kind="namespace") if x.findtext("compoundname") == "OpenMM"))
StopIteration
make[2]: *** [openmm/wrappers/CMakeFiles/ApiWrappers.dir/build.make:65: openmm/wrappers/OpenMMCWrapper.h] Error 1
make[2]: *** Deleting file 'openmm/wrappers/OpenMMCWrapper.h'
make[1]: *** [CMakeFiles/Makefile2:1967: openmm/wrappers/CMakeFiles/ApiWrappers.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Apparently some paths are confused. So I guess I'm missing some patches. Existing documentation does not help me much though. Thanks.

@informatorius
Copy link

I build FahBench on Windows and it worked to build OpenMM on its own and FahBench on its own and then just copy the OpenMM dlls to FahBench folder. Maybe something similar works on Linux too?

@IanSteveC
Copy link

I am having similar issues trying to compile this on linux and the instructions are sorely lacking. can someone update it? @akostadinov how did you get boost in there? when i download the package nothing is in the boost folder. the instructions say that boost will be automatically downloaded, but it is not, the folder remains empty.

i've tried manually downloading boost, but there is no cmake list file there and it still gives an error.

@PantherX
Copy link

Hiya @IanSteveC

Please note that I have reached out to someone so let's see what happens 🤞

@IanSteveC
Copy link

IanSteveC commented Nov 16, 2020

@PantherX Thanks, I'm looking forward to it, I'd love to be able to compile the FAH bench app with core22 and the latest CUDA support for some testing.

Or if we can get someone to compile and release a new build of FAHbench with these features, then I wont even have to bother trying to build it myself. Whatever works.

@informatorius
Copy link

informatorius commented Nov 16, 2020

I can only give it to you unofficial build for Windows with Core22 mixed precision OpenCL / CUDA

https://gofile.io/d/qdIqlR
Password: abcd1234

Only download file if you trust me. This is a Windows executable file and could in theory be a computer virus.

@IanSteveC
Copy link

@informatorius, what version of CUDA is this? I need the latest CUDA 11.1 for full RTX 3000 Ampere support.

@informatorius
Copy link

informatorius commented Nov 16, 2020

It is CUDA 9.2 compiler. I build it using CUDA 11.1 but the runtime needs the CUDA 9.2 dlls for kernel compile. I got it from a real FAH work unit running with CUDA. I can also provide build guidance for Windows if you want to try it yourself.

I was wrong, it works with CUDA 11 compiler too.

@IanSteveC
Copy link

If you can provide full instructions for Windows I’ll give it a try.

@informatorius
Copy link

informatorius commented Nov 16, 2020

I build FAHbench and OpenMM with Release x64

  1. Download Visual Studio 2019 Comunity Edition and install with C++ Modules
  2. Download OpenMM source code from github foldingAtHome and extract to a folder https://github.com/FoldingAtHome/openmm/releases
  3. Download SwigWin and extract to a folder http://www.swig.org/download.html e.g. v3.0.12
  4. Download and extract boost library https://www.boost.org e.g. v1.6.2
  5. Download OCL SDK and CUDA SDK and install or extract to folder
  6. Open cmd shell in folder and proceed with
set PATH=%PATH%;C:\Program Files\swigwin-3.0.12; C:\Program Files\OCL_SDK_Light; C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
cmake -G "Visual Studio 16 2019" -A "x64"
  1. Open generated solution file OpenMM.sln in Visual Studio
  2. In Visual Studio unload all test projects if you do not want to run them and save time
  3. Build solution
    => All dlls ready in Release folder

I had issue with some environment variables not set and some includes and libs path not correct. After fixing that it builds everything

Same instructions are valid for the FahBench source code. But it needs additional QT library for GUI.

  1. Download and install QT library for your Visual Studio version https://www.qt.io/download-qt-installer e.g. v5.12
  2. Open cmd shell and set environment depending on the folders and versions you selected previously
set OPENMM_LIB_PATH=C:\Program Files\openmm-7.4.2\release
set OPENMM_INCLUDE_PATH=C:\Program Files (x86)\OpenMM\include
set PATH=C:\Libraries\Qt\5.4\msvc2019\bin;%PATH%
set PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin;%PATH%

cmake -G "Visual Studio 16 2019" -A "x64"
3) Open generated solution file FahBench.sln in Visual Studio
4) For mixed precision support used in FahCore_22 edit file fahbench/gui/CentralWidget.cpp:49 add line precision_wid->addItem("mixed");
5) Build solution
=> All dlls ready in Release folder

If both FahBench and OpenMM are build then copy OpenMM.dll to FahBench root folder and OpenMMCPU.dll, OpenMMCUDA.dll, OpenMMCPU.dll to FahBench/OpenMM subfolder

For CUDA you will also need cufft64_92.dll, nvrtc64_92.dll, nvrtc-builtins64_92.dll copy to FahBench/OpenMM subfolder e.g. from CUDA toolkit folder

@informatorius
Copy link

informatorius commented Nov 16, 2020

I was wrong FahBench runs with CUDA 11 only too. I will update the zip package.
https://gofile.io/d/1ee6go
Password: abcd1234
(It still says Cuda92 dlls but I just renamed it from CUDA 11)

@IanSteveC
Copy link

Thanks I’ll try that one. Did you use CUDA 11.0 or 11.1?

@IanSteveC
Copy link

@informatorius I'm getting an error trying to run your FAH bench version. I did install the CUDA 11.1 toolkit on my system.

i get "Error loading CUDA module: CUDA_ERROR_FILE_NOT_FOUND (301)"

@IanSteveC
Copy link

if i remove the CUDA toolkit I get:

"error compiling program: nvrtc: error: failed to open nvrtc-builtins64_111.dll.
Make sure that nvrtc-builtins64_111.dll is installed correctly.
Compilation flags: -arch=compute_70 --use_fast_math
Device compute capability: 7
nvrtc version 11.1"

another thing that is interesting is that I think it should be trying compute_86, not compute 70. is this a parameter you changed when you built this? my RTX 3070 has CC 8.6, not 7.0

@informatorius
Copy link

informatorius commented Nov 17, 2020

That sounds like it did not like my renaming of cuda files from 111 to 92 which works on my PC. Then I have to rebuild FahBench with 111 in code.

I did not change compute_86 but I guess FahBench/OpenMM does not use newer CUDA features anyway

@IanSteveC
Copy link

thanks, I got it working by using your first link with cuda92 DLLs and then adding/renaming the cuda111 DLLs from a freshly installed CUDA toolkit (then uninstalled CUDA toolkit).

@IanSteveC
Copy link

but i hope someone can update the linux instructions and procedures. I'm more comfortable with linux compiling and use.

@informatorius
Copy link

informatorius commented Nov 17, 2020

I'm more familiar with Windows but it should also be easy on Linux, download source, download dependencies devel, cmake and build. I can try it in a Linux VM but don't know if this can run CUDA...
Which part of https://github.com/fahbench/fahbench/blob/master/doc/build-and-install.md
did not work for you?

@IanSteveC
Copy link

IanSteveC commented Nov 17, 2020

this part:

"3. From a clean build directory, use ccmake to configure the build. Make sure the right OpenCL and Qt libraries are being found."

the first issue is that these instructions are incredibly vague. there really needs to be a more specific direction on how exactly to use ccmake to get the desired output. saying " just use it" is a lot different than saying "run this exact command with these parameters".

when doing this, the configure fails because it cannot find boost, claiming there is no boost cmake lists file. and indeed there isnt since the boost directory comes empty. in another version of the instructions here: http://fahbench.github.io/build-and-install.html it says "Boost (automatically downloaded and built)". with no explanation on how boost is supposed to be automatically downloaded and installed if there is no cmake file or nothing in the code that seems to perform this action.

 CMake Error at CMakeLists.txt:50 (add_subdirectory):
   The source directory

     /home/ian/builds/fahbench-2.3.1/boost

   does not contain a CMakeLists.txt file.

i've tried downloading boost manually, but there seems to be no way to link that into this install scheme. there is no cmake lists file for boost when you download their source from the vendor.

in general, their Linux instructions have a lot of missing steps or implied steps making the whole thing very unclear. that's what triggered this whole discussion.

@informatorius
Copy link

For the boost part I can say on Windows it gets downloaded when building the solution, because there is a boost project which purpose is to download and build boost on the fly during build.

I will try it on Linux when I have time.

@mpharrigan
Copy link
Contributor

boost and openmm are included as submodules in this repository. Make sure you force git to actually check them out. This will obviate the need to download them separately

@IanSteveC
Copy link

Can you elaborate? Maybe provide a command? How do you “force git to actually check them out”

In my previous attempts I just downloaded the zip file. And the openmm and boost folders are empty in this case.

@kotenok2000
Copy link

git clone --recursive

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

6 participants