-
Notifications
You must be signed in to change notification settings - Fork 24
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
Installation issues #9
Comments
Thanks.
This might indicate some issue with the CUDA libraries in nix, or that they are incompatible with our systems. Might have to look into this deeper. |
This last issue definitely seems to be unrelated to (py)amgx, as I'm unable to run the AMGX example program:
|
@shwina, thanks for looking into that. I'll try and debug or switch to Conda. |
@shwina, I submitted an issue on amgx, NVIDIA/AMGX#27 |
Thanks, but I think the problem may be at a lower level than AMGX. I cannot even run the
I'm trying to see if installing NVIDIA drivers via Nix fixes anything. |
So far that doesn't seem to be working. |
OK some progress after going down a small Nix hole:
So first I tried:
So I also added path to
So as with NumPy, for some reason I had to
Finally:
OK so a more elegant way to do this (also recommended in the above discussion) is to create symlinks to the above libraries to a folder
|
I also made a few small changes to the
|
Awesome work! I'm going to try and follow along. Apologies for sending you down the Nix rabbit hole. I've been trying to get into Nix lately and I think it's an improvement over using Conda. I hope that you enjoy it. Please do add the final nix recipes to this repository if you/we do get things working. I can submit a pull request if you'd like some outside contributions. I haven't tried submitting anything to nixpkgs yet, but maybe that is also an option down the road. I think that the LD_LIBRARY_PATH can probably be set during the nix build via a shell hook. I'll look into that assuming I can reproduce your work above. Also, I wasn't using a machine with a gpu or drivers, which I am now. I don't use gpus much so didn't really know what I was doing. |
I've figured out what causes the issues with numpy/scipy imports: it's because of the different GCC versions used to compile AMGX (gcc-4.8) v/s numpy/scipy (Nix default I think gcc-7.3.0). See below: when pyamgx is imported first, numpy and scipy are not happy about finding the gcc-4.8.5 versions of
Use
|
Currently, the following happens
but when the
It's built using |
Could you try with It's only the NVIDIA driver (which provides both |
It looks like cudatoolkit9 installs CUDA toolkit 9.1, which needs a minimum driver version 387.xx |
Sorry, I'm confused, does that mean I should try |
Yes, try with |
I can confirm that I get the same error with |
Different error this time (using
|
Hmm, what GPU is on the system? Can you provide the output of
on the host system? |
I think we are close. I suspect that the final piece is the The appropriate value can be found for different GPUs here. For example, a Quadro K2200 GPU supports compute capability capability 3.0, so I don't think AMGX supports anything lower than 3.0 though. |
|
Oh dear! It looks like the "Tesla C2075" is 2.0. Looks like I need to switch to another GPU. Correct? |
Let me try compiling AMGX with only 2.0 compute capability and see what happens. |
Sorry that the process is so long drawn out! I forgot how many things there are to keep in mind. |
Unfortunately, that didn't work. I can try to investigate further, but if you have access to a newer GPU for testing, that would probably be the way to go! |
My current situation:
I cloned the AMGX repo so that I can do, The above gives,
|
As reported here, AMGX does actually seem to work with the nix recipe, however, running demo.py still gives the above error. |
Ok the following version of demo.py works now for me.
|
OK so the problem definitely has something to do with the creation of the dense LU solver although I have no idea what exactly. The At least the Nix pieces are coming together nicely 🎉 |
I noticed that a similar error (but not same) is raised with a singular matrix. This may be a long shot, but @wd15, could you please post the output of the following program:
The above just prints the random matrix before uploading it to AMGX. |
Sorry, but you have to rearrange the imports as before I think. |
I ran the above and I get the same,
|
Thanks, did it also print the matrix?
…On Tue, May 22, 2018, 11:43 AM Daniel Wheeler ***@***.***> wrote:
I ran the above and I get the same, Could not create the CUDENSE handle
$ LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libcuda.so /usr/lib/nvidia-384/libnvidia-fatbinaryloader.so.384.111" python demo_shwina.py
AMGX version 2.0.0.130-opensource
Built on May 18 2018, 19:09:36
Compiled with CUDA Runtime 8.0, using CUDA driver 9.0
Caught amgx exception: Could not create the CUDENSE handle
at: /tmp/nix-build-AmgX.drv-0/lafn8qxabfn95rh3bh3y0bi113kzwl8w-source/core/src/solvers/dense_lu_solver.cu:733
Stack trace:
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADCuhTYEVOUYHBcBKNTtE3AoM7291su4ks5t1DIigaJpZM4T_jql>
.
|
It doesn't get that far, the Python traceback is
|
Hmm. So looks like maybe a problem with the cuSolver library, and not AMGX.
I'll try to see how to do a simple test with Nix for this.
…On Tue, May 22, 2018, 3:27 PM Daniel Wheeler ***@***.***> wrote:
It doesn't get that far, the Python traceback is
Traceback (most recent call last):
File "demo_shwina.py", line 16, in <module>
solver = pyamgx.Solver().create(rsc, cfg)
File "pyamgx/Solver.pyx", line 28, in pyamgx.Solver.create
File "pyamgx/Errors.pyx", line 62, in pyamgx.check_error
pyamgx.AMGXError: CUDA kernel launch error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADCuhWJPkERn6mS-owOdPjuT1_k-9B5uks5t1GaRgaJpZM4T_jql>
.
|
The cuSolver wasn't required for testing FiPy with pyamgx so I'm no longer concerned about this. Please close this if you like. |
OK thanks for trying! |
I tried to install amgx / pyamgx using this Nix recipe. I've encountered three problems while testing using demo.py.
import numpy
as the first import in demo.py. Otherwise, I get the following error.The configuration in demo.py on line 6 needs to be changed to
cfg = pyamgx.Config().create_from_file(os.environ['AMGX_DIR']+'/lib/configs/core/FGMRES_AGGREGATION.json')
since I'm accessing the json file in lib/ where pyamgx is installed.When running
demo.py
I now get the following error.I'm using version 6cb23fed266 of amgx and version df32133 of pyamgx. Are those versions compatible?
The text was updated successfully, but these errors were encountered: