mirror of
https://gitlab.com/scemama/eplf
synced 2025-01-03 01:56:07 +01:00
Improved Makefile and configure
This commit is contained in:
parent
895a341298
commit
6d29b1d8c9
BIN
EZFIO.tar.gz
BIN
EZFIO.tar.gz
Binary file not shown.
19
Makefile
19
Makefile
@ -1,16 +1,25 @@
|
||||
|
||||
all: bin/eplf
|
||||
|
||||
|
||||
EZFIO: EZFIO.tar.gz
|
||||
EZFIO/config/eplf.config: EZFIO.tar.gz
|
||||
tar -zxvf EZFIO.tar.gz
|
||||
ln -s $$PWD/eplf.config EZFIO/config
|
||||
cd EZFIO ; ./configure
|
||||
if [ -e $@ ] ; then rm $@ ; fi
|
||||
ln -s $$PWD/eplf.config $@
|
||||
|
||||
EZFIO/lib/libezfio.so: EZFIO eplf.config
|
||||
EZFIO/lib/libezfio.so: EZFIO/config/eplf.config
|
||||
make -C EZFIO/
|
||||
|
||||
bin/ezfio.py: EZFIO/lib/libezfio.so
|
||||
ln -s $$PWD/EZFIO/Python/ezfio.py bin/ezfio.py
|
||||
if [ -e $@ ] ; then rm $@ ; fi
|
||||
ln -s $$PWD/EZFIO/Python/ezfio.py $@
|
||||
|
||||
bin/eplf: EZFIO/lib/libezfio.so
|
||||
make -C src
|
||||
mv src/eplf bin
|
||||
|
||||
clean:
|
||||
- rm -rf EZFIO
|
||||
- rm bin/eplf
|
||||
- rm bin/ezfio.py
|
||||
- make -C src veryclean
|
||||
|
112
configure.ac
Normal file
112
configure.ac
Normal file
@ -0,0 +1,112 @@
|
||||
# EPLF computes the Electron Pair Localization Function
|
||||
# Copyright (C) 2009 Anthony SCEMAMA, CNRS
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Anthony Scemama
|
||||
# LCPQ - IRSAMC - CNRS
|
||||
# Universite Paul Sabatier
|
||||
# 118, route de Narbonne
|
||||
# 31062 Toulouse Cedex 4
|
||||
# scemama@irsamc.ups-tlse.fr
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
VERSION=[`. version ; echo $VERSION`]
|
||||
AC_SUBST([VERSION])
|
||||
|
||||
AC_REVISION([$Revision: $VERSION $])
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
AC_INIT([EPLF], [], [scemama@irsamc.ups-tlse.fr],[eplf],[http://eplf.sourceforge.net])
|
||||
|
||||
AC_SYS_LONG_FILE_NAMES
|
||||
ROOT=`pwd`
|
||||
AC_SUBST([ROOT])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/main.irp.f])
|
||||
AC_CONFIG_FILES([make.config])
|
||||
AC_PREFIX_DEFAULT([./])
|
||||
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CC
|
||||
|
||||
# Test if Static zlib is present
|
||||
# ------------------------------
|
||||
|
||||
AC_CHECK_LIB([z],[gzclose],[STATIC=1],[STATIC=0],[-static])
|
||||
STATIC_LIB="../EZFIO/lib/libezfio_irp.a"
|
||||
SHARED_LIB="-L../EZFIO/lib -lezfio"
|
||||
|
||||
# Test Fortran
|
||||
# ------------
|
||||
|
||||
AC_LANG([Fortran])
|
||||
AC_PROG_FC([mpif90 ifort gfortran],[Fortran 90])
|
||||
AC_PROG_FC_C_O
|
||||
AC_FC_SRCEXT([F90])
|
||||
AC_FC_FREEFORM
|
||||
|
||||
case $FC in
|
||||
mpif90*)
|
||||
FCFLAGS="-O3"
|
||||
;;
|
||||
ifort*)
|
||||
FCFLAGS="-O3 -axT -ip"
|
||||
if test $STATIC == 1 ; then
|
||||
FCFLAGS="$FCFLAGS -static-intel -static-libgcc -static"
|
||||
fi
|
||||
;;
|
||||
gfortran*)
|
||||
FCFLAGS="O3 -ffast-math"
|
||||
if test $STATIC == 0 ; then
|
||||
FCFLAGS="$FCFLAGS -static-libgcc -static"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Test IRPF90
|
||||
# ------------
|
||||
|
||||
AC_CHECK_PROG([IRPF90],[irpf90],[yes],[no])
|
||||
if [[ $IRPF90 = no ]] ; then
|
||||
AC_MSG_ERROR([Please install IRPF90:\nhttp://irpf90.sourceforge.net])
|
||||
fi
|
||||
IRPF90=`which irpf90`
|
||||
AC_SUBST(IRPF90)
|
||||
|
||||
# Write make.config
|
||||
|
||||
if [[ $STATIC = 1 ]] ; then
|
||||
LIB="$STATIC_LIB -lz"
|
||||
else
|
||||
LIB="$SHARED_LIB -lz"
|
||||
AC_MSG_WARN([
|
||||
=====================================================
|
||||
|
||||
Using shared library. Add
|
||||
$ROOT/EZFIO/lib/
|
||||
to the LD_LIBRARY_PATH environment variable.
|
||||
|
||||
=====================================================
|
||||
])
|
||||
fi
|
||||
AC_SUBST([LIB])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
4
make.config
Normal file
4
make.config
Normal file
@ -0,0 +1,4 @@
|
||||
IRPF90 = /usr/bin/irpf90
|
||||
FC = ifort
|
||||
FCFLAGS= -O3 -axT -ip
|
||||
LIB = -L../EZFIO/lib -lezfio -lz
|
4
make.config.in
Normal file
4
make.config.in
Normal file
@ -0,0 +1,4 @@
|
||||
IRPF90 = @IRPF90@
|
||||
FC = @FC@
|
||||
FCFLAGS= @FCFLAGS@
|
||||
LIB = @LIB@
|
16
src/Makefile
16
src/Makefile
@ -1,21 +1,7 @@
|
||||
# MPI-ifort
|
||||
IRPF90 = irpf90 -DMPI #-a -d
|
||||
FC = mpif90 -xT -ip -finline
|
||||
FCFLAGS= -O3
|
||||
|
||||
# Gfortran
|
||||
#IRPF90 = irpf90 #-DMPI #-a -d
|
||||
#FC = gfortran -static-libgcc
|
||||
#FCFLAGS= -O3 -ffast-math -L ~/QCIO/lib
|
||||
|
||||
# Mono
|
||||
#IRPF90 = irpf90
|
||||
#FC = ifort -static-intel -static-libgcc
|
||||
#FCFLAGS= -O3 -axP
|
||||
include ../make.config
|
||||
|
||||
SRC=
|
||||
OBJ=
|
||||
LIB=../EZFIO/lib/libezfio.a
|
||||
|
||||
eplf: main
|
||||
mv main eplf
|
||||
|
@ -22,7 +22,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_axis_p, (ao_num) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Cartesian polynomial part of the atomic orbitals.
|
||||
@ -40,7 +39,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_axis_grad_p, (ao_num,3) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Gradients of the cartesian polynomial part of the atomic orbitals.
|
||||
@ -74,7 +72,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_axis_lapl_p, (ao_num) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
BEGIN_DOC
|
||||
! Laplacian of the cartesian atomic orbitals
|
||||
END_DOC
|
||||
|
@ -11,7 +11,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_grad_p, (ao_num,3) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
BEGIN_DOC
|
||||
! Gradients of the atomic orbitals
|
||||
END_DOC
|
||||
@ -30,7 +29,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_lapl_p, (ao_num) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
BEGIN_DOC
|
||||
! Laplacian of the atomic orbitals
|
||||
END_DOC
|
||||
|
@ -1,6 +1,5 @@
|
||||
BEGIN_PROVIDER [ real, ao_oneD_prim_p, (ao_num,ao_prim_num_max) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Exponentials of the primitive AOs
|
||||
@ -35,7 +34,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_oneD_p, (ao_num) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! One-dimensional component of the AOs
|
||||
@ -57,7 +55,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_oneD_prim_grad_p, (ao_num,ao_prim_num_max,3) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Gradients of the one-dimensional component of the primitive AOs
|
||||
@ -77,7 +74,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_oneD_grad_p, (ao_num,3) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Gradients of the one-dimensional component of the AOs
|
||||
@ -98,7 +94,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_oneD_prim_lapl_p, (ao_num,ao_prim_num_max) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Laplacian of the one-dimensional component of the primitive AOs
|
||||
@ -115,7 +110,6 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ real, ao_oneD_lapl_p, (ao_num) ]
|
||||
implicit none
|
||||
include 'types.F'
|
||||
|
||||
BEGIN_DOC
|
||||
! Laplacian of the one-dimensional component of the AOs
|
||||
|
@ -1,6 +1,5 @@
|
||||
BEGIN_PROVIDER [ integer, det_num ]
|
||||
implicit none
|
||||
include "types.F"
|
||||
BEGIN_DOC
|
||||
! Number of determinants
|
||||
END_DOC
|
||||
|
@ -1,14 +1,7 @@
|
||||
integer, parameter :: t_Gaussian = 1
|
||||
integer, parameter :: t_Slater = 2
|
||||
|
||||
integer, parameter :: t_Brownian = 3
|
||||
integer, parameter :: t_Langevin = 4
|
||||
|
||||
integer, parameter :: t_VMC = 5
|
||||
integer, parameter :: t_DMC = 6
|
||||
integer, parameter :: t_CI = 7
|
||||
|
||||
character*(32) :: types(t_CI) = &
|
||||
character*(32) :: types(t_Slater) = &
|
||||
(/ "Gaussian", "Slater", "Brownian", "Langevin", &
|
||||
"VMC", "DMC", "CI" /)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user