Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加nvidia-hpc-sdk工具链支持 #2327

Closed
xiangyi-wang opened this issue Apr 29, 2022 · 7 comments
Closed

添加nvidia-hpc-sdk工具链支持 #2327

xiangyi-wang opened this issue Apr 29, 2022 · 7 comments

Comments

@xiangyi-wang
Copy link

xiangyi-wang commented Apr 29, 2022

Is your feature request related to a problem? Please describe.

添加nvidia-hpc-sdk工具链支持(https://developer.nvidia.cn/nvidia-hpc-sdk-downloads)

Describe the solution you'd like

可以自动识别nvidia-hpc-sdk工具链

Describe alternatives you've considered

No response

Additional context

No response

@waruqi waruqi added this to the v2.6.6 milestone May 1, 2022
@waruqi
Copy link
Member

waruqi commented May 1, 2022

dev 支持了,更新到 xmake update dev

目前支持 nvc/nvc++/nvfortran

$ xmake f --toolchain=cuda -c
$ xmake -rv
[ 25%]: ccache compiling.release src/main.f90
/usr/bin/ccache /opt/nvidia/hpc_sdk/Linux_x86_64/22.3/compilers/bin/nvfortran -c -m64 -O3 -o build/.objs/test/linux/x86_64/release/src/main.f90.o src/main.f90
[ 50%]: linking.release test
/opt/nvidia/hpc_sdk/Linux_x86_64/22.3/compilers/bin/nvfortran -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/src/main.f90.o -m64 -s
[100%]: build ok!
$ xmake f --toolchain=cuda -c
$ xmake -rv
[ 25%]: ccache compiling.release src/main.cpp
/usr/bin/ccache /opt/nvidia/hpc_sdk/Linux_x86_64/22.3/compilers/bin/nvc++ -c -m64 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -o build/.objs/test/linux/x86_64/release/src/main.cpp.o src/main.cpp
[ 50%]: linking.release test
/opt/nvidia/hpc_sdk/Linux_x86_64/22.3/compilers/bin/nvc++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/src/main.cpp.o -m64 -s
[100%]: build ok!

@waruqi waruqi closed this as completed May 1, 2022
@xiangyi-wang
Copy link
Author

xiangyi-wang commented May 3, 2022

感谢这么快就支持了,不过 我更新到dev后还是有点问题,如果不设置fc,直接执行 xmake f --toolchain=cuda -c仍然使用的gfortran,设置fc后可以看到识别到nvfortran了,但是不识别fc设置的nvfortran
image

image

@waruqi
Copy link
Member

waruqi commented May 3, 2022

我这里可以,确认更新到最新 dev

@xiangyi-wang
Copy link
Author

xiangyi-wang commented May 3, 2022

除了执行xmake update dev还需要其他操作吗 版本好像还是之前的, 怎么确认更新到dev了··

image

@xiangyi-wang
Copy link
Author

刚试了下 从vscode插件切换工具链成功过了
image

@waruqi
Copy link
Member

waruqi commented May 3, 2022

source ~/.xmake/profile

或者重新开下终端

@xiangyi-wang
Copy link
Author

可以了 谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants