Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ULARC

JohnNichols
Valued Contributor III
2,297 Views
DO 211 N=1,NUMSFT
        Read (sr,*, end = 1005, err = 1005)N_DUM, AA(N), XI(N), YBAR(N), E(N),SKII(N),SKJJ(N),SKIJ(N),nsfsci(n),NSFSCJ(N)
        AA(N) = AA(N) * (1.0+0.05*R1A)
        XI(N) = XI(N) * (1.0+0.05*R1B)
        E(N) = E(N) * (1.0+0.05*R1C)
        write (sw,220)N,AA(N),XI(N),E(N),YBAR(N),SKII(N),SKJJ(N),SKIJ(N),nsfsci(n),nSFSCJ(N)
        
211 CONTINUE

210 FORMAT(I5,6F10.0,2I5)
215 FORMAT(/////' STIFFNESS TYPE TABLE'//' STIFF.',3X,'SECTION',2X,'MOMENT OF',3X,' YOUNGS    Y',6X,' STIFFNESS COEFFICIENTS' ,3X,'STRENGTH TYPES'/,' TYPE' ,3X,'    AREA' ,2X,'  INERTIA' ,2X,'   MODULUS',2X,'BAR',6X,'KII',5X,'KJJ',5X,'KIJ',5X,' END I  END J'//)
220 FORMAT(I4,2X,2E11.3,E11.3,1X,F5.3,2X,3F8.3,3X,I4,2x,I6)

    !
    !     SECTION STRENGTH TYPE TABLE
    !
    READ (sr,*, end = 1006, err=1006) (N,YMP(N),YMN(N),ROTCP(N),ROTCN(N),M=1,NUMCST)
    write (sw,240) (N,YMP(N),YMN(N),ROTCP(N),ROTCN(N),N=1,NUMCST)

ULARC developed by Powell's group at UCB in the late 1960s, is a good program for quick and dirty analysis.  I am using it to look at some quick and dirty problems in a place a long way away where there is limited information.  

I was making some minor amendments to look at Structural Reliablity problems, just playing, and I noticed for the first time the difference in the input method in line2 and line 19, one is wrapped in an external do loop and one in an internal do loop.   Will they generate equivalent assemby code?  

 

0 Kudos
26 Replies
jimdempseyatthecove
Black Belt
2,087 Views

I think you meant line 17?

Also, line 17 local iterator index M, whereas the subscripts are using index N. This looks like an error in programming (unless you want to read forward NUMCST records overwriting the same variables at index N).

Jim Dempsey

 

0 Kudos
JohnNichols
Valued Contributor III
2,042 Views

No, the blasted thing works, it has been like that since 1968.  It must read N set to 1 and then set YMP(1) etc.   and then set N to 2, all done in the one line, repeated for M which is never used except as a counter. 

Fortran must separate the reads in assembler so it does N first and then YMP(N) with N fully assigned.  I have programmed in assembler once and then decided life was to short.  I wrote a program that sounded like a machine gun.  

 

The first do  is only doing more work as I added the extra stuff,  

 

Powells' group at UCB were good Fortran programmers for the time.  The guy that wrote ULARC died in his 40's, I tracked down his wife and told her how good he was.  

 

My first boss did a structural masters at UCB and bought Powell's programs on a tape.  I had control data run the tape onto floppies for the programs I used.  It gave us a huge commerical advantage in modelling large coal bins. 

0 Kudos
jimdempseyatthecove
Black Belt
2,030 Views

RE: READ (sr,*, end = 1006, err=1006) (N,YMP(N),YMN(N),ROTCP(N),ROTCN(N),M=1,NUMCST)

>>No, the blasted thing works, it has been like that since 1968. 

That very well have worked in 1968 pre-optimizing compilers, or now in Debug build, but this may be an issue with optimized code depending on the particulars of the Fortran standard regarding the volatility of indices in the read-in list. Note, this is not completely unlike redefining the loop control variable from within a DO loop. IOW, at what point in time is N evaluated?

 Perhaps Steve L. can respond to this?

 

Jim Dempsey

 

 

0 Kudos
JohnNichols
Valued Contributor III
2,026 Views

Ah...........  I only use debug mode even when I put it on a far away computer.  Release is a pain.  

I just saw it yesterday, while I was trying to turn ULARC in a Monte Carlo system.   I am having some interesting issues with MKL and the Gaussian distributions.  

I have fixed it so it is proper in a modern sense.  

It is just fun to look at the olden days.  

0 Kudos
jimdempseyatthecove
Black Belt
2,085 Views

As for efficiency, generate the assembly code (or use the debugger and examine the disassembly). Your line 1 loop is performing more work than simply reading in the arrays.

Jim Dempsey

0 Kudos
Ron_Green
Moderator
2,083 Views

I think looking at the assembly with -S is the right answer. 

The optimizer is sure to get involved with the first DO loop.  So settings around optimization, vectorization, and FP model come into play and will affect the assembly for this loop.   there are FP ops in the DO loop, but not in the IO Implied Do on line 17 so the optimizer may just pass over it and leave alone and toss it to the FRTL. 

Our FRTL guru said about the same "only way to tell really is to look at the assembly" since there are things outside of the Fortran Front End at play here.

 

0 Kudos
JohnNichols
Valued Contributor III
2,041 Views

Ron:

Programs become so complex, one person cannot know it all.  

Thanks 

I am going to change the code so both reads are inside full do loops. Makes it easier to read and remove the N. 

John

0 Kudos
JohnNichols
Valued Contributor III
1,952 Views

Jim:

I downloaded the Ularc program from the UCB site and the manual.  They are attached.  

 

These files were updated in 1986 by someone at Peking University.  It is interesting to look at the old code.  

John

 

0 Kudos
JohnNichols
Valued Contributor III
1,951 Views

I have always wondered why a natural logarithm is log   and not ln in Fortran? 

0 Kudos
cean
New Contributor II
978 Views

Have you compiled this updated version? 

 

There is two lines with 'end'. Need to delete one line.

0 Kudos
JohnNichols
Valued Contributor III
931 Views

Not that I remember, I do not need this version, I have a copy from 1981 given to me as a tape from UCB. My first boss studied at UCB and must have been taught by Powell or someone in his group.  

So since then I have used this original version of ULARC and slowly updated it.  

I was making the program into a Monte Carlo procedure and saw the different input methods.  

ULARC has a number of advantages as a structural program, you can directly import the stiffness coefficients to allow different shapes and pin ends, so in the 1980s it was useful for designing portal frames for winery buildings as they liked minimum costs and so we reduced the steel beams by making them tapered.  

ULARC does plastic analysis really well, which is important in structural reliability. 

0 Kudos
cean
New Contributor II
907 Views
I feel it is a bit like Frame3DD. Maybe Frame3DD was inspired by it.
Frame3DD has Newton-Raphson iteration. I haven't read ULARC's pdf, don't know how it deals with plastic. I just see the code finished when it reached collapse.  
I tried the EXAMP1 case under the PCDOS version. Attached is a result EXAMP1.msh file which could be viewed with gmsh.
Interesting to play with old Fortran code.
0 Kudos
JohnNichols
Valued Contributor III
876 Views

I have looked at this author's work before and he does some interesting stuff. I can see no evidence that ULARC had any impact on his work or the program.  ULARC is from Powell's group.  He would have been better working on DRAIN. 

There are very many structural analysis programs, the end result of all of Powell's work was DRAIN, but that is a huge lift to get to do what I want it to do.  

ULARC was never really published, you had to actually know about it, there was a second program AXISHELL that allowed us to design very large coal bins in the 1980s when Australia was opening a lot of coal mines.  I made a nice steady living redesigning all the lousy bins designed by hand in major consulting offices.  

My boss and I went to a FEM conference in Sydney and listened to some of the Syd Uni stuff, when we left he said, why did you not tell them about what we are doing, I looked at him and said I was not giving up the commercial advantage.  We could cut the steel mass in half. 

Ularc gives me a lambda factor straight away, the lambda with a bit of math can be turned into a beta value.   ULARC is very fast.   All you want to know is that lambda is greater than 1.66. 

If you have a look on this forum you will find a program, Bork or Balor, that comes from Sydney University that does beams and plates,  a structural package without plates is not really that useful except for steel.  

 

0 Kudos
cean
New Contributor II
653 Views
      IF(ABS(RRTOT(J,I)).LT.1.E4) GO TO 260

DISPLACEMENT>1.E4 then COLLAPSE.

What is the unit of displacement? 

0 Kudos
JohnNichols
Valued Contributor III
635 Views

I do all the work in metric,  I can do Imperial, but it is tedious.  

The limit is usually radians, but I would note that I mainly work on large civil structures where the loads are rather large, so for example a road bridge has a relatively small design load until some one starts running 190 tonne cranes over the bridge and then you have a problem that the lambda factor is getting close to 1.   Permit loads are high, and if you are doing a lifetime estimate using Monte Carlo then you need the permit loads as a small percentage. 

I have not done normal buildings and when those engineers talk about loads, I just think, the floor plate is heavier than that on some civil structures.  

Most things fail from poor design, lack of ductility in an earthquake or lousy construction, the usual saving grace is the large loads are rare and the earthquakes are rarer.  Spitak earthquake showed the problem of poor design.  

If a class wanted Imperial as there was a loud student, one gives them barley corns and stones, both valid Imperial units and by extension US customary units.   As a guide, my mass is about 12 stones and I am 210 bc high. 

You use bc every day of the year, you just do not know it, unless you sell shoes. 

 

0 Kudos
JohnNichols
Valued Contributor III
860 Views

Sorry, I had to go away and do some real work.  You are really asking an underlying question.  There has to be a reason why we want to build a new program or do some engineering research. Too much of this stuff is to spend money and not really advance the cause of knowledge.  

Classic example, Texas researchers look at the rate of corrosion of steel bars inside concrete made with limestone aggregate, nice results, of little use anywhere else.   

Research is not an economic activity, because really good research may prove the null hypothesis.  But the engineering communities turn it into an economic measurement, how many papers did you publish, can you spend this money in this time and get this result and if you do not we will not give you any more money or promote you. 

If you want to see the absolute waste from a lot of poorly directed "research" read the Guardian articles on the UK government handling of covid.  Still two people beetling away in a lab and being told repeatedly that MRnI stuff was useless saved a lot of lives.  

Margaret Thatcher asked what was the use of the advanced physics labs in Oxbridge, answer they created the best diagnostic tool after the blood pressure meter, she wanted to spend the money on another headache drug or some such thing. 

Mexican child is not given a playground, plays in the pig slop in an abattoir picks up a nasty disease, it spreads to Texas and a lot of people need a lot of expensive medical treatment, solution give the kid a playground, but we cannot, he is in a different country.  

So then we come around to the Fortran compiler, there are many people who think it is doomed in the long run,  they are wrong, but they cannot see past the money, see the paper I uploaded the other day from the Los Alamos lab guy.  There are always going to be great researchers who need FORTRAN and Intel sees this value, it is a pity that MICROSOFT did not, but the theory that Bill Gates once said, if you cannot make it good, make it look good, is still relevant and probably goes a long way to explaining the reason - deep down. 

The real question is can Intel keep up with NVIDIA and can any part of the free world afford to lose Taiwan and the answer is no. 

So real programmers use Fortran or C++  and the rest don't. 

0 Kudos
Steve_Lionel
Black Belt
1,941 Views

Both log and ln are used in math for this function. 

0 Kudos
JohnNichols
Valued Contributor III
1,933 Views

We used log tables in high school and log meant base 10 and ln meant base e.  

0 Kudos
mecej4
Black Belt
1,931 Views

The name "ln" is attributable to Irving Stringham; see Article 75 of his book, Uniplanar Algebra. Adoption of this notation across the pond was slow.

0 Kudos
JohnNichols
Valued Contributor III
1,929 Views

My Kaplan and Lewis has a nice explanation on page 41, saying that Ln is modern and log is old fashioned for natural logarithm.  Book published in 1971 although I am sure there are old KL versions.  

I have always used KL for my math since Feb 1975. 

0 Kudos
Reply