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

code does not compile in Visual Studio 2019 #47

Open
gfernval opened this issue Jan 27, 2024 · 5 comments
Open

code does not compile in Visual Studio 2019 #47

gfernval opened this issue Jan 27, 2024 · 5 comments

Comments

@gfernval
Copy link

There is missing pthreads.h, sys\time.h, unistd.h in Visual Studio 2019, would like to have cuda_memtest running in Windows

@psychocoderHPC
Copy link
Member

Thanks for reporting.
Could you please provide a fix or point to the file where the include is missing? I checked cuda_memtest.h and cpp and both contain #include <pthread.h>

IMO the problem is that by default pthreads does not existis in Widows. You need to compile it your self or download a pre-compiled library.
If we would refactore the code and use c++ threads the issue would be solved.

I do not have a Windows machine to test it.

@psychocoderHPC
Copy link
Member

Currently, I do not have time to work on it. I will see if I find someone working on it.

@gfernval
Copy link
Author

Thanks, besides pthread.h there are other issues like sys/time.h that does not exists in Windows,
cmake generates sucessfully a makefile for Visual Studio 2019 (after installing Cuda libraries), but when build
inside Visual Studio 2019 complains about pthread.h, sys/time.h,.. Could be such lines removed in order to make a
command line utility runnable under Windows 7 64 bit? Don´t know enough about making such task. cuda-memtest
compiles successfully without problems under Ubuntu Linux 20.04, I have checked it.

@psychocoderHPC
Copy link
Member

Gould to known that sys/time.h is in the code too. If we would switch to C++17 both can be solved with C++ std::.

@gfernval
Copy link
Author

gfernval commented Feb 2, 2024

I don´t know enough programming to remove all POSIX stuff from the source code, but the code as is depicted generates a valid makefile from cmake of Visual Studio 2019, problem is that when compiling under Visual Studio 2019 complais about pthreads.h, time.h, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants