Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3351404
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:54:16+00:00 2026-05-18T01:54:16+00:00

I develop a Lattice Boltzmann (Fluid dynamics) code using F#. I am now testing

  • 0

I develop a Lattice Boltzmann (Fluid dynamics) code using F#. I am now testing the code on a 24 cores, 128 GB memory server. The code basically consists of one main recursive function for time evolution and inside a System.Threading.Tasks.Parallel.For loop for a 3D dimensional space iteration. The 3D space is 500x500x500 large and one time cycle takes for ever :).

let rec timeIterate time =
  // Time consuming for loop
  System.Threading.Tasks.Parallel.For(...)

I would expect the server to use all 24 cores i.e. to have 100% usage. What I observe is something between 1% – 30% usage.

And my questions are:

  1. Is F# an appropriate tool for HPC computations on such servers?
  2. Is it realistic to use up to 100% of CPU for a real world problem?
  3. What should I do to obtain a high speed up? Everything is in one big parallel for loop so I would expect that it is all what I should do…
  4. If F# is NOT an appropriate language, what language is?

Thank you for any suggestions.

EDIT: I am willing to share the code if anyone is interested to take a look at it.

EDIT2: Here is the stripped version of the code: http://dl.dropbox.com/u/4571/LBM.zip
It does not do anything reasonable and I hope I have not introduced any bugs by stripping the code 🙂

The startup file is ShearFlow.fs and at the of the file bottom is

let rec mainLoop (fA: FArrayO) (mR: MacroResult) time =
  let a = LBM.Lbm.lbm lt pA getViscosity force g (fA, mR)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:54:17+00:00Added an answer on May 18, 2026 at 1:54 am

    1 . Is F# an appropriate tool for HPC computations on such servers?

    It (F#), as a language, can encourage code which works well in parallel — at least part of this is a reduction of state mutability and higher-order functions — this is a can and not a will. However, with HPC there are many specialty programming languages/compilers and/or ways of load distribution (e.g. shared unified memory or distributed micro-kernels). F# is merely a general-purpose programming language: it may or may not have access (e.g. bindings may or may not exist) to the various techniques. (This applies even to non-distributed parallel computing.)

    2 . Is it realistic to use up to 100% of CPU for a real world problem?

    It depends on what the limiting factor is. Talking to my friend who does 5k+ 100k+ core HPC research and development, the exchange of data and idle times are normally the limiting factor (of course, this is a much higher n 🙂 and so even small improvements in IO reduction (efficiency or different algorithm) can lead to significant gains. Don’t forget the cost of simply moving data between CPUs/caches on the same machine! And, of course, the ever-slow disk IO…

    3 . What should I do to obtain a high speed up? Everything is in one big parallel for loop so I would expect that it is all what I should do…

    Find out where the slow part(s) is(are) and fix it(them) 🙂 E.g. run a profile analysis. Keep in mind it may require using an entirely different algorithm or approach.

    4 . If F# is NOT an appropriate language, what language is?

    While I am not arguing for it, my PhD friend uses/works on Charm++: it is a very focused language for distributed parallel computing (not the environment in question, but I’m trying to make a point 🙂 — F# tries to be a decent general-purpose language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop a number of desktop Java applications using Swing, and while Swing is
I develop exclusively on VMs. I currently run Boot Camp on a MacBook Pro
I develop an extension module for Guile, written in C. This extension module embeds
We develop custom survey web sites and I am looking for a way to
We develop Win32 application that access to SQL 2005 database through Linq to SQL.
I develop and manage about 45 WindowsCE5 devices. Updating applications on the devices is
I develop and maintain small intranet web apps written in JSP and Java. They
I develop applications for the PocketPC platform (.NET Compact Framework 2.0 and higher), and
I develop web applications and in my job so far, I have been waging
I develop a variety of applications and have 3-4 miscellaneous libraries that I reuse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.