Skip to content

CI: test validation2 dataset at fortran_mpi's CI #127

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

gxyd
Copy link
Collaborator

@gxyd gxyd commented May 24, 2025

Description

the only different between validation and validation2 dataset is it sets the value of the read variable epscg (located at testsuite/validation/input/pot3d.dat's namelist
in validation dataset is 1e-12, while in validation2 dataset
it is 1e-8

This test set is being tested only with the possible purpose that the testsuite validation2 runs faster than validation dataset with GFortran and LFortran compilers both.

I'll first check whether all the CI tests pass with validation2 or not, just like they currently pass with validation dataset. Once it does pass the tests, I'll post the timings difference between running validation2 vs validation dataset.

NOTE: this PR isn't intended to be merged at all currently.

@gxyd
Copy link
Collaborator Author

gxyd commented May 24, 2025

It passes all the tests, but we can't reduce epscg further (i.e. for epscg=1e-7, it fails the tests with GFortran) with the current setup (for now atleast), I'll try to see if any other variable in pot3d.dat can be modified to reduce the time spent running POT3D with validation test

br_photo_file=''
ncghist=10
ncgmax=10000000
epscg=1.e-8
Copy link
Collaborator Author

@gxyd gxyd May 24, 2025

Choose a reason for hiding this comment

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

This is the only point of difference between validation testsuite (which has epscg=1.e-12) and validation2 introduced in this PR.

@gxyd
Copy link
Collaborator Author

gxyd commented May 24, 2025

On my macbook air M4 machine with 16GB RAM (10 cores), with MPICH

MPI Ranks Validation Dataset (seconds) Validation2 (this branch) Dataset (seconds)
1 63.027569 47.466790
2 34.250361 26.317204
4 23.318231 16.478486

Copy link
Collaborator

@certik certik left a comment

Choose a reason for hiding this comment

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

I don't know what this is doing, but it doesn't seem to break anything either.

the only different between validation and validation2 dataset is
it sets the value of the read variable `epscg` (located at
`testsuite/validation/input/pot3d.dat`'s namelist
 in validation dataset is `1e-12`, while in validation2 dataset
it is `1e-8`
@gxyd
Copy link
Collaborator Author

gxyd commented May 26, 2025

I don't know what this is doing, but it doesn't seem to break anything either.

epscg acts as an epsilon for CG solver (Conjugate gradient) which is used in POT3D, by using a larger epscg (i.e. now 1e-8 instead of 1e-12), we converge rather quickly while still getting the same values for BP**2 etc, as this converges quickly, hence it runs faster.

We'll now test both with validation and validation2 at fortran_mpi's CI. I'll make further modifications to validation2 in further PR's, which will intend to further reduce the time taken to run POT3D program.

@gxyd
Copy link
Collaborator Author

gxyd commented May 26, 2025

The tests pass, so I'm merging this.

@gxyd gxyd merged commit cb6e5c8 into lfortran:main May 26, 2025
8 checks passed
@gxyd gxyd deleted the validation2 branch May 26, 2025 13:58
@adit4443ya adit4443ya added the CI label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants