I am trying to develop a USER300 user element in Ansys 2025R2.
While setting up the programming environment required to compile and develop, I've run into an issue where the Fortran compiler hangs indefinitely without providing any feedback or error logs.
My initial plan was to successfully compile an existing example before writing my own developments. Below is a step-by-step summary of my environment setup and build process based on my findings. I would highly appreciate it if someone could review this and help me identify what might be going wrong.
Environment Setup & Specifications
- Ansys Version: 2025R2
- Target Directory:
C:\Program Files\ANSYS Inc\v252\ansys\custom\user\winx64
- Compiler Note: Currently, the legacy Fortran compiler
ifort is required. The latest Intel ifx compiler is not yet supported for this workflow.
1. Microsoft Visual Studio Build Tools 2022
2. Intel oneAPI Base Toolkit (v2023.2.0)
3. Intel oneAPI HPC Toolkit (v2023.2.0)
Working Directory Configuration
Following the guidelines inside ANSUSERSHARED.bat, I have placed my USER300 source files alongside the following mandatory batch files and configuration files in my local project directory:
ANSUSERSHARED.bat
ANSCUST.BAT
ANSUPF.bat
ansysex.def
ansys.lrf
app.manifest
set_revn.bat
Step-by-Step DLL Build Process
Step 1: Open the Environment Prompt
I initialize the command prompt using the dedicated shortcut to ensure ifort.exe and link.exe environment variables are properly mapped:
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Intel oneAPI 2023\Intel oneAPI command prompt for Intel 64 for Visual Studio 2022.lnk"
Step 2: Navigate to the Working Directory
Step 3: Execute the Build Script
- .\ANSUSERSHARED.bat
- Expected behavior: The script should compile all source files (.F, .c, .cpp) present in the directory into .obj files.
Step 4: Specify the Feature
- When prompted with "Enter a user-programmable feature source filename:", I input: userelem
Step 5: Post-Build Verification
- Once successful, the script should output: "UserElemLib.dll (userelem) has been successfully built". I will then point Ansys to the DLL using the ANS_USER_PATH environment variable.
The Problem
The build sequence completely hangs immediately after executing Step 3 (.\ANSUSERSHARED.bat). The terminal processes endlessly, never finishes compiling, and does not yield any error messages or standard output logs to indicate what it is stuck on.
Has anyone successfully built custom elements for 2025R2 using this toolchain combo? If you have experienced this infinite compilation loop or know a workaround, your help would be greatly appreciated!
Thanks and regards,
Jan