AMGX I/O Error

I’m trying to run the examples provided by the AMGX library, but get the following error,

License acquired, proceeding
AMGX version 1.2.0-build108
Built on Dec 22 2014, 10:38:36
Compiled with CUDA 6.5, using CUDA driver 7.5
Error opening file ‘…/configs/FGMRES_AGGREGATION’
AMGX ERROR: file amgx_capi.c line 253
AMGX ERROR: I/O error.

Can anyone help?

How are you passing the arguments to the example?

My call looks like

./amgx_capi -mode dDDI -c pathto/config.json -m pathto/matrix.mtx

It says “Cannot read file as JSON object, trying as AMGX config” then says it converts it and seems to be happy.

Hello @costat,

Were you able to solve your problem? I am having the same issue. When I call the the config file without the json extension I get the same I/O error as you.

When I call the config file with the json extension as @trf86 suggested it complains that the program couldn’t allocate memory in the device, which might be a different problem all together.

I can run my own cuda kernels and stuff but it is not working with the library. Did you had the same problem?

Hey, any news on the issue? I have exactly the same behaviour. If you try with -c …/configs/CG_DILU.json it complains but works as a charm, otherwise with no extension (as it should) it’s not working, provides the I/O error mentioned by OP.

@costat @bnas

I’m using the “2014.12.22_amgx_redhat-6.5_cuda-6.5.zip” package on Linux64/Tesla K40c box.
Looks like it works fine for me.

===
$ export export LM_LICENSE_FILE=…/amgx_trial-exp-latest.txt
$ export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:…/lib
$ ./amgx_capi -mode dDDI -c …/configs/CG_DILU.json -m …/matrix.mtx
License acquired, proceeding
AMGX version 1.2.0-build108
Built on Dec 22 2014, 10:38:36
Compiled with CUDA Runtime 6.5, using CUDA driver 7.5

Cannot read file as JSON object, trying as AMGX config
Converting config string to current config version
Parsing configuration string: exception_handling=1 ;
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
iter Mem Usage (GB) residual rate
--------------------------------------------------------------
Ini 0 3.464102e+00
0 0 2.180692e+00 0.6295
1 0.0000 3.261485e+00 1.4956
2 0.0000 4.759305e+00 1.4592
3 0.0000 6.295770e+00 1.3228
4 0.0000 8.253265e+00 1.3109
5 0.0000 1.792999e+01 2.1725
6 0.0000 2.095238e+02 11.6857
7 0.0000 4.912902e+00 0.0234
8 0.0000 1.156666e+01 2.3543
9 0.0000 6.920293e+00 0.5983
10 0.0000 3.884973e+00 0.5614
11 0.0000 6.937691e+00 1.7858
12 0.0000 4.563621e+01 6.5780
13 0.0000 5.762017e+00 0.1263
14 0.0000 8.289748e+00 1.4387
15 0.0000 3.508333e+01 4.2321
16 0.0000 8.959246e+00 0.2554
17 0.0000 3.564701e+01 3.9788
18 0.0000 1.917661e+01 0.5380
19 0.0000 8.653961e+00 0.4513
--------------------------------------------------------------
Total Iterations: 20
Avg Convergence Rate: 1.0468
Final Residual: 8.653961e+00
Total Reduction in Residual: 2.498183e+00
Maximum Memory Usage: 0.000 GB
--------------------------------------------------------------
Total Time: 0.00349238
setup: 3.0656e-05 s
solve: 0.00346173 s
solve(per iteration): 0.000173086 s

with “configs/FGMRES_AGGREGATION.json”:

===
$ ./amgx_capi -mode dDDI -c …/configs/FGMRES_AGGREGATION.json -m …/matrix.mtx
License acquired, proceeding
AMGX version 1.2.0-build108
Built on Dec 22 2014, 10:38:36
Compiled with CUDA Runtime 6.5, using CUDA driver 7.5

Cannot read file as JSON object, trying as AMGX config
Converting config string to current config version
Parsing configuration string: exception_handling=1 ;
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
LVL ROWS NNZ SPRSTY Mem (GB)
--------------------------------------------------------------
0(D) 12 61 0.424 8.75e-07
--------------------------------------------------------------
Grid Complexity: 1
Operator Complexity: 1
Total Memory Usage: 8.75443e-07 GB
--------------------------------------------------------------
iter Mem Usage (GB) residual rate
--------------------------------------------------------------
Ini 0.393673 3.464102e+00
0 0.393673 1.619840e-14 0.0000
--------------------------------------------------------------
Total Iterations: 1
Avg Convergence Rate: 0.0000
Final Residual: 1.619840e-14
Total Reduction in Residual: 4.676075e-15
Maximum Memory Usage: 0.394 GB
--------------------------------------------------------------
Total Time: 0.00200077
setup: 0.00144653 s
solve: 0.00055424 s
solve(per iteration): 0.00055424 s

@kkang

Actually it’s not. You are seeing the same error we all are, its working fine but JSON format reading appears to be broken. If you see you have in both executions these 3 lines:


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

This is the issue :)

Thanks @bnas .

I have filed a nv bug report internally. And I’ll keep you posted here once the further information becomes available. Thanks.

@kkang

Please keep us posted!

@bnas

It’s identified that the warning is unnecessary actually, and it has been removed as an excessive :).