[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Fortran

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 22
Thread images: 1

File: Fortran.jpg (20KB, 500x264px)
Fortran.jpg
20KB, 500x264px
I'm learning Fortran, and it seems like a comfy language. People have been telling me that there's typically only one way to do a given thing in Fortran, which leaves little room for doing stuff wrong, and I think I'm starting to see what they mean.

Anyone else here like Fortran?

And btw, ow do I use LAPACK? I don't know much about programming to be honest besides syntax. Before now I've been writing in Python using Spyder, which literally just werks. I didn't need to mess around with SciPy or anything, just install Spyder and "import" everything. So how do I "install" LAPACK? And how do I get the BLAS? Do I just download some files and place them in the right folder, then continue using gfortran to compile?

Hopefully this is a good place to ask. I tried asking in a programming thread in /g/ as well, but the conversation was headed in another direction.
>C++ is really good
>no it is shit
>no it is good
>no
>>
idk every time I looked at fortran code in my compilers course shit looked really weird.

but i'm not saying it's bad.

Also C++ isn't shit, kys
>>
>>8995833
C++ is huge and messy. It means you won't know how to use it properly. For smaller tasks that doesn't really matter though.
>>
>>8995862
>>8995858
I'm not saying anything about C++, I'm just saying that /g/ were busy bickering over how shit/not-shit it was, so no one responded.
>>
>>8995833
We use it a lot in chemical engineering, lots of programs use Fortran as a kind of 'scripting' language in its simulations. I like it, you only need to learn a handful of things to completely know the language.

THat said, I dont think id want to write large programs in in since it (at least the vertion im used to) doesnt have a lot of the modern features that makes organizing code easier.

Ive never used fortran as a stand alone programming langiuge, or installed LAPACK, so cant help you.

> I tried asking in a programming thread in /g/
I have never in my life gotten good programming advice from /g/, /sci/, and the amature game dev threads on /vg/ and /mlp/ have been a lot more helpful because they actualy help you. /g/ just argues about something irreverent to your question.
>>
>>8995923
>you only need to learn a handful of things to completely know the language.
That's my impression so far as well. I found a short written introductory guide, and I was done with my first reading in an afternoon. Now I just want to find some exercises on which to grind my teeth.

And yeah, I get less and less interest in /g/ each time I go there.
>>
>>8995833
what would make one use fortran instead of, say, C?
I've heard of it, but what I heard was mainly that it was old, yet efficient
>>
>>8996039
I've been told it's wicked fast, because it is written with only that goal in mind, that is to say it even beats C. There are so many stupidly fast and old libraries for doing numerics, written in Fortran and still being used. I think there may be versions of those same libraries in other languages, but still.

That, and it is really simple to learn, write and read.
>>
>>8995833
http://physics.oregonstate.edu/~landaur/nacphy/lapack/fortran.html
>>
>>8995923
Why would you use an outdated language such as fortran instead of python? Just wondering not trying to hate on fortran but you cannot deny it's a bit old
>>
>>8996111
python is more versatile, but is also really slow compared to languages like fortran
>>
install ATLAS thru the package manager
>>
>>8996111
They wanted to make something that was fast for numerics, and got it right the first time. Lots of libraries have been written through the years which make it worth learning even today, so you might say it remains popular because it is popular.

Also, it is deliberately not very versatile, so that there is only one "canonical" way of writing a given algorithm. This makes the job of the compiler easier, and you can be relatively sure that the compiled program will run as fast as possible.

I'm not an expert myself, but I have seen the difference in speed between Python and Fortran. For assignments in a numerics class I took, Fortran code would run several orders of magnitude faster than my own Python code, which I even thought was cleverly written.
>>
>>8996224
>>8996257
I see thanks, seems like speed and reliability are strong points of fortran
>>
>>8995858
C++ is a hulking monstrosity that needs to be put out of its own misery.
>>
>>8996262
>look mommy, I'm repeating stuff /g/ said! Aren't I good with computers?
>>
>>8996277
>>8996262
>>8995862
>>8995858
goddamnit, I made this thread to escape the C++ discussions.
>>
>>8996086
>>8996233
Thanks guys, will look into these
>>
>>8996285
Tough luck, /g/ is the most autistic board on 4chan and the urge to either defend or shit talk C++ is stronger than they are.
>>
>>8996299
>most autistic board on 4chan
That has to be hyperbole, surely
>>
>>8995833
Fortran is probably the best language for scientific computing imo. I think a lot of people were put off by the antiquated f77 version which had syntax based on punch card inputs, but the latest versions are much more intuitive. The language has been around forever and has a ton of libraries that are optimized for performance. Check out numerical recipes which has all of its code online. The hardest part is often understanding the numerical analysis that goes into solving a problem and the appropriate approach to the given problem. Library functions often have an easy to understand description with explicit input and output parameters.

I don't have experience with LAPACK but you should look for how to compile your program with the LAPACK library for your given system. It shouldn't be too difficult, good luck.
>>
>>8996368
Numerical Recipes is a fantastic tome of a book, I'm going to have to read through it properly this summer.

I have to admit I'm not a strong programmer, so while I appreciate your guidance I don't know how to interpret it.
>compile your program with the LAPACK library for your given system
I am able to compile using gfortran, but I don't know what it would mean to do it along with LAPACK. Essentially, I don't understand the words you are using.
Thread posts: 22
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.