Coder Social home page Coder Social logo

libnegf's Introduction

libNEGF

libNEGF is a general library for Non Equilibrium Green's Functions.

With libNEGF you can calculate Equilibrium and Non Equilibrium Green's Function in open systems and related quantities, within an efficient sparse iterative scheme.

libNEGF is available under LGPL license.

For an example of application, see the use of libNEGF in dftb+

*A. Pecchia, L. Salvucci, G. Penazzi and A. Di Carlo, New Journal of Physics 10, 065022 (2008)

libnegf's People

Contributors

aradi avatar awvwgk avatar baradi09 avatar bhourahine avatar gpenazzi avatar pecchia avatar sebastianachilles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libnegf's Issues

segfault when calling destroy_negf if contacts are not initialized

This minimal test causes a segfault:

program hello
  use libnegf
  use lib_param
  implicit none
  Type(Tnegf), pointer :: pnegf

  call init_negf(pnegf)
  call destroy_negf(pnegf)

end program hello

The segfault happens during destroy_matrices called in destroy_negf, because negf%cont has not been allocated. Fix: add an allocation check or allocate a default 0 size array during init.

Linking error with MPI on OSX

Compiling libnegf (release v1.0.2) on OSX with MPI support fails when linking the dylib with

Undefined symbols for architecture x86_64:
  "_mpi_cart_create_", referenced from:
      ___mpi_globals_MOD_negf_cart_init in mpi_globals.f90.o
  "_mpi_cart_sub_", referenced from:
      ___mpi_globals_MOD_negf_cart_init in mpi_globals.f90.o
ld: symbol(s) not found for architecture x86_64

See conda-forge/libnegf-feedstock#4

Conda package

I would like to package libnegf for conda-forge and make it useable with the DFTB+ package there. Let me know if there is interest or if you want to join as feedstock maintainers on this.

One thing that would be incredibly helpful for this purpose would be an official release of libnegf. Would you consider creating a versioned release of libnegf and export this version via CMake/pkg-config? I could help setting up the CMake to do the latter if it is not already in place.

Let me know if you are interested in distributing libnegf on conda-forge.

Binary files in repository

Hi,

not sure, whether on purpose or not, but you have two (non-pdf) binary files in the repository:

  • ext_sparskit/INOUT/test

  • ext_metis/metis-4.0/Graphs/mtest

You may consider to remove them. I think, at least the first one is really superfluous, as the source file for the test program is available. I am not sure about the second one...

Remove Metis from repo ?

Connected to Balint's issue, I think we should remove Metis-4.0, as it is not even used. In case we will decide we need it we can set an automatic download.

CMake config fails without explicit BUILD_SHARED_LIBS setting

Note, the current official release does not build with CMake as a standalone, if one does not set BUILD_SHARED_LIBS explicitely. Nothing tragic, but could be maybe fixed when sometimes later a new release is issued...

cmake ..

yields

...
CMake Error at ext_system/CMakeLists.txt:10 (set_target_properties):
  set_target_properties called with incorrect number of arguments.

Using

cmake -DBUILD_SHARED_LIBS=False

works, though.

Support for MPI in cmake, testing and C api

Fails to compile with Intel compilers (version 2021.1)

I encountered this problem while building DFTB+ with libnegf and the Intel oneAPI classic compilers (ifort, icc).

Tested version of libnegf: 83d7588

Intel Fortran version:

> ifort -V
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.1 Build 20201112_000000
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

CMake version:

> cmake --version
cmake version 3.19.4

CMake suite maintained and supported by Kitware (kitware.com/cmake)

Ninja version:

> ninja --version
1.10.2

Build configuration is done with

> export FC=ifort CC=icc FFLAGS="-g -warn all -stand f08 -check -diag-error-limit 1 -traceback"
> cmake -B _build_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug

Build output:

> ninja -C _build_debug
ninja: Entering directory `_build_debug'
...
[134/143] Building Fortran object src/CMakeFiles/negf.dir/complexbands.f90.o
FAILED: src/CMakeFiles/negf.dir/complexbands.f90.o src/include/complexbands.mod 
/opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort  -Isrc -Iext_system/include -Isrc/include -g -warn all -stand f08 -check -diag-error-limit 1 -traceback -g -module src/include -c src/CMakeFiles/negf.dir/complexbands.f90-pp.f90 -o src/CMakeFiles/negf.dir/complexbands.f90.o
src/complexbands.f90(278): warning #8889: Explicit declaration of the EXTERNAL attribute is required.   [ZGGEV]
    call zggev(JOBVL,JOBVR,Sdim, TA, Sdim, TB, Sdim, Ad, Bd, &
---------^
src/complexbands.f90(286): warning #8889: Explicit declaration of the EXTERNAL attribute is required.   [ZGGEV]
    call zggev(JOBVL,JOBVR,Sdim, TA, Sdim, TB, Sdim, Ad, Bd, &
---------^
src/complexbands.f90(439): warning #8889: Explicit declaration of the EXTERNAL attribute is required.   [ZHEGV]
    call ZHEGV(1,JOBV,'L',PLdim,HH,PLdim,SS,PLdim,&
---------^
src/complexbands.f90(209): remark #7712: This variable has not been used.   [E]
  subroutine complex_k(E,PLdim,Z11,Z12,kz,Z21,Cl,Cr,vf)
-----------------------^
src/complexbands.f90(389): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for src/CMakeFiles/negf.dir/complexbands.f90-pp.f90 (code 1)

Seems to be an issue with the Intel compiler, which is not necessarily a problem in libnegf, therefore I just opening this issue here to document the compiler failure.

Bulid fails if "python" is not available

When built as standalone, the fypp delivered with the project uses /usr/bin/env python, which fails on Ubuntu derivates, where the standard Python3 interpreter is called python3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.