| [ANN] Salford Software Event Invitation - Numerical co mputing - Bringing Fortran to .NET with Visual Studio |
|
 |
Index ‹ fortran
|
- Previous
- 4
- Free source code diagramming programsThe latest revision of my source code diagramming programs are
available at
http://www.geocities.com/grunes/diagram.html
These programs diagram source code in the following languages:
C and C++<br>
FORTRAN<br>
HTML (very incomplete)<br>
IDL, PV-WAVE, GDL and FL
They do things like draw lines showing the start and end of routines
and blocks, put * next to jumps, and = next to commented out sections,
and can warn you of certain classes of error.
They can help you find problems in your own code, or help you look at
long complicated legacy code other people give you.
The programs themselves are in FORTRAN. I know that is a problem for
users of other programming languages, but it is freely available as g77
or g95 under Cygwin (under Windows) or Linux, and is available on many
other platforms.
- 5
- G95: Zero Known Bugs
I am pleased to announce that g95 has reached a major milestone--
Zero Known Bugs.
While I'm sure someone will soon smash this idyll, the queue has
been drained for the first time in years. I know of no bugs despite
the wonderful testers who pound relentlessly on it from every quarter.
I've been extremely pleased with how solid g95 has become in the
last couple of months and it has been the gradual tapering off of bug
reports that has allowed the once huge pile of hundreds to be trimmed
to nothing. I promised myself years ago that I would release a 1.0
version when the pile got down to fifty, but it turned out that I'm
too much of a maniac to settle for that.
In this new lull, I am going to add some long-planned candy,
upgrades and some more speed enhancements before releasing a stable
1.0 version.
Cheers,
Andy
- 5
- passing arguments to an application from the command-linehi,
i'm trying to modify an existing fortran 77 program
the way the current program runs is as follows:
1. user calls executable fortran app from the command-line
2. command-line then asks user to enter the name of a file that will
be manipulated
3. user enters file-name and fortran app opens/reads/manipulates
file contents
I'd like to feed the filename *directly* to the executable while i'm
calling the executable.
in Java, I'd call the application with a trailing array of input
parameters which can then be read via **public static void
main(String[] args)**
> java myprogram argument1, argument2
Is there a similar way of passing initial arguments to compiled
fortran code?
if so, How does one specify and read the initial parameters?
THANKS!!
e.g.
one snippet of the existing code looks like this:
15 format (1X,'Enter the name of the input file: ',$)
read(*,'(a20)') INFI
TMPNAME = INFI
I'd like to remove this code and simply call the application with a
command-line argument that specifies the file-name.
- 5
- eqv vs ==Is it correct that I cannot use:
if (a == b) write(*,*) 'can do'
if a and b are both of the logical type (in case of fortran 95)?
Should i use instead:
if (a.eqv.b) write(*,*) 'can do'
Arno
- 6
- Bounds Check OverheadDmitry A. Kazakov <email***@***.com> wrote:
> Well, maybe Ada and Fortran share some things, but not the design
> philosophy. Ada standard actually starts with a classification of error:
>
> 1. Errors that are required to be detected no later than at compile time
> 2. Errors that are required to be detected at run-time
> 3. Bounded errors which detection isn't required, but the effect is bounded
> 4. Erroneous execution, unbounded effect
>
> The design decisions made in Ada are always in favor of 1, maybe at the
> cost of some idioms. So in Ada modifying the index of a loop isn't a
> "bounded error" as it seems to be in Fortran, it is a compile-time error.
In that classification scheme, I'd put modifying the index of a loop as
a 4 in Fortran, if I understand the categories correctly. Almost
anything can happen in the Fortran case in theory.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
- 7
- C++ wrapper for a fortran77 program??Hi everyone,
I have a fortran77 program on unix (made up of 5 fortran program files
and about 5k lines). I would like to make it work on windows. Besides
completely rewriting the fortran program in c or c++, I was told that
a C++ wrapper to call the functions inside of it may work as well. I
am looking for the most practical way to do this project. And if C++
wrapper is the best option, what steps should I take? Some examples
will be appreciated. I know some of c and c++, but not an expert.
Thanks for any of your advice on this...
Hong
- 8
- [ANN] Altova DiffDog 2005 - the dedicated differencing utility for developers and power users
Altova Unveils DiffDog(tm) 2005
-------------------------------
This week, Altova added a new dedicated differencing utility to its
award-winning product line. DiffDog 2005 is a powerful, easy-to-use
synchronization tool that facilitates the comparison and merging of files,
folders, and directories for application developers and power users.
DiffDog 2005 Standard and Professional editions allow users to quickly
compare source code files, HTML files, or any text-based files then merge
changes with a click of the mouse. Both editions deliver versatile
comparison and merging options for all file directories as well. Uniquely,
DiffDog 2005 Professional Edition also provides advanced XML-aware
differencing and editing capabilities based on those popularized in Altova
XMLSpy.
DiffDog 2005 integrates with any version control system that supports
external differencing applications. For optimal efficiency, you can edit
content directly within its differencing display, merge changes, and
instantly re-compare the edited files. Intelligent syntax-coloring, line
numbering, indentation guides, folding margins, and other innovative
features are provided to assist in comparing source-code and XML files.
DiffDog 2005 also provides powerful capabilities for directory comparisons,
allowing you to compare and merge directories, and open and edit file pairs
directly from the directory comparison view. You can instantly identify the
differences in two versions of a large directory, open and edit files
side-by-side, then move what you want into your target directories. With all
this you can reconcile source code versions, synch-up files on your laptop
and desktop computers, or even modify and merge your play lists or photo
collections in a matter of seconds. DiffDog 2005 is the latest in Altova's
line of award-winning developer tools.
Let DiffDog 2005 track down the differences in your development and
integration projects.
Download a 30-day FREE trial today:
http://www.altova.com/download_diffdog.html.
For more information on Altova DiffDog 2005 please visit:
http://www.altova.com/products_diffdog.html.
- 11
- question about optimize a do loophi,
I have a question.
My friends told me that if I have an if, end if statment inside do
loop, the code will be slow down a lot since compiler can not optimize
it very well. I suppose it makes sense.
I have a large loop which takes several hours. Usually I echo sth. on
the screen every 10 percent so I have an idea where the procedure is.
what I did is somewhat like
do i=1, N
if(mod(i,int(N/10)).eq.0) write(*,*) int(i*10/N),' precent done'
etc.
end do
If I want to keep the same function and remove the judgement statement,
the first thing I think I can do is to write a double loop like,
(supposing mod(N,10)==0)
do i=1, 10
write(*,*) i*10, ' precent done'
do j=(i-1)*N/10+1, i*N/10
etc
end do
end do
Will this be better optimized? If not, any comments on this issue?
Rgds
Yuan
- 12
- Very small floating point numbers make code slow?Hi,
The code that I'm working does a lot of numerical processing. There
are several functions (modified Bessel functions) that take a real
argument and return a complex result. As the input argument gets
large the result tends to zero exponentially. I've noticed that when
the input gets large (hence the result is very small), my code begins
to run significantly slower. If I check the function result first,
and, if it is small, set the function value to zero, then the code
does not slow down. The rest of the code basically does straight
number crunching, so I am a little unsure what is going on. My first
guess is it has something to do with floating point underflows (I am
getting underflows according to the run-time warnings), but I don't
really understand why this slows everything down. To me, an addition
operation is an addition operation no matter the value (I am sure this
is probably a naive assumption). When there is an underflow
condition, does the processor start doing additional checks or
something? If so, can I turn this off? Even though the results may
be less accurate with the underflow, they are still much better than
setting the value to 0. But, the speed hit is so large, that I would
rather set the value to zero if there isn't another solution. Of
course, I might be totally on the wrong track as to the reason. I'm
working on a P4 with CVF 6.6B under Windows XP and the Intel Fortran
Compiler 7.1 under Linux. The condition occurs in both.
Thanks,
John
- 13
- NAG, Sun, Compaq possible f95 bugThe following program causes NAG f95 version 4.2 to stop in a panic
instead of compiling it. NAG say they will fix that bug. Note that my
own program certainly has one bug and it may have two.
1. The certain bug, which Sun and Compaq f95 don't detect, but I don't
think the standard forces them to, is the extra ) in the format in the
PRINT statement.
2. The possible bug is using the variable i as both a DO-variable and
an ac-do-variable inside the range of the DO loop. I don't know whether
that is standard-conforming or not. In the f95 standard section
8.1.4.4.2 we are told that a DO variable shall not be redefined while
the DO construct is active, but in Adams et al Fortran 95 Handbook
section 4.6 rule 4 we are told that an ac-do-variable has the scope of
the ac-implied-do. Does that mean it isn't the same i that was the
do-variable of the outer DO loop? However, that comment is in neither my
possibly obsolete J3/97-007R2 copy of the f95 standard section 4.5 nor
the Sep 2002 draft f2003 standard section 4.8.
On Sun and Compaq f95 the program compiles and runs; the last two output
columns are identical, and floating-point 3*0.1 seemns to be > 0.3.
If inside function test one declares an integer j and uses it as the
ac-do-variable the result with all three compilers is unchanged: panic
stop with NAG, compile and run with no errors found by Sun, Compaq.
IMPLICIT NONE
!add the first 8 nonzero terms of the Maclaurin series of s/(1-s**2)
!and compare with the "exact" result.
INTEGER,PARAMETER::DP = KIND(1.0d0)
INTEGER i
REAL(DP) s
DO i=0,3
s = i*0.1_DP
PRINT "(A,F10.7,A,2F11.6))", 'test(',s,')=',test(s),s/(1-s**2)
END DO
CONTAINS
REAL(DP) FUNCTION test(s)
REAL(DP),INTENT(IN)::s
REAL(DP),PARAMETER ::coefs(8)=1
IF(abs(s)>0.3_DP) STOP 'Use another method for moderate/large s!'
test = sum(coefs*s**(/(2*i-1,i=1,size(coefs))/))
END FUNCTION test
END
John Harper, School of Mathematical and Computing Sciences,
Victoria University, PO Box 600, Wellington, New Zealand
e-mail email***@***.com phone (+64)(4)463 5341 fax (+64)(4)463 5045
- 13
- Virginia Tech survey on software metrics - $200 raffleResearchers at Virginia Tech are interested in studying the adoption
of software measures/metrics. We have developed an on-line survey that
asks questions about the software measures that people are familiar
with and/or are currently using.
The survey can be found at
http://sheetzlab.cob.vt.edu/onlinesurvey/sms/p/smssurvey.asp
If you complete the survey you will be entered into a raffle for a
prize of $200. The name of the winning participant will be drawn at
random on midnight on October 24th and contacted via e-mail. The
survey should take you less than 30 minutes to complete. Thank you
for your participation.
Linda Wallace
Department of Accounting and Information Systems
Virginia Tech
email***@***.com
- 13
- How to link libraries statically on LinuxOne workaround could be to use the full name of the .a library, instead
of the -l form.
So:
g77 -o program program.o libanylib.a
instead of
g77 -o program program.o -lanylib
Regards,
Arjen
- 13
- variable names for different fortransLane Straatman <email***@***.com> wrote:
> I recently had a complete snafu with F77 and fixed form. What are some
> common things to remember along with
> 1) Don't put anything in the first seven columns if you can avoid it.
In many ways, column 73 is worse. You will usually (not always, but
usually) get some kind of error message for putting junk in cols 1-6.
The message can be pretty cryptic, its true.
But going past column 72 in fixed source form fairly often causes the
code to be wrong with no diagnostic. Sometimes it is even perfectly
legal code, but doesn't do what you intended. I'll note that the use of
"implicit none" improves the odds of getting an error message from this
kind of error.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
- 14
- Writing own encryption program in Fortran?Hey guys,
I'm a little curious about writing my own program that can encrypt my
files. Just a "see if I can do it" exercise.
AIUI, encryption in a nutshell is a 1-to-1 mapping between two spaces
with no information loss, although superfluous data might be added to
further frustrate brute force de-scrambling. I don't know much about
encryption techniques but here's how I think I will try to do it. Sorry
guys if it seems very elementary. Please let me know if you have any
suggestions/pointers/RTFMs etc :-)
Basically how I plan to do it is use a good PRNG like the Mersenne
Twister to generate a series of random numbers based on the seed, which
will be the decryption key. These random numbers define a sequence of
reversible operations that will be done to encrypt the data, such as
breaking it into chunks, adding superfluous data, randomly flipping
bits, transposing some chunks, etc.
Knowing the seed will allow you to deterministically re-generate the
random sequence, and thus be able to recover your data.
How robust is this encryption technique? Have I basically described how
encryption programs work? Can you recommend any Linux programs that can
convert any file format into a binary string for the above operations
to be performed on?
One problem with the above technique is that I'm not sure if the
conversion to a binary string is reversible, and whether data
corruption would cause complete loss of the file to be encrypted.
- 16
- Arrays IntersectionHi All,
I have received so many nice answers in this newsgroup that I
thought I could ask one more question. I am trying to find the
intersection of 2 one-dimensional integer arrays, where "intersection"
means the common elements in both arrays, i.e.:
a = [1,2,3,4,5,6]
b = [5, 6, 7]
intersection(a, b) ==> [5, 6]
At the moment I am working with Python, which handles very well sets,
lists and structures for which it's easy to define an "intersection",
but as I have many many arrays to compare, this is becoming a bit slow
so I thought to use fortran. Unfortunately, my google-fu failed me as
I couldn't find anything related to "array intersection" in Fortran.
Does anyone know what I should do in order to achieve a fast solution
to this problem?
Thank you very much for your suggestions.
Andrea.
|
| Author |
Message |
Andrew Smith

|
Posted: 2004-1-27 0:18:36 |
Top |
fortran, [ANN] Salford Software Event Invitation - Numerical co mputing - Bringing Fortran to .NET with Visual Studio
Dear Fortran user,
You are invited to attend the following event
Numerical computing - Bringing Fortran to .NET with Visual Studio, Microsoft
Campus, Reading, UK, February 17th, 2004.
Are you getting the most out of your investment in Fortran?
The purpose of this free Salford Software and Microsoft seminar is to help
you understand and make use of recent advances in FTN95 to lower your costs
and still get superior results.
If your business is in some way reliant on a Fortran based application and
you have concerns about protecting that asset, then this event is for you.
Attendance is free and you are welcome to bring along colleagues, guests and
business partners.
To book simply call 0870 166 6671 or visit
http://www.microsoft.com/uk/events
and quote event code 118742058. See you on February 17th!
Regards,
--
Andrew Smith
Salford Software Ltd.
email: email***@***.com
web: http://www.salfordsoftware.co.uk
Tel: +44 (0) 161 906 1002
Fax: +44 (0) 161 906 1003
----------------------------------------
Important Information
This email is confidential and may contain privileged material. If you are
not the intended recipient then you must not copy it, forward it, use it for
any purpose, or disclose it to another person. Instead please return it to
the sender immediately. Please then delete your copy from your system.
Please also note that the author of this email cannot conclude any contract
on behalf of Salford Software Ltd by email.
|
| |
|
| |
 |
| |
 |
Index ‹ fortran |
- Next
- 1
- Bug, out of standard or human error?Sorry for my very poor english.
I tryed to compile tis simple code:
=====================================
PROGRAM Crivello_di_Eratostene
IMPLICIT NONE
INTEGER,PARAMETER :: last_number = 900000
INTEGER,ALLOCATABLE :: numbers(:)
INTEGER :: i, number_of_primes, ac
allocate(numbers(last_number))
! Start
numbers = (/0,(ac,ac=2,last_number)/)
DO i=2,last_number
IF (numbers(i) /= 0) THEN ! if questo numero e' primo...
numbers(2*i : last_number : i) = 0 ! ...se ne eliminano i multipli
END IF
END DO
number_of_primes = COUNT(numbers/=0)
numbers(1:number_of_primes) = PACK(numbers, numbers /= 0)
PRINT "(A,I9,A)", "Numeri primi fra 1 e ",last_number,": "
PRINT "(5I7)", numbers(1:number_of_primes)
deallocate(numbers)
END PROGRAM Crivello_di_Eratostene
=====================================
My test on Fedora GNU/Linux (kernel vanilla 2.4.21)
Intel Fortran Compiler 7.1:
---------------------------
The compilation fase, require a big time! And make a very big binary.
Why?
#ls -l v71
-rwxr-xr-x 1 root root 3991124 6 feb 16:18 v71
3.9 Mb is very big :), but the program run very fine.
Intel Fortran Compiler 8.0
---------------------------
# ifort primi.f90 -o v80
# ls -l v80
-rwxr-xr-x 1 root root 421618 6 feb 16:35 v80
# ./v80
Segmentation fault
Why?
Debug
-----
# ifort -g primi.f90 -o v80
# idb v80
Linux Application Debugger for 32-bit applications, Version 7.3.1, Build 20031003
------------------
object file name: v80
Reading symbolic information ...done
(idb) run
Thread received signal SEGV
stopped at [subroutine crivellodieratostene():1 0x8049d50]
1 PROGRAM Crivello_di_Eratostene
(idb)
Thanks to All
- 2
- Worst extension ever?Brooks Moses <email***@***.com> wrote:
>Jim Klein wrote:
>> There are no bad extensions. There are just the ones I use and the
>> ones I don't use.
>
>What about the ones you use by accident?
>
>- Brooks
I don't have accidents in my code, just FEATURES.
James E. Klein
email***@***.com
Engineering Calculations
http://www.ecalculations.com
email***@***.com
Engineering Calculations is the home of
the KDP-2 Optical Design Program
for Windows and (soon) MAC OSX
Free KDP-2 (Intro Version) downloadable!
1-818-507-5706 (Voice and Fax)
- 3
- 4
- Enum not found in PNNL FLIB libraryHi Hani,
The error message you get is more like an internal error of g95, not
due to your source. However, I seem to have no problems compiling and
using flib with g95. I'm guessing that either the compilation of flib
was with some other version of g95 or that one of the mod files got
corrupted one way or another.
I would suggest that the first thing to try is to remove the old .mod
and .o files and simply
g95 flib.f90 samplefile.f90
and see if you get an a.out. I would expect this to work, if not,
upgrade g95 to the current version. If you have the simple compile
working, you can try again your procedure of putting the flib stuff in
/usr/local (but don't forget that the format of the .mod files might
change if you change compiler (version)).
Joost
- 5
- MODULE vs INCLUDE (CVF Directives)Below is the content of an include file I'm thinking of using for code
tailoring to produce library versions compatible with different
compilers. It would be nicer (for my CM sensibilities) if I could put
this in a module (only thing in it is compiler directives), but CVF
won't allow that since the directives are not within the scope of a
procedure within the module (would be at the point of USE though). Are
comments are not even included in the module, directive or not? I would
assume the directive must be stored. Is that as it should be
(theoretical question, ignoring whether I've gotten it right for LF95
yet)?
!
! Compiler tailoring
!
!DEC$ IF (compiler .EQ. 1) !Lahey LF95
!DEC$ IF (api .EQ. 1) !API #1
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconstrace_' :: ezConsTrace
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_eztrce_' :: EZTRCE
!DEC$ ELSEIF (api .eq. 2)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsinit_' :: ezConsInit
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezinit_' :: EZINIT
!DEC$ ELSEIF (api .eq. 3)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsopen_' :: ezConsOpen
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezopen_' :: EZOPEN
!DEC$ ELSEIF (api .eq. 4)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsclose_' :: ezConsclose
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezclos_' :: EZCLOS
!DEC$ ELSEIF (api .eq. 5)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconssettitle_' :: ezConsSetTitle
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezsttl_' :: EZSTTL
!DEC$ ELSEIF (api .eq. 6)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsgettitle_' :: ezConsGetTitle
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezgttl_' :: EZGTTL
!DEC$ ELSEIF (api .eq. 7)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconscreatebuffer_' :: ezConsCreateBuffer
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcbuf_' :: EZCBUF
!DEC$ ELSEIF (api .eq. 8)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsgetstdhandle_' :: ezConsGetStdHandle
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezgsh_' :: EZGSH
!DEC$ ELSEIF (api .eq. 9)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconswritetext_' :: ezConsWriteText
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezwtxt_' :: EZWTXT
!DEC$ ELSEIF (api .eq. 10)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconssetcurspos_' :: ezConsSetCursPos
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezscp_' :: EZSCP
!DEC$ ELSEIF (api .eq. 11)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconssetsecatt_' :: ezConsSetSecAtt
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezssa_' :: EZSSA
!DEC$ ELSEIF (api .eq. 12)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconssettextatt_' :: ezConsSetTextAtt
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezsta_' :: EZSTA
!DEC$ ELSEIF (api .eq. 13)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsctrlevent_' :: ezConsCtrlEvent
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcev_' :: EZCEV
!DEC$ ELSEIF (api .eq. 14)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsgeterrortext_' :: ezConsGetErrorText
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezetxt_' :: EZETXT
!DEC$ ELSEIF (api .eq. 15)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsgetoserrortext_' :: ezConsGetOSErrorText
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezgoet_' :: EZGOET
!DEC$ ELSEIF (api .eq. 16)
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezconsmsgbox_' :: ezConsMsgBox
!DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezmbox_' :: EZMBOX
!DEC$ ELSEIF (api .eq. 17)
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcons_' :: ezCons
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ez_' :: EZ
!DEC$ ELSEIF (api .eq. 18)
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcons_' :: ezCons
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ez_' :: EZ
!DEC$ ELSEIF (api .eq. 19)
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcons_' :: ezCons
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ez_' :: EZ
!DEC$ ELSEIF (api .eq. 20)
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ezcons_' :: ezCons
! DEC$ ATTRIBUTES DLLEXPORT, REFERENCE, NOMIXED_STR_LEN_ARG,
ALIAS:'_ez_' :: EZ
!DEC$ ENDIF
!DEC$ ELSEIF (compiler .eq. 2)
...
!DEC$ ENDIF
--
Gary Scott
mailto:email***@***.com
Fortran Library
http://www.fortranlib.com
Support the GNU Fortran G95 Project: http://g95.sourceforge.net
- 6
- Large ArraysHi,
I have a program that I need to compile with large arrays under
debian linux using intel fortran compiler. After certain size I start
getting segmentation faults in the compilation process. I can
reproduce the problem with the following code:
program qh
integer, parameter :: n=35000000
real*8 qhz(n)
real*8 qha(n)
real*8 qhb(n)
real*8 qhc(n)
real*8 qhd(n)
integer i
do i=1,n
qhz(i)=i
qha(i)=i
qhb(i)=i
qhc(i)=i
qhd(i)=i
enddo
end
I think this is more an operating system problem and I was wondering
if you guys could give me pointers as to how to approach the problem.
Is there anything I could do to make the program compile under linux
with whatever array size I need. Thanks for your help!
Pedro
- 7
- Finding bit_size of user type.I'm using direct-access scratch files for temporary storage, which
works well, except I would like to make their record lengths as small
as possible to reduce the amount of information they have to store.
Now I'm writing a user defined type and I would like to find a
portable way to figure out how much memory that type will use in a
record field. I've noticed the bit_size intrinsic, but it only works
for integers and I do not understand how to provide similar
information for my real components. Also, couldn't there be "extra"
information for the type added by the compiler or runtime that may not
appear with such a bit_size function, but could be written to a
record?
Thank you in advance.
--Ed Wells
- 8
- ONES COMPLEMENTrobin wrote:
> glen herrmannsfeldt wrote in message ...
(snip)
>>Well, you want unsigned arithmetic to do multiple precision,
>>which is harder if a machine only supplies ones complement.
> In what way?
> The arithmetic is done using fewer bits than word.
> You have to do that with twos complement also.
The bits resulting in an unsigned addition or subtraction operation are
the same as for a twos complement operation, but the detection of
overflow (or carry/borrow) is different. If you can properly detect
carry/borrow you can do it with all the bits in the word.
> The arithmetic required is addition; and all values
> manipulated are positive. Results are the same in
> machines supporting ones or twos complement
> representation for negative values.
Hmm. If you can detect the end around carry you can generate
the correct unsigned result, and so still use all the bits.
This is not usually easy in an high-level language, but should
be provided to the assembly programmer.
-- glen
- 9
- locating numerical differences in g77 to gFortran conversionI'm trying to compiles a legacy building performance simulation tool
with gFortran. The code comprises several hundred thousand lines of
mostly fortran 77 code, with some ancient fortran, c and c++ thrown in.
Everything compiles with gcc3 / g77, and after a few trivial changes,
I've managed to build the project with gcc 4 / gFortran.
However, I've found differences in the numerical output --- some of the
floating point results differ by as much as 4%. I'm looking advice on
how best to locate the source of these differences.
The code previously made use of the g77 '-finit-local-zero' flag, which
is presently unavailable in gFortran. Compiling with the '-O1
-Wuninitialized' options produces hundreds of potential refereces of
uninitialized variables, but the Forcheck static analyser protests over
only a handful of these. I've modified the code to initialize the
variables flagged by Forcheck, but to no effect.
The Forcheck output also warns about many other 'unclean' fortran
statements, such as bare floating point comparisons.
Do you suggest starting with the Forcheck warning messages, or should I
turn my attention to the other potentially uninitialized variables
suggested by gFortran?
Thanks for reading!
- 10
- Ariane>>Having the computer shut down, after putting it's error code
>>on the data bus (and not on a command or error reporting bus,
>>for example).
> That alone meant that it was essential that ABSOLUTELY ALL
> exceptions be trapped.
Not at all. It means that it was an incompetent design decision
to handle unexpected errors in "mission mode" in the same way as
in "development mode". That includes the assumption (which was
made explicitly even for the Ariane 4 implementation, AFAIR) that
any possible unexpected fault could only be due to a hardware
error and that any common-mode faults (including those caused by
errors in the software) were not to be considered. Not doing
defensive programming when it's easy is just shoddy practive.
Jan
- 11
- Nice to have feature in upcoming Fortran compilers...Interoperability with C is now a part of ISO standard. It would be nice
to have an automatic Fortran interface generator. A utility that parse
C file headers and then generates corresponding ISO-conform binding
module(s). In one scenario such a utility would be an integrated part
of a commercial Fortran compiler.
In the best scenario, it would be an open-source community-based effort
(like SWIG)
Nobat
- 12
- Floating Point: Binary Shift SubroutineHi folks. I am in the process of rewriting subroutines with no source
code (OpenVMS Fortran.) All's going well, but ran into this routine.
Here is what the documentation says the routine will do:
******
subroutine BAM43D (IN32D,SCALE,OUT32)
in: IN32D - integer array of size 2 which contains the floating point
value to be converted.
in: SCALE - integer variable which contains the binary shift count (0
to 32)
out: OUT32 - integer variable which contains the converted BAM value
example:
IN32D(1)=10213200000 (octal)
IN32D(2)=0
ISCALE=32
call BAM43D(IN32D(1),ISCALE,OUT32)
After the call to BAM43D, the value will be OUT32 = 4000000000 (octal)
******
I wrote a test program to call the old (no source) routine and it
returns the value as described in the example. I was thinking that the
ISHFT routine should give us the same thing, but I'm getting a 0 in
OUT32. Any suggestions as to what needs to be done?
Thanks. Grant.
- 13
- Is FORTRAN a dying language? (not a troll)>>Thanks for clarfying to the world that the THERAC-25 software was open source.
> True to form, you're confused. The THERAC-25 (PDP 10/11 assembler) is
> better than open source, it's on the public record in NA, screw Euroville.
> Get your librarian to provide you with the facts, duh!., then we can talk.
We were talking about development methodology, remember? Are you telling me
that the THERAC-25 software was published _before_ the litigation based on
its features occurred?
And mentioning PDP-10 and PDP-11 assembler as if they were the same shows
ignorance of galactic dimensions.
Jan
- 14
- Append to screen IOI would like to write a table on screen using do-loops :
do k=1,n3
do i=1,n1
write(*,*)Interfaces(i,0,k)
enddo
enddo
but the write statement restart a new line each time, and, when I am
in a i loop I would like to append each new value to the current line.
For sure it is a very basic problem, however it is a very annoying one
for me right now.
Thanks,
J.D.
- 15
- iso_varying_string in f2003?Richard E Maine wrote:
>
> Let me repeat a very general statement. If you think that you see a way
> for f95 or f2003 to leak memory with allocatables, then either you
> misunderstand the standard or there is a bug in the standard which needs
> fixing. This is a fundamental part of the design principles of
> allocatable. I might add that it is tricky enough that things relating
> to it were among the things that kept the allocatable TR from making it
> into f95 (namely, making sure that the principle still held with all the
> new places where allocatables could be used).
>
OK, that's what I was thinking. This is one of the reasons that I think
Fortran allocatables (F95 and beyond) are such a great thing...
cheers,
Rich
|
|
|