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) :
for(int i=3;i<narg;++i){
if(!strcmp(arg[i],"outfile")) next=1;
else if(next==1){
// Each replica writes an independent log file
// with suffix equal to the replica id
char str_num[32], logFile[1024];
sprintf(str_num,".%d",universe->iworld);
strncpy(logFile,arg[i],1024);
strcat(logFile,str_num);
p->cmd("setLogFile",logFile);
next=0;
if(universe->existflag == 1){
// Each replica writes an independent log file
// with suffix equal to the replica id
char str_num[32], logFile[1024];
sprintf(str_num,".%d",universe->iworld);
strncpy(logFile,arg[i],1024);
strcat(logFile,str_num);
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(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