From 96914a962bd720632454952dffdd966c675e03b7 Mon Sep 17 00:00:00 2001 From: Robert Carson Date: Sun, 14 Jul 2024 12:56:32 -0700 Subject: [PATCH] UMAT fixes for Intel LLVM builds --- src/mechanics_umat.cpp | 2 +- src/umat_tests/umat.cxx | 2 +- src/umat_tests/userumat.cxx | 6 +++--- src/umat_tests/userumat.h | 2 +- src/userumat.h | 5 ++++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mechanics_umat.cpp b/src/mechanics_umat.cpp index 10940d5..5bfffec 100644 --- a/src/mechanics_umat.cpp +++ b/src/mechanics_umat.cpp @@ -532,7 +532,7 @@ void AbaqusUmatModel::ModelSetup(const int nqpts, const int nelems, const int sp // call c++ wrapper of umat routine - umat(&stress[0], &statev[0], &ddsdde[0], &sse, &spd, &scd, &rpl, + umat_call(&stress[0], &statev[0], &ddsdde[0], &sse, &spd, &scd, &rpl, ddsdt, drplde, &drpldt, &stran[0], &dstran[0], time, &deltaTime, &tempk, &dtemp, &predef, &dpred, &cmname, &ndi, &nshr, &ntens, &nstatv, &props[0], &nprops, &coords[0], diff --git a/src/umat_tests/umat.cxx b/src/umat_tests/umat.cxx index 36fc688..466067a 100644 --- a/src/umat_tests/umat.cxx +++ b/src/umat_tests/umat.cxx @@ -11,7 +11,7 @@ #ifdef WIN32 #define UMAT_API __declspec(dllexport) -#elif defined(__clang__) +#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER) #define UMAT_API extern "C" #define UMAT umat #else diff --git a/src/umat_tests/userumat.cxx b/src/umat_tests/userumat.cxx index 4bc7559..cdc7e48 100755 --- a/src/umat_tests/userumat.cxx +++ b/src/umat_tests/userumat.cxx @@ -14,7 +14,7 @@ extern "C" { #ifdef WIN32 #define UMAT_API __declspec(dllexport) -#elif defined(__clang__) +#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER) #define UMAT_API #define UMAT umat #else @@ -22,7 +22,7 @@ extern "C" { #define UMAT umat_ #endif - // A fortran function defined in umat.f + // A fortran function defined in umat.f void UMAT(real8 *stress, real8 *statev, real8 *ddsdde, real8 *sse, real8 *spd, real8 *scd, real8 *rpl, real8 *ddsdt, real8 *drplde, real8 *drpldt, @@ -36,7 +36,7 @@ extern "C" { // The C entry point function for my umat UMAT_API void - umat(real8 *stress, real8 *statev, real8 *ddsdde, + umat_call(real8 *stress, real8 *statev, real8 *ddsdde, real8 *sse, real8 *spd, real8 *scd, real8 *rpl, real8 *ddsdt, real8 *drplde, real8 *drpldt, real8 *stran, real8 *dstran, real8 *time, diff --git a/src/umat_tests/userumat.h b/src/umat_tests/userumat.h index a26d361..13b671c 100644 --- a/src/umat_tests/userumat.h +++ b/src/umat_tests/userumat.h @@ -41,7 +41,7 @@ extern "C" { int *layer, int *kspt, int *kstep, int *kinc); // The C entry point function for my umat UMAT_API void - umat(real8 *stress, real8 *statev, real8 *ddsdde, + umat_call(real8 *stress, real8 *statev, real8 *ddsdde, real8 *sse, real8 *spd, real8 *scd, real8 *rpl, real8 *ddsdt, real8 *drplde, real8 *drpldt, real8 *stran, real8 *dstran, real8 *time, diff --git a/src/userumat.h b/src/userumat.h index 172e904..f21b104 100644 --- a/src/userumat.h +++ b/src/userumat.h @@ -16,6 +16,9 @@ extern "C" { #ifdef WIN32 #define UMAT_API __declspec(dllexport) +#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER) +#define UMAT_API +#define UMAT_FUNC umat #else #define UMAT_API #define UMAT_FUNC umat_ @@ -35,7 +38,7 @@ extern "C" { // The C entry point function for my umat UMAT_API void - umat(real8 *stress, real8 *statev, real8 *ddsdde, + umat_call(real8 *stress, real8 *statev, real8 *ddsdde, real8 *sse, real8 *spd, real8 *scd, real8 *rpl, real8 *ddsdt, real8 *drplde, real8 *drpldt, real8 *stran, real8 *dstran, real8 *time,