Installation and execution of ECHO3D and ECHO2D under macOS
How to Run ECHO3D on macOS
When you download the ECHO3D code on a macOS computer, the files may have an extended attribute called com.apple.quarantine. You must remove this attribute before launching the applications.
Removing the Extended Attribute:
- Open Terminal.
- Navigate to the Codes/MacOS_ARM directory.
- Run the following command: xattr -c ./*
Step-by-Step Instructions for Running ECHO3D:
- Open Terminal.
- Navigate to the Example Directory: cd (your path)/ECHO3D_v1_4/Examples/N1_RoundStepOut_LongWake
- Copy All Codes from the “Codes” Directory: cp ../../Codes/MacOS_ARM/* ./
- Run Mesher: ./Mesher
- Run InitField: ./InitField
- Run ECHO3D: ./ECHO3D
- Run IndirectIntegration: ./IndirectIntegration
Using Command Files for Simplified Execution:
- Navigate to the Example Directory: cd (your path)/ECHO3D_v1_4/Examples/N1_RoundStepOut_LongWake
- Change the File Attributes to Executable: chmod +x run_Mac.command
- Execute the Command File:
- Double-click run_Mac.command in Finder.
- Alternatively, run it from Terminal: ./run_Mac.command
Note: These instructions are also applicable to ECHO2D.
Parallelization Options for ECHO3D and ECHO2D:
ECHO3D Parallelization:
- Technology: Uses OpenMP (or threads).
- Setup: Can only run on one computer with multiple cores.
- Configuration: Set the ThreadsNumber parameter in input.txt to a value equal to or less than the number of available cores.
ECHO2D Parallelization Options:
- MPI Parallelization:
- Location: Codes/MacOS_ARM_MPI
- Usage: Run using the mpirun command, suitable for clusters with multiple nodes.
- Thread-Based Parallelization:
- Location: Codes/MacOS_ARM_OpenMP
- Usage: Runs on a single computer with multiple cores.
- Configuration: The number of threads will be equal to the number of modes defined in input_in.txt using the Modes parameter.
In the example “N10_TESLACavityLong,” the azimuthal modes for calculations are specified in the input_in.txt file via the parameter “Modes.”
Modes=0 means that only the monopole mode (m=0) will be calculated. Modes=0 1 means that both monopole and dipole modes will be calculated.
The calculation of each mode itself is not parallelized; however, different modes can be calculated in parallel. This means that:
In the first case (Modes=0), you should use “mpirun -np 1” or simply run the code without the mpirun command. In the second case (Modes=0 1), you can use a maximum of two processors with the command “mpirun -np 2.”
For rectangular geometries, where typically 30-100 modes are needed, parallelization can be beneficial.
For rotationally symmetric modes, the ECHOz2 code can be used. This code calculates only one mode at a time, but the computation is parallelized with threads/OpenMP, allowing multiple processors to work in parallel for a single mode calculation. ECHOz2 includes a GUI; however, there is currently no macOS version available. If you have Parallels and install Windows ARM, the ARM version of ECHOz2 runs efficiently on a Mac.