forked from ilyak/libefp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from libefp2/lyuda_Jan6
Lyuda jan6
- Loading branch information
Showing
77 changed files
with
7,690 additions
and
422 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,7 @@ | |
/include/ | ||
tags | ||
build*/ | ||
cmake-build-debug/ | ||
/installed/ | ||
/cmake-build-debug/ | ||
compilation.log | ||
|
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
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
Libefp was written by Ilya Kaliman. | ||
The following people contributed to libefp. Thanks! | ||
|
||
Yen (Terri) Bui | ||
Lori A. Burns | ||
Dmitry Morozov | ||
Carlos H. Borca | ||
Yen (Terri) Bui | ||
Yongbin Kim | ||
Dmitry Morozov | ||
Suranjan Paul | ||
Lyudmila V. Slipchenko | ||
|
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
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,56 @@ | ||
|
||
# Installation with LibTorch for ML/EFP models | ||
|
||
## Required libraries | ||
|
||
- cmake | ||
- lapack math library | ||
- C/C++ compiler (GCC 9 or newer) | ||
- Fortran 77 compiler | ||
|
||
An example of working setup at Purdue supercomputers | ||
can be foound in *module.sh* script. | ||
|
||
AppleClang 14 works on M2 MacOS Ventura. | ||
|
||
## LibTorch library | ||
|
||
For ML/EFP models, one needs to use LibTorch library. | ||
Install LibTorch (C++ frontend) of PyTorch. Consult Libtorch/Pytorch | ||
webpages for detail: https://pytorch.org/cppdocs/ | ||
|
||
You can opt out and configure with EFP-only installation - see the next section. | ||
|
||
## Setup environmental variables | ||
|
||
*setup.sh* or *setup.csh* are used to set up environmental | ||
variables. The first two are mandatory: | ||
|
||
`TORCH_SWITCH` is the variable governing compilation | ||
with or without LibTorch. | ||
|
||
`LIBEFP_DIR` is a path to LibEFP directory with source codes. | ||
|
||
`INSTALLATION_DIR` is the installation directory. | ||
|
||
`TORCH_INSTALLED_DIR` and `LIBTORCH_INCLUDE_DIRS` are paths to the LibTorch | ||
installation and included directories. | ||
|
||
## Compilation | ||
|
||
Further tuning can be done in `CMakeLists.txt`. Otherwise, | ||
run `./compile.sh` to compile. | ||
|
||
Executable `efpmd` will be in `build/efpmd/efpmd` and in | ||
|
||
## Running test jobs | ||
|
||
Test jobs are contained in `tests` directory.To check the complilation, | ||
do | ||
|
||
`cd tests` | ||
|
||
`make check` | ||
|
||
This will run all the test jobs and report `SUCCESS/FAILURE`. Examine any failed jobs carefully. | ||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
#!/bin/csh | ||
|
||
rm -rf build | ||
mkdir build | ||
|
||
if ( "$TORCH_SWITCH" == "ON" ) then | ||
echo "Building with Torch integration..." | ||
echo "TORCH_DIR = ${TORCH_INSTALLED_DIR}" | ||
cd build | ||
setenv TORCH_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0" | ||
cmake -DCMAKE_INSTALL_PREFIX=${INSTALLATION_DIR} -DCMAKE_PREFIX_PATH=${TORCH_INSTALLED_DIR} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. | ||
#cmake -DCMAKE_PREFIX_PATH=${TORCH_INSTALLED_DIR} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. | ||
make VERBOSE=1 | ||
make install | ||
else | ||
echo "Building without Torch integration..." | ||
cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${INSTALLATION_DIR} | ||
cd build | ||
make VERBOSE=1 | ||
make install | ||
endif | ||
|
||
echo "Compilation complete. You can now run test jobs as '${INSTALLATION_DIR}/bin/efpmd input.in' from the tests directory." |
Oops, something went wrong.