AmgX Compiling Issue

Hi… dear few people:

I encountered a compling problem during compling AmgX library on a DLX HPC server, which I really really wish to solve.

Warning message as below:
“ld: warning:, needed by …/lib/, not found.”

I then tried to install this library on a local GPU server, debian based, no problem reported.
I then asked the administrator of the HPC server to comfirm the symlink.
Result as below:

[root@gnode028 lib]# ls -ld cuda
lrwxrwxrwx 1 root root 12 Jun 13 20:02 ->
lrwxrwxrwx 1 root root 17 Jun 13 20:02 ->
-rwxr-xr-x 1 root root 13121100 Jun 13 20:02

Other information:
1, the server system: REDHAT 6.2
2, CUDA version 5.5, 6.5 and 7.0 (there are multiple versions because I am only the one of many users, and I pointed everything to 6.5)
3, AmgX package downloaded is REDHAT 6.2 CUDA 6.5 .
4, -L switch, envrioment variables and PATH are correctly set (checked a million times)
5, I even tyied ln -s /user/local/cuda-6.5/lib64/stubs/ (compiling then will not generate warning, but runs into driver problems, like MPI libs not found and insufficient CUDA driver version.)

Currently since I don’t have the root access, much inconvinience has been brought.

Any help would be so appriciated…


The driver (346.46) should have installed this on RHEL 6.2:

ls /usr/lib/libcuda* /usr/lib/ /usr/lib/ /usr/lib/ ls /usr/lib64/libcuda*
/usr/lib64/ /usr/lib64/ /usr/lib64/

The and above are actually symlinks.
Does your system look the same? (you appear to have looked in the lib directory, but the amgx package is 64-bit and needs the one in the lib64 directory)

If so, what is the result of


on your system (gnode028)?

I think this is the problem:
ls: cannot access /usr/lib64/libcuda*: No such file or directory
ls: cannot access /usr/lib64/libcuda*: No such file or directory
Maybe they put them in another place where I don’t have access since it’s driver related? which doesn’t make any sense.

The result from echo $LD_LIBRARY_PATH

the one I could find is in /usr/local/cuda-6.5/lib64/stubs/
for I cannot locate it.

I also searched using
find /share/cluster/RHEL6.2/x86_64/app -iname “libcuda.*”
lots of permission denied and no useful answer.


Is your RHEL 6.2 OS a 32-bit OS or a 64-bit OS ?

If it is a 64-bit OS (seems to be), then I would agree that the inability to find /usr/lib64/ is curious and I can’t explain it. what is the result of running


on that server?

Are you building this on a cluster login or build node that doesn’t have GPUs installed?

It is 64-bit.
-bash: nvidia-smi: command not found

I think…yes, I am building this on a login node that doesn’t have GPUs installed.
They use MOAB and SLURM.

I have a feeling that there is a piece of key knowledge I’m missing…do you mean this library can only be installed with root access on all the GPU nodes linked so I could use it.

The login node most likely doesn’t have a GPU installed.
Without a GPU installed, your sysadmins may feel there is no obvious reason to install the GPU driver (the CUDA toolkit, for CUDA runtime API applications, does not depend on any driver component.) (not the stubs you have been playing with) installed in /usr/lib and /usr/lib64 is put there by the driver installer, not the CUDA toolkit installer.
The response to nvidia-smi suggests that the driver was not installed also.

Apparently depends on libcuda:

$ ldd
ldd: warning: you do not have execution permission for `./' =>  (0x00007fff929fe000) => /usr/local/cuda-6.5/lib64/ (0x00007f77bf828000) => /lib64/ (0x00007f77be97a000) => /lib64/ (0x00007f77be776000) => /usr/local/cuda-6.5/lib64/ (0x00007f77bccd4000) => /usr/local/cuda-6.5/lib64/ (0x00007f77ba3c7000) => /lib64/ (0x00007f77ba1aa000) => /lib64/ (0x00007f77b9ea2000) => /lib64/ (0x00007f77b9b9a000) => /lib64/ (0x00007f77b9984000) => /lib64/ (0x00007f77b95c5000) => /lib64/ (0x00007f77b93bc000)
        /lib64/ (0x000000319aa00000)

Having said all this, it is perhaps not an issue, if your compute nodes have a proper GPU driver installed on them. Note that the initial inquiry was around a warning, not an error:

ld: warning:, needed by ../lib/, not found.

That does not necessarily indicate a problem. It means in the current environment, can’t be located. However if the environment you will run on is a compute node with a GPU and a GPU driver, then most likely the will be in the proper place, and will be properly found on that machine, at run-time.

In other words, see what happens in the actual run environment ( i.e. just ignore this warning in the build environment.)

Thank you for the detailed reply txbob!

[gnode025.local:80140] mca: base: component_find: unable to open /share/cluster/RHEL6.2/x86_64/apps/openmpi/1.6.2/lib/openmpi/mca_mtl_mxm: cannot open shared object file: No such file or directory (ignored)
[gnode025.local:80141] mca: base: component_find: unable to open /share/cluster/RHEL6.2/x86_64/apps/openmpi/1.6.2/lib/openmpi/mca_mtl_mxm: cannot open shared object file: No such file or directory (ignored)
Process 0 selecting device 0
Process 1 selecting device 1
License acquired, proceeding
AMGX version 1.2.0-build108
Built on Dec 22 2014, 10:33:38
Compiled with CUDA Runtime 6.5, using CUDA driver 7.0
License acquired, proceeding

Cannot read file as JSON object, trying as AMGX config
Converting config string to current config version
Parsing configuration string: exception_handling=1 ;

Reading matrix dimensions in file: ./matrix.mtx
Reading data…
RHS vector was not found. Using RHS b=[1,▒~@▒,1]^T
Solution vector was not found. Setting initial solution to x=[0,▒~@▒,0]^T
Finished reading
AMG Grid:
Number of Levels: 1
0(D) 12 61 0.424 1.1e-06
Grid Complexity: 1
Operator Complexity: 1
Total Memory Usage: 1.09896e-06 GB
iter Mem Usage (GB) residual rate
Ini 0.346046 3.464102e+00
0 0.346046 3.166381e+00 0.9141
1 0.3460 3.046277e+00 0.9621
2 0.3460 2.804132e+00 0.9205
3 0.3460 2.596292e+00 0.9259
4 0.3460 2.593806e+00 0.9990
5 0.3460 3.124839e-01 0.1205
6 0.3460 5.373423e-02 0.1720
7 0.3460 9.795357e-04 0.0182
8 0.3460 3.679172e-13 0.0000
Total Iterations: 9
Avg Convergence Rate: 0.0362
Final Residual: 3.679172e-13
Total Reduction in Residual: 1.062085e-13
Maximum Memory Usage: 0.346 GB
Total Time: 0.0103681
setup: 0.00306624 s
solve: 0.00730186 s
solve(per iteration): 0.000811317 s

This is the result I got, I only worried about the first two lines, it’s not a problem, I hope? Everything is the same as the example shown in readme.txt except for the error. I don’t know if this will cause more trouble in later tests, that’s why I try to eliminate all the protetial dangers

I don’t see any CUDA or AMGX issues. The first two lines have to do with your open MPI installation, not dense matrix multiply. There may be something up with your open MPI installation, but I’m not really sure about that.

Thank you agin, you are great!