[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fortran problem



Holger,

The warning that you mention indicates that Fortran prefers having items in a COMMON block in a special order to promote natural alignment.  As the Digital Help file says  "Although you can use the DF command /align: keyword options to ensure naturally aligned data, you should check and consider reordering data declarations of data items within common blocks and structures. Within each common block, derived type, or record structure, carefully specify the order and sizes of data declarations to ensure naturally aligned data. Start with the largest size numeric items first, followed by smaller size numeric items, and then nonnumeric (character) data. " 

However, I am not sure your problem is caused by this warning, because fixing alignment usually just improves performance.

I suggest you insert the statement "Implicit None" at the top of your component.  This will force you to declare every variable in your component as REAL, Double Precision, etc. Check to make sure things like XIN and OUT are Double Precision and match the TRNSYS standard components. Using Explicit None should clear up any variables that are not properly defined. Depending on your compiler, it is possible to turn off the warning message you received or turn ON other messages for undeclared variables, unused variables, etc.  I would also set your Exceptions in Debug so that you are informed of "Array Bounds Exceeded" errors.

Sincerely,
Nate Blair



At 11:32 AM 11/17/2000 +1100, you wrote:
Dear TRNSYS users,

one of my types produces erratic results which I suspect might correlate
somehow to the following warning:
"C:\trnsys15\Types\Type143.for(1429) : Warning: Because of COMMON, the
alignment of object is inconsistent with its type   [ENTHPWR]".
Does anybody know what the problem could be? Help is much appreciated.

Cheers,

Holger

--
----------------------------------------------------------
Holger Kreetz - Dipl Ing (TU Berlin, 1997)
Solar Thermal Group, Centre for Sustainable Energy Systems
Department of Engineering, FEIT
Australian National University
Canberra, ACT 0200

ph:    ++61-2-62493976
mobile: ++61-404-234928
fax:    ++61-2-62490506
e-mail: kreetz@faceng.anu.edu.au
web: http://engn.anu.edu.au/solar/solarth/
----------------------------------------------------------

----------------------------------------------------
Nathan Blair
Graduate Student at Erdman Center for Manufacturing and Technology Management
Home Address: 1005 Delaplaine Ct.     Madison WI  53715   USA
Home Phone: 608-256-7894
Cell Phone: 608-239-6053
Email: blair@sel.me.wisc.edu
Website: http://sel.me.wisc.edu/blair
--------------------------------------------------------