Please read the documentation for ZGETRI which can be found in the LAPACK Users' Guide, or as the leading comment to the source code.
Firstly, ZGETRI has to be preceded by a call to ZGETRF in order to perform an LU factorization of the matrix A. Secondly, when you call ZGETRI with LWORK = -1, that is a workspace query - the routine simply computes the optimal size of the array WORK, which is returned in WORK(1).
Sven Hammarling.

