octopus: Add berkeleygw variant (#36495)
* octopus: Add berkeleygw variant * octopus: style fix
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							33833a4f32
						
					
				
				
					commit
					07559d778e
				
			@@ -40,6 +40,7 @@ class Octopus(AutotoolsPackage, CudaPackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    variant("mpi", default=True, description="Build with MPI support")
 | 
					    variant("mpi", default=True, description="Build with MPI support")
 | 
				
			||||||
    variant("scalapack", default=False, when="+mpi", description="Compile with Scalapack")
 | 
					    variant("scalapack", default=False, when="+mpi", description="Compile with Scalapack")
 | 
				
			||||||
 | 
					    variant("berkeleygw", default=False, description="Compile with BerkeleyGW")
 | 
				
			||||||
    variant("metis", default=False, description="Compile with METIS")
 | 
					    variant("metis", default=False, description="Compile with METIS")
 | 
				
			||||||
    variant("parmetis", default=False, when="+mpi", description="Compile with ParMETIS")
 | 
					    variant("parmetis", default=False, when="+mpi", description="Compile with ParMETIS")
 | 
				
			||||||
    variant("netcdf", default=False, description="Compile with Netcdf")
 | 
					    variant("netcdf", default=False, description="Compile with Netcdf")
 | 
				
			||||||
@@ -92,6 +93,7 @@ class Octopus(AutotoolsPackage, CudaPackage):
 | 
				
			|||||||
        depends_on("arpack-ng+mpi", when="+arpack")
 | 
					        depends_on("arpack-ng+mpi", when="+arpack")
 | 
				
			||||||
        depends_on("elpa+mpi", when="+elpa")
 | 
					        depends_on("elpa+mpi", when="+elpa")
 | 
				
			||||||
        depends_on("netcdf-fortran ^netcdf-c+mpi", when="+netcdf")
 | 
					        depends_on("netcdf-fortran ^netcdf-c+mpi", when="+netcdf")
 | 
				
			||||||
 | 
					        depends_on("berkeleygw@2.1+mpi", when="+berkeleygw")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    with when("~mpi"):  # list all the serial dependencies
 | 
					    with when("~mpi"):  # list all the serial dependencies
 | 
				
			||||||
        depends_on("fftw@3:+openmp~mpi", when="@8:9")  # FFT library
 | 
					        depends_on("fftw@3:+openmp~mpi", when="@8:9")  # FFT library
 | 
				
			||||||
@@ -100,6 +102,7 @@ class Octopus(AutotoolsPackage, CudaPackage):
 | 
				
			|||||||
        depends_on("arpack-ng~mpi", when="+arpack")
 | 
					        depends_on("arpack-ng~mpi", when="+arpack")
 | 
				
			||||||
        depends_on("elpa~mpi", when="+elpa")
 | 
					        depends_on("elpa~mpi", when="+elpa")
 | 
				
			||||||
        depends_on("netcdf-fortran ^netcdf-c~~mpi", when="+netcdf")
 | 
					        depends_on("netcdf-fortran ^netcdf-c~~mpi", when="+netcdf")
 | 
				
			||||||
 | 
					        depends_on("berkeleygw@2.1~mpi", when="+berkeleygw")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    depends_on("etsf-io", when="+etsf-io")
 | 
					    depends_on("etsf-io", when="+etsf-io")
 | 
				
			||||||
    depends_on("py-numpy", when="+python")
 | 
					    depends_on("py-numpy", when="+python")
 | 
				
			||||||
@@ -232,6 +235,8 @@ def configure_args(self):
 | 
				
			|||||||
        # --with-sparskit=${prefix}/lib/libskit.a
 | 
					        # --with-sparskit=${prefix}/lib/libskit.a
 | 
				
			||||||
        # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix}
 | 
					        # --with-pfft-prefix=${prefix} --with-mpifftw-prefix=${prefix}
 | 
				
			||||||
        # --with-berkeleygw-prefix=${prefix}
 | 
					        # --with-berkeleygw-prefix=${prefix}
 | 
				
			||||||
 | 
					        if "+berkeleygw" in spec:
 | 
				
			||||||
 | 
					            args.append("--with-berkeleygw-prefix=%s" % spec["berkeleygw"].prefix)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # When preprocessor expands macros (i.e. CFLAGS) defined as quoted
 | 
					        # When preprocessor expands macros (i.e. CFLAGS) defined as quoted
 | 
				
			||||||
        # strings the result may be > 132 chars and is terminated.
 | 
					        # strings the result may be > 132 chars and is terminated.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user