From daizadeh@indigo.ucdavis.edu  Thu Jul 31 03:14:36 1997
Received: from indigo.ucdavis.edu  for daizadeh@indigo.ucdavis.edu
	by www.ccl.net (8.8.3/950822.1) id DAA01363; Thu, 31 Jul 1997 03:14:25 -0400 (EDT)
Received: by indigo.ucdavis.edu (940816.SGI.8.6.9/940406.SGI.AUTO)
	 id AAA07593; Thu, 31 Jul 1997 00:23:45 -0700
From: "Iraj Daizadeh" <daizadeh@indigo.ucdavis.edu>
Message-Id: <9707310023.ZM7591@indigo.ucdavis.edu>
Date: Thu, 31 Jul 1997 00:23:30 -0700
X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail)
To: daizadeh@indigo.ucdavis.edu, roberts@indigo.ucdavis.edu,
        bashore@indigo.ucdavis.edu, chemistry@www.ccl.net,
        fink@indigo.ucdavis.edu, goodyear@indigo.ucdavis.edu,
        heifets@indigo.ucdavis.edu, stuchebr@indigo.ucdavis.edu
Subject: Multi-Language Programming on SGI
Cc: schlyer@indigo.ucdavis.edu, tucker@indigo.ucdavis.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii


Hello.

The conversation on the CCL concerning OO led very nicely into a discussion of
mixing programming languages (for an incomplete summary, please see below).
 This methodology should merit considerable thought by the computational
chemistry society since it combines aspects in computational efficiency and
modern coding practices (viz., raw speed, dynamic memory allocation, and object
oriented design) with that of using old routines that are still very
functional. How to implement these ideas in a pragmatic manner, however, has
not been well-documented within these discussions bombarding our email
terminals.

We have been using multi-language programming ever since I began my
computational career here at UC Davis under the watchful eye of Prof.
Stuchebrukhov (circa. 3 academic years ago).  Thus, I thought it might be
useful to describe in detail a (probably) complicated procedure (for the
novice) which would allow the generation of an executable from a C code calling
a Fortran routine.  Generalization of the ideas presented (briefly) below
should suffice to enable any programmer using an SGI running IRIX 5.2 or above
(up to 6.2) (at least what we have used) to be able to create an executable
from C/Fortran (Fortran/C, Fortran/Pascal, etc.. (<-in a similar manner->) )
code.

 An outline of this procedure follows:

	(The methodology was suggested to us when we first started in this
direction ( see Fortran/C Interface in the Fortran 77 Programmer's Guide on the
insight pages by SGI (5.2) )...

1.  Here is an example C code:


#include <stdio.h>

extern double add_(double *,double *);

void main()
{
        double x,y;

        x=y=10.0;

        printf("%f  %f  %f\n", x, y, add_(&x,&y));

} /* end main */


This very easy program takes two doubles x,y and adds their assigned values.
 There exist a couple of items within the C code that are of particular
interest to us.  First, we have used an external function called add.  Add is
the fortran function (returns a value).  The fortran call must by followed by
an UNDERSCORE. Next notice that we have parameterized this function with
pointers and sent the  addresses of our variables to the fortran routine (This
is essential since fortran uses implicitly pointers (no more on this)).  That
is all there is to it.

2.  Next follows the fortran function:

      function add(x,y)
      double precision add,x,y
      add = x+y
      return
      end

Notice there is no underscore after the add function.  This is an intact code
without any changes (YEA!).

3.  Compile as follows:
	cc -c main.c   # main.c is the file that contains the c code
	f77 -c add.f   # add.f is the file that contains the fortran code
	cc -o add main.o add.o   # now link them with the compiler that
contains main

You are done!!!

A couple of notes:
	a.  Remember: c is case-sensitive, fortran is not.
	       What c does is convert the fortran statement to lowercase:
		  [function statement(arg-list) or subroutine name(arg-list)]
			Thus, the following are equivalent to the c call above:
				function ADD()		subroutine ADD()
				function Add()          subroutine Add()
				function add()   or     subroutine add
				function AdD()		subroutine AdD()
					      ...etc...

	b. Watch your datatype!
	c. For a fortran routine calling a C function a similar procedure
works.
		But keep in mind whichever code contains
			main
		should be the compiler that links all the object codes;

		e.g. if fortran code contained main
			use:	cc -c add.c
				f77 -c main.f
				f77 -o add add.o main.o
	d. There are some minor details for sending arrays and structures but
trial and error will allow you to figure this out on your own.
	e. remember it may be necessary to use the -lftn extension when there
exist some unresolved errors.


I would appreciate it if there were others in the field with this type of
programming experience would kindly send me their explicit methodologies for
muli-language implementations on other platforms.  We are in the process of
re-evaluating our computational hardware and are considering acquiring a Dec
\alpha or HP.  I will summarize all of them as is customary.

Any comments, concerns or questions, please do not hesitate to email.  If I am
too busy, I will say so.

Iraj.

--

Iraj Daizadeh
Department of Chemistry
University of California
One Shields Ave.
Davis, CA  95616-5295
Phone:  916.754.8695
Fax:    916.752.8995
email:  daizadeh@indigo.ucdavis.edu




------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Alex Turner <A.J.Turner@bath.ac.uk) writes:

There seems to be one points that no-one has covered, especially when we
say FORTRAN has run its coarse.  If I am to spend a long time writing a
piece of code to perform a very complex task - I need to be 100% sure
that the code will be in a lagnuage that can be used in the future.  There
is only one language that can really offer that - FORTRAN.

---

Considering the amount of C code written in the last, oh, 5 years
(both commercial and non-commercial), I think C will be with us
for the forseeable future as well.  I suspect in the computational
chemistry arena, there has been (far?) more C code written over this
time than Fortran...

This doesn't mean that there are more lines of C out there in use
than Fortran, merely that times actually have changed a little, or
maybe more than a little.  Having written a fair amount of code in
both languages, I would hate to write anything BUT numerically-
intensive code in Fortran anymore.  Trying to do I/O, or interact
with the environment, etc. seems so much easier in C...

Also, while I cannot say for certain, there seems to be some platforms
for which a Fortran compiler is either unavailable or a relative newcommer.
C, however, seems available wherever one cares to look (although my
experience with supercomputers is not up to date).  While Fortran, on
the strength of some pre-preprocessors, might still hold a lead in
generating "fast" code, sections of "C-tran" seem to optimize as well
if some thought is given to "helping" the compiler.

Something called "Fortran" will be around for a while.  So will something
called "C"...  Neither language is probably the best-choice when
developer effort is the concern, but both seem rather good for heavy
lifting.  It's just that given the annoyances of multi-language software,
there has to be SIGNIFICANT performance issues to get me to mix in
Fortran anymore.

Joe Leonard
jle@world.std.com

P.S. FWIW, I live in the workstation environment, usually working on
code which is either heavy-lifting or personal/throwaway...


---
Administrivia: This message is automatically appended by the mail exploder:
CHEMISTRY@www.ccl.net: Everybody | CHEMISTRY-REQUEST@www.ccl.net: Coordinator
MAILSERV@www.ccl.net: HELP CHEMISTRY or HELP SEARCH | Gopher: www.ccl.net 73
Anon. ftp: www.ccl.net   | CHEMISTRY-SEARCH@www.ccl.net -- archive search
             Web: http://www.ccl.net/chemistry.html


----------------------------------------------------------------------------------------------------------------------------------------------------------------
It idea of mixed language programming is to use languages most
appropriate for the task at hand, not just for speed, but for ease of
implementation.  Such decisions are usually fairly coarse-grained.
For example, you might prefer to use C code to implement operations on
a fairly complex data structure, while a computationally-intensive
section might better be written in Fortran.

If the code is well encapsulated, there should be little problem
(conceptually) and no performance degredation from hooking up code
written in multiple languages.  Of course that's different from making
a poor choice of programming language to implement a given component.

It is true that interlanguage programming is not standardized (yet),
but as a practical matter, on a given platform you can expect that
most languages (from the same vendor at least) will follow a similar
underlying structure and _will_ be able to interface.  It is also true
that relatively little documentation of these interfaces is
available, but in most cases it is really fairly straightforward.

Some things, like mixed Fortran77 and C, are now so common that there
is a community of people out there who understand pretty well how to
do this and even some packages/templates to help you do it in a
platform-independent way.  If you seek out such people, you can
probably find them without too much trouble.

I can't recall a case where I had to know more about the
"processor-dependent nitty-gritty of numerical computation" to do
mixed-language programming than I needed to do a good job of
scientific programming in one language -- the interfaces are rarely so
fine-grained as that.

> Ultimately, most folks are more concerned with optimizing their time
> use than the computer's :-) .

In my opinion, this is the reason _to_ use mixed language
programming.  If I wanted to write a robust input parser for a large
chemistry software package, I'm sure I could write it in Fortran, but
it would take a lot of work.  These days, there are tools to do this
quite easily in C (lex, yacc, etc.).  For many people, the time
required to write the parser in C _and_ the time to sort out the
interface to Fortran would be shorter than writing it in scratch from
Fortran.  And the C-Fortran interfacing skills learned during the
exercise could easily be reused for other projects.
--
David E. Bernholdt                      | Email:  bernhold@npac.syr.edu
Northeast Parallel Architectures Center | Phone:  +1 315 443 3857
111 College Place, Syracuse University  | Fax:    +1 315 443 1973
Syracuse, NY 13244-4100                 | URL:    http://www.npac.syr.edu
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>   Some things, like mixed Fortran77 and C, are now so common that there
>   is a community of people out there who understand pretty well how to
>
>Are you offering your services? :-) Perhaps it's not as bad as it
>looks from my end, but if I had to rely on the kindness of unpaid
 [...snip ...]

 Hmm.  How about mixed tcl/C ?  The tcl interpreter is done in C,
 so rebuilding the interpreter is not mixed-language.  But the
 result would be -- use tcl (slow as molasses, but lots of
 high level constructs like hashes, regular expressions, flow
 control) for the putting-together-the-tools part, and let
 C (or fortran) do the heavy lifting.

 Someone could provide a toolkit of tcl commands written in C,
 and anyone could put the tools together in new ways using
 a highlevel scripting language.  I think perl and python
 would also work as scripting languages here.  This is
 not just object-oriented (for the programmer) but also
 somewhat component-oriented (for the application builder or
 end user).

   bobg
----------------------------------------------------------------------------------------------------------------------------------------------------------------

David E. Bernholdt:

> It idea of mixed language programming is to use languages most
> appropriate for the task at hand, not just for speed, but for ease of
> implementation.  Such decisions are usually fairly coarse-grained.

Exactly!

> > Ultimately, most folks are more concerned with optimizing their time
> > use than the computer's :-) .
>
> In my opinion, this is the reason _to_ use mixed language
> programming.  If I wanted to write a robust input parser for a large

I couldn't agree more!

> One can DESIGN software based on these principles (OOD) regardless of
> what language the software is to be implemented in.

Right. But implementing an OO design in a non-OO language requires
a lot of experience and discipline - to be expected of a professional
programmer, but not of a programming scientist.

Of course the more basic problem is that scientists tend to skip
the design phase altogether. Which is why big projects ought to
be started in collaboration with software engineering experts.

> I disagree with the person who proposed C++ is "the" langauge for
> future work because it is an OOL.  There are a lot of other
> considerations that (should) factor into the decision of which
> language to use.  However I think that ALL projects should consider
> object-oriented DESIGN regardless of implementation language.

Again I agree completely.

--------------------------------------------------
Lestaw K. Bieniasz:

> If you need a program for individual purpose, use Fortran if you like it.

Of course. However, don't do one of the following:

1) Force your students and postdocs to use Fortran even if they know
   and prefer something else.

2) Teach your students nothing but Fortran.

Unfortunately, both are standard practice today.

--------------------------------------------------

OK, that's it, sorry for the long post, and back to work...
--
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- 
Iraj Daizadeh
Department of Chemistry
University of California
One Shields Ave.
Davis, CA  95616-5295
Phone:  916.754.8695
Fax:    916.752.8995
email:  daizadeh@indigo.ucdavis.edu

From pbrown@prodigy.com  Thu Jul 31 04:14:36 1997
Received: from p3.net  for pbrown@prodigy.com
	by www.ccl.net (8.8.3/950822.1) id DAA01480; Thu, 31 Jul 1997 03:32:43 -0400 (EDT)
From: <pbrown@prodigy.com>
Received: from prodigy.com (xykpa21.p3.net [207.76.249.60]) by p3.net (8.6.12/8.6.12) with SMTP id VAA12000; Wed, 30 Jul 1997 21:10:11 -0400
Date: Wed, 30 Jul 1997 21:10:11 -0400
Message-Id: <199707310110.VAA12000@p3.net>
To: pbrown@prodigy.com
Subject: Greetings!


///////////////////////////////////////////////////////////////////////////////
If you wish to be removed from this advertiser's future mailings, please reply 
with the subject "Remove" and this software will automatically block you 
from their future mailings.
////////////////////////////////////////////////////////////////////////////////

                         *** MAKE $36,000 in 14 WEEKS ***


*** Just what you needed, just when you needed it! ***

The main reason for this letter is to convince you that this system is
honest, lawful, extremely profitable, and is a way to get a large amount
of money in a short time.  I was approached several times before I checked
this out.  I joined just to see what one could expect in return for the minimal
effort and money required.  Initially I let no one in the organization know
that I was an attorney and, to my astonishment, I received $36,470.00 in
the first 14 weeks, with money still coming in.

Sincerely yours, Phillip A. Brown


"Please Read This Twice!"

Dear friend,


		*** Print This Now For Future Reference ***

The following income opportunity is one you may be intersested in  taking a 
look at. It can be started with VERY LITTLE investment and the income 
return is TREMENDOUS!!!

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

You are about to make at least $50,000 in less than 90 days!  
Please read the enclosed program...THEN READ IT AGAIN!!!

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

This is a MONEY-MAKING PHENOMENON. PRINT this letter, read the 
program...  THEN READ IT AGAIN !!!

You are looking at the most profitable and unique program you may ever
see.  It has demonstrated and proven ability to generate large sums of
money.  This program is showing fantastic appeal with a huge and ever
growing population which needs additional income.

This is a legitimate LEGAL money-making opportunity.  It does not
require you to come in contact with people, do any hard work, and best
of all, you never have to leave the house, except to get the mail.  If you 
believe that some day you will get that lucky break that you have been
waiting for, THIS IS IT!  Simply follow the easy instructions, and your
dream will come true!  This electronic multi-level marketing program works
perfectly...100% EVERY TIME!

Thousands of people have used this program to raise capital to start their
own business, pay off debts, buy homes, cars, etc., even retire! This is
your chance, so don't pass it up.

OVERVIEW OF THIS EXTRAORDINARY ELECTRONIC MULTI-LEVEL 
MARKETING PROGRAM

Basically, this is what we do:  We sell thousands of people a product for 
$5.00 that costs us next to nothing to produce and e-mail.  As with all
multi-level businesses, we build our business by recruiting new partners
and selling our products.  Every state in the U.S. allows you to recruit
new multi- level business online (with your computer).

The product in this program is a series of four businesses and financial
reports.  Each $5.00 order you receive by "snail mail" will include the e-mail
address of the sender.  To fill each order, you simply e-mail the product to
the buyer.  THAT'S IT!...the $5.00 is yours!  This is the GREATEST
electronic multi-level marketing business anywhere!

FOLLOW THE INSTRUCTIONS EXACTLY!
Let's face it, the profits are worth it!  THEY'RE TREMENDOUS!!!
So go for it.  Remember the 4 points and we'll see YOU at the top!


                     ******* I  N  S  T  R  U  C  T  I  O  N  S *******

This is what you MUST do:

1.  Order both reports listed and numbered from the list below.
     For each report send $5.00 CASH, YOUR E-MAIL ADDRESS and YOUR
     RETURN POSTAL ADDRESS (in case of a problem) to each person listed.

     When you order, make sure you request each SPECIFIC report.  You
     will need all four reports, because you will be saving them on
     your computer and reselling them.

2.  IMPORTANT--DO NOT alter the names, or their sequence other than
     instructed in this program! Or you will not profit the way you
     should.

     Replace the name and address under REPORT #1 with yours, moving
     the one that was there down to REPORT #2.  Move the name and
     address under REPORT #2 to REPORT #3.   

     When doing this, please make certain you copy everyone's name and
     address ACCURATELY!!!  Also, DO NOT move the Report/Product
     positions!

3.  Take this entire program text, including the corrected names list,
     and save it on your computer.

4.  Now you're ready to start a massive advertising campaign on the
     WORLDWIDE WEB!  Advertising on the WEB is very, very inexpensive,
     but there are HUNDREDS of FREE places to advertise also.  Another
     avenue which you could use is e-mail mailing lists.  You can buy
     these lists for under $20/1,000 addresses.  START YOUR AD CAMPAIGN
     AS SOON AS YOU CAN.

ALWAYS PROVIDE SAME-DAY SERVICE ON ALL ORDERS!!!
 
                           REQUIRED REPORTS

***Order each REPORT by NUMBER and NAME***

ALWAYS SEND  $5 CASH (Concealed) FOR EACH ORDER 
REQUESTING THE SPECIFIC REPORT BY NAME AND NUMBER. 
ALWAYS SEND FIRST CLASS OR PRIORITY MAIL AND PROVIDE 
YOUR E-MAIL ADDRESS FOR QUICK DELIVERY.

____________________________________________________
REPORT #1 
"HOW TO MAKE $250,000 THROUGH MULTI-LEVEL SALES"

ORDER REPORT #1 FROM:  
W.U.
100 Sprigdale Road A-3 
Suite 136
Cherry Hill, NJ 08003

________________________________________
REPORT #2
"USE YOUR COMPUTER AS A MONEY MAKING  MACHINE"

ORDER REPORT #2 FROM:
C.S. Marketing
PO Box 1125
Valley Forge, PA  19482

___________________________________________________
REPORT #3 
"SOURCES FOR THE BEST MAILING LISTS"

ORDER REPORT #3 FROM:
ek@NYL
1 Radnor Corp. Cntr, Suite 100
Radnor, PA 19087
____________________________________________________


HERE'S HOW THIS AMAZING PLAN WILL MAKE YOU $MONEY$

Let's say you decide to start small just to see how it goes.  Assume
your goal is to get 10 people to participate on your first level.
(Placing a lot of FREE ads on the internet could EASILY get a better
response.)  Also assume that everyone else in YOUR BUILDING 
ORGANIZATION gets ONLY 10 downline members.  Follow this example 
for the STAGGERING results below.

1st level --  your 10 members with $5  ($5 x 10)                           $50
2nd level --10 members from those 10 ($5 x 100)                      $500
3rd level -- 10 members from those 100 ($5 x 1,000)              $5,000
4th level -- 10 members from those 1,000 ($5 x 10,000)       $50,000
         			
                                                          THIS TOTALS-----------$55,550

Remember friends, this is assuming that the people who participate
only recruit 10 people each.  Dare to think for a moment what would
happen if everyone got 20 people to participate!  Some people get
100's of recruits!  THINK ABOUT IT!

By the way, your cost to participate in this is practically nothing.
You obviously already have an internet connection and email is FREE!!!
REPORT#1 will show you the best methods for bulk emailing and purchasing
email lists.

REMEMBER:  Approx. 50,000 new people get online monthly!

ORDER YOUR REPORTS NOW!!!


*******TIPS FOR SUCCESS*******

THISIAS YOUR BUSINESS!  Send for the three reports IMMEDIATELY,
so you will have them when the orders start coming in because:
When you receive a $5 order, you MUST send out the requested product/
report to comply with the U.S. Postal & Lottery Laws, Title 18,
Sections 1302 and 1341 or Title 18, Section 3005 in the U.S. Code,
also Code of Federal Regs. vol. 16, Sections 255 and 436, which
state that "a product or service must be exchanged for money received."

*  ALWAYS PROVIDE SAME-DAY SERVICE ON THE ORDERS YOU RECEIVE.

*  Be patient and persistent with this program.  If you follow the
    instructions exactly the results WILL undoubtedly be SUCCESS!

*  ABOVE ALL, HAVE FAITH IN YOURSELF THAT YOU CAN SUCCEED!


*******YOUR SUCCESS GUIDELINE*******

The check point that guarantees your success is simply this:
You MUST receive 10 to 20 orders for REPORT #1!  THIS IS A MUST!  If
you don't within two weeks, advertise more and send out more programs
until you do.  Then, a couple of weeks later you should receive at
least 100 orders for REPORT #2.  If you don't, advertise more and send
out more programs until you do.  Once you have received 100, or more
orders for REPORT #2, YOU CAN RELAX, because you will be on your way
to the BANK!  -OR-  You can DOUBLE your efforts!

REMEMBER:  Every time your name is moved down on the list you are in
front of a DIFFERENT report, so you can KEEP TRACK of your PROGRESS
by what report people are ordering from you. IT'S THAT EASY!!!

NOTE:  IF YOU NEED HELP with starting a business, registering a business
name, how income tax is handled, etc., contact your local office of the 
Small Business Administration (a Federal agency) for free help and answers to
questions.  Also, the Internal Revenue Service offers free help via telephone
and free seminars about business taxes.

                             ******* T  E  S  T  I  M  O  N  I  A  L  S *******
 
This program does work, but you must follow it EXACTLY! Especially the
rule of not trying to place your name in a different position, it won't work,
you'll lose a lot of money.  I'm living proof that it works.  It really is a great
opportunity to make relatively easy money, with little cost to you.  If you
do choose to participate, follow the program exactly, and you'll be on your
way to financial security.  If you are a fellow Christian and are in financial
trouble like I was, consider this a sign.  I DID!
                                                                     Good Luck & God Bless You,
                                                                     Sincerely, Chris Johnson

P.S.  Do you have any idea what 11,700 $5 bills ($58,500) looks
like piled up on the kitchen table?...IT'S AWESOME!


My name is Frank.  My wife Doris and I live in Bel-Air, MD.
I am a cost accountant with a major U.S. Corporation and I make
pretty good money.  When I received the program I grumbled to Doris
about receiving "junk mail"!  I made fun of the whole thing, spouting
my knowledge of the population and percentages involved.  I "knew" it
wouldn't work.  Doris totally ignored my supposed intelligence and
jumped in with both feet.  I made merciless fun of her, and was ready
to lay the old "I told you so" on her when the thing didn't work...
well, the laugh was on me!  Within two weeks she had received over 50
responses.  Within 45 days she had received over $147,200 in $5 bills!
I was stunned.  I was sure that I had it all figured and that it wouldn't 
work...I AM a believer now.  I have joined Doris in her "little" hobby. I did
have seven more years until retirement,  but I think of the "rat race" and
it's not for me...We owe it all to MLM.
                                                                      Frank T., Bel-Air, MD
 
I just want to pass along my best wishes and encouragement to you. 
Any doubts you have will vanish when your first orders come in.  I even
checked with the U.S. Post Office to verify that the plan was legal.  
It definitely is!  IT WORKS!!!
                                                                     Paul Johnson, Raleigh, NC

This is the only realistic money-making offer I've ever received.  I 
participated because this plan truly makes sense. I was surprised
when the $5.00 bills started filling my mail box. By the time it tapered
off I had received over 8,000 orders with over $40,000 in cash.  Dozens
of people have sent warm personal notes too, sharing the news of their
good fortunes!  It's been WONDERFUL.
                                                                     Carl Winslow Tulsa, OK
 
The main reason for this letter is to convince you that this system is
honest, lawful, extremely profitable, and is a way to get a large amount
of money in a short time.  I was approached several times before I checked
this out.  I joined just to see what one could expect in return for the minimal
effort and money required.  Initially I let no one in the organization know
that I was an attorney and, to my astonishment, I received $36,470.00 in
the first 14 weeks, with money still coming in.
                                                                    Sincerely yours, Phillip A. Brown
 
This plan works like GANG-BUSTERS!! So far I have had 9,735 total orders
OVER $48,000!!!  I hope I have sparked your own excitement, if you follow
the program exactly, you could have the same success I have, if not better.
Your success is right around the corner, but you must do a little work.
                                                                    Good Luck!  G. Bank
 
Not being the gambling type, it took me several weeks to make
up my mind to participate in this plan.  But conservative that I am
I decided that the initial investment was so little that there was
just no way that I wouldn't get enough orders to at least get my money
back.  Boy I was surprised when I found my medium-size post office box
crammed with orders.  After that it got so over-loaded that I had to
start picking up my mail at the window.  I'll make more money this
year than any 10 years of my life before.  The nice thing about this
deal is that it doesn't matter where in the U.S. the people live.
There simply isn't a better investment with a faster return.
                                                                   Mary Rockland, Lansing, MI

I had received this program before.  I deleted it, but later
I wondered if I shouldn't have given it a try.  Of course, I had no
idea who to contact to get another copy, so I had to wait until I
was e-mailed another program...11 months passed then it came...I
didn't delete this one!...I made $41,000 on the first try!!
                                                                   D. Wilburn, Muncie, IN
 
This is my third time to participate in this plan.  We have
quit our jobs, and quite soon we will buy a home on the beach and live
off the interest on our money.  The only way on earth that this plan
will work for you is if you do it.  For your sake, and for your family's
sake don't pass up this golden opportunity.  Remember, when you order
your four reports, SEND CASH.  Checks have to clear the bank and create
too many delays.  Good luck and happy spending!
                                                                 Charles Fairchild, Spokane, WA
 
Typically when I look at a money-making deal I want to
know if the company is strong, will it be here when it's time for
my big pay off.  In this crazy thing there is no company intervention
for management to blow it.  Just people like me ordering directly
from the source!  Interesting...I had a couple of projects I'd been
trying to fund to no avail so I thought; Why not give it a try?  Well
2 1/2 weeks later the orders started coming in.  One project is funded
and I'm sure the other will be soon!
                                                                Marilynn St. Claire, Logan, UT
 
====================================================

We could be printing YOUR testimonial next!!!
 
ORDER YOUR REPORTS TODAY AND GET
STARTED DOWN THE ROAD TO YOUR
FINANCIAL FREEDOM!!!

From chan@uni-muenster.de  Thu Jul 31 06:22:14 1997
Received: from asterix.uni-muenster.de  for chan@uni-muenster.de
	by www.ccl.net (8.8.3/950822.1) id FAA01768; Thu, 31 Jul 1997 05:44:06 -0400 (EDT)
Received: from localhost (chan@localhost) by asterix.uni-muenster.de (8.7.5/8.7.5) with SMTP id LAA90970 for <chemistry@www.ccl.net>; Thu, 31 Jul 1997 11:44:07 +0200
X-Authentication-Warning: asterix.uni-muenster.de: chan owned process doing -bs
Date: Thu, 31 Jul 1997 11:44:07 +0200 (MES)
From: "Jerry C.C. Chan" <chan@uni-muenster.de>
To: chemistry@www.ccl.net
Subject: Diffuse and Polarization functions for TZV basis set (fwd)
Message-ID: <Pine.A41.3.96.970731114351.29914A-100000@asterix.uni-muenster.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII





Hi CCLers,                                                                
                                                                          
        We are working on DFT calculations of molecules containing C, F,  
etc, using TZVP basis set (UniChem_basis).  Could anyone please tell us    
where we can get some appropriate diffuse and polarization functions for     
the first two row elements?  I will summarize.                              
                                                                          
Many thanks,                                                              
Jerry

******************************************************************
* Jerry Chun Chung CHAN              chan@moorea.uni-muenster.de *
*								 *
* Universitaet Muenster	                phone: 0049-251-83-29156 *
* Institut fuer Physikalische Chemie    fax:   0049-251-83-29159 *
* Schlossplatz 4-7						 *
* D-48149 Muenster						 *
* Germany							 *
******************************************************************



From bradley@mail.enterprise.net  Thu Jul 31 08:22:00 1997
Received: from dns0.enterprise.net  for bradley@mail.enterprise.net
	by www.ccl.net (8.8.3/950822.1) id HAA02114; Thu, 31 Jul 1997 07:44:24 -0400 (EDT)
Received: from dbradley (ppp407.enterprise.net [194.72.196.153]) by dns0.enterprise.net (8.8.5/8.7.3) with SMTP id MAA14389 for <chemistry@www.ccl.net>; Thu, 31 Jul 1997 12:44:04 +0100 (BST)
Message-Id: <199707311144.MAA14389@dns0.enterprise.net>
Comments: Authenticated sender is <bradley@mail.enterprise.net>
From: "David Bradley Science Writer" <Bradley@enterprise.net>
To: chemistry@www.ccl.net
Date: Thu, 31 Jul 1997 12:45:30 +0000
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Subject: ChemOffice
Reply-to: Bradley@enterprise.net
Priority: urgent
In-reply-to: <199707310520.BAA00933@www.ccl.net>
X-mailer: Pegasus Mail for Win32 (v2.54)


How do the molecular modelling aspects of ChemOffice Ultra (v 4) from 
CambridgeSoft Corp, which includes various optimisation engines such 
as MOPAC93 compare with standalone units. Anyone willing to discuss 
their experiences of this package please feel free to get in touch

Thanks in advance

Dave Bradley
 --------------------------------------------------------
|              David  Bradley  Science Writer            |
|                  Bradley@enterprise.net                |
|              Tel/Fax +44 1223 440834 (Intl)            |
|              Tel/Fax    01223 440834 (UK)              |
|                                                        |
|  http://homepages.enterprise.net/bradley/bradhome.html | 
 --------------------------------------------------------

From daizadeh@indigo.ucdavis.edu  Thu Jul 31 13:14:40 1997
Received: from indigo.ucdavis.edu  for daizadeh@indigo.ucdavis.edu
	by www.ccl.net (8.8.3/950822.1) id MAA04268; Thu, 31 Jul 1997 12:37:14 -0400 (EDT)
Received: by indigo.ucdavis.edu (940816.SGI.8.6.9/940406.SGI.AUTO)
	 id JAA02048; Thu, 31 Jul 1997 09:46:45 -0700
From: "Iraj Daizadeh" <daizadeh@indigo.ucdavis.edu>
Message-Id: <9707310946.ZM2046@indigo.ucdavis.edu>
Date: Thu, 31 Jul 1997 09:46:31 -0700
X-Mailer: Z-Mail (3.2.0 26oct94 MediaMail)
To: chemistry-request@www.ccl.net, chemistry@www.ccl.net,
        daizadeh@indigo.ucdavis.edu, jkl@ccl.net
Subject: (Fwd) Multi-Language Programming on SGI
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii


Hello.

There was a problem sending the message below to be posted on the CCl.  Would
you mind ensuring this.

Thanks.

Iraj.
--------------------------------------------------------------------------------
Hello.

The conversation on the CCL concerning OO led very nicely into a discussion of
mixing programming languages (for an incomplete summary, please see below).
 This methodology should merit considerable thought by the computational
chemistry society since it combines aspects in computational efficiency and
modern coding practices (viz., raw speed, dynamic memory allocation, and object
oriented design) with that of using old routines that are still very
functional. How to implement these ideas in a pragmatic manner, however, has
not been well-documented within these discussions bombarding our email
terminals.

We have been using multi-language programming ever since I began my
computational career here at UC Davis under the watchful eye of Prof.
Stuchebrukhov (circa. 3 academic years ago).  Thus, I thought it might be
useful to describe in detail a (probably) complicated procedure (for the
novice) which would allow the generation of an executable from a C code calling
a Fortran routine.  Generalization of the ideas presented (briefly) below
should suffice to enable any programmer using an SGI running IRIX 5.2 or above
(up to 6.2) (at least what we have used) to be able to create an executable
from C/Fortran (Fortran/C, Fortran/Pascal, etc.. (<-in a similar manner->) )
code.

 An outline of this procedure follows:

	(The methodology was suggested to us when we first started in this
direction ( see Fortran/C Interface in the Fortran 77 Programmer's Guide on the
insight pages by SGI (5.2) )...

1.  Here is an example C code:


#include <stdio.h>

extern double add_(double *,double *);

void main()
{
        double x,y;

        x=y=10.0;

        printf("%f  %f  %f\n", x, y, add_(&x,&y));

} /* end main */


This very easy program takes two doubles x,y and adds their assigned values.
 There exist a couple of items within the C code that are of particular
interest to us.  First, we have used an external function called add.  Add is
the fortran function (returns a value).  The fortran call must by followed by
an UNDERSCORE. Next notice that we have parameterized this function with
pointers and sent the  addresses of our variables to the fortran routine (This
is essential since fortran uses implicitly pointers (no more on this)).  That
is all there is to it.

2.  Next follows the fortran function:

      function add(x,y)
      double precision add,x,y
      add = x+y
      return
      end

Notice there is no underscore after the add function.  This is an intact code
without any changes (YEA!).

3.  Compile as follows:
	cc -c main.c   # main.c is the file that contains the c code
	f77 -c add.f   # add.f is the file that contains the fortran code
	cc -o add main.o add.o   # now link them with the compiler that
contains main

You are done!!!

A couple of notes:
	a.  Remember: c is case-sensitive, fortran is not.
	       What c does is convert the fortran statement to lowercase:
		  [function statement(arg-list) or subroutine name(arg-list)]
			Thus, the following are equivalent to the c call above:
				function ADD()		subroutine ADD()
				function Add()          subroutine Add()
				function add()   or     subroutine add
				function AdD()		subroutine AdD()
					      ...etc...

	b. Watch your datatype!
	c. For a fortran routine calling a C function a similar procedure
works.
		But keep in mind whichever code contains
			main
		should be the compiler that links all the object codes;

		e.g. if fortran code contained main
			use:	cc -c add.c
				f77 -c main.f
				f77 -o add add.o main.o
	d. There are some minor details for sending arrays and structures but
trial and error will allow you to figure this out on your own.
	e. remember it may be necessary to use the -lftn extension when there
exist some unresolved errors.


I would appreciate it if there were others in the field with this type of
programming experience would kindly send me their explicit methodologies for
muli-language implementations on other platforms.  We are in the process of
re-evaluating our computational hardware and are considering acquiring a Dec
\alpha or HP.  I will summarize all of them as is customary.

Any comments, concerns or questions, please do not hesitate to email.  If I am
too busy, I will say so.

Iraj.

--

Iraj Daizadeh
Department of Chemistry
University of California
One Shields Ave.
Davis, CA  95616-5295
Phone:  916.754.8695
Fax:    916.752.8995
email:  daizadeh@indigo.ucdavis.edu




------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Alex Turner <A.J.Turner@bath.ac.uk) writes:

There seems to be one points that no-one has covered, especially when we
say FORTRAN has run its coarse.  If I am to spend a long time writing a
piece of code to perform a very complex task - I need to be 100% sure
that the code will be in a lagnuage that can be used in the future.  There
is only one language that can really offer that - FORTRAN.

---

Considering the amount of C code written in the last, oh, 5 years
(both commercial and non-commercial), I think C will be with us
for the forseeable future as well.  I suspect in the computational
chemistry arena, there has been (far?) more C code written over this
time than Fortran...

This doesn't mean that there are more lines of C out there in use
than Fortran, merely that times actually have changed a little, or
maybe more than a little.  Having written a fair amount of code in
both languages, I would hate to write anything BUT numerically-
intensive code in Fortran anymore.  Trying to do I/O, or interact
with the environment, etc. seems so much easier in C...

Also, while I cannot say for certain, there seems to be some platforms
for which a Fortran compiler is either unavailable or a relative newcommer.
C, however, seems available wherever one cares to look (although my
experience with supercomputers is not up to date).  While Fortran, on
the strength of some pre-preprocessors, might still hold a lead in
generating "fast" code, sections of "C-tran" seem to optimize as well
if some thought is given to "helping" the compiler.

Something called "Fortran" will be around for a while.  So will something
called "C"...  Neither language is probably the best-choice when
developer effort is the concern, but both seem rather good for heavy
lifting.  It's just that given the annoyances of multi-language software,
there has to be SIGNIFICANT performance issues to get me to mix in
Fortran anymore.

Joe Leonard
jle@world.std.com

P.S. FWIW, I live in the workstation environment, usually working on
code which is either heavy-lifting or personal/throwaway...


---
Administrivia: This message is automatically appended by the mail exploder:
CHEMISTRY@www.ccl.net: Everybody | CHEMISTRY-REQUEST@www.ccl.net: Coordinator
MAILSERV@www.ccl.net: HELP CHEMISTRY or HELP SEARCH | Gopher: www.ccl.net 73
Anon. ftp: www.ccl.net   | CHEMISTRY-SEARCH@www.ccl.net -- archive search
             Web: http://www.ccl.net/chemistry.html


----------------------------------------------------------------------------------------------------------------------------------------------------------------
It idea of mixed language programming is to use languages most
appropriate for the task at hand, not just for speed, but for ease of
implementation.  Such decisions are usually fairly coarse-grained.
For example, you might prefer to use C code to implement operations on
a fairly complex data structure, while a computationally-intensive
section might better be written in Fortran.

If the code is well encapsulated, there should be little problem
(conceptually) and no performance degredation from hooking up code
written in multiple languages.  Of course that's different from making
a poor choice of programming language to implement a given component.

It is true that interlanguage programming is not standardized (yet),
but as a practical matter, on a given platform you can expect that
most languages (from the same vendor at least) will follow a similar
underlying structure and _will_ be able to interface.  It is also true
that relatively little documentation of these interfaces is
available, but in most cases it is really fairly straightforward.

Some things, like mixed Fortran77 and C, are now so common that there
is a community of people out there who understand pretty well how to
do this and even some packages/templates to help you do it in a
platform-independent way.  If you seek out such people, you can
probably find them without too much trouble.

I can't recall a case where I had to know more about the
"processor-dependent nitty-gritty of numerical computation" to do
mixed-language programming than I needed to do a good job of
scientific programming in one language -- the interfaces are rarely so
fine-grained as that.

> Ultimately, most folks are more concerned with optimizing their time
> use than the computer's :-) .

In my opinion, this is the reason _to_ use mixed language
programming.  If I wanted to write a robust input parser for a large
chemistry software package, I'm sure I could write it in Fortran, but
it would take a lot of work.  These days, there are tools to do this
quite easily in C (lex, yacc, etc.).  For many people, the time
required to write the parser in C _and_ the time to sort out the
interface to Fortran would be shorter than writing it in scratch from
Fortran.  And the C-Fortran interfacing skills learned during the
exercise could easily be reused for other projects.
--
David E. Bernholdt                      | Email:  bernhold@npac.syr.edu
Northeast Parallel Architectures Center | Phone:  +1 315 443 3857
111 College Place, Syracuse University  | Fax:    +1 315 443 1973
Syracuse, NY 13244-4100                 | URL:    http://www.npac.syr.edu
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>   Some things, like mixed Fortran77 and C, are now so common that there
>   is a community of people out there who understand pretty well how to
>
>Are you offering your services? :-) Perhaps it's not as bad as it
>looks from my end, but if I had to rely on the kindness of unpaid
 [...snip ...]

 Hmm.  How about mixed tcl/C ?  The tcl interpreter is done in C,
 so rebuilding the interpreter is not mixed-language.  But the
 result would be -- use tcl (slow as molasses, but lots of
 high level constructs like hashes, regular expressions, flow
 control) for the putting-together-the-tools part, and let
 C (or fortran) do the heavy lifting.

 Someone could provide a toolkit of tcl commands written in C,
 and anyone could put the tools together in new ways using
 a highlevel scripting language.  I think perl and python
 would also work as scripting languages here.  This is
 not just object-oriented (for the programmer) but also
 somewhat component-oriented (for the application builder or
 end user).

   bobg
----------------------------------------------------------------------------------------------------------------------------------------------------------------

David E. Bernholdt:

> It idea of mixed language programming is to use languages most
> appropriate for the task at hand, not just for speed, but for ease of
> implementation.  Such decisions are usually fairly coarse-grained.

Exactly!

> > Ultimately, most folks are more concerned with optimizing their time
> > use than the computer's :-) .
>
> In my opinion, this is the reason _to_ use mixed language
> programming.  If I wanted to write a robust input parser for a large

I couldn't agree more!

> One can DESIGN software based on these principles (OOD) regardless of
> what language the software is to be implemented in.

Right. But implementing an OO design in a non-OO language requires
a lot of experience and discipline - to be expected of a professional
programmer, but not of a programming scientist.

Of course the more basic problem is that scientists tend to skip
the design phase altogether. Which is why big projects ought to
be started in collaboration with software engineering experts.

> I disagree with the person who proposed C++ is "the" langauge for
> future work because it is an OOL.  There are a lot of other
> considerations that (should) factor into the decision of which
> language to use.  However I think that ALL projects should consider
> object-oriented DESIGN regardless of implementation language.

Again I agree completely.

--------------------------------------------------
Lestaw K. Bieniasz:

> If you need a program for individual purpose, use Fortran if you like it.

Of course. However, don't do one of the following:

1) Force your students and postdocs to use Fortran even if they know
   and prefer something else.

2) Teach your students nothing but Fortran.

Unfortunately, both are standard practice today.

--------------------------------------------------

OK, that's it, sorry for the long post, and back to work...
--
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--
Iraj Daizadeh
Department of Chemistry
University of California
One Shields Ave.
Davis, CA  95616-5295
Phone:  916.754.8695
Fax:    916.752.8995
email:  daizadeh@indigo.ucdavis.edu



