Skip to content

Building and Running with EGADSLite CUDA

Cameron Smith edited this page Feb 16, 2022 · 5 revisions

environment

For SCOREC RHEL7 systems

module load gcc mpich cmake cuda/10.2

build libmeshb

git clone git@github.com:LoicMarechal/libMeshb.git
cmake -S ./libMeshb -B buildLibMeshb -DCMAKE_C_COMPILER=gcc -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_INSTALL_PREFIX=$PWD/buildLibMeshb/install
cmake --build buildLibMeshb --target install -j8

build egadslite-cuda

git clone git@github.com:SCOREC/egadsliteCuda.git 
cmake -S ./egadsliteCuda -B buildEGLcuda -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_INSTALL_PREFIX=$PWD/buildEGLcuda/install
cmake --build buildEGLcuda --target install -j8

build omega_h

git clone -b cws/egadsLiteCuda git@github.com:SCOREC/omega_h.git
cmake -S omega_h -B buildOmegah \
-DCMAKE_INSTALL_PREFIX=$PWD/buildOmegah/install \
-DCMAKE_PREFIX_PATH="$PWD/buildLibMeshb/install;$PWD/buildEGLcuda/install" \
-DBUILD_SHARED_LIBS=off \
-DOmega_h_USE_MPI=off \
-DOmega_h_USE_CUDA=on \
-DCMAKE_CUDA_HOST_COMPILER=g++ \
-DCMAKE_CUDA_ARCHITECTURES=75 \
-DOmega_h_USE_libMeshb=on \
-DBUILD_TESTING=ON \
-DOmega_h_USE_EGADSlite=on
cmake --build buildOmegah -j8

run cone-cone case

git clone git@github.com:UGAWG/adapt-benchmarks.git
cd adapt-benchmarks/cone-cone
../../buildOmegah/src/egads_lite_adapt_test --model cone-cone.step cone-cone.meshb out.meshb

output

reading in cone-cone.meshb
computing metric tags
limited gradation in 3 steps
computing minimum quality
reading in cone-cone.step
allocating new context
allocating new strings
copying strings
have new context
CUDA Error: invalid argument, in '/space/cwsmith/testOmegahEgads/egadsliteCuda/lite/liteBase.c', line 373
CUDA Error: invalid argument, in '/space/cwsmith/testOmegahEgads/egadsliteCuda/lite/liteBase.c', line 373
 EGADS Error: Not a EGADS Lite file!
assertion nbodies == 1 failed at /space/cwsmith/testOmegahEgads/omega_h/src/Omega_h_egads_lite.cpp +96
Aborted (core dumped)

failing in the call to EG_open(&eg->context);

https://github.com/SCOREC/omega_h/blob/1e01733d7e3892bb17339ba50310b98230c54a26/src/Omega_h_egads_lite.cpp#L86

which calls the EG_SET_CNTXT macro:

https://github.com/SCOREC/egadsliteCuda/blob/9b781d7f5f11437a01bf54af7e69db5d6b17e885/lite/liteBase.c#L373

where the EG_SET_CNTXT macro is define here:

https://github.com/SCOREC/egadsliteCuda/blob/9b781d7f5f11437a01bf54af7e69db5d6b17e885/lite/liteDevice.h#L74-L104

Clone this wiki locally