Skip to Content.
Sympa Menu

forum - Re: [abinit-forum] compiling 4.6.5 with G95 on Linux-Opteron

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

Re: [abinit-forum] compiling 4.6.5 with G95 on Linux-Opteron


Chronological Thread 
  • From: Paul Fons <paul-fons@aist.go.jp>
  • To: forum@abinit.org
  • Subject: Re: [abinit-forum] compiling 4.6.5 with G95 on Linux-Opteron
  • Date: Fri, 11 Nov 2005 18:16:47 +0900

Perhaps it is a minor point, but you only have the default optimization specified for the compile options. Might you not want to try letting the compiler do its best with an -O3 switch? I don't know about linux, but on the mac, there are hand coded libraries optimized for each cpu and machine type form Apple that run much more quickly than the default compiled Blas and Linpack libraries. Do you have such things on your system.

Although I am running mich2 and using g95 as well for the parallel version of abinit, I have no idea of speed. You didn't mention the version of abinit you were using with the ugly factor of six. Did abinis show a similar slowdown (e.g. is the problem with mpich2 communication?)

It would be nice to have some benchmarks to compare things like this. There is an old set of benchmarks on the abinit web site, but there is no documentation as to how they were generated (that I understand anyway). It would be nice to be able to use this to check things like optimization and have people submit values for different hardware/software configurations.

Paul Fons

On Nov 11, 2005, at 13:37 PM, delaire@caltech.edu wrote:

Hello,

We are trying to compile Abinit-4.6.5 with G95 on Linux/Debian. Our cluster has Opteron-246 cpus.

We managed to compile both the serial and parallel code, both pass the tests and work fine, but they are *extremely slow*, and I would really appreciate it if anyone could help with tips to optimize the speed of g95 executables.
In particular, I also downloaded the g95-compiled parallel and sequential binaries from the Abinit website, and these seem much faster than the binaries we compiled ourselves (by about a factor of 6 !). So why don't we just use the binaries posted online? well, the binaries for abinip-4.6.5 (g95) give an error when launched under mpich2 (also compiled with g95)... we get an error "semget failed for setnum = 0".
If someone could give more details on how the g95 binaries where compiled, it would be very helpful. Alternatively, if people know how to fix that mpich2 problem, I may not need to recompile/ optimize. :)

Since g95 changes often, let me make a note that we are using the g95 binaries distributed on www.g95.org, and dated from Nov-7th 2005
[Linux x86_64 (AMD) or EMT64 Binary (32 bits)]

Also, you can find below the makefile_macros I'm using.
Thanks!

Olivier Delaire.


###################################################################
# This file contains the definitions needed for every possible script
# to be used with the ABINIT makefiles. It is very much machine- dependent.
# It is read by makemake and makearch.

# This version for dummy based on a Pentium IV, bi-procs
# Explanations about this file can be found in the makefile_macros_help file,
# in the Infos subdirectory

####################################################################
# For the sequential version

# Machine type
MACHINE=P6
# Fortran optimized compilation
FC=g95
#FC=mpif90

FFLAGS= -msse2 -m64 -march=k8 -m80387
FFLAGS_LIBS= -msse2 -m64 -march=k8 -m80387

# C preprocessor, used to preprocess the fortran source.
CPP=/lib/cpp
CPP_FLAGS=-P -traditional -DCONTRACT

# C optimized compilation.
CC=cc
CFLAGS=-O

# Location of perl . Used to generate the script fldiff, in ~ABINIT/ Utilities .
PERL=/usr/bin/perl

# List of machine-dependent routines
MACHINE_DEP_C_SEQ_SUBS_LIST=etime.o

# Use the ABINIT default libraries.
# For dynamical link, uncomment this line
#LIBS= $(LAPACK) $(BLAS) $(NETCDF)

NC_CC=cc
NC_FC=pgf77
NC_F90=pgf90
NC_CPPFLAGS=-DpgiFortran

####################################################################
# For the parallel version

# Compiler flags and definitions
FFLAGS_PAR= $(FFLAGS) -I /usr/local/mpi-pgi/include
# List of machine-dependent routines
MACHINE_DEP_C_PAR_SUBS_LIST=etime.par

# Location of the MPI library
MPI_A=/tmp/opt/mpich2-1.0.2p1/lib/libfmpich.a /tmp/opt/ mpich2-1.0.2p1/lib/libmpich.a
# Include blas, lapack, and any other libraries here
LIBS_PAR=$(LIBS) $(MPI_A)

# Command for automatic tests in parallel (optional)
COMMAND_PAR=rsh -. n00 mpirun -np 2 abinip

####################################################################
# For integration of netcdf

# The following lines may be uncommented if the ./configure script for
# netcdf doesn't find the appropriate tools.
# The script Lib_netcdf/src/nc_configure will strip the NC_ prefix,
# set the appropriate environment variables
# and call the standard netcdf ./configure script
# Note that in this example, the CFLAGS is given to define the "compiler platform"
# as expected by netcdf (not always required, the compiler may define
# the adequate environment variable or configur may find it).
# For examples of environment variables used on different platforms see:
# http://www.unidata.ucar.edu/packages/netcdf/INSTALL.html

NC_FC=/usr/pgi/linux86/bin/pgf90
NC_F90=/usr/pgi/linux86/bin/pgf90
NC_CPPFLAGS='-DNDEBUG -DpgiFortran'
#NC_CC=
#NC_CFLAGS=
#NC_FFLAGS=
#NC_F90FLAGS=

# This is a last line in makefile_macros ----------




Archive powered by MHonArc 2.6.16.

Top of Page