solos: Automatically determine number of ports