Project

General

Profile

Bug #511

Changes to futil break GMX_FAHCORE

Added by Kyle Beauchamp about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Changes to futil.c prevent gromacs from compiling with GMX_FAHCORE enabled. The following code (line 1068) uses the undeclared variable fio:

int gmx_fsync(FILE *fp) {
int rc=0;
#ifdef GMX_FAHCORE
/* the fahcore defines its own os-independent fsync /
rc=gmx_fsync_lowlevel(fio->fp);
#else /
GMX_FAHCORE */

My proposed fix is:

int gmx_fsync(FILE *fp) {
int rc=0;
#ifdef GMX_FAHCORE
rc=fah_fsync(fp);
#else /* GMX_FAHCORE */

I still need to do further tests on the new code--I want to verify that checkpointing is still OK. I will make another post after I've done further testing. As of right now, the new code compiles and runs, but with all of the recent futil changes, I want to try to some sort of "stress" tests.

FYI, fah_fsync appears to just
1. Get a file descriptor fd for fp.
2. return fsync(fd);

Thanks

History

#1 Updated by Sander Pronk about 9 years ago

Yes, sorry about that - your fix is obviously right.

fah_fsync does only that, but note the define earlier in the file that redefines fsync to _commit: the FAH core also fsyncs on fflush.

#2 Updated by Erik Lindahl about 9 years ago

Fixed by sander in commit 385904e9aea3e44e80ea365ca275fe23557a4179.

Also available in: Atom PDF