Partition functions and elliptic genera from supergravity