о뷢չ
JOURNAL OF COMPUTER RESEARCH AND DEVELOPMENT
1999ꡡ3610ڡVol.36No.101999



ڲвCԳԹParCT
ϡֲɡ¬
ժҪм㼼ķٷչԴµҪ.ԿԷΪڽڲĿԺͻڽ̼໥ϵʱ.ܵĲĲԹߡParCT (parallel C-language testing tools)Ҫ.нParCTƼҪ:ͨԳĶ̬ԵõԵĸʡгδǷ֧ԼԸ֧ķƵ,ӶûɶԲԳ̶ȵΪûµĲṩĿ.ڴ˻,ԲвԹٵһϵ¿,̵ʵʱ١ĲԲ(test generation)㷨̵߳ĲԹߡгʱ(timing sequence testing),һ̶ȵ̽.
ؼʡ,Ը,,ؼ
ͼšTP311.5
ParCTA PARALLEL C-LANGUAGE TESTING TOOL
LIANG Yu, LI Ji-Kai*, ZHANG Lin-Bo**, LI Yu-Cheng*, and LU Hui-Qiong***
(Research Center of High-Performance Computers, 
Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100080)
*(Research and Development Center for Parallel Software,
Institute of Software, Chinese Academy of Sciences, Beijing 100080)
**(Institute of Computational Mathematics and Scientific/Engineering Computing,
Chinese Academy of Sciences, Beijing 100080)
***(Institute of Software, Chinese Academy of Sciences, Beijing 100080)
AbstractThe rapid development of parallel computing technology has brought about new challenges to the software testing. The testing of parallel programs consists of two parts: control flow testing(in-process testing) and timing-sequence testing(interprocess testing). ParCT(parallel C-language testing tools) is control-flow oriented. First introduced are the functions of ParCT, which include demonstrating the testing coverage-ratio, listing the un-hit statements, and compiling the testing result. With its help the users can evaluate how the testing has been completed and then try to design new test case to cover the un-hit branches. Furthermore several critical technologies in realizing the above functions are also addressed. Finally discussed are a series of new functions facing a more powerful ParCT, such as thread-safety, test generation, real time debugging, timing-sequence testing, etc..
Key wordssoftware testing, coverage ratio, parallel, essential point
1
(software test)Ϊ˷ֳʵ(realization)Ƿû(requirement)ȷԽִ֤ƻԹ(destructive process).,ǰ˴, ๤Դге,ڲĲԷ, ǻä. 
ݲгл, гĲӦð:
(1) , Ҫ̵ĸƷ֧;
(2) ʱ, Ҫ̼Ĳͬʱ.
ԲгĿ, ĿǰѾбȽϳļ; ʱ,ûйϵͨ㷨. ܵڲвCԳԹߡParCT(parallel C-language testing tools)ĿǰֻڽڲĿ.
ӳ߼ṹĽǶϿг봮гȲر֮,˴гԹеಿհ;Ȼ,ڲгйж໥ЭͬĽ̻߳п໥Լ໥ͻ,ǵĲԹѼ¼̵й켣.˲Ҫо֮һųн̻̼߳ĸ,Զɶִ·ļ¼.еĴгԹߵĻ,ԲгصΪṩһֿеĲԷ.
1.1ParCTϵͳеҪ
гParCTõҪ.
(test case)1ָΪ˷ֳеĹ϶רƵһһ.뼼оҪ֮һҵܷϵСĲ(нϸЧʵĲ).
Ը(coverage ratio)ָһһЧ(Ʋɳ̶).ȽϳĲԸʵļ串׼򡢷֧(ֳж)׼׼ж׼Ͷ׼ȣ25.ǰ汾ParCTõǷ֧׼,÷֧׼ŵ㷨ʵֽΪ,ȱڶжвԷʱпܶһЩ.ݷ֧׼,˹ؼ(essential point)һ,ģڵȳ֧ܳ.

(1)
̽ǲϵͳ뵽ϵͳеܷӳ¼ϵͳ״̬Ϣ.ParCT̽ҪǽӦĹؼϢؼ.
1.2ParCTҪص㡢
ĿǰParCT汾Ҫṩ¹:
(1) ͨԳĶ̬ԵõԵĸ(ؼ㸲ʺģ鸲),Ӷﵽɳ̶ȵĿ;
(2) гԺδǷ֧δģ;
(3) ṩϵͳϢ,ִдƵȵ. ûԶԷƵߵصŻ;
(4) ԱϵͳԴһ̶ȵ﷨.
ܵ˵,ParCTص:
(1) ڶԲгĲ.ҲParCTҪص.
(2) нΪƵĴʷ﷨,ܴCеĴ﷨ʽ, if-then-else, while, for, switch, goto, 괦,.
(3) һݴ. йз,ParCTܹڽ˳ǰ浱ǰִϢ;һ, ԶԽļй鲢ʱ,ParCTܹЩļǷͬ,Ƿͬһϵͳ.
(4) ȻǶ뱻ϵͳ,Աϵͳı롢ִвӰ.
(5) ϵͳ,ParCTֻСģϵͳ. ϵͳ˹Ӵ.βϵͳֻǱϵͳĸ.رĿǰӦϵͳڿֲԵĿ, 价ԽԽ. ϵͳ̫Ӵ,Թߵʹô.
(6) Խݽй鲢ۺϵĲԸ.
(7) ֲ.ڱϵͳUNIX67ϲ,ԼUNIX汾ϵ,ֻĶɽParCTֲϵͳ.
(8) ϵͳһԭ:ٶԱϵͳܵӰ.ParCTһԭ.
2ParCTĹԭ
2.1ParCTĹ
ParCTͼ1ʾĲػ.ParCTейΧƹؼе.ParCTвҪ3׶:Ԥִкͽۺ(潫Ҫϸ˵).ԤҪͨϵͳĳṹΪؼṩҪϢ,ڴ˽׶λɶԱϵͳĲװ,дؼĺ뱻ϵͳ.ִн׶Ҫִ̬ͨбϵͳ̽,Ϣؼ,ڱϵͳ˳֮ǰؼϢļ.ֵһǵϵͳΪгʱ,ؼĿȫһһӦ, ҪΪ̱ʱ,ڴеҲһ𱻸.ۺҪǽԽļеĹؼϢй鲢ۺ,õյδǹؼͲԸ.
봮г,ڲгĲٵǽ̵ķֹ.Эͬһʱ,ǵִʱ䳤̿ܲһ,ɵĽܻ̿ɱ(kill)ֹ(terminate),,г,Ҳֹֽ̱ܳ.ڽԴͷ֮ǰйؽ,ǽòԽ.
Ľֹ,ǿɲEXIT,־MAIN滻ȷ,ʵ϶Ľֹ,һĴвԹ߾.
ڽ̵ķֹ,ParCT˲Խռ(result-collector)ź(signal-driven facility),ʹܹ֮ػڲжź.̷ֹǰ,ں(kernel)ᷢӦжź(signal),˲ͼ1ʾĹ,ԽռԤȽػֹźţźSIG_TERM.̽⵽źʱ,Խռڽ˳֮ǰɶԲݵı.


ͼ1ParCTĹ
ֵһ,ϵͳǲȫһЩ̹ɵ(packages),Ҫ(tester)иģ(һ̾ṩ)ֱԼ.ԴϵͳвʱӦýģ.ڱ,ΪFORTRANʱҲ.
2.2ParCTĲ
ParCTĲ̿ɷΪԤִкͽ3Ҫ׶.
ParCT,ԤɵҪ:ٶԺд,עͲ,ֽ.ڷ¼ڲṹ.ļΪλзֿ,͹ؼ,йϢļʽ.۲װ(instrument). ڳйؼ̽(probe).
Ԥ,̬Ĳִ.ִн׶εҪǰѱϵͳϵͳ,ִвռϢ.
ؼ:
(1) EXIT.Ϊʹִܷزģ, 뵽Խռ, ҪѱϵͳеĽֹ滻Σ
(2) MAIN.ѱϵͳģ,ȵðѱϵͳ(ϵͳһĺĳ)(ϵͳȫһЩ̹ʱ)е־(main,main())޸,ε
(3) ִй̽Ϣؼ.ؼļʽӲжǱڴ,Ҫǻ:ڴķٶԶԶӲ.ڶԽ̽иʱ,ָֻܶ(code segment)ݶ(data segment)и.ļܿԱ,ָļȴΨһ,ֻܶӵһؼļ.
йڵǰϵͳĲԽݽй鲢ۺ(Բͬ),óܵĲԸ.һ,ParCTܹԽǷͬһϵͳ.
3ʵ
3.1BLACSвԵĽ
BLACS(basic linear algebra communication subprogram)8ݵҪĿΪֲʽµԴṩһϵи߶Żͨ(highly optimized routines).
LAPACK(linear algebra package)ŻԼںռԴõŻBLAS(basic linear algebra subprograms). ScaLAPACK(scalable linear algebra package)ǷֲʽлµLAPACK汾ǲҪṩŻļ̣һûṩŻ(Чáֲǿ)ͨ. BLACSǻ.ˣBLASBLACSԳScaLAPACK֧.
BLACSṩ˶ְ汾ӦͬϢݻPVM9ݺMPI.ֻPVM汾BLACSв. PVMBLACS164̹ɣϵͳԴ15,500УPVMBLACSṩĲΪ23000.˽йBLACSݣμJack Dongarra/R. WhaleyġA User's Guide to the BLACS8ݡ.
ParCTBLACS(subroutines)˲.ǵõյĲԸʺͺ£
Ը=81.95122%;
=95.73141%.
3.2PBLASвԵĽ
BLAS(basic linear algebra subprograms)ΪʵϵĻԼ׼ǷǳɹģΪһлڲлϺܺõطãˣչPBLAS(parallel basic linear algebra subprograms). PBLASͨ˽ṹû͸ݷȼܺõʵ˿ֲԡչԼûļ.ͬʱҲһģȽϴCԴ10.ȫֹǲ.ParCTPBLASCԲֽвԣЧǳãͨб׼ȷԲ.
ǵõյĲԸΪ52.98246%.
4
ParCTȽдԵĲPVM BLACS(basic linear algebra communication subprogram)PBLAS(parallel basic linear algebra subprograms)˲Ժ͸ʷ.,PVM BLACS78ݵҪĿΪֲʽµԴṩһϵи߶Żͨ.164̹,ϵͳԴ15,500,PVM BLACSṩPVM BLACSĲ(FORTRAN 77 ʵ)Ϊ23000.PBLASṩ˲ԴĻӺ,һģȽϴ,CԴ52000,ҲFORTRAN,Ϊ66000.ʵ֤ParCTнǿȶ,ԱϵͳĹܡܾδӰ.һ̶ȵĸĽ,ParCTȫԻøΧʹ.
õȻѧĿ(ĿB-F020302-69883006).
߼飺ϣУ19683ʿҪоΪдϵṹݴ.
У19724ҪоΪֵܲ.
ֲУ19629оԱҪоΪ㷨.
ɣУ19616߼ʦҪоΪܲѧ.
¬Ů19377оԱʿʦҪоΪ.
ߵλϡйѧԺ㼼оġ100080
ɡйѧԺооġ100080
ֲйѧԺѧѧ̼о100080
¬йѧԺо100080
ο
1Ferguson R, Korel R. Software test data generation using the chaining approach. In: Int'l Test Conf, Washington, 1995. 703709
2Beizer B. Software Testing Techniques. New York: Van Nostrand Reinhold Company, 1983
3Tai K C, Carver R H. Testing of distributed programs. In: Parallel & Distributed Computing Handbook. New York: McGraw-Hill, 1996
4¬. 붯̬Թ. о뷢չ, 1990, 27(1): 2832
(Lu Huiqiong. Software testing and dynamic testing tools. Journal of Computer Research and Development(in Chinese), 1990, 27(1): 2832)
5ޱ. CTT(C Testing Tools)ʵ֣˶ʿģ. йѧԺо, , 1993
(Luo Baoguo. Design and implementation of CTTmaster dissertation(in Chinese). Institute of Software, Chinese Academy of Sciences, Beijing, 1993)
6Steven Robbins K A. Practical Unix Programming: A Guide to Concurrency, Communication, and Multithreading. Englewood Cliffs, NJ: Prentice Hall, 1996
7Rochkind M J. Advanced Unix Programming. Englewood Cliffs, NJ: Prentice Hall, 1996
8Dongarra J, Whaley R. Installing and Testing the BLACS. ftp.netlib.org /blacs, 1996
9Geist A, Beguelin A, Dongarra J J et al. A PVM3 User's Guide and Reference Manual. ftp.netlib.org: /pvm3. 1996 
ԭյڣ1997-12-05
޸ĸյڣ1998-09-15.
