firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
641 stars 614 forks source link

Installation Problems on Mac M1 with Ventura 13.6 #12263

Open Spueli2301 opened 9 months ago

Spueli2301 commented 9 months ago

Hi there, i am new at fire dynamics simulations and i have a problem installing FDS and SMV on my mac M1 running Ventura 13.6. I extracted the data like explained in

https://github.com/firemodels/fds/wiki/Installing-and-Running-FDS-under-macOS

(Option 2) then I typed in alias fds='/Applications/FDS/FDS6/bin/fds' alias smv='/Applications/FDS/FDS6/bin/smokeview'

after that I restarted my computer and tried to open a file called "beispiel1.fds" with the command: fds beispiel1.fds

the terminal answered:

[[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ess_singleton_module.c at line 572 [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file ess_singleton_module.c at line 172

Sorry! You were supposed to get help about: orte_init:startup:internal-failure But I couldn't open the help file: /opt/openmpi414_oneapi22u3/share/openmpi/help-orte-runtime: No such file or directory. Sorry!


Sorry! You were supposed to get help about: mpi_init:startup:internal-failure But I couldn't open the help file: /opt/openmpi414_oneapi22u3/share/openmpi/help-mpi-runtime.txt: No such file or directory. Sorry!

An error occurred in MPI_Init_thread on a NULL communicator MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, and potentially your MPI job)

Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

Do you know what I am doing wrong?

marcosvanella commented 9 months ago

Did you add the following lines in your startup (~/.bash_profile) file and open a new terminal window?

source /Applications/FDS/FDS6/bin/FDS6VARS.sh source /Applications/FDS/FDS6/bin/SMV6VARS.sh

marcosvanella commented 9 months ago

@Spueli2301 could you get your case to run?

Spueli2301 commented 9 months ago

@marcosvanella thank you for your answer! I am currently not at my office but I will try it next week.

cmcarman15 commented 4 months ago

Hello,

I am also have installation issues on an M1 Macbook Air. I am unfortunately not really familiar with coding on a mac but I have followed the download instructions. I got the program installed, but when it asks me to add the following into the ./bash_profile is where i get into trouble.

source /Applications/FDS/FDS6/bin/FDS6VARS.sh 
source /Applications/FDS/FDS6/bin/SMV6VARS.sh

#  set OMP_NUM_THREADS to max of 4 and "Total Number of Cores" obtained from running
#  system_profiler SPHardwareDataType
export OMP_NUM_THREADS=4

# unlimit stack for macOS
ulimit -s 65532

My laptop had switched over to the Z shell. I searched around and figured out how to switch it back to the Bash shell, but then I didn't have a bash_profile file or a ".bashrc" startup file that I could find to add that code into. Also every video I try to look up to is for OSX and there is this very convenient launcher zip file that is just dragged and dropped onto the dock. That launcher file is nowhere in the install files. I am running on Sonoma 14.4.1. So at this point I have the files installed but have no idea how to run them.

All I'm trying to do is get Smokeview installed so I can view some files for a class I'm teaching this week. Help with this ASAP will be greatly appreciated!

Thank you, Clinton

rmcdermo commented 4 months ago

I need to write up some notes for M1 macs... In the meantime, here is what I do (in ~/.bash_profile).

Step 1: Install homebrew

https://brew.sh/

Step 2: Install modules

$ brew install modules

Step 3: Install FDS-SMV

$ bash FDS-6.9.1_SMV-6.9.1_osx.sh

Follow prompts. Install to /Applications/FDS/FDS6/FDS-6.9.1_SMV-6.9.1

Step 4: Update your startup script. Copy the following to your ~/.bash_profile. Exit and reopen a terminal. No need to unlimit stack on M1.

# homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"

# use modules
source $HOMEBREW_PREFIX/Cellar/modules/5.3.1/init/bash

# release version of FDS
export MODULEPATH=/Applications/FDS/FDS-6.9.1_SMV-6.9.1/bin/modules:$MODULEPATH
module load FDS6
module load SMV6

# Set number of OpenMP threads
export OMP_NUM_THREADS=4

Log out and back into a terminal. From there you should be able to run FDS by:

$ fds casename.fds

And smokeview by

$ smokeview casename

Let me know.

cmcarman15 commented 4 months ago

Thank you very much for the help Randy. I feel like I'm almost there. These are the steps that appear to be successful:

Thank you again for your help and so quickly!

rmcdermo commented 4 months ago

OK, sounds to me like you are still in a zsh terminal. You need to do this:

$ chsh -s /bin/bash

Then log out and back into a terminal.

In your ~/.bash_profile add this to the top to make sure it is being executed.

echo "Hello World!"

If you do not see "Hello World!" when you start your terminal then your ~/.bash_profile is not executing.

cmcarman15 commented 4 months ago

I added the comment to the /.bash_profile file and it worked. I couldn't get the command line to work to change the shell from Z shell to Bash, but I went in through the GUI Settings > User and Groups > Advanced Options under my user and selected /bin/bash as the shell option.

Now when I start a new Terminal I see the following: `Last login: Mon May 6 16:48:52 on ttys000 Hello World! -bash: /opt/homebrew/Cellar/modules/5.3.1/init/bash: No such file or directory -bash: module: command not found -bash: module: command not found

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. Clintons-MacBook-Air:~ clintoncarman$ `

Now when I try and run FDS I get the following error: -bash: fds: command not found

cmcarman15 commented 4 months ago

Thank you again for the help !

rmcdermo commented 4 months ago

OK, cd into /opt/homebrew/Cellar/modules and see what version of modules was install by homebrew. Change the "5.3.1" to whatever that directory says and try again.

rmcdermo commented 4 months ago

That is, change the version of modules in your .bash_profile to match what homebrew installed.

cmcarman15 commented 4 months ago

The 5.3.1 was changed to "5.4.0". Now when I start Terminal i see two red error messages: Restored session: Mon May 6 17:22:35 PDT 2024 Hello World! ERROR: Unable to locate a modulefile for 'FDS6' ERROR: Unable to locate a modulefile for 'SMV6'

rmcdermo commented 4 months ago

OK, show me again the path where you installed FDS. Probably you do not need the "FDS6" part of the path I said above. Sorry. Make sure the path before the FDS-6.9.1_SMV-6.9.1 is correct.

cmcarman15 commented 4 months ago
Screenshot 2024-05-06 at 5 30 52 PM

I did the default install with the specification of the correct version of FDS/SMV /Applications/FDS/FDS6/FDS-6.9.1_SMV-6.9.1

rmcdermo commented 4 months ago

When you go into "bin" do you see the modules subdirectory?

rmcdermo commented 4 months ago

Oh wait... the problem may be the opposite of what I said, you do need the FDS6 part in your path for modules and I did not have that in mine. So add that. Should be:

# release version of FDS
export MODULEPATH=/Applications/FDS/FDS6/FDS-6.9.1_SMV-6.9.1/bin/modules:$MODULEPATH
module load FDS6
module load SMV6
cmcarman15 commented 4 months ago

Randy, you are amazing! Thank you SO much for all your help!!! FDS is running successfully! And smokeview opened!

rmcdermo commented 4 months ago

Glad to hear it! I'll use these notes for a new wiki asap. Cheers

cmcarman15 commented 4 months ago

Is there by chance any kind of launcher app file like there used to be? Or is all interaction done through the Terminal app?

rmcdermo commented 4 months ago

I do everything through the terminal. I think there is a way to set up a launcher. @ericvmueller may have some advice there.

ericvmueller commented 4 months ago

If you're talking about launching smokeview by clicking on an smv file in Finder, you can create an 'app' via Automator where the app simply executes smokeview on the file (In this case replace the path to smokeview with your own installation):

image

The only issue is that it doesn't show the terminal output of smokeview in the background, so it's not great for debugging etc. There might be a way to change that behavior with the Automator script, but I haven't looked into it.