nlopt is optional