@@ -42,6 +42,61 @@ TEST_F(PWTEST,test1_1_2)
4242 const int bigny_ref = 27 ;
4343 const int ny_ref = 14 ;
4444 const int nz_ref = 54 ;
45+ // some results for different number of processors
46+ int npw_per_ref[12 ][12 ]={
47+ {5012 },
48+ {2506 ,2506 },
49+ {1672 ,1670 ,1670 },
50+ {1253 ,1253 ,1251 ,1255 },
51+ {1002 ,1002 ,1002 ,1003 ,1003 },
52+ {835 ,837 ,835 ,836 ,835 ,834 },
53+ {716 ,717 ,716 ,716 ,716 ,716 ,715 },
54+ {627 ,627 ,628 ,626 ,626 ,627 ,625 ,626 },
55+ {556 ,559 ,555 ,555 ,555 ,557 ,559 ,559 ,557 },
56+ {502 ,502 ,501 ,499 ,498 ,502 ,502 ,503 ,503 ,500 },
57+ {457 ,457 ,454 ,458 ,458 ,454 ,456 ,455 ,452 ,455 ,456 },
58+ {419 ,419 ,419 ,418 ,417 ,418 ,416 ,416 ,416 ,420 ,416 ,418 }
59+ };
60+ int nst_per_ref[12 ][12 ]={
61+ {176 },
62+ {88 ,88 },
63+ {59 ,59 ,58 },
64+ {44 ,44 ,44 ,44 },
65+ {35 ,35 ,35 ,36 ,35 },
66+ {29 ,30 ,30 ,29 ,29 ,29 },
67+ {25 ,25 ,25 ,25 ,26 ,25 ,25 },
68+ {22 ,22 ,22 ,22 ,22 ,22 ,22 ,22 },
69+ {20 ,19 ,19 ,19 ,19 ,20 ,20 ,20 ,20 },
70+ {17 ,17 ,18 ,18 ,17 ,17 ,18 ,18 ,18 ,18 },
71+ {16 ,16 ,16 ,16 ,16 ,16 ,16 ,16 ,16 ,16 ,16 },
72+ {15 ,15 ,15 ,15 ,15 ,15 ,14 ,14 ,14 ,15 ,14 ,15 }
73+ };
74+ int *npw_per;
75+ if (rank_in_pool == 0 )
76+ {
77+ npw_per = new int [nproc_in_pool];
78+ }
79+ #ifdef __MPI
80+ MPI_Gather (&pwtest.npw ,1 ,MPI_INT,npw_per,1 ,MPI_INT,0 ,POOL_WORLD);
81+ #else
82+ if (rank_in_pool == 0 ) npw_per[0 ] = pwtest.npw ;
83+ #endif
84+ if (rank_in_pool == 0 )
85+ {
86+ if (nproc_in_pool <= 12 )
87+ {
88+ for (int ip = 0 ; ip < nproc_in_pool ; ++ip)
89+ {
90+ ASSERT_EQ (npw_per_ref[nproc_in_pool-1 ][ip], npw_per[ip]);
91+ ASSERT_EQ (nst_per_ref[nproc_in_pool-1 ][ip], pwtest.nst_per [ip]);
92+ }
93+ }
94+ else
95+ {
96+ cout<<" Please use mpi processors no more than 12." <<endl;
97+ }
98+ delete [] npw_per;
99+ }
45100
46101
47102 // results
0 commit comments