forked from dftfeDevelopers/dftfe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compiled and tested dealii development version with gcc compiler. For…
… compiling with new version use the CMakeListsFluxGCC.txt.
- Loading branch information
Showing
5 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
#script to setup and build DFT-FE | ||
#set CMAKE path | ||
cmake=/opt/cmake/bin/cmake | ||
|
||
# | ||
#Usually, no changes are needed below this line | ||
# | ||
RCol='\e[0m' | ||
Blu='\e[0;34m'; | ||
optimizedMode=1 | ||
if [ $optimizedMode == 1 ]; then | ||
if [ -d "build/release" ]; then | ||
echo -e "${Blu}build/release directory already present${RCol}" | ||
# Control will enter here if build directory exists. | ||
cd build | ||
cd release | ||
echo -e "${Blu}Building Non-Periodic executable in Optimized (Release) mode...${RCol}" | ||
mkdir -p nonPeriodic && cd nonPeriodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" -DCMAKE_BUILD_TYPE=Release ../../../. && make && cd .. | ||
echo -e "${Blu}Building Periodic executable in Optimized (Release) mode...${RCol}" | ||
mkdir -p periodic && cd periodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" -DCMAKE_BUILD_TYPE=Release -D_ENABLE_PERIODIC=TRUE ../../../. && make && cd ../.. | ||
else | ||
rm -rf build/release | ||
echo -e "${Blu}Creating build directory...${RCol}" | ||
mkdir -p build && cd build | ||
mkdir -p release && cd release | ||
echo -e "${Blu}Building Non-Periodic executable in Optimized (Release) mode...${RCol}" | ||
mkdir -p nonPeriodic && cd nonPeriodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" -DCMAKE_BUILD_TYPE=Release ../../../. && make && cd .. | ||
echo -e "${Blu}Building Periodic executable in Optimized (Release) mode...${RCol}" | ||
mkdir -p periodic && cd periodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_CXX_FLAGS_RELEASE="-O3 -march=native" -DCMAKE_BUILD_TYPE=Release -D_ENABLE_PERIODIC=TRUE ../../../. && make && cd ../.. | ||
fi | ||
else | ||
if [ -d "build/debug" ]; then | ||
echo -e "${Blu}build/debug directory already present${RCol}" | ||
# Control will enter here if build directory exists. | ||
cd build | ||
cd debug | ||
echo -e "${Blu}Building Non-Periodic executable in Debug mode...${RCol}" | ||
mkdir -p nonPeriodic && cd nonPeriodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Debug ../../../. && make && cd .. | ||
echo -e "${Blu}Building Periodic executable in Debug mode...${RCol}" | ||
mkdir -p periodic && cd periodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Debug -D_ENABLE_PERIODIC=TRUE ../../../. && make && cd ../.. | ||
else | ||
rm -rf build/debug | ||
echo -e "${Blu}Creating build directory...${RCol}" | ||
mkdir -p build && cd build | ||
mkdir -p debug && cd debug | ||
echo -e "${Blu}Building Non-Periodic executable in Debug mode...${RCol}" | ||
mkdir -p nonPeriodic && cd nonPeriodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Debug ../../../. && make && cd .. | ||
echo -e "${Blu}Building Periodic executable in Debug mode...${RCol}" | ||
mkdir -p periodic && cd periodic && cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Debug -D_ENABLE_PERIODIC=TRUE ../../../. && make && cd ../.. | ||
fi | ||
fi | ||
echo -e "${Blu}Build complete.${RCol}" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters