Project

General

Profile

Bug #513

Error when compiled with fortran compiler in double precision

Added by Anonymous 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

An error was found when compiled gmx with fortran compiler in double precision, listed in the following:

../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:141: error: ‘nbkernel204_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:142: error: ‘nbkernel210_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:143: error: ‘nbkernel211_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:144: error: ‘nbkernel212_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:145: error: ‘nbkernel213_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:146: error: ‘nbkernel214_f77_double’ undeclared here (not in a function)

When I check the file "nb_kernel_f77_double.c", the lines of inclusion were like this:
#include "nbkernel010_f77_double.h"
#include "nbkernel020_f77_double.h"
#include "nbkernel030_f77_double.h"
#include "nbkernel100_f77_double.h"
#include "nbkernel101_f77_double.h"

The naming of these header files are not consistent with the file name in dir nb_kernel_f77_double.

~/software/gromacs/src/gmxlib/nonbonded/nb_kernel_f77_double$ ls *.h

nb_kernel010_f77_double.h nb_kernel200_f77_double.h nb_kernel303_f77_double.h
nb_kernel020_f77_double.h nb_kernel201_f77_double.h nb_kernel304_f77_double.h
nb_kernel030_f77_double.h nb_kernel202_f77_double.h nb_kernel310_f77_double.h
nb_kernel100_f77_double.h nb_kernel203_f77_double.h nb_kernel311_f77_double.h
nb_kernel101_f77_double.h nb_kernel204_f77_double.h nb_kernel312_f77_double.h
nb_kernel102_f77_double.h nb_kernel210_f77_double.h nb_kernel313_f77_double.h
....

Obviously an underline is lost here.

History

#1 Updated by Anonymous about 9 years ago

It is occured when compiled gmx with fortran kernels in double precision.

Command is: configure --enable-fortran --enable-mpi --enable-double

#2 Updated by Anonymous about 9 years ago

When I correct the nb_kernel_f77_double.c and compile again, another error was occured as follows:

../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:141:
error: ‘nbkernel010_f77_double’ undeclared here (not in a function)
../../../../../gmx-git/src/gmxlib/nonbonded/nb_kernel_f77_double/nb_kernel_f77_double.c:142:
error: ‘nbkernel020_f77_double’ undeclared here (not in a function)
...

It is said 'nbkernel010_f77_double' is not declared in the nb_kernel010_f77_double.h.

#3 Updated by Erik Lindahl about 9 years ago

Fixed in commit 609261b0a5c34f46688a7883df967d0868992ec5.

Note that the setup has now changed so Fortran is a special "optimized" architecture (just like SSE), and not a parallel option to C. If you actually want to use the F77 kernels on x86 you will also need to disable the SSE/SSE2 kernels at compile time.

Also available in: Atom PDF