fangohr / octopus-in-spack

Develop Octopus in spack (software packaging)
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Add and test berkeleygw variant #79

Closed iamashwin99 closed 1 year ago

iamashwin99 commented 1 year ago

Fixes #67 partially. With Hennings changes to the berkeleygw package, berkeleygw now has mpi and non mpi variant. This MR adds the berkeleygw variant and chooses correctly the berkeleygw variant based on octopus variant (mpi or non mpi )

fangohr commented 1 year ago

Looks good. Can be merged when the Ci passes.

iamashwin99 commented 1 year ago

This brings in elpa, scalapack and other optional berkeleygw dependencies even when octopus dosent specify them see for eg:

    ==> Concretized octopus@12.1%gcc@11.3.0+berkeleygw ^libxc@5.2.3
     -   a3hpjdr  octopus@12.1%gcc@11.3.0~arpack+berkeleygw~cgal~cuda~debug~elpa~libvdwxc~libyaml~likwid~metis+mpi~netcdf~nlopt~parmetis~pfft~python~scalapack build_system=autotools dev_path=/scratch/karnada/spackbox/iamSpack/testberkelyenv/octopus arch=linux-debian11-sandybridge
     -   rihhxxg      ^berkeleygw@3.0.1%gcc@11.3.0~debug+elpa+hdf5+mpi+openmp+python~verbose build_system=makefile arch=linux-debian11-sandybridge
     -   2qkgfmx          ^elpa@2022.11.001.rc2%gcc@11.3.0~autotune~cuda+mpi+openmp~rocm build_system=autotools arch=linux-debian11-sandybridge

full at http://p.ip.fi/DDZM

Need to think of a way to pass octopus variants into berkeleygw variants

iamashwin99 commented 1 year ago

New versions of berkeleyGW incompatible with octopus: https://gitlab.com/octopus-code/octopus/-/issues/545

fangohr commented 1 year ago

Looks good. Do we know if berkeleygw@2.1 is the correct and only version of BerkeleyGW for all Octopus versions?

iamashwin99 commented 1 year ago

Berkeleygw gets pulled in for both mpi and non mpi variant: https://github.com/fangohr/octopus-in-spack/actions/runs/4417514992/jobs/7743327694


Version                : 12.2
Commit                 :
Build time             : Tue Mar 14 17:30:07 UTC 2023
Configuration options  : maxdim3 openmp sse2 libxc5 libxc_fxc
Optional libraries     : berkeleygw cgal etsf_io netcdf sparskit nlopt
Architecture           : x86_64
C compiler             : /usr/bin/gcc
 Version                : 12.2
Commit                 :
Build time             : Tue Mar 14 18:03:18 UTC 2023
Configuration options  : maxdim3 openmp mpi sse2 avx libxc5 libxc_fxc
Optional libraries     : berkeleygw cgal etsf_io metis netcdf parmetis pfft pnfft sparskit nlopt
Architecture           : x86_64
C compiler             : /home/user/spack/opt/spack/linux-debian11-x86_64_v4/gcc-10.2.1/openmpi-4.1.5-hn6nfwprjx4yzno3wwixc5qecjwc4rc5/bin/mpicc (/home/user/spack/lib/spack/env/gcc/gcc)

Regarding the versions, its unclear if older versions support berkeleygw@2.1. The octopus buildbot uses berkeleygw@1.2 for testing and berkeleygw@2.1 is the latest version that octopus 12.2 supports.

iamashwin99 commented 1 year ago

Would you suggest that we make it such that all versions from berkeleygw@1.2 until berkeleygw@2.1 are supported instead ? This would have to be separately tested.

fangohr commented 1 year ago

If Octopus currentlly works with 1.2 (on the buildbot) and 2.1, then at least we could allow different versions of BerkeleyGW in our spack package? If we know a mapping of - for example -

octopus 11.1 -> BerkeleyGW 1.2 octopus 11.2 -> BerkeleyGW 1.2 octopus 12.0 -> BerkeleyGW 2.1

then we could implement this in Spack.

If all of those Octopus versions support both BerkeleyGW versions, it might be better to allow the full range of BerkeleyGW versions (I.e. from 1.2 to 2.1): this way, if you have a spack installation that happens to have BerkeleyGW 1.3 installed already, Octopus could use that as a dependency. (This wouldn't work if we fix the only allowed BerkeleyGW version to be 2.1.)

iamashwin99 commented 1 year ago

The problem is we dont know the mapping and for octopus team figuring out this mapping for BerkeleyGW is quite low on the bucket list. Spack also has support for only 3.0.1, 3,2.1 and the older versions are not tested. I am manually trying out the compilation of the following specs and if they work I will set the version to 1.2<=BerkeleyGW<=2.1:

octopus@11.1^berkeleygw@2.1
octopus@11.1^berkeleygw@1.2 ( even though berkeleygw@1.2 checksum not in spack )
octopus@12.2^berkeleygw@1.2  ( already tested by buildbot)
iamashwin99 commented 1 year ago

octopus@11.1^berkeleygw@2.1 works properly:

Version                : 11.1
Commit                 : 479f5a74a3e8a9925c20c1e7f27872f02941f27a
Build time             : Thu Mar 16 15:28:16 CET 2023
Configuration options  : maxdim3 openmp mpi sse2 avx libxc5 libxc_fxc
Optional libraries     : berkeleygw gdlib metis mpi2

but berkeleygw@1.2 wasnt tested as there are issues getting the package installed https://github.com/spack/spack/issues/36163

iamashwin99 commented 1 year ago

We decided to stick with berkeleygw@2.1 for all versions of octopus as it seems to be supported by all the modern versions of octopus and olderversions are not easily supported by spack out of the box.