Skip to content

How to run on modern Linux (Ubuntu/WSL) - Path & Symlink Fixes #3

Description

@Stevenbperry

This project has some hardcoded path and case-sensitivity issues that prevent it from running "out of the box" on modern, case-sensitive Linux systems like Ubuntu. I will summarize below what I have found to work, in the most basic way possible.

  1. Use a Linux system (like Ubuntu or WSL) with gfortran and cmake installed.
    sudo apt update && sudo apt install gfortran cmake

  2. Clone the repo and build the project using the README instructions.
    git clone https://github.com/[user]/LWPC.git
    cd LWPC
    cmake -B build
    cmake --build build

  3. The program crashes because it can't find its data files. You must provide an absolute path in lwpcDAT.loc.
    cd LWPCv21
    pwd
    Copy this output into the /LWPC/LWPCv21/lwpcDAT.loc file, replacing the string currently in there.

  4. The code is hardcoded to look for lowercase directory names (lwpc, lwpcv21), but the repository uses uppercase (LWPC, LWPCv21). We can fix this by creating symbolic links (symlinks).
    cd ../.. -> Gets you out of LWPC/LWPCv21 so you are in your base directory.
    ln -s LWPC lwpc
    cd LWPC
    ln -s LWPCv21 lwpcv21

  5. The example .inp files point to the wrong directory (assuming you haven't changed anything). Open an example like bearings.inp in /LWPC/LWPCv21 and change the file directories from ../output/ to ../LWPCv21/output. This must be done for any .inp files you want to run.

  6. TEST the program by running an example .inp file by doing the following:
    ../build
    ./lwpc.bin ../LWPCv21/bearings
    The program should run with no errors. Then, do the following:
    ./scan
    ../LWPCv21/output/bearings.lwf
    2
    A scan.log file will be generated that contains the output, and it will be located in the /LWPC/build/ directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions