-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unable to compile in Docker image #126
Comments
@Svennemans Thanks for the feedback. The instruction and dockerfile were not updated after the compilation changes. They are updated now in the master branch. BTW, if you find adding any additional information in the instruction is useful for others, please feel free to create a PR. |
@wxj6000 Thanks, the good news is that with the new dockerfile and compile steps, it does indeed compile. The new instructions do not create the necessary wheels to "pip install" in another location, though. Which was the case I think with the build.sh/setup.py. How can this be achieved? I tried to test inside the docker
I get the following error
But anyway I do not want to run gpu4pyscf inside the compile docker, so I need to get a working install outside docker. When I try to copy the gpu4pyscf outside the docker, in a conda env with pyscf and scipy/numpy/h5py/... preinstalled
|
@Svennemans For the first issue, you would need For the second issue, the compiled libraries in docker generally does not work in a different environment. If you would like to run it outside the docker environment, you can build There is no a simple instruction to build a GPU package for different environments. The dockerfile was created for a "standard" environment. Be prepared for some issues. |
@wxj6000 I'm curious then, how did you compile the binary packages that one can install without compiling? |
@Svennemans The binary packages are built in manylinux environment. You can find the dockerfile and build script here. |
Incase it is helpful I made a singularity image to build a version of this plugin for older computer capability and cuda11. You can build the binary wheel with the singularity shell and then pip install it wherever you want: https://github.com/sef43/gpu4pyscf/tree/master?tab=readme-ov-file#updated-for-compute-capability-60-and-build-loally-with-singularity-image |
Thanks for the suggestions @wxj6000 and @sef43 , I'll try those for sure. Meanwhile, I've installed cuda toolkit and now the import statements are working fine for my compiled code.
the last statement throws the following error:
Initial search seemed to indicate this may be a mismatch between cupy/numpy versions. For reference, this is my list of installed packages:
version of cuda toolkit (latest) = 12.4 |
I guess you also compiled the latest pyscf. The master branch in github introduced some incompatibility with gpu4pyscf. You can either BTW, we just released gpu4pyscf v0.7.5. The new release supports older GPUs such as GTX 1080. You can |
OK, Great news that gpu4pyscf v0.7.5 now supports compute 6+! I will update and recompile to see if that then fixes the CudaError. FYI: my long term goal is to see if it's possible to create a working pyscf/gpu4pyscf combo on Windows, which is why I'm mainly interested in understanding the compilation steps rather than just get a working version on my Linux machine. |
So I recompiled the cuda v12 code again with gpu4pyscf v0.7.5. Running the example once again the previous CudaError was gone, but now I get this - which explicitly mentions an incompatibility of compute architecture below 70 for 'Cuda synchronisation primitives'... Did you have a chance to check the binary images you created against a card with compute below 7?
|
@wxj6000 FYI I get the exact same catastrophic error when running the binary downloads - both v12 and v11.
|
@wxj6000 this might give an idea on what is wrong as of cupy v13: cupy/cupy#8184 |
Success!! I have downgraded cupy-cuda to v12.3.0 and then it runs fine. Suggestion: change the package dependencies for the binary downloads from requiring cupy-cuda v13.0.0 => cupy-cuda v12.3.0 until cupy v13.1.0 is released. |
@Svennemans Thank you for bringing up the issue and testing the code. Some modules of the code are using the new APIs introduced in CuPy v13.0. Switching to CuPy v12.3 will break down some functionality. I am removing the version requirement of CuPy. People switch to different versions based on their use case. The release of CuPy V13.1 is scheduled this month. The issue will be resolved by then. |
@wxj6000 when trying to build wheels using docker images, failure on build_dockers.sh:
|
@Svennemans just remove The image is available in docker.io (wxj6000/manylinux2014:cuda118) |
Hi,
I cannot get gpu4pyscf to compile inside the environment generated through 'dockerfiles/compile/Dockerfile'
Environment:
Issues:
Based on assumptions / trail and error I followed this scenario:
=> Are these steps correct? Or am I missing something already?
I suggest to add some instructions to get started with compiling to the Readme file
Actions taken:
apt-get update && apt-get install gfortran
=> is this the correct Fortran compiler?
I Suggest to add proper Fortran compiler to docker 'compile' environment or add instructions for selecting/installing the correct compiler
Errors below, I currently haven't been able to find out what I am missing.
The text was updated successfully, but these errors were encountered: