Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 971e1c2
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 13:35:52 2023 +0800

    Minor change in README

commit 6793e0e
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 14:05:02 2023 +0800

    update changelog

commit e3e77cc
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 13:46:34 2023 +0800

    update manual pdf 20230906

commit 72e9f3f
Author: YaphetS-jx <[email protected]>
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 <[email protected]>
Date:   Wed Sep 6 12:57:37 2023 +0800

    update changelog

commit 4cf51d8
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 11:58:20 2023 +0800

    update manual pdf 20230906

commit bdbbbd5
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 11:57:25 2023 +0800

    add new documentation

commit 4312f9f
Author: T.Tian <[email protected]>
Date:   Wed Sep 6 10:55:36 2023 +0800

    add installation option for conda-forge

commit e46fab6
Merge: b30259c 3aab735
Author: T.Tian <[email protected]>
Date:   Sat Aug 19 00:38:21 2023 +0800

    Merge branch 'SPARC-X:master' into master

commit b30259c
Author: T.Tian <[email protected]>
Date:   Mon Aug 14 20:54:49 2023 -0700

    add copy doc

commit d4fbf03
Author: T.Tian <[email protected]>
Date:   Mon Aug 14 08:32:00 2023 -0700

    add activation scripts
  • Loading branch information
alchem0x2A committed Sep 6, 2023
1 parent d8b3a75 commit c32d3c3
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 2 deletions.
1 change: 1 addition & 0 deletions .conda/activate.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export SPARC_PSP_PATH="${CONDA_PREFIX}/share/sparc/psps"
export SPARC_DOC_PATH="${CONDA_PREFIX}/doc/sparc"
11 changes: 11 additions & 0 deletions .conda/build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
#!/bin/bash
# The build script is intended to be used on the root level
echo Compiling sparc using ${CPU_COUNT} cores

cd ./src
make clean
make -j ${CPU_COUNT} USE_MKL=0 USE_SCALAPACK=1

# ls -al lib
echo "Installing sparc into $PREFIX/bin"
cp ../lib/sparc $PREFIX/bin
echo "Moving sparc psp into $PREFIX/share/sparc/psps"
mkdir -p $PREFIX/share/sparc/psps
cp ../psps/* $PREFIX/share/sparc/psps/
mkdir -p $PREFIX/doc/sparc
cp -r ../doc/ $PREFIX/doc/sparc/
echo "Finish compiling sparc!"

# Copy activate and deactivate scripts
cd ../.conda/
cp activate.sh $PREFIX/etc/conda/activate.d/activate-sparc.sh
cp deactivate.sh $PREFIX/etc/conda/deactivate.d/deactivate-sparc.sh
echo "Finish setting up activate / deactivate scripts"
1 change: 1 addition & 0 deletions .conda/deactivate.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
unset SPARC_PSP_PATH
unset SPARC_DOC_PATH
2 changes: 1 addition & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source:
requirements:
target:
- linux-64
# - linux-aarch64
- linux-aarch64
host:
- compilers
- openmpi
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@ sparc
.vscode
dev_tests/
*~
*#*#
/conda/
/doc/.LaTeX/**/*.out
/doc/.LaTeX/**/*.aux
/doc/.LaTeX/**/*.vrb
/doc/.LaTeX/**/*.out
/doc/.LaTeX/**/*.log
/doc/.LaTeX/**/auto/
/doc/.LaTeX/Manual.pdf*
/doc/.LaTeX/**/*.synctex*
/README.html
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
-Name
-changes

--------------
Sep 06, 2023
Name: Tian Tian
Changes: (README.md, doc/)
1. Add installation instruction for conda-forge
2. Update the installation section in manual

--------------
Sep 05, 2023
Name: Xin Jing
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,25 @@ There are several options to compile SPARC, depending on the available external

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

* Option 4: Install pre-compiled `sparc` binaries distributed by `conda-forge`

Pre-compiled `sparc` package can be installed on x86_64 or aarch64 Linux platforms using `anaconda` or `miniconda`.
The binary is compiled with OpenBLAS and OpenMPI and flags `USE_MKL=0 USE_SCALAPACK=1 USE_FFTW=1`.

* Step 1 (optional): create a conda environment (e.g. `sparc-env`)
```shell
conda create -n sparc-env
conda activate sparc-env
```
* Step 2: install conda package `sparc-x`
```shell
conda install -c conda-forge sparc-x
echo sparc binary is located at: $(which sparc)
echo .psp files installed at: $SPARC_PSP_PATH
echo SPARC doc files installed at: $SPARC_DOC_PATH
```


### (3) Input files:
The required input files to run a simulation with SPARC are (with shared names)

Expand Down
31 changes: 30 additions & 1 deletion doc/.LaTeX/Introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,35 @@
\begin{frame}[allowframebreaks,fragile]{\textbf{Installation - lib}} \label{Installation:lib}
Once compilation is done, a binary named \texttt{sparc} will be created in the \texttt{lib/} directory.
\end{frame}

\begin{frame}[allowframebreaks,fragile]{\textbf{Installation - Option 4}} \label{Installation:4}
\begin{itemize}
\item Option 4: Install pre-compiled \texttt{sparc} binaries distributed by \texttt{conda-forge}

Pre-compiled \texttt{sparc} package can be installed on x86\_64 or
aarch64 Linux platforms with \texttt{anaconda} or
\texttt{miniconda} installed. The binary is compiled with
OpenBLAS and OpenMPI using flags \texttt{USE\_MKL=0 USE\_SCALAPACK=1 USE\_FFTW=1}.

\begin{itemize}

\item Step 1 (optional): create a conda environment (e.g. \texttt{sparc-env})
\begin{verbatim}
$ conda create -n sparc-env
$ conda activate sparc-env
\end{verbatim}

\item Step 2: install conda package \texttt{sparc-x}
\begin{verbatim}
$ conda install -c conda-forge sparc-x
$ echo sparc binary is located at: $(which sparc)
$ echo .psp files installed at: $SPARC_PSP_PATH
$ echo SPARC doc files installed at: $SPARC_DOC_PATH
\end{verbatim}
\end{itemize}
\end{itemize}

\end{frame}



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

0 comments on commit c32d3c3

Please sign in to comment.