how to best compile swat source code files

1,137 views
Skip to first unread message

JJ

unread,
Apr 15, 2010, 3:51:50 PM4/15/10
to SWAT-user
Hi, SWAT folks.

The uniqueness of the watershed I am working on led me to make a minor
modification to the SWAT source code. The modification doesn't add
any calculations, but, when I compile it with the new Intel Visual
Fortran Compiler 11.1, it actually takes slightly longer to run on my
computer using Win32 architecture - 60 seconds instead of 56 seconds.
I can live with that, but I'm thinking the new compiler should
actually be able to shave off some time. Worse still, when I compile
with the new Fortran 11.1 compiler on a 64-bit desktop, it runs MUCH
slower on that desktop (over 2 minutes), though there should be a way,
I think, for it to run faster. Run times are important to me because
I'm doing extensive uncertainty analysis. Anyone have any ideas? I
tried to follow a handout from a SWAT workshop on compiling using
Fortran 6.6C, but the software has changed so much since then.

Any help would be much appreciated.

John Joseph

Jim Almendinger

unread,
Apr 16, 2010, 5:20:33 PM4/16/10
to JJ, SWAT-user
John --
From my limited-understanding attempts at compiling with the Intel compiler, with lots of trial and error, here are a few of my conclusions:
(1) the "release" set of compiler options results in very fast code, and hydrology seemed OK, but sediment and maybe other water-quality variables were corrupted in some of the output files (floating-point overflow errors).  The Reach output was corrupt, but I think the Hru and Sub output might be OK. 
(2) the "full debug" set of compiler options produced very big and slow code
(3) the run-time option to check array and string bounds seems to be the critical factor that makes the code big and slow.  Try turning this off.
(4) the "library" option for "debug multithreaded" seems to be the critical factor in avoiding the overflow errors I noted above. 

So if I'm just running for hydrology, I use an executable created with the "release" compiler options.  If I'm looking at sediment and nutrients, I recompile, starting with the "release" version but then add step (4) above. 

Ideally, we should talk to the guys at Intel and have them figure out the problem with the "release" version.  I presume it's a bug in their compiler, or perhaps it's from some part of the SWAT code that is now deprecated (obsolete and not supported, if I understand the term). 

Cheers,
-- Jim


From: "JJ" <john....@utsa.edu>
To: "SWAT-user" <swat...@googlegroups.com>
Sent: Thursday, April 15, 2010 2:51:50 PM
Subject: [SWAT-user:2506] how to best compile swat source code files
--
You received this message because you are subscribed to the Google Groups "SWAT-user" group.
To post to this group, send email to swat...@googlegroups.com.
To unsubscribe from this group, send email to swatuser+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swatuser?hl=en.



--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 01C5TQ0gH) is spam:
Spam:        https://canit.smm.org/canit/b.php?i=01C5TQ0gH&m=f8278dfe077e&t=20100415&c=s
Not spam:    https://canit.smm.org/canit/b.php?i=01C5TQ0gH&m=f8278dfe077e&t=20100415&c=n
Forget vote: https://canit.smm.org/canit/b.php?i=01C5TQ0gH&m=f8278dfe077e&t=20100415&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS



--
Dr. James E. Almendinger
St. Croix Watershed Research Station
Science Museum of Minnesota
16910 152nd St N
Marine on St. Croix, MN  55047
tel: 651-433-5953 ext 19

Experience a once-in-a-lifetime opportunity: see authentic 2,000-year-old manuscripts, including the earliest biblical writings. The Dead Sea Scrolls. Once forgotten. Now unforgettable. Visit www.smm.org/scrolls.

--
You received this message because you are subscribed to the Google Groups "SWAT-user" group.
To post to this group, send email to swat...@googlegroups.com.
To unsubscribe from this group, send email to swatuser+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swatuser?hl=en.
Reply all
Reply to author
Forward
0 new messages