I am trying to couple Abaqus and precice library, where I have written Abaqus user subroutine: coupling.f90
system: cluster (super computer); precice v2.4.0 (installed via spack); mpi: openmpi
I am using fortran module from precice: precice.f90, this on compilation with gfortran -c precice.f90 gives me precice.mod and precice.o files.
In order to use precice functions inside the abaqus subroutine, a shared library file is necessary to abaqus, created by linking coupling.f90 and precice.mod and libprecice.
I am using the following commands to create the shared library libstandard.so (all files are in same folder):
F03 ?= gfortran
all: libstandardU.so
libstandardU.so: coupling.f90
$(F03) -shared -fPIC $^ -o $@ -I. $(shell pkg-config --libs libprecice)
then I ran:
abaqus job=Read.inp user=coupling.f90 ask=off int
I am still getting the error as undefined symbol precice:
Begin Abaqus/Standard Analysis
Mon 05 Aug 2024 03:56:08 PM CEST
Run standard
/cluster/SIMULIA/EstProducts/2024/linux_a64/code/bin/standard: symbol lookup error: /tmp/kandekac_Read_552606/libstandardU.so: undefined symbol: precice_
My code snippet to call the precice function inside the abaqus subroutine is:
USE precice
IMPLICIT NONE
CHARACTER(50):: config, participantName, meshName
CHARACTER(50):: writeInitialData, readItCheckp, writeItCheckp
CHARACTER(50):: writeDataName
CHARACTER(50):: node_coor_data_name
CHARACTER(50):: spall_thick_data_name
INTEGER :: ongoing,dimensions,meshID,bool,numberOfVertices
INTEGER :: writeDataID, node_coor_ID, spall_thick_ID
REAL(8):: precice_dt, solver_dt
I am not sure, why it does not link precice?
Can anyone help me with this linking problem?