Magudeswarar Temple, Kodumudi

The Magudeswarar Temple in Kodumudi is a large Hindu temple dedicated to Shiva in Erode district of Kongu nadu, Tamil Nadu, India. 
This is the sixth temple in Kongu, the region praised in the Thevaram hymns. it is situated on the banks of the river Kaveri.
The sage Agastya is associated with this temple.
Location.
The temple is about 40 km from Erode and about 25 km from Karur in Erode district. The Kodumudi Railway Station is located on the Trichy-Erode Rail Line. The temple is located close to the railway station. The nearest airports are at Coimbatore and Trichy, both at a distance of about 110 km. The temple is located on the banks of the river Kaveri. The temple is counted as one of the temples built on the banks of River Kaveri. The rock in the middle of the river opposite to the temple is believed to be the place where a crow titled the cup of sage Agastya.
Architecture.
The east facing temple is 640 feet in length and 484 feet in breadth. The temple houses the shrines for Lord Shiva, Lord Vishnu and Lord Brahma, hence the name Trimurthy Kovil. This vast temple has 3 entrances on the east side. To the north of the central gate lies the entrance for the shrine of the presiding deity Lord Shiva known as Kodumudi Nathar and Makuteswarar. To the south of the central gate lies the entrance for the shrine of female deity his consort mother Parvathy known as Panmozhi Nayaki and Soundarambika. Lord Vishnu is called as Veeranarayana Perumal . Kunchitapaada Natarajar has both his feet on the ground, in contrast to the raised left foot. The Stala Vriksham is Vanni tree and the Theertham is river Kaveri.
This is a large temple complex containing of 7 main shrines. 
These are separate shrines made of stone.
Legend.
The legend of this temple is connected to the sage Agastya. Once the sage noticed that the idol was disappearing. He caught the idol in his hand and his finger prints can be seen on the deity.
Pandiya kings have patronised the temple regularly and because of the connection of Pandiya kings, this shivasthalam is called as Tiruppandikodumudi. The temple has epigraphs from the rule of King Sundarapandiyan Kesari. This Shiva temple is on the west bank of Kaveri river.
Mythology.
Legend has it that in a test of strength between Adiseshan and Vayu, 5 gems are said to have gotten scattered from the head of Adisesha. A ruby stone landed at Tiruvannamalai, an emerald at Eengoimalai, a Blue sapphire at Potikai, a manikkam at Vaatpoki and a diamond rested here in this temple.
The legend of Agasthyar travelling to the South to tilt the balance of the earth is associated with Paandikkodumudi. It is believed that the waters of his kamandalam flowed from here as the Kaveri river to alleviate the misery of the farmers downstream. The Vinayakar here is referred to as Kaviri Kanda Vinayakar.
Endowments from the Pandyan rulers such as Malayathuvuja Pandian, Maravarman Sundarapandian and Pandiya Kesarivarman are some of the kings who have donated land, jewellery etc. to this temple.
Poems on this temple.
It is one of the shrines of the 275 Paadal Petra Sthalams. Sambandar, Appar, Sundarar have composed the Pathigams. Sundarar composed his Namachivaayappatikam here Several literary works praise the glory of this temple.
Festivals.
Bhrammotsavam is celebrated in the tamil month Chittirai, in addition to Aadipperukku where lighted lamps are set afloat in the river. The sun's rays illuminate the sanctum of Shiva and Ambal for a period of 4 days in the tamil months of Panguni and Aavani. The other festivals are Aippasi Pournami, Thaippoosam & Arudra Darisanam .
References.
http://www.thevaaram.org/thirumurai_1/koil_view.php?koil_idField=207