<p><strong>Description of the issue</strong></p>
<p>Im trying to setup quickvina2 GPU2.1 on my windows laptop. after finishing setting it up correctly, without errors nor warnings, i tried running it in visual studio as suggested, to perform the test run. I got an assertion error and everything stopped.
This is the first time i am setting up VINA GPU.</p>
<p><strong>Steps to Reproduce</strong></p>
<ol>
<li><p>i cloned the repo</p>
</li>
<li><p>set up a C++ project on visual studio 2022 with the code</p>
</li>
<li><p>downloaded the boost library, bootstrapped it, and ran b2 toolset=msvc-14.3 variant=debug cxxstd=17 threading=multi</p>
</li>
<li><p>added in the C++ include dirs my quickvina2 GPU2.1 lib dir, openCL inc dir, my 12.3 CUDA toolkit include and lib/x64 dirs, the root boost dir, and the boost/stage/lib dir. in the linker additional libraries settings i put my boost/stage/lib and  CUDA toolkit lib/x64 dir. then in additional input in the linker i put the openCL lib file path, from inside my CUDA toolkit</p>
</li>
<li><p>set optimization for speed</p>
</li>
<li><p>set --config ./input_file_example/2bm2_config.txt as command arguments</p>
</li>
<li><p>tried to build but due to
Error   C1189   #error:  The &lt;experimental/filesystem&gt; header providing std::experimental::filesystem is deprecated by Microsoft and will be REMOVED. It is superseded by the C++17  header providing std::filesystem
I swapped experimental/filesystem for filesystem and ensured i was using C++17
i modified the</p>
<pre><code>     std::experimental::filesystem::create_directory(out_dir);
     for (const auto&amp; entry : std::experimental::filesystem::directory_iterator(ligand_directory)) {
</code></pre>
</li>
</ol>
<p>snippet to use filesystem instead with</p>
<pre><code>                    std::filesystem::create_directory(out_dir);
                    for (const auto&amp; entry : std::filesystem::directory_iterator(ligand_directory)) {
</code></pre>
<ol start="7">
<li>built and compiled without issues</li>
<li>ran from inside visual studio 2022</li>
</ol>
<p><strong>Expected Behavior</strong></p>
<p>i expected the test run to go well without errors, and create the correct output in /test_out, instead it went like this</p>
<p><strong>Actual Behavior</strong></p>
<p>Using virtual screening mode
Output will be in the directory ./test_out
Reading input ... done.
Setting up the scoring function ... done.
Using heuristic search_depth
Analyzing the binding site ... done.
GPU OpenCL Platform: NVIDIA CUDA
GPU Device: NVIDIA GeForce RTX 4060 Laptop GPU
Using random seed: 433324452</p>
<p>then an error pops up saying</p>
<p>debug assertion failed</p>
<p>program VINA.exe
file minkernel\crts\ucrt\src\app\stdio\fseek.cpp
Line 183
Expression: stream.valid()</p>
<p>press retry to debug the application</p>
<p>the line where the error happens is</p>
<pre><code>_UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);
</code></pre>
<p><strong>Environment</strong>
I am using</p>
<ul>
<li>Windows 11 Home 23H2</li>
<li>msvc 14.3 in visual studio 2022</li>
<li>quickvina2 GPU2.1</li>
<li>Processor    13th Gen Intel(R) Core(TM) i7-13650HX   2.60 GHz</li>
<li>Installed RAM 32.0 GB (31.7 GB usable)</li>
<li>System type   64-bit operating system, x64-based processor</li>
<li>GPU nvidia geforce RTX 4060 laptop</li>
<li>CUDA 12.3</li>
</ul>
<p><strong>Additional Context</strong></p>
<pre><code>_UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);
</code></pre>
<p>in the code block</p>
<pre class="lang-c prettyprint-override"><code>// Repositions the file pointer of a stream to the specified location, relative
// to 'whence', which can be SEEK_SET (the beginning of the file), SEEK_CUR (the
// current pointer position), or SEEK_END (the end of the file).  The offset may
// be negative.  Returns 0 on success; returns -1 and sets errno on failure.
static int __cdecl common_fseek(
    __crt_stdio_stream const stream,
    __int64            const offset,
    int                const whence,
    __crt_cached_ptd_host&amp;   ptd
    ) throw()
{
    _UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);
    _UCRT_VALIDATE_RETURN(ptd, whence == SEEK_SET || whence == SEEK_CUR || whence == SEEK_END, EINVAL, -1);```

    int return_value = -1;

    _lock_file(stream.public_stream());
    __try
    {
        return_value = common_fseek_nolock(stream, offset, whence, ptd);
    }
    __finally
    {
        _unlock_file(stream.public_stream());
    }

    return return_value;
}
</code></pre>
<p>throws error</p>
<p>What other info can i give that will help resolving this issue?</p>
<p>Thanks</p>

CC BY-SA 4.0
2024-04-13T14:53:07.053Z
Is the tool supposed to work on Windows? That is relatyively rare, and most scientific tools are designed for *nix operating systems. The compilation instructions on https://github.com/QVina/QVina.github.io/blob/master/compilingQvina2.md seem to assume a POSIX shell, at least, and mention MacOS as an alternative but nothing else.
terdon
CC BY-SA 4.0
2024-04-13T14:54:05.347Z
We have "linux" and "mac" dirs at https://github.com/QVina/qvina/tree/master/build but nothing else. I really doubt this is expected to compile and work on a Windows system.
terdon
CC BY-SA 4.0
2024-04-13T18:47:57.683Z
@terdon 
I am referring, as stated in the question, to the GPU version, specifically the quickvina2 GPU2.1 version, part of the vinaGPU2.1 repo found here
https://github.com/DeltaGroupNJUPT/Vina-GPU-2.1
which explicitly tells about windows compatibility as found in the 

Compiling and Running
Windows

section

Thank you
Zea Mays
<docking><c++>
Im asking for help for resolving an assertion error while building quickvina2 GPU2.1 on windows 11
# Im asking for help for resolving an assertion error while building quickvina2 GPU2.1 on windows 11

(Asked by: username_0 on 2024-04-13)

Description of the issue
Im trying to setup quickvina2 GPU2.1 on my windows laptop. after finishing setting it up correctly, without errors nor warnings, i tried running it in visual studio as suggested, to perform the test run. I got an assertion error and everything stopped.
This is the first time i am setting up VINA GPU.
Steps to Reproduce

i cloned the repo

set up a C++ project on visual studio 2022 with the code

downloaded the boost library, bootstrapped it, and ran b2 toolset=msvc-14.3 variant=debug cxxstd=17 threading=multi

added in the C++ include dirs my quickvina2 GPU2.1 lib dir, openCL inc dir, my 12.3 CUDA toolkit include and lib/x64 dirs, the root boost dir, and the boost/stage/lib dir. in the linker additional libraries settings i put my boost/stage/lib and  CUDA toolkit lib/x64 dir. then in additional input in the linker i put the openCL lib file path, from inside my CUDA toolkit

set optimization for speed

set --config ./input_file_example/2bm2_config.txt as command arguments

tried to build but due to
Error   C1189   #error:  The  header providing std::experimental::filesystem is deprecated by Microsoft and will be REMOVED. It is superseded by the C++17  header providing std::filesystem
I swapped experimental/filesystem for filesystem and ensured i was using C++17
i modified the
     std::experimental::filesystem::create_directory(out_dir);
     for (const auto& entry : std::experimental::filesystem::directory_iterator(ligand_directory)) {



snippet to use filesystem instead with
                    std::filesystem::create_directory(out_dir);
                    for (const auto& entry : std::filesystem::directory_iterator(ligand_directory)) {


built and compiled without issues
ran from inside visual studio 2022

Expected Behavior
i expected the test run to go well without errors, and create the correct output in /test_out, instead it went like this
Actual Behavior
Using virtual screening mode
Output will be in the directory ./test_out
Reading input ... done.
Setting up the scoring function ... done.
Using heuristic search_depth
Analyzing the binding site ... done.
GPU OpenCL Platform: NVIDIA CUDA
GPU Device: NVIDIA GeForce RTX 4060 Laptop GPU
Using random seed: 433324452
then an error pops up saying
debug assertion failed
program VINA.exe
file minkernel\crts\ucrt\src\app\stdio\fseek.cpp
Line 183
Expression: stream.valid()
press retry to debug the application
the line where the error happens is
_UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);

Environment
I am using

Windows 11 Home 23H2
msvc 14.3 in visual studio 2022
quickvina2 GPU2.1
Processor    13th Gen Intel(R) Core(TM) i7-13650HX   2.60 GHz
Installed RAM 32.0 GB (31.7 GB usable)
System type   64-bit operating system, x64-based processor
GPU nvidia geforce RTX 4060 laptop
CUDA 12.3

Additional Context
_UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);

in the code block
// Repositions the file pointer of a stream to the specified location, relative
// to 'whence', which can be SEEK_SET (the beginning of the file), SEEK_CUR (the
// current pointer position), or SEEK_END (the end of the file).  The offset may
// be negative.  Returns 0 on success; returns -1 and sets errno on failure.
static int __cdecl common_fseek(
    __crt_stdio_stream const stream,
    __int64            const offset,
    int                const whence,
    __crt_cached_ptd_host&   ptd
    ) throw()
{
    _UCRT_VALIDATE_RETURN(ptd, stream.valid(), EINVAL, -1);
    _UCRT_VALIDATE_RETURN(ptd, whence == SEEK_SET || whence == SEEK_CUR || whence == SEEK_END, EINVAL, -1);```

    int return_value = -1;

    _lock_file(stream.public_stream());
    __try
    {
        return_value = common_fseek_nolock(stream, offset, whence, ptd);
    }
    __finally
    {
        _unlock_file(stream.public_stream());
    }

    return return_value;
}

throws error
What other info can i give that will help resolving this issue?
Thanks

**Tags:** docking, c++
> **Comments:**
> **username_1**: Is the tool supposed to work on Windows? That is relatyively rare, and most scientific tools are designed for *nix operating systems. The compilation instructions on https://github.com/QVina/QVina.github.io/blob/master/compilingQvina2.md seem to assume a POSIX shell, at least, and mention MacOS as an alternative but nothing else.  
> **username_1**: We have "linux" and "mac" dirs at https://github.com/QVina/qvina/tree/master/build but nothing else. I really doubt this is expected to compile and work on a Windows system.  
> **username_0**: @terdon  I am referring, as stated in the question, to the GPU version, specifically the quickvina2 GPU2.1 version, part of the vinaGPU2.1 repo found here https://github.com/DeltaGroupNJUPT/Vina-GPU-2.1 which explicitly tells about windows compatibility as found in the   Compiling and Running Windows  section  Thank you  

---

## 0 answers

