Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
84c77200
Commit
84c77200
authored
Jun 18, 2018
by
Daniel Wortmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes/beautification of configure scripts
parent
85cc11fa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
34 deletions
+85
-34
cmake/process_arguments.sh
cmake/process_arguments.sh
+45
-21
cmake/store_environment.sh
cmake/store_environment.sh
+1
-1
cmake/tests/test_HDF5.cmake
cmake/tests/test_HDF5.cmake
+11
-0
configure.sh
configure.sh
+14
-2
external/libxc/install_libxc.sh
external/libxc/install_libxc.sh
+14
-10
No files found.
cmake/process_arguments.sh
View file @
84c77200
...
...
@@ -62,34 +62,58 @@ if [ $help -gt 0 ]
then
echo
"USAGE: configure.sh [options] [MACHINE] [label]"
echo
"
The following command line options are supported:
-h : print this help-page
-m # : specify the machine to build on (see below for possible options)
This can also be specified without -m as a first argument
-l # : label for the build. It will be attached to the name of the build directory.
This option can also be specified as second argument without -l
-d : build a debugging version of FLEUR (adds .debug to label)
-g : do a git pull first if this is a git version
-t : generate all tests including those that run longer
-b : backup an old build directory if present
To help the script finding a proper configuration you should
provide the name of a specific machine to compile on.
Currently known machine configurations are:
The following command line options are supported.
General options:
-h : print this help-page
-m # : specify the machine to build on (see below for possible options)
This can also be specified without -m as a first argument
-l # : label for the build. It will be attached to the name of
the build directory.
This option can also be specified as second argument without -l
-d : build a debugging version of FLEUR (adds .debug to label)
-g : do a git pull first if this is a git version
-t : generate all tests including those that run longer
-b : backup an old build directory if present
-make : do not stop after configure script but run make directly
-cmake # : cmake executable to use
-cmake_opts # : additional options for cmake can be specified here directly
Command line options to switch on/off features. These options overwrite the results of
the test and might lead to the configuration to fail.
-hdf5 [TRUE|FALSE] : use HDF5 library
-wannier [TRUE|FALSE] : use Wannier90 library
-mpi [TRUE|FALSE] : compile the MPI parallel version
Command line option to compile external libraries:
-external # : download and compile external libraries before building FLEUR
currently 'hdf5' and 'libxc' are possible options. The switch
can be specified multiple times
Options to specify Fortran/Linker flags:
-link # : String to use for linking (options separated by ;, e.g. '-lxml2;-lhdf5')
-libdir # : Directory to find libraries in (can be specified multiple times)
-flags # : String to add while compiling (e.g. '-g')
-includedir # : Directory to find include files (can be specified multiple times)
Special options:
-elpa_openmp : USE the OpenMP version of elpa, e.g. use '-lelpa_openmp'
To help the script finding a proper configuration you should provide the name of
a specific machine to compile on.
Currently known machine configurations are:
"
echo
"
$known_machines
"
echo
"
If you do not specify the machine the AUTO option will be used in which some
defaults are tested. It might work if your machine is not one of those known.
If you do not specify the machine the AUTO option will be used in which some
defaults are tested. It might work if your machine is not one of those known.
You might also want to add your configuration to the file
cmake/machines.sh
in this case :-)
You might also want to add your configuration to the directory
cmake/machines
in this case :-)
In addition you can modify some environment variables:
FC -- name of Fortran compiler
CC -- name of C compiler
FLEUR_LIBRARIES -- list of linker arguments i.e. '-L/lib;-lbla'
CMAKE_Fortran_FLAGS -- list of compiler options i.e. '-r8'"
CC -- name of C compiler"
echo
"
By specifying a label you can have different build directories.
The label will be added to the 'build' directory name."
...
...
cmake/store_environment.sh
View file @
84c77200
...
...
@@ -39,7 +39,7 @@ echo "set(FLEUR_LIBRARIES $cmake_lib)" >>config.cmake
#2. If CLI_FLAGS is given use that
#3. If FLEUR_INCLUDEDIR/CLI_INCLUDEDIR is given, add -I options for these
if
[
"
$CMAKE_Fortan_FLAGS
"
]
if
[
"
$CMAKE_Fort
r
an_FLAGS
"
]
then
cmake_flags
=
"
$CMAKE_Fortran_FLAGS
"
fi
...
...
cmake/tests/test_HDF5.cmake
View file @
84c77200
...
...
@@ -13,6 +13,17 @@ if (NOT FLEUR_USE_HDF5)
endif
()
endif
()
#now try to find the library by adding the -l stuff to the FLEUR_LIBRARIES
if
(
NOT FLEUR_USE_HDF5
)
set
(
TEST_LIBRARIES
"
${
FLEUR_LIBRARIES
}
;-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5"
)
try_compile
(
FLEUR_USE_HDF5
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/cmake/tests/test_HDF5.f90
LINK_LIBRARIES
${
TEST_LIBRARIES
}
)
if
(
FLEUR_USE_HDF5
)
set
(
FLEUR_LIBRARIES
${
TEST_LIBRARIES
}
)
endif
()
endif
()
#now try the find_package feature
if
(
NOT FLEUR_USE_HDF5
)
find_package
(
HDF5
)
...
...
configure.sh
View file @
84c77200
...
...
@@ -66,12 +66,24 @@ then
then
echo
"OLD build directory found, saved in build.
$$
"
mv
$buildname
$buildname
.
$$
mkdir
$buildname
else
echo
"Overwriting old build"
rm
-r
$buildname
cd
$buildname
for
file
in
*
do
if
[
"
$file
"
==
"external"
]
then
echo
"Keeping 'external' directory"
else
rm
-r
$file
fi
done
cd
..
fi
else
mkdir
$buildname
fi
mkdir
$buildname
cd
$buildname
#Now check the machine and set some defaults
...
...
external/libxc/install_libxc.sh
View file @
84c77200
libxc_version
=
4.2.1
#Get the file with the code
curl
-LO
"http://www.tddft.org/programs/octopus/download/libxc/
${
libxc_version
}
/libxc-
${
libxc_version
}
.tar.gz"
tar
xzf libxc-
${
libxc_version
}
.tar.gz
cd
libxc-
${
libxc_version
}
#Compile&test (This will take a while)
./configure
--prefix
=
$PWD
/INSTALL_DIR
make
make
install
if
[
!
-d
libxc-
${
libxc_version
}
]
then
#Get the file with the code
curl
-LO
"http://www.tddft.org/programs/octopus/download/libxc/
${
libxc_version
}
/libxc-
${
libxc_version
}
.tar.gz"
tar
xzf libxc-
${
libxc_version
}
.tar.gz
cd
libxc-
${
libxc_version
}
#Compile&test (This will take a while)
./configure
--prefix
=
$PWD
/INSTALL_DIR
make
make
install
else
cd
libxc-
${
libxc_version
}
fi
#Store the installation location
FLEUR_LIBDIR
=
"
$PWD
/INSTALL_DIR/lib
$FLEUR_LIBDIR
"
FLEUR_INCLUDEDIR
=
"
$PWD
/INSTALL_DIR/include"
FLEUR_INCLUDEDIR
=
"
$PWD
/INSTALL_DIR/include
$FLEUR_INCLUDEDIR
"
if
[
$FLEUR_LIBRARIES
]
then
FLEUR_LIBRARIES
=
"
$FLEUR_LIBRARIES
;-lxcf03;-lxc"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment