Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing in pull requests #12

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Binary file removed .DS_Store
Binary file not shown.
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:

permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
intel_build:
name: Intel OneAPI build
runs-on: ubuntu-20.04
env:
FC: mpiifort
APT_PACKAGES: >-
intel-oneapi-compiler-fortran
intel-oneapi-mpi
intel-oneapi-mpi-devel

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install fftw
run: |
echo "Entering FFTW folder"
cd fftw
echo "Unpacking FFTW"
tar -xf fftw.tar.gz
echo "Compiling FFTW"
cd fftw
bash compile.sh

- name: Add Intel repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use the setup-fortran action instead of all this setup.
https://github.com/fortran-lang/setup-fortran

(I've been meaning to try it out for ABIN but did not get to it yet, would be great if you could test it here!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, nothing escapes your attention on GitHub. Thanks for the idea, I will give it a try, but I first need to understand how the whole stuff works. I copied that from ABIN but I need the fftw library first which I somehow can't figure out now. :D

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FFTW probably needs to be compiled with the same compiler as qdyn, so you need to move the FFTW compilation after you setup the intel compiler.

I'd recommend just copying the fftw_build job from ABIN, where I install fftw via apt to avoid compilation. In that case, you need to use to default gfortran compiler otherwise the installed fftw apt package will not be compatible.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, nothing escapes your attention on GitHub.

Haha, for some reason I am getting emails for each change on the qdyn repo :-D I was getting a lot of them today. :-P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, cool, thanks for the advice, I will try it someday.

Haha, for some reason I am getting emails for each change on the qdyn repo :-D I was getting a lot of them today. :-P

I had no idea you were watching this repo. I was just playing around thinking no one would see it. :D


- name: Install Intel oneAPI compiler
run: |
sudo apt-get install ${{ env.APT_PACKAGES }}
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV

- name: Build ABIN
run: cd src/; make clean && make
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.o
*.mod
src/*.o
src/*.mod
src/qdyn
*.DS_Store
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,4 @@ Inputs can be prepared with the help of python scripts.
A series of python scripts is prepared for plotting the data.

## Notes
Hydrogen atom test is not working well, probably too much stretch for the code. Spherical harmonic oscilator works so there should be no problem with spherical harmonics.

## TODO
Imaginary-time propagation and real-time propagation in 1D are finished and tested. Extension of RT to multiple states is currently under progress.
1) Add rotation matrix for propagation expH1
2) Add autocorrelation function to the analyze scripts
3) Add imaginary absorption potential

## small TODO list
1) change input description in README.md
Hydrogen atom test is not working well, probably too much stretch for the code. Spherical harmonic oscilator works so there should be no problem with spherical harmonics. A better grid point selection would be necessary for such potential.
Binary file removed fftw/.DS_Store
Binary file not shown.
Binary file removed scripts/.DS_Store
Binary file not shown.
Binary file removed tests/.DS_Store
Binary file not shown.
Loading