Skip to content

Conversation

@rtburns-jpl
Copy link
Member

This speeds up compilation, and brings it closer in line with the CPU port
Now working with .cpp files and pybind11 module

setup.py step no longer needed
@lijun99
Copy link
Contributor

lijun99 commented Nov 16, 2022

Thanks, @rtburns-jpl ! Looks good to me. I understand the changes will make interfacing with python easier.
BTW, maybe we should abandon the Makefile, and use a CMakeLists.txt.standalone instead, such as,
https://github.com/lijun99/cuAmpcor/blob/main/CMakeLists.txt

@rtburns-jpl
Copy link
Member Author

For sure, I like CMake much better. I wasn't sure where to put a standalone CMakeLists.txt since there is already the project's CMakeLists.txt in this directory, but I suppose we could either put a standalone one in src/, or figure out how to make the existing one work standalone as well. For now, I think I'll merge this, so that we have at least something working.

@sssangha
Copy link
Contributor

sssangha commented Dec 20, 2022

@rtburns-jpl , I was able to get this setup on my end, but encounter a bug I'm not sure how to address. Could you please advise? Thanks:

(pyampcor) [ssangha@trappist merged]$ cuDenseOffsets.py -r SLC/20221004/20221004.slc.full -s SLC/20221016/20221016.slc.full --outprefix ./20151120_20151214/offset --ww 64 --wh 64 --oo 32 --kw 300 --kh 100 --nwac 32 --nwdc 1 --sw 20 --sh 20 --gpuid 2
This is the Open Source version of ISCE.
Some of the workflows depend on a separate licensed package.
To obtain the licensed package, please make a request for ISCE
through the website: https://download.jpl.nasa.gov/ops/request/index.cfm.
Alternatively, if you are a member, or can become a member of WinSAR
you may be able to obtain access to a version of the licensed sofware at
https://winsar.unavco.org/software/isce
./20151120_20151214/offset
API open (R): /u/trappist-r0/ssangha/CA/A064/merged/SLC/20221016/20221016.slc.full
API open (R): /u/trappist-r0/ssangha/CA/A064/merged/SLC/20221004/20221004.slc.full
deramp method (0 for magnitude, 1 for complex): 0
image length: 4178
image width: 21577
the number of windows: 40 by 71
window size for cross-correlation: 64 by 64
initial search range: 20 by 20
the first pixel in reference image is: (20, 20)
search step: 100 by 300
correlation surface zoom-in window size: 16
correlation surface oversampling factor: 32
offsetfield: ./20151120_20151214/offset.bip
gross offsetfield: ./20151120_20151214/offset_gross.bip
snr: ./20151120_20151214/offset_snr.bip
cov: ./20151120_20151214/offset_cov.bip
Set constant grossOffset (0, 0)
redo: False
Running PyCuAmpcor
gpuDeviceInit() Device 2 is not a valid GPU device.

@lijun99
Copy link
Contributor

lijun99 commented Dec 20, 2022

"--gpuid 2" is to choose the gpu device with id=2 if you have multiple gpus. Please use "nvidia-smi" to check the available gpus on your computer. If you only have one, please use "--gpuid 0" or simply neglect this setting (since gpuid=0 is the default setting).

@sssangha
Copy link
Contributor

Thanks @lijun99 , that part was an input error on my end! However after making the suggested commandline adjustment, I encounter a new error along the same part of the routine:

Total number of windows (azimuth x range): 40 x 71
to be processed in the number of chunks: 40 x 3
Processing chunks (1, x) - (4, x) out of 40
cuArraysCopy.cu(141) : CUDA error : cuArraysCopyToBatchAbsWithOffset_kernel : (209) no kernel image is available for execution on the device.

I have the impression that the parameters I specified in my Makefile may not have been appropriate.

For reference, here is my available GPU:

(pyampcor) [ssangha@trappist merged]$ nvidia-smi
Tue Dec 20 16:41:17 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.39.01 Driver Version: 510.39.01 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA A100 80G... Off | 00000000:41:00.0 Off | 0 |
| N/A 31C P0 42W / 300W | 0MiB / 81920MiB | 0% Default |
| | | Disabled |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

Could you perhaps advise on what may be the issue here, be it may on the Makefile level or otherwise? Thanks again!

@rtburns-jpl
Copy link
Member Author

I think you just need to add the appropriate compute version for your device here

-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_60,code=sm_60 \

@rtburns-jpl rtburns-jpl merged commit e7b506d into isce-framework:main Jan 4, 2023
@rtburns-jpl rtburns-jpl deleted the pycuampcor-cpp-files branch January 4, 2023 18:21
lijun99 pushed a commit to lijun99/isce2 that referenced this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants