Skip to content

Commit c32d3c3

Browse files
committed
Squashed commit of the following:
commit 971e1c2 Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 13:35:52 2023 +0800 Minor change in README commit 6793e0e Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 14:05:02 2023 +0800 update changelog commit e3e77cc Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 13:46:34 2023 +0800 update manual pdf 20230906 commit 72e9f3f Author: YaphetS-jx <xjing30@gatech.edu> Date: Tue Sep 5 17:54:55 2023 -0400 1. integrate spin and spinor wave function cases for eigen solver, xc, force, stress, etc 2. clean and merge duplicate code 3. update references with 1E-5 tolerance 4. add implementation of noncollinear spin 5. change rhoTrigger defualt number 6. calculate and print magnetization of each atom 7. fix default of Nstates 8. add testsuites for noncollinear spin 9. update documentation 10. change functions for printing density and orbital commit 33420fd Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 12:57:37 2023 +0800 update changelog commit 4cf51d8 Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 11:58:20 2023 +0800 update manual pdf 20230906 commit bdbbbd5 Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 11:57:25 2023 +0800 add new documentation commit 4312f9f Author: T.Tian <alchem0x2a@gmail.com> Date: Wed Sep 6 10:55:36 2023 +0800 add installation option for conda-forge commit e46fab6 Merge: b30259c 3aab735 Author: T.Tian <alchem0x2a@gmail.com> Date: Sat Aug 19 00:38:21 2023 +0800 Merge branch 'SPARC-X:master' into master commit b30259c Author: T.Tian <alchem0x2a@gmail.com> Date: Mon Aug 14 20:54:49 2023 -0700 add copy doc commit d4fbf03 Author: T.Tian <alchem0x2a@gmail.com> Date: Mon Aug 14 08:32:00 2023 -0700 add activation scripts
1 parent d8b3a75 commit c32d3c3

File tree

8 files changed

+81
-2
lines changed

8 files changed

+81
-2
lines changed

.conda/activate.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export SPARC_PSP_PATH="${CONDA_PREFIX}/share/sparc/psps"
2+
export SPARC_DOC_PATH="${CONDA_PREFIX}/doc/sparc"

.conda/build.sh

+11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
#!/bin/bash
2+
# The build script is intended to be used on the root level
23
echo Compiling sparc using ${CPU_COUNT} cores
4+
35
cd ./src
46
make clean
57
make -j ${CPU_COUNT} USE_MKL=0 USE_SCALAPACK=1
8+
69
# ls -al lib
710
echo "Installing sparc into $PREFIX/bin"
811
cp ../lib/sparc $PREFIX/bin
912
echo "Moving sparc psp into $PREFIX/share/sparc/psps"
1013
mkdir -p $PREFIX/share/sparc/psps
1114
cp ../psps/* $PREFIX/share/sparc/psps/
15+
mkdir -p $PREFIX/doc/sparc
16+
cp -r ../doc/ $PREFIX/doc/sparc/
1217
echo "Finish compiling sparc!"
18+
19+
# Copy activate and deactivate scripts
20+
cd ../.conda/
21+
cp activate.sh $PREFIX/etc/conda/activate.d/activate-sparc.sh
22+
cp deactivate.sh $PREFIX/etc/conda/deactivate.d/deactivate-sparc.sh
23+
echo "Finish setting up activate / deactivate scripts"

.conda/deactivate.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
unset SPARC_PSP_PATH
2+
unset SPARC_DOC_PATH

.conda/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source:
2121
requirements:
2222
target:
2323
- linux-64
24-
# - linux-aarch64
24+
- linux-aarch64
2525
host:
2626
- compilers
2727
- openmpi

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,14 @@ sparc
66
.vscode
77
dev_tests/
88
*~
9+
*#*#
10+
/conda/
11+
/doc/.LaTeX/**/*.out
12+
/doc/.LaTeX/**/*.aux
13+
/doc/.LaTeX/**/*.vrb
14+
/doc/.LaTeX/**/*.out
15+
/doc/.LaTeX/**/*.log
16+
/doc/.LaTeX/**/auto/
17+
/doc/.LaTeX/Manual.pdf*
18+
/doc/.LaTeX/**/*.synctex*
19+
/README.html

ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
-Name
44
-changes
55

6+
--------------
7+
Sep 06, 2023
8+
Name: Tian Tian
9+
Changes: (README.md, doc/)
10+
1. Add installation instruction for conda-forge
11+
2. Update the installation section in manual
12+
613
--------------
714
Sep 05, 2023
815
Name: Xin Jing

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,25 @@ There are several options to compile SPARC, depending on the available external
7575

7676
Once compilation is done, a binary named `sparc` will be created in the `lib/` directory.
7777

78+
* Option 4: Install pre-compiled `sparc` binaries distributed by `conda-forge`
79+
80+
Pre-compiled `sparc` package can be installed on x86_64 or aarch64 Linux platforms using `anaconda` or `miniconda`.
81+
The binary is compiled with OpenBLAS and OpenMPI and flags `USE_MKL=0 USE_SCALAPACK=1 USE_FFTW=1`.
82+
83+
* Step 1 (optional): create a conda environment (e.g. `sparc-env`)
84+
```shell
85+
conda create -n sparc-env
86+
conda activate sparc-env
87+
```
88+
* Step 2: install conda package `sparc-x`
89+
```shell
90+
conda install -c conda-forge sparc-x
91+
echo sparc binary is located at: $(which sparc)
92+
echo .psp files installed at: $SPARC_PSP_PATH
93+
echo SPARC doc files installed at: $SPARC_DOC_PATH
94+
```
95+
96+
7897
### (3) Input files:
7998
The required input files to run a simulation with SPARC are (with shared names)
8099

doc/.LaTeX/Introduction.tex

+30-1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,35 @@
134134
\begin{frame}[allowframebreaks,fragile]{\textbf{Installation - lib}} \label{Installation:lib}
135135
Once compilation is done, a binary named \texttt{sparc} will be created in the \texttt{lib/} directory.
136136
\end{frame}
137+
138+
\begin{frame}[allowframebreaks,fragile]{\textbf{Installation - Option 4}} \label{Installation:4}
139+
\begin{itemize}
140+
\item Option 4: Install pre-compiled \texttt{sparc} binaries distributed by \texttt{conda-forge}
141+
142+
Pre-compiled \texttt{sparc} package can be installed on x86\_64 or
143+
aarch64 Linux platforms with \texttt{anaconda} or
144+
\texttt{miniconda} installed. The binary is compiled with
145+
OpenBLAS and OpenMPI using flags \texttt{USE\_MKL=0 USE\_SCALAPACK=1 USE\_FFTW=1}.
146+
147+
\begin{itemize}
148+
149+
\item Step 1 (optional): create a conda environment (e.g. \texttt{sparc-env})
150+
\begin{verbatim}
151+
$ conda create -n sparc-env
152+
$ conda activate sparc-env
153+
\end{verbatim}
154+
155+
\item Step 2: install conda package \texttt{sparc-x}
156+
\begin{verbatim}
157+
$ conda install -c conda-forge sparc-x
158+
$ echo sparc binary is located at: $(which sparc)
159+
$ echo .psp files installed at: $SPARC_PSP_PATH
160+
$ echo SPARC doc files installed at: $SPARC_DOC_PATH
161+
\end{verbatim}
162+
\end{itemize}
163+
\end{itemize}
164+
165+
\end{frame}
137166

138167

139168

@@ -157,7 +186,7 @@
157186
\end{verbatim}
158187
As an example, one can run one of the tests located in `SPARC/tests/`. First go to `SPARC/tests/Example\_tests/` directory:
159188
\begin{verbatim}
160-
$ $ cd tests/Example_tests/
189+
$ cd tests/Example_tests/
161190
\end{verbatim}
162191
There are a few input files available. Run a DC silicon system by
163192
\begin{verbatim}

0 commit comments

Comments
 (0)