I'm using Marc 2020 and have been trying to implement user subroutines, for which I've installed Microsoft Visual Studio 2017 and Intel Fortran Compiler via Intel's oneAPI toolkits. However, I haven't been able to properly run the program with subroutines (have been trying some of the demo examples), the latest issue being:
LINK : fatal error LNK1181: cannot open input file 'C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\..\mkl\lib\intel64\mkl_intel_ilp64.lib'
Environment variables have been properly set using setvars.bat from oneAPI. However, I see that Intel paths set in Marc's include_win64.bat are wrong, but can't edit them.
I don't know if this will still work for the revision of the software you are using. I was having a similar experience with Marc 2022.1.
However, I was able to get the Fortran Subroutines running following these instructions precisely:
Install Marc 2022.1
Install Microsoft Visual Studio 2019 - Must be installed prior to Intel oneAPI, also must include Desktop development with C++ for Intel oneAPI Fortran to work
Install Intel oneAPI Base Kit - Must include Intel oneAPI Math kernel Library (MKL)
Install Intel oneAPI HPC Kit - Must include MPI Libraries and Fortran Compiler for the install
I use VS 2019 with Inter OneAPI Base Kit + HPC Kit. However, I can only access Marc 2020 and cannot upgrade to 2022. I have an issue similar to @Eduardo Montalto. In addition to the "LINK: fatal error LNK1181" error, I also get an ifort warning:
ifort: command line warning #10434: option '/integer_size' use with underscore is deprecated; use '/integer-size' instead
I created an environment variable to call the run_marc.bat file and added the file path to the Path user variable so I could run it from the OneAPI framework. I got an "unrecognized internal or external command" error when using the run_marc command before doing this.
I then start by opening the cmd prmt for intel 64 VS 2019 to use the correct compiler.
In the cmd prmt, I move to the directory with the test input file: e2x4.dat and the user subroutine: u2x4.f (I took both files from the marc demo files) and used the run_marc command with the input parameter:
[<some directory>] >run_marc -j e2x4 -u u2x4
I am attaching the resulting .log file for more information.
I ended up contacting support, and they sent me a patch for the include_64.bat ("C:\Program Files\MSC.Software\Marc\2020.1.0\marc2020.1\tools\include_win64.bat"). However, this didn't work because the patch was meant for Marc 2020.1 and I was running Marc 2020.0. I was told then to upgrade to Marc 2021.4 (newest version at the time) and that fixed the problem. I recommend contacting support to see if you can get a similar patch. And if you don't have access to newer versions, you might still be able to update to the newest 2020 version.