我在一个计算节点中有25个处理器。
我有一个主要的python脚本A,a)在循环中运行,3)在也分布在25个处理器之间的每个循环中执行20 tasks。
主要Python脚本A
Lots of calculations
os.system("csh subtask.csh; wait")
Lots of calculations
Return to beginning of loop其中,subtask.csh为以下类型:
./model -h 1 controlfile
./model -h 2 controlfile
./model -h 3 controlfile
./model -h 4 controlfile
./model -h 5 controlfile
...
./model -h 20 controlfile但是,通过这种方式,我的程序不会等待subtask.csh完成。
我怎么才能让它等待呢?
发布于 2018-03-22 14:30:56
你能试试这个吗??
./model -h 1 controlfile &
./model -h 2 controlfile &
./model -h 3 controlfile &
./model -h 4 controlfile &
./model -h 5 controlfile &
waithttps://stackoverflow.com/questions/49417780
复制相似问题