It sounds like you have more of a problem than the odor, the water is the problem. Contact home owners, get the water problem fixed and get new carpet. Just like when a sponge gets a musty smell that won't go away, carpet will as well if it gets wet.