[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
CULA • View topic - Zero solution with cula sparse

Zero solution with cula sparse

General CULA Sparse support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

Zero solution with cula sparse

Postby gregk » Tue May 07, 2013 5:23 am

gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Tue May 07, 2013 5:48 am

If B is zero, then you have a trivial solution where x=0.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Tue May 07, 2013 6:25 am

Unfortunatelly that is indeed true. but can't i search for a solution other than this profinite one? I know there is another solution, because GELIM gives me one with the initial code.
gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Tue May 07, 2013 6:50 am

A full-rank linear system has only a single solution. Are you certain that your gaussian elimination code is producing a correct result? I ask, because sparse gaussian is non-trivial because it will create new non-zeroes (potentially to the point of making your matrix dense).
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Tue May 07, 2013 7:33 am

The gelim code is surely correct and I think i should take the same solution in the first place. Maybe i've malformed the matrix during the convertion to CSR.

I think i need to check it out again.
Thanks for the help

Btw, i am trying now to trigger a data error when the solver is called, but i can't xD

I am changing the n and nnz arguments but i still get the same output.
How can i indicate that the data i am passing are not correct?
gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Tue May 07, 2013 11:44 am

You should consider calculating the residual of your gelim code to see how accurate it is: || A*x-b || should be a very small number.

But really, if your B is all zeroes then your answer should be zero.

CULA doesn't do a lot of error checking on your data unless you enable the debug option. You're hitting a short circuit path where your initial residual is calculated and then no iterations occur, because the answer can be trivially calculated.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Thu May 09, 2013 12:40 am

I changed solver, tweaked my code a bit and now i get a proper solution.

But i've come up with another problem. I need to call CULA inside a loop, what should i do with the initialize and the shutdown functions??? should they be inside or outside the loop?

I've seed that cula takes some time to initialize, but when i tried to put the initialize inside the loop it did that only the first time. All the next ones, i think where bypassed, with the results being garbage(maybe its the solvers fault here i am not sure, i'll test it again asap) Is this normal?
gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Thu May 09, 2013 6:10 am

You'll want to initialize outside the loop.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Sun May 12, 2013 1:53 pm

gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Mon May 13, 2013 6:01 am

Our strings are ISO-8859-1 - your editor may be expecting UTF8 or some kind of wide character encoding?
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Mon May 13, 2013 10:26 am

gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Mon May 13, 2013 1:29 pm

If you're solving against zeros, that's what you should expect. "0" basically means the solver terminated before even getting to the first iteration.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Zero solution with cula sparse

Postby gregk » Tue May 14, 2013 1:37 am

gregk
 
Posts: 9
Joined: Thu Apr 18, 2013 3:28 am

Re: Zero solution with cula sparse

Postby john » Tue May 14, 2013 7:07 am

IT could be that there's a bug there. The Fortran support has improved quite a bit in S5, so you might want to try that out as well. (Check cula_sparse_legacy.f90)

I'd also note that GMRES is one of our less preferred solvers, so you may also wish to try some of the others. The "solver selection flowchart" in the manual may be of assistance to you.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm


Return to CULA Sparse Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron