라벨이 Server인 게시물 표시

nvidia- smi has failed because it couldn't communicate with the nvidia driver 오류 해결 방법 정리

이미지
우분투 서버에서 NVIDIA GPU 4060 설치하다 맞이한 오류입니다. 한동안 오류에서 벗어나 있었는데 지난 밤을 꼬박 세웠네요. 1.  설치된 라이브러리 지우고 다시 설치 $ sudo apt remove nvidia* $ sudo apt autoremove $ sudo reboot 재부팅 후 다시 접속 후 $ ubuntu-drivers devices 전 추천이 535로 나오더군요 $ sudo apt install nvidia-driver-535 역시나 안되더군요. 전 지우는 방법만 달리해서 한 15번 정도 반복했던거 같습니다. 2.  GCC 및 G++ 지우고 다시 설치 $ sudo apt remove gcc $ sudo apt remove g++ $ sudo apt autoremove $ sudo reboot 재부팅 후 다시 접속합니다. $ sudo apt install gcc $ sudo apt install g++ 3. CMOS 에서 SECURE BOOT 비활성화 전 이 방법으로 하니 되더군요. 전원을 끄고 다시 전원을 켠 후 바로 F1 과 Del 키를 눌렀어요. 어느 키가 CMOS 진입키 인지 모르니까요. 들어가서 부팅 쪽 메뉴에 있더라구요. 요즘은 기본으로 활성화 되어 있으니 그걸 찾아서 Disable 했어요. 이게 GPU 기기를 인증 안된걸로 인식하여 차단되어서 그렇다고 하더라구요. $ sudo apt remove nvidia* $ sudo apt autoremove $ sudo reboot 재부팅 후 다시 접속합니다. $ sudo apt install nvidia-driver-535 $ nvidia-smi 오랜만에 결과가 나왔네요.

Server Side Swift 에서 Memory 해제가 안되어 무한 증가할 때 조치 법

몽고디비에 자료를 가져와서 가공을 한 뒤에 다시 몽고디비에 자료를 저장하는 프로그램을 서버용 스위프트로 작성하였다. 하지만 아래와 같이 작성했을 때는 실행을 하면 메모리 해제가 안되어 무한증식하는 상태가 발생되었다. import Foundation import MongoKitten do {     let mongo = try Server("mongodb://localhost:27017")     let db = mongo["db"]     if mongo.isConnected { print("connected successfully to server") }     let collection = db["collection"]     let docu: Document = []     let query = Query(docu)     var textLog = TextLog()     do {         for entity in try collection.find(query) {             trainLocations.forEach {                 textLog.write("\($0.date.Format(into: "yyyy-MM-dd HH:mm:ss Z")) \n")             }         }  //end_for entity in try collection.find(query)     } catch { print("error -> \(error.localizedDescription)") }     try mongo.disconnect() } catch { print("error -> \(error.localizedDescription)") } 이를 해결하기 위해 함수를 포인터를 사용하는 등 별짓을 다했지만 역시나 무한증식은