Skip to content
Snippets Groups Projects
Commit 5fd45761 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Further fix from @PabloPiaggi

When a single replica is present, do not add replica suffix
parent 3eab1de2
No related branches found
No related tags found
No related merge requests found
...@@ -101,14 +101,20 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) : ...@@ -101,14 +101,20 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) :
for(int i=3;i<narg;++i){ for(int i=3;i<narg;++i){
if(!strcmp(arg[i],"outfile")) next=1; if(!strcmp(arg[i],"outfile")) next=1;
else if(next==1){ else if(next==1){
// Each replica writes an independent log file if(universe->existflag == 1){
// with suffix equal to the replica id // Each replica writes an independent log file
char str_num[32], logFile[1024]; // with suffix equal to the replica id
sprintf(str_num,".%d",universe->iworld); char str_num[32], logFile[1024];
strncpy(logFile,arg[i],1024); sprintf(str_num,".%d",universe->iworld);
strcat(logFile,str_num); strncpy(logFile,arg[i],1024);
p->cmd("setLogFile",logFile); strcat(logFile,str_num);
next=0; p->cmd("setLogFile",logFile);
next=0;
} else {
// partition option not used
p->cmd("setLogFile",arg[i]);
next=0;
}
} }
else if(!strcmp(arg[i],"plumedfile"))next=2; else if(!strcmp(arg[i],"plumedfile"))next=2;
else if(next==2){ else if(next==2){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment