Hello,
The example in the file(src/user_examples/cs_user_performance_tuning.c.) you mentioned helps me to force CSR for scalar matrices but not for the velocity(version 4.0). But if I want to set MSR for the velocity and CSR for most scalar matrices, what should I do?
Best Regards,
Jackie
Using both MSR and CSR Matrix
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Using both MSR and CSR Matrix
Hello,
The setting is done for a specific fill type. So you need to force the MSR format for the CS_MATRIX_BLOCK_D fill type in addition to forcing CSR for CS_MATRIX_SCALAR and possibly CS_MATRIX_SCALAR_SYM.
Regards,
Yvan
The setting is done for a specific fill type. So you need to force the MSR format for the CS_MATRIX_BLOCK_D fill type in addition to forcing CSR for CS_MATRIX_SCALAR and possibly CS_MATRIX_SCALAR_SYM.
Regards,
Yvan
Re: Using both MSR and CSR Matrix
Hello,
If I set the file(src/user_examples/cs_user_performance_tuning.c.) you mentioned, most linear systems should use CSR. But recently I find that most linear systems still use NATIVE when I use callgrind tool for the call graph. It shows that "_mat_vec_p_l_native" is the main call for CG, and _b_mat_vec_p_l_native is the main call for block_3_jacobi.
but If set the MSR format for the CS_MATRIX_BLOCK_D fill type. It shows that "_mat_vec_p_l_native" is the main call for CG, and _b_mat_vec_p_l_msr is the main call for block_3_jacobi.
No matter how I set the file, I still get the similar result. I don't know why this keeps happening? And I don't know how to set the two matrix format for the same time, there is no user example for me.
The revise code as follow:
(1)CSR format
(2)MSR format
Best Regards,
Jackie
If I set the file(src/user_examples/cs_user_performance_tuning.c.) you mentioned, most linear systems should use CSR. But recently I find that most linear systems still use NATIVE when I use callgrind tool for the call graph. It shows that "_mat_vec_p_l_native" is the main call for CG, and _b_mat_vec_p_l_native is the main call for block_3_jacobi.
but If set the MSR format for the CS_MATRIX_BLOCK_D fill type. It shows that "_mat_vec_p_l_native" is the main call for CG, and _b_mat_vec_p_l_msr is the main call for block_3_jacobi.
No matter how I set the file, I still get the similar result. I don't know why this keeps happening? And I don't know how to set the two matrix format for the same time, there is no user example for me.
The revise code as follow:
(1)CSR format
Code: Select all
cs_matrix_variant_t *mv
= cs_matrix_variant_create(CS_MATRIX_CSR,
cs_glob_mesh->i_face_numbering);
cs_matrix_variant_set_func(mv,
cs_glob_mesh->i_face_numbering,
CS_MATRIX_SCALAR,
2,
"default");
cs_matrix_set_variant(CS_MATRIX_SCALAR, mv);
cs_matrix_variant_destroy(&mv);
Code: Select all
cs_matrix_variant_t *mv
= cs_matrix_variant_create(CS_MATRIX_CSR,
cs_glob_mesh->i_face_numbering);
cs_matrix_variant_set_func(mv,
cs_glob_mesh->i_face_numbering,
CS_MATRIX_33_BLOCK_D,
2,
"default");
cs_matrix_set_variant(CS_MATRIX_33_BLOCK_D, mv);
cs_matrix_variant_destroy(&mv);
Best Regards,
Jackie
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Using both MSR and CSR Matrix
Hello,
At the beginning of your block (2), for MSR, you still have CSR instead of MSR. Fixing the typo should help.
Regards,
Yvan
At the beginning of your block (2), for MSR, you still have CSR instead of MSR. Fixing the typo should help.
Regards,
Yvan
Re: Using both MSR and CSR Matrix
Hello,
Thanks a lot. That's a mistake. But when I fix the error, I still get the same problem.
Best Regards,
Jackie
Thanks a lot. That's a mistake. But when I fix the error, I still get the same problem.
but If set the MSR format for the CS_MATRIX_BLOCK_D fill type. It shows that "_mat_vec_p_l_native" is the main call for CG, and _b_mat_vec_p_l_msr is the main call for block_3_jacobi.
Best Regards,
Jackie
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Using both MSR and CSR Matrix
Hello,
Which solvers are you using for which variables ? Could you follow the forum's usage recommendations regarding details to provide ?
Regards,
Yvan
Which solvers are you using for which variables ? Could you follow the forum's usage recommendations regarding details to provide ?
Regards,
Yvan