The latest version of MSC.Nastran that currently supports Linux is version 2024.2. The installation instructions are fairly straightforward: first, install the license server, then install the main program, and finally set up the license server. In practice, however, there are several common pitfalls that need to be taken into consideration.
1. Install the MSC License Server
Enter the folder where the program is located and run the license server installation file. By default, the graphical installation interface will launch, showing a message that Ubuntu is not supported. Here, the text-based installation interface is accessed using --mode console.
./msc_licensing_lithium_linux64.bin --mode console
Enter Y or press Enter to confirm and proceed to the installation program.
Display the hostname and hostid list. Press space to continue.
Enter the installation path and provide the absolute path according to your needs. If the installation is in a location outside of the ${HOME} directory, please ensure that the logged-in user has read and write permissions for that path; otherwise, it will be necessary to rerun the installer with administrative privileges.
Enter the path to save the log file.
Enter the absolute path of the license file.
Display the information of the license file, and press space to continue.
Ask whether to start the license server. It is recommended to choose y and press Enter to continue.
Ask whether to edit advanced properties, just press Enter to skip.
Confirm the installation information, press space to continue, and start the installation process.
After the installation is complete, the following information will be displayed. At this point, the license daemon has already started.
2. Configure License Service
Check if the license service daemon is running properly.
ps -eaf | grep MSC
Display the following information to indicate that the license service daemon has started successfully. Otherwise, check the log files to confirm whether the license file information is correct and replace it with the correct license file if necessary.
At this time, the license service daemon has not yet registered as a system service. After a reboot, the process exits and needs to be run manually, which is very inconvenient. We create a new Systemd service to solve this problem.
sudo touch /usr/lib/systemd/system/msc_lmd.service
sudo chmod 754 /usr/lib/systemd/system/msc_lmd.service
sudo vi /usr/lib/systemd/system/msc_lmd.service
Add the following content and save before exiting.
[Unit]
Description=MSC Software Licensing Deamon
After=msc_lmd.service
[Service]
Type=forking
User=root
Group=root
ExecStart="/opt/MSC.Software/MSC Licensing/Lithium/lmgrd" -c "/opt/MSC.Software/MSC Licensing/Lithium/license.dat" -l "/opt/MSC.Software/MSC Licensing/LOG/lmgrd.log" -local -2 -p -x lmremove
ExecReload=
ExecStop="/opt/MSC.Software/MSC Licensing/Lithium/lmutil"lmdown -q -c "/opt/MSC.Software/MSC Licensing/Lithium/license.dat"
[Install]
WantedBy=multi-user.target
Start the service using the following command.
sudo systemctl enable msc_lmd
sudo systemctl start msc_lmd
Check service status.
sudo systemctl status msc_lmd
3. Install Nastran solver
Run the MSC Nastran solver installation file.
./nastran_2024.2_linux64.bin --mode console
Enter the installer.
Type Acknowledged and press Enter to accept the statement and continue the installation, or type Cancel or press Enter directly to exit the installer.
Enter the installation path of the solver, and press Enter to directly copy the files to the installation path.
Enter the port number and address of the license server, here type 27500@localhost and press Enter to confirm.
You can choose to enter the path of the scratch folder, or press Enter to skip here. It’s best to choose an existing path, or manually create a scratch folder after the installation is complete.
Choose whether to enable the scratch folder each time it runs according to the prompt. Note that if you choose to confirm, it is best to give all users who use the solver read and write permissions for the scratch folder; otherwise, submission of calculations is likely to result in errors.
Enter the default memory size, just skip it.
Enter the buffer size, keep default.
Prompt to install the SDK, just skip it.
The installation is now complete.
4. Setup Environment Variables
Create a new environment variable file msc_nastran_2024_2.env.
touch msc_nastran_2024_2.env
chmod +x msc_nastran_2024_2.env
vi msc_nastran_2024_2.env
The content is edited as follows.
export LM_LICENSE_FILE=27500@localhost
# Make sure that port 27500 is not occupied by other programs.
# If you need to change the port number, you must edit
# the license file and restart the service.
export NASTRAN_PATH=/opt/MSC.Software/MSC_Nastran/2024.2
# This path is determined based on the installation location
# entered earlier and should be an absolute path.
export PATH=$NASTRAN_PATH/bin:$PATH
alias nastran=nast
In this way, you need to manually load the environment variables before each run.
source msc_nastran_2024_2.env
Display nastran help information.
nastran help
Example of how to submit a calculation. smp=16 means enabling 16 parallel computation threads on this machine. As for the submission script on HPC, you can refer to this1 for configuration.
mkdir scratch && nastran jid=test.bdf smp=16 sdir=$PWD/scratch
If you previously chose to enable the scratch folder, it’s best to add sdir= to specify the location of the scratch folder, in order to avoid errors caused by lack of access permissions to the default /scratch folder.