Skip to content

Commit 286e939

Browse files
Gareth Aneurin TribelloGareth Aneurin Tribello
authored andcommitted
Change to driver so only one replica outputs json files needed by PlumedToHTML. This should fix some small issues in the manual
1 parent be87a5e commit 286e939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cltools/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
728728
}
729729
ifile.close();
730730
// Only output the full version of the input file if there are shortcuts
731-
if( data.size()>0 ) {
731+
if( data.size()>0 && intracomm.Get_rank()==0 && intercomm.Get_rank()==0 ) {
732732
OFile long_file;
733733
long_file.open( full_outputfile );
734734
long_file.printf("{\n");
@@ -762,7 +762,7 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc) {
762762
long_file.close();
763763
}
764764
}
765-
if( valuedict_file.length()>0 ) {
765+
if( valuedict_file.length()>0 && intracomm.Get_rank()==0 && intercomm.Get_rank()==0 ) {
766766
OFile valuefile;
767767
valuefile.open( valuedict_file );
768768
valuefile.printf("{\n");

0 commit comments

Comments
 (0)